@elementor/editor-props 3.35.0-353 → 3.35.0-355
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 +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/utils/validate-prop-value.ts +8 -0
package/dist/index.d.mts
CHANGED
|
@@ -6167,6 +6167,11 @@ declare const Schema: {
|
|
|
6167
6167
|
nonConfigurablePropKeys: readonly string[];
|
|
6168
6168
|
configurableKeys: typeof configurableKeys;
|
|
6169
6169
|
validatePropValue: (schema: PropType, value: unknown) => {
|
|
6170
|
+
valid: boolean;
|
|
6171
|
+
errors: never[];
|
|
6172
|
+
errorMessages: never[];
|
|
6173
|
+
jsonSchema: string;
|
|
6174
|
+
} | {
|
|
6170
6175
|
valid: boolean;
|
|
6171
6176
|
errors: jsonschema.ValidationError[];
|
|
6172
6177
|
errorMessages: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -6167,6 +6167,11 @@ declare const Schema: {
|
|
|
6167
6167
|
nonConfigurablePropKeys: readonly string[];
|
|
6168
6168
|
configurableKeys: typeof configurableKeys;
|
|
6169
6169
|
validatePropValue: (schema: PropType, value: unknown) => {
|
|
6170
|
+
valid: boolean;
|
|
6171
|
+
errors: never[];
|
|
6172
|
+
errorMessages: never[];
|
|
6173
|
+
jsonSchema: string;
|
|
6174
|
+
} | {
|
|
6170
6175
|
valid: boolean;
|
|
6171
6176
|
errors: jsonschema.ValidationError[];
|
|
6172
6177
|
errorMessages: string;
|
package/dist/index.js
CHANGED
|
@@ -984,6 +984,14 @@ function formatDetailedErrors(errors, indent = "") {
|
|
|
984
984
|
}
|
|
985
985
|
var validatePropValue = (schema, value) => {
|
|
986
986
|
const jsonSchema = propTypeToJsonSchema(schema);
|
|
987
|
+
if (value === null) {
|
|
988
|
+
return {
|
|
989
|
+
valid: true,
|
|
990
|
+
errors: [],
|
|
991
|
+
errorMessages: [],
|
|
992
|
+
jsonSchema: JSON.stringify(propTypeToJsonSchema(schema))
|
|
993
|
+
};
|
|
994
|
+
}
|
|
987
995
|
const result = (0, import_jsonschema.validate)(value, jsonSchema);
|
|
988
996
|
const detailedErrors = result.errors.map(processValidationError);
|
|
989
997
|
return {
|
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/validate-prop-value.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';\nimport { validatePropValue } from './utils/validate-prop-value';\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\tvalidatePropValue,\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', 'ch' ] ),\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\ntype PropConverter = ( value: unknown ) => PropValue;\n\ntype Options = {\n\tforceKey?: string;\n\ttransformers?: Record< string, PropConverter >;\n};\n\nconst defaultOptions: Options = {\n\ttransformers: {},\n};\n\nexport const adjustLlmPropValueSchema = (\n\tvalue: Readonly< PropValue >,\n\t{ transformers = {}, forceKey = undefined }: Options = defaultOptions\n): PropValue => {\n\tconst clone = structuredClone( value );\n\tif ( typeof clone !== 'object' || clone === null ) {\n\t\treturn null;\n\t}\n\t// Check for transformable types\n\tif ( Array.isArray( clone ) ) {\n\t\treturn clone.map( ( item ) => adjustLlmPropValueSchema( item, { forceKey, transformers } ) ) as PropValue;\n\t}\n\tconst transformablePropValue = clone as TransformablePropValue< string >;\n\tif ( forceKey ) {\n\t\ttransformablePropValue.$$type = forceKey;\n\t}\n\n\t// fix by type - Size is the only case where we have a non-valid structure\n\tswitch ( transformablePropValue.$$type ) {\n\t\tcase 'size': {\n\t\t\tconst { value: rawSizePropValue } = transformablePropValue as TransformablePropValue<\n\t\t\t\tstring,\n\t\t\t\t{ size: StringPropValue | NumberPropValue; unit: StringPropValue }\n\t\t\t>;\n\t\t\tconst unit =\n\t\t\t\ttypeof rawSizePropValue.unit === 'string'\n\t\t\t\t\t? rawSizePropValue.unit\n\t\t\t\t\t: ensureNotNull( stringPropTypeUtil.extract( rawSizePropValue.unit ), 'px' );\n\t\t\tconst size =\n\t\t\t\ttypeof rawSizePropValue.size === 'string' || typeof rawSizePropValue.size === 'number'\n\t\t\t\t\t? rawSizePropValue.size\n\t\t\t\t\t: ensureNotNull(\n\t\t\t\t\t\t\tstringPropTypeUtil.extract( rawSizePropValue.size ),\n\t\t\t\t\t\t\tnumberPropTypeUtil.extract( rawSizePropValue.size )\n\t\t\t\t\t );\n\t\t\treturn {\n\t\t\t\t$$type: 'size',\n\t\t\t\tvalue: {\n\t\t\t\t\tunit,\n\t\t\t\t\tsize,\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\tdefault:\n\t\t\tconst transformer = transformers?.[ transformablePropValue.$$type ];\n\t\t\tif ( transformer ) {\n\t\t\t\treturn transformer( transformablePropValue.value );\n\t\t\t}\n\t}\n\n\tif ( typeof transformablePropValue.value === 'object' ) {\n\t\tif ( Array.isArray( transformablePropValue.value ) ) {\n\t\t\ttransformablePropValue.value = adjustLlmPropValueSchema( transformablePropValue.value, {\n\t\t\t\ttransformers,\n\t\t\t} ) as PropValue[];\n\t\t} else {\n\t\t\tconst { value: objectValue } = transformablePropValue as ObjectPropValue;\n\t\t\tconst clonedObject = clone as ObjectPropValue;\n\t\t\tclonedObject.value = {} as ( typeof clonedObject )[ 'value' ]; // Record< string, PropValue >;\n\t\t\tObject.entries( objectValue ).forEach( ( [ key, childProp ] ) => {\n\t\t\t\tclonedObject.value[ key ] = adjustLlmPropValueSchema( childProp as PropValue, { transformers } );\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// Add example from initial_value if it exists\n\tif ( propType.initial_value !== null && propType.initial_value !== undefined ) {\n\t\tschema.examples = [ propType.initial_value ];\n\t}\n\n\t// Handle different kinds of prop types\n\tswitch ( propType.kind ) {\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\nfunction convertPlainPropType(\n\tpropType: PropType & { key: string; kind: string },\n\tbaseSchema: JsonSchema7\n): JsonSchema7 {\n\tconst schema = { ...baseSchema };\n\n\t// This could happen when data is malformed due to a bug, added this as a safeguard.\n\tif ( ! Object.hasOwn( propType, 'kind' ) ) {\n\t\tthrow new Error( `PropType kind is undefined for propType with key: ${ propType.key ?? '[unknown key]' }` );\n\t}\n\n\tconst enumValues = ( propType.settings?.enum || [] ) as string[] | number[];\n\n\tswitch ( propType.kind ) {\n\t\tcase 'string':\n\t\tcase 'number':\n\t\tcase 'boolean':\n\t\t\treturn {\n\t\t\t\t...schema,\n\t\t\t\ttype: 'object',\n\t\t\t\tproperties: {\n\t\t\t\t\t$$type: {\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tconst: propType.key ?? propType.kind,\n\t\t\t\t\t},\n\t\t\t\t\tvalue: {\n\t\t\t\t\t\ttype: propType.kind,\n\t\t\t\t\t\t...( enumValues.length > 0 ? { enum: enumValues } : {} ),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\trequired: [ '$$type', 'value' ],\n\t\t\t};\n\t\tdefault:\n\t\t\treturn {\n\t\t\t\t...schema,\n\t\t\t\ttype: 'object',\n\t\t\t\t$$type: propType.kind,\n\t\t\t\tvalue: {\n\t\t\t\t\ttype: propType.kind,\n\t\t\t\t},\n\t\t\t};\n\t}\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\tif ( typeKey === 'dynamic' || typeKey === 'overridable' ) {\n\t\t\tcontinue;\n\t\t}\n\t\tconst subSchema = convertPropTypeToJsonSchema( subPropType );\n\t\tschemas.push( subSchema );\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\tconst internalStructure: {\n\t\tproperties: {\n\t\t\t$$type: JsonSchema7;\n\t\t\tvalue: JsonSchema7;\n\t\t};\n\t} = {\n\t\tproperties: {\n\t\t\t$$type: {\n\t\t\t\ttype: 'string',\n\t\t\t\tconst: propType.key,\n\t\t\t},\n\t\t\tvalue: {\n\t\t\t\ttype: 'object',\n\t\t\t\tproperties: {} as Record< string, JsonSchema7 >,\n\t\t\t\tadditionalProperties: false,\n\t\t\t},\n\t\t},\n\t};\n\n\tconst required: string[] = [ '$$type', 'value' ];\n\tconst valueRequired: 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 = propTypeToJsonSchema( subPropType );\n\n\t\t// Check if this property is required\n\t\tif ( subPropType.settings?.required === true ) {\n\t\t\tvalueRequired.push( key );\n\t\t}\n\n\t\tif ( internalStructure.properties.value.properties ) {\n\t\t\tinternalStructure.properties.value.properties[ key ] = propSchema;\n\t\t}\n\t}\n\n\tschema.required = required;\n\tif ( valueRequired.length > 0 ) {\n\t\tinternalStructure.properties.value.required = valueRequired;\n\t}\n\n\treturn {\n\t\t...schema,\n\t\t...internalStructure,\n\t};\n}\n\nfunction convertArrayPropType( propType: PropType & { kind: 'array' }, baseSchema: JsonSchema7 ): JsonSchema7 {\n\tconst schema = structuredClone( baseSchema );\n\n\tschema.type = 'object';\n\tlet items: unknown;\n\n\tconst itemPropType = propType.item_prop_type;\n\n\tif ( itemPropType ) {\n\t\titems = convertPropTypeToJsonSchema( itemPropType );\n\t}\n\n\tschema.properties = {\n\t\t$$type: {\n\t\t\ttype: 'string',\n\t\t\tconst: propType.key,\n\t\t},\n\t\tvalue: {\n\t\t\ttype: 'array',\n\t\t\t...( items ? { items } : {} ),\n\t\t} as JsonSchema7,\n\t};\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 { validate, type ValidationError } from 'jsonschema';\n\nimport { type PropType } from '../types';\nimport { propTypeToJsonSchema } from './props-to-llm-schema';\n\n/**\n * Detailed error information with nested anyOf variant errors\n */\nexport interface DetailedValidationError {\n\tpath: ( string | number )[];\n\tmessage: string;\n\tschema?: unknown;\n\tinstance?: unknown;\n\tname: string;\n\t/**\n\t * If this was an anyOf failure, contains errors for each variant\n\t */\n\tvariants?: {\n\t\tdiscriminator: string;\n\t\terrors: DetailedValidationError[];\n\t}[];\n}\n\n/**\n * Recursively processes validation errors to provide detailed information about anyOf failures\n *\n * @param error The validation error to process\n */\nfunction processValidationError( error: ValidationError ): DetailedValidationError {\n\tconst detailed: DetailedValidationError = {\n\t\tpath: error.path,\n\t\tmessage: error.message,\n\t\tschema: error.schema,\n\t\tinstance: error.instance,\n\t\tname: error.name,\n\t};\n\n\t// If this is an anyOf error, re-validate against each variant to get nested errors\n\tif ( error.name === 'anyOf' && error.schema && typeof error.schema === 'object' && 'anyOf' in error.schema ) {\n\t\tconst anyOfSchema = error.schema as { anyOf?: unknown[] };\n\t\tconst variants = ( anyOfSchema.anyOf || [] ).map( ( variantSchema, idx ) => {\n\t\t\t// Re-validate the instance against this specific variant\n\t\t\tconst variantResult = validate( error.instance, variantSchema );\n\n\t\t\t// Get discriminator from schema if available\n\t\t\tlet discriminator = `variant-${ idx }`;\n\t\t\tif (\n\t\t\t\tvariantSchema &&\n\t\t\t\ttypeof variantSchema === 'object' &&\n\t\t\t\t'properties' in variantSchema &&\n\t\t\t\tvariantSchema.properties &&\n\t\t\t\ttypeof variantSchema.properties === 'object' &&\n\t\t\t\t'$$type' in variantSchema.properties\n\t\t\t) {\n\t\t\t\tconst typeProperty = variantSchema.properties.$$type;\n\t\t\t\tif (\n\t\t\t\t\ttypeProperty &&\n\t\t\t\t\ttypeof typeProperty === 'object' &&\n\t\t\t\t\t'const' in typeProperty &&\n\t\t\t\t\ttypeof typeProperty.const === 'string'\n\t\t\t\t) {\n\t\t\t\t\tdiscriminator = typeProperty.const;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tdiscriminator,\n\t\t\t\terrors: variantResult.errors.map( processValidationError ),\n\t\t\t};\n\t\t} );\n\n\t\tdetailed.variants = variants;\n\t}\n\n\treturn detailed;\n}\n\n/**\n * Formats detailed errors into a human-readable string\n * @param errors\n * @param indent\n */\nfunction formatDetailedErrors( errors: DetailedValidationError[], indent = '' ): string {\n\tconst lines: string[] = [];\n\n\tfor ( const error of errors ) {\n\t\tconst pathStr = error.path.length > 0 ? error.path.join( '.' ) : 'root';\n\t\tlines.push( `${ indent }Error at ${ pathStr }: ${ error.message }` );\n\n\t\tif ( error.variants && error.variants.length > 0 ) {\n\t\t\tlines.push( `${ indent } Tried ${ error.variants.length } variant(s):` );\n\t\t\tfor ( const variant of error.variants ) {\n\t\t\t\tlines.push( `${ indent } - ${ variant.discriminator }:` );\n\t\t\t\tif ( variant.errors.length === 0 ) {\n\t\t\t\t\tlines.push( `${ indent } (no errors - this variant matched!)` );\n\t\t\t\t} else {\n\t\t\t\t\tfor ( const nestedError of variant.errors ) {\n\t\t\t\t\t\tconst nestedPathStr = nestedError.path.length > 0 ? nestedError.path.join( '.' ) : 'root';\n\t\t\t\t\t\tlines.push( `${ indent } ${ nestedPathStr }: ${ nestedError.message }` );\n\n\t\t\t\t\t\t// Recursively format nested variant errors\n\t\t\t\t\t\tif ( nestedError.variants && nestedError.variants.length > 0 ) {\n\t\t\t\t\t\t\tlines.push( formatDetailedErrors( [ nestedError ], `${ indent } ` ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn lines.join( '\\n' );\n}\n\nexport const validatePropValue = ( schema: PropType, value: unknown ) => {\n\tconst jsonSchema = propTypeToJsonSchema( schema );\n\tconst result = validate( value, jsonSchema );\n\tconst detailedErrors = result.errors.map( processValidationError );\n\treturn {\n\t\tvalid: result.valid,\n\t\terrors: result.errors,\n\t\terrorMessages: formatDetailedErrors( detailedErrors ),\n\t\tjsonSchema: JSON.stringify( jsonSchema ),\n\t};\n};\n\n/**\n * Validates a prop value with detailed error reporting for anyOf failures\n *\n * This function provides enhanced error messages that show exactly which nested\n * properties failed validation in anyOf schemas, making debugging much easier.\n *\n * @param schema The PropType schema to validate against\n * @param value The value to validate\n * @return Validation result with detailed error information\n */\nexport const validatePropValueDetailed = ( schema: PropType, value: unknown ) => {\n\tconst jsonSchema = propTypeToJsonSchema( schema );\n\tconst result = validate( value, jsonSchema );\n\n\t// Process all errors to add detailed anyOf information\n\tconst detailedErrors = result.errors.map( processValidationError );\n\n\treturn {\n\t\tvalid: result.valid,\n\t\terrors: detailedErrors,\n\t\terrorMessages: detailedErrors.map( ( err ) => err.message ),\n\t\tformattedErrors: formatDetailedErrors( detailedErrors ),\n\t\tjsonSchema: JSON.stringify( jsonSchema ),\n\t};\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,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,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;;;A7D7BO,IAAM,SAAS;AAAA,EACrB;AAAA,EACA;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/validate-prop-value.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';\nimport { validatePropValue } from './utils/validate-prop-value';\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\tvalidatePropValue,\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', 'ch' ] ),\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\ntype PropConverter = ( value: unknown ) => PropValue;\n\ntype Options = {\n\tforceKey?: string;\n\ttransformers?: Record< string, PropConverter >;\n};\n\nconst defaultOptions: Options = {\n\ttransformers: {},\n};\n\nexport const adjustLlmPropValueSchema = (\n\tvalue: Readonly< PropValue >,\n\t{ transformers = {}, forceKey = undefined }: Options = defaultOptions\n): PropValue => {\n\tconst clone = structuredClone( value );\n\tif ( typeof clone !== 'object' || clone === null ) {\n\t\treturn null;\n\t}\n\t// Check for transformable types\n\tif ( Array.isArray( clone ) ) {\n\t\treturn clone.map( ( item ) => adjustLlmPropValueSchema( item, { forceKey, transformers } ) ) as PropValue;\n\t}\n\tconst transformablePropValue = clone as TransformablePropValue< string >;\n\tif ( forceKey ) {\n\t\ttransformablePropValue.$$type = forceKey;\n\t}\n\n\t// fix by type - Size is the only case where we have a non-valid structure\n\tswitch ( transformablePropValue.$$type ) {\n\t\tcase 'size': {\n\t\t\tconst { value: rawSizePropValue } = transformablePropValue as TransformablePropValue<\n\t\t\t\tstring,\n\t\t\t\t{ size: StringPropValue | NumberPropValue; unit: StringPropValue }\n\t\t\t>;\n\t\t\tconst unit =\n\t\t\t\ttypeof rawSizePropValue.unit === 'string'\n\t\t\t\t\t? rawSizePropValue.unit\n\t\t\t\t\t: ensureNotNull( stringPropTypeUtil.extract( rawSizePropValue.unit ), 'px' );\n\t\t\tconst size =\n\t\t\t\ttypeof rawSizePropValue.size === 'string' || typeof rawSizePropValue.size === 'number'\n\t\t\t\t\t? rawSizePropValue.size\n\t\t\t\t\t: ensureNotNull(\n\t\t\t\t\t\t\tstringPropTypeUtil.extract( rawSizePropValue.size ),\n\t\t\t\t\t\t\tnumberPropTypeUtil.extract( rawSizePropValue.size )\n\t\t\t\t\t );\n\t\t\treturn {\n\t\t\t\t$$type: 'size',\n\t\t\t\tvalue: {\n\t\t\t\t\tunit,\n\t\t\t\t\tsize,\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\tdefault:\n\t\t\tconst transformer = transformers?.[ transformablePropValue.$$type ];\n\t\t\tif ( transformer ) {\n\t\t\t\treturn transformer( transformablePropValue.value );\n\t\t\t}\n\t}\n\n\tif ( typeof transformablePropValue.value === 'object' ) {\n\t\tif ( Array.isArray( transformablePropValue.value ) ) {\n\t\t\ttransformablePropValue.value = adjustLlmPropValueSchema( transformablePropValue.value, {\n\t\t\t\ttransformers,\n\t\t\t} ) as PropValue[];\n\t\t} else {\n\t\t\tconst { value: objectValue } = transformablePropValue as ObjectPropValue;\n\t\t\tconst clonedObject = clone as ObjectPropValue;\n\t\t\tclonedObject.value = {} as ( typeof clonedObject )[ 'value' ]; // Record< string, PropValue >;\n\t\t\tObject.entries( objectValue ).forEach( ( [ key, childProp ] ) => {\n\t\t\t\tclonedObject.value[ key ] = adjustLlmPropValueSchema( childProp as PropValue, { transformers } );\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// Add example from initial_value if it exists\n\tif ( propType.initial_value !== null && propType.initial_value !== undefined ) {\n\t\tschema.examples = [ propType.initial_value ];\n\t}\n\n\t// Handle different kinds of prop types\n\tswitch ( propType.kind ) {\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\nfunction convertPlainPropType(\n\tpropType: PropType & { key: string; kind: string },\n\tbaseSchema: JsonSchema7\n): JsonSchema7 {\n\tconst schema = { ...baseSchema };\n\n\t// This could happen when data is malformed due to a bug, added this as a safeguard.\n\tif ( ! Object.hasOwn( propType, 'kind' ) ) {\n\t\tthrow new Error( `PropType kind is undefined for propType with key: ${ propType.key ?? '[unknown key]' }` );\n\t}\n\n\tconst enumValues = ( propType.settings?.enum || [] ) as string[] | number[];\n\n\tswitch ( propType.kind ) {\n\t\tcase 'string':\n\t\tcase 'number':\n\t\tcase 'boolean':\n\t\t\treturn {\n\t\t\t\t...schema,\n\t\t\t\ttype: 'object',\n\t\t\t\tproperties: {\n\t\t\t\t\t$$type: {\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tconst: propType.key ?? propType.kind,\n\t\t\t\t\t},\n\t\t\t\t\tvalue: {\n\t\t\t\t\t\ttype: propType.kind,\n\t\t\t\t\t\t...( enumValues.length > 0 ? { enum: enumValues } : {} ),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\trequired: [ '$$type', 'value' ],\n\t\t\t};\n\t\tdefault:\n\t\t\treturn {\n\t\t\t\t...schema,\n\t\t\t\ttype: 'object',\n\t\t\t\t$$type: propType.kind,\n\t\t\t\tvalue: {\n\t\t\t\t\ttype: propType.kind,\n\t\t\t\t},\n\t\t\t};\n\t}\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\tif ( typeKey === 'dynamic' || typeKey === 'overridable' ) {\n\t\t\tcontinue;\n\t\t}\n\t\tconst subSchema = convertPropTypeToJsonSchema( subPropType );\n\t\tschemas.push( subSchema );\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\tconst internalStructure: {\n\t\tproperties: {\n\t\t\t$$type: JsonSchema7;\n\t\t\tvalue: JsonSchema7;\n\t\t};\n\t} = {\n\t\tproperties: {\n\t\t\t$$type: {\n\t\t\t\ttype: 'string',\n\t\t\t\tconst: propType.key,\n\t\t\t},\n\t\t\tvalue: {\n\t\t\t\ttype: 'object',\n\t\t\t\tproperties: {} as Record< string, JsonSchema7 >,\n\t\t\t\tadditionalProperties: false,\n\t\t\t},\n\t\t},\n\t};\n\n\tconst required: string[] = [ '$$type', 'value' ];\n\tconst valueRequired: 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 = propTypeToJsonSchema( subPropType );\n\n\t\t// Check if this property is required\n\t\tif ( subPropType.settings?.required === true ) {\n\t\t\tvalueRequired.push( key );\n\t\t}\n\n\t\tif ( internalStructure.properties.value.properties ) {\n\t\t\tinternalStructure.properties.value.properties[ key ] = propSchema;\n\t\t}\n\t}\n\n\tschema.required = required;\n\tif ( valueRequired.length > 0 ) {\n\t\tinternalStructure.properties.value.required = valueRequired;\n\t}\n\n\treturn {\n\t\t...schema,\n\t\t...internalStructure,\n\t};\n}\n\nfunction convertArrayPropType( propType: PropType & { kind: 'array' }, baseSchema: JsonSchema7 ): JsonSchema7 {\n\tconst schema = structuredClone( baseSchema );\n\n\tschema.type = 'object';\n\tlet items: unknown;\n\n\tconst itemPropType = propType.item_prop_type;\n\n\tif ( itemPropType ) {\n\t\titems = convertPropTypeToJsonSchema( itemPropType );\n\t}\n\n\tschema.properties = {\n\t\t$$type: {\n\t\t\ttype: 'string',\n\t\t\tconst: propType.key,\n\t\t},\n\t\tvalue: {\n\t\t\ttype: 'array',\n\t\t\t...( items ? { items } : {} ),\n\t\t} as JsonSchema7,\n\t};\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 { validate, type ValidationError } from 'jsonschema';\n\nimport { type PropType } from '../types';\nimport { propTypeToJsonSchema } from './props-to-llm-schema';\n\n/**\n * Detailed error information with nested anyOf variant errors\n */\nexport interface DetailedValidationError {\n\tpath: ( string | number )[];\n\tmessage: string;\n\tschema?: unknown;\n\tinstance?: unknown;\n\tname: string;\n\t/**\n\t * If this was an anyOf failure, contains errors for each variant\n\t */\n\tvariants?: {\n\t\tdiscriminator: string;\n\t\terrors: DetailedValidationError[];\n\t}[];\n}\n\n/**\n * Recursively processes validation errors to provide detailed information about anyOf failures\n *\n * @param error The validation error to process\n */\nfunction processValidationError( error: ValidationError ): DetailedValidationError {\n\tconst detailed: DetailedValidationError = {\n\t\tpath: error.path,\n\t\tmessage: error.message,\n\t\tschema: error.schema,\n\t\tinstance: error.instance,\n\t\tname: error.name,\n\t};\n\n\t// If this is an anyOf error, re-validate against each variant to get nested errors\n\tif ( error.name === 'anyOf' && error.schema && typeof error.schema === 'object' && 'anyOf' in error.schema ) {\n\t\tconst anyOfSchema = error.schema as { anyOf?: unknown[] };\n\t\tconst variants = ( anyOfSchema.anyOf || [] ).map( ( variantSchema, idx ) => {\n\t\t\t// Re-validate the instance against this specific variant\n\t\t\tconst variantResult = validate( error.instance, variantSchema );\n\n\t\t\t// Get discriminator from schema if available\n\t\t\tlet discriminator = `variant-${ idx }`;\n\t\t\tif (\n\t\t\t\tvariantSchema &&\n\t\t\t\ttypeof variantSchema === 'object' &&\n\t\t\t\t'properties' in variantSchema &&\n\t\t\t\tvariantSchema.properties &&\n\t\t\t\ttypeof variantSchema.properties === 'object' &&\n\t\t\t\t'$$type' in variantSchema.properties\n\t\t\t) {\n\t\t\t\tconst typeProperty = variantSchema.properties.$$type;\n\t\t\t\tif (\n\t\t\t\t\ttypeProperty &&\n\t\t\t\t\ttypeof typeProperty === 'object' &&\n\t\t\t\t\t'const' in typeProperty &&\n\t\t\t\t\ttypeof typeProperty.const === 'string'\n\t\t\t\t) {\n\t\t\t\t\tdiscriminator = typeProperty.const;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tdiscriminator,\n\t\t\t\terrors: variantResult.errors.map( processValidationError ),\n\t\t\t};\n\t\t} );\n\n\t\tdetailed.variants = variants;\n\t}\n\n\treturn detailed;\n}\n\n/**\n * Formats detailed errors into a human-readable string\n * @param errors\n * @param indent\n */\nfunction formatDetailedErrors( errors: DetailedValidationError[], indent = '' ): string {\n\tconst lines: string[] = [];\n\n\tfor ( const error of errors ) {\n\t\tconst pathStr = error.path.length > 0 ? error.path.join( '.' ) : 'root';\n\t\tlines.push( `${ indent }Error at ${ pathStr }: ${ error.message }` );\n\n\t\tif ( error.variants && error.variants.length > 0 ) {\n\t\t\tlines.push( `${ indent } Tried ${ error.variants.length } variant(s):` );\n\t\t\tfor ( const variant of error.variants ) {\n\t\t\t\tlines.push( `${ indent } - ${ variant.discriminator }:` );\n\t\t\t\tif ( variant.errors.length === 0 ) {\n\t\t\t\t\tlines.push( `${ indent } (no errors - this variant matched!)` );\n\t\t\t\t} else {\n\t\t\t\t\tfor ( const nestedError of variant.errors ) {\n\t\t\t\t\t\tconst nestedPathStr = nestedError.path.length > 0 ? nestedError.path.join( '.' ) : 'root';\n\t\t\t\t\t\tlines.push( `${ indent } ${ nestedPathStr }: ${ nestedError.message }` );\n\n\t\t\t\t\t\t// Recursively format nested variant errors\n\t\t\t\t\t\tif ( nestedError.variants && nestedError.variants.length > 0 ) {\n\t\t\t\t\t\t\tlines.push( formatDetailedErrors( [ nestedError ], `${ indent } ` ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn lines.join( '\\n' );\n}\n\nexport const validatePropValue = ( schema: PropType, value: unknown ) => {\n\tconst jsonSchema = propTypeToJsonSchema( schema );\n\tif ( value === null ) {\n\t\treturn {\n\t\t\tvalid: true,\n\t\t\terrors: [],\n\t\t\terrorMessages: [],\n\t\t\tjsonSchema: JSON.stringify( propTypeToJsonSchema( schema ) ),\n\t\t};\n\t}\n\tconst result = validate( value, jsonSchema );\n\tconst detailedErrors = result.errors.map( processValidationError );\n\treturn {\n\t\tvalid: result.valid,\n\t\terrors: result.errors,\n\t\terrorMessages: formatDetailedErrors( detailedErrors ),\n\t\tjsonSchema: JSON.stringify( jsonSchema ),\n\t};\n};\n\n/**\n * Validates a prop value with detailed error reporting for anyOf failures\n *\n * This function provides enhanced error messages that show exactly which nested\n * properties failed validation in anyOf schemas, making debugging much easier.\n *\n * @param schema The PropType schema to validate against\n * @param value The value to validate\n * @return Validation result with detailed error information\n */\nexport const validatePropValueDetailed = ( schema: PropType, value: unknown ) => {\n\tconst jsonSchema = propTypeToJsonSchema( schema );\n\tconst result = validate( value, jsonSchema );\n\n\t// Process all errors to add detailed anyOf information\n\tconst detailedErrors = result.errors.map( processValidationError );\n\n\treturn {\n\t\tvalid: result.valid,\n\t\terrors: detailedErrors,\n\t\terrorMessages: detailedErrors.map( ( err ) => err.message ),\n\t\tformattedErrors: formatDetailedErrors( detailedErrors ),\n\t\tjsonSchema: JSON.stringify( jsonSchema ),\n\t};\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,EAAE,MAAM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AAI;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;;;A7D7BO,IAAM,SAAS;AAAA,EACrB;AAAA,EACA;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
|
@@ -892,6 +892,14 @@ function formatDetailedErrors(errors, indent = "") {
|
|
|
892
892
|
}
|
|
893
893
|
var validatePropValue = (schema, value) => {
|
|
894
894
|
const jsonSchema = propTypeToJsonSchema(schema);
|
|
895
|
+
if (value === null) {
|
|
896
|
+
return {
|
|
897
|
+
valid: true,
|
|
898
|
+
errors: [],
|
|
899
|
+
errorMessages: [],
|
|
900
|
+
jsonSchema: JSON.stringify(propTypeToJsonSchema(schema))
|
|
901
|
+
};
|
|
902
|
+
}
|
|
895
903
|
const result = validate(value, jsonSchema);
|
|
896
904
|
const detailedErrors = result.errors.map(processValidationError);
|
|
897
905
|
return {
|
package/dist/index.mjs.map
CHANGED
|
@@ -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/validate-prop-value.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', 'ch' ] ),\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\ntype PropConverter = ( value: unknown ) => PropValue;\n\ntype Options = {\n\tforceKey?: string;\n\ttransformers?: Record< string, PropConverter >;\n};\n\nconst defaultOptions: Options = {\n\ttransformers: {},\n};\n\nexport const adjustLlmPropValueSchema = (\n\tvalue: Readonly< PropValue >,\n\t{ transformers = {}, forceKey = undefined }: Options = defaultOptions\n): PropValue => {\n\tconst clone = structuredClone( value );\n\tif ( typeof clone !== 'object' || clone === null ) {\n\t\treturn null;\n\t}\n\t// Check for transformable types\n\tif ( Array.isArray( clone ) ) {\n\t\treturn clone.map( ( item ) => adjustLlmPropValueSchema( item, { forceKey, transformers } ) ) as PropValue;\n\t}\n\tconst transformablePropValue = clone as TransformablePropValue< string >;\n\tif ( forceKey ) {\n\t\ttransformablePropValue.$$type = forceKey;\n\t}\n\n\t// fix by type - Size is the only case where we have a non-valid structure\n\tswitch ( transformablePropValue.$$type ) {\n\t\tcase 'size': {\n\t\t\tconst { value: rawSizePropValue } = transformablePropValue as TransformablePropValue<\n\t\t\t\tstring,\n\t\t\t\t{ size: StringPropValue | NumberPropValue; unit: StringPropValue }\n\t\t\t>;\n\t\t\tconst unit =\n\t\t\t\ttypeof rawSizePropValue.unit === 'string'\n\t\t\t\t\t? rawSizePropValue.unit\n\t\t\t\t\t: ensureNotNull( stringPropTypeUtil.extract( rawSizePropValue.unit ), 'px' );\n\t\t\tconst size =\n\t\t\t\ttypeof rawSizePropValue.size === 'string' || typeof rawSizePropValue.size === 'number'\n\t\t\t\t\t? rawSizePropValue.size\n\t\t\t\t\t: ensureNotNull(\n\t\t\t\t\t\t\tstringPropTypeUtil.extract( rawSizePropValue.size ),\n\t\t\t\t\t\t\tnumberPropTypeUtil.extract( rawSizePropValue.size )\n\t\t\t\t\t );\n\t\t\treturn {\n\t\t\t\t$$type: 'size',\n\t\t\t\tvalue: {\n\t\t\t\t\tunit,\n\t\t\t\t\tsize,\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\tdefault:\n\t\t\tconst transformer = transformers?.[ transformablePropValue.$$type ];\n\t\t\tif ( transformer ) {\n\t\t\t\treturn transformer( transformablePropValue.value );\n\t\t\t}\n\t}\n\n\tif ( typeof transformablePropValue.value === 'object' ) {\n\t\tif ( Array.isArray( transformablePropValue.value ) ) {\n\t\t\ttransformablePropValue.value = adjustLlmPropValueSchema( transformablePropValue.value, {\n\t\t\t\ttransformers,\n\t\t\t} ) as PropValue[];\n\t\t} else {\n\t\t\tconst { value: objectValue } = transformablePropValue as ObjectPropValue;\n\t\t\tconst clonedObject = clone as ObjectPropValue;\n\t\t\tclonedObject.value = {} as ( typeof clonedObject )[ 'value' ]; // Record< string, PropValue >;\n\t\t\tObject.entries( objectValue ).forEach( ( [ key, childProp ] ) => {\n\t\t\t\tclonedObject.value[ key ] = adjustLlmPropValueSchema( childProp as PropValue, { transformers } );\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// Add example from initial_value if it exists\n\tif ( propType.initial_value !== null && propType.initial_value !== undefined ) {\n\t\tschema.examples = [ propType.initial_value ];\n\t}\n\n\t// Handle different kinds of prop types\n\tswitch ( propType.kind ) {\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\nfunction convertPlainPropType(\n\tpropType: PropType & { key: string; kind: string },\n\tbaseSchema: JsonSchema7\n): JsonSchema7 {\n\tconst schema = { ...baseSchema };\n\n\t// This could happen when data is malformed due to a bug, added this as a safeguard.\n\tif ( ! Object.hasOwn( propType, 'kind' ) ) {\n\t\tthrow new Error( `PropType kind is undefined for propType with key: ${ propType.key ?? '[unknown key]' }` );\n\t}\n\n\tconst enumValues = ( propType.settings?.enum || [] ) as string[] | number[];\n\n\tswitch ( propType.kind ) {\n\t\tcase 'string':\n\t\tcase 'number':\n\t\tcase 'boolean':\n\t\t\treturn {\n\t\t\t\t...schema,\n\t\t\t\ttype: 'object',\n\t\t\t\tproperties: {\n\t\t\t\t\t$$type: {\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tconst: propType.key ?? propType.kind,\n\t\t\t\t\t},\n\t\t\t\t\tvalue: {\n\t\t\t\t\t\ttype: propType.kind,\n\t\t\t\t\t\t...( enumValues.length > 0 ? { enum: enumValues } : {} ),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\trequired: [ '$$type', 'value' ],\n\t\t\t};\n\t\tdefault:\n\t\t\treturn {\n\t\t\t\t...schema,\n\t\t\t\ttype: 'object',\n\t\t\t\t$$type: propType.kind,\n\t\t\t\tvalue: {\n\t\t\t\t\ttype: propType.kind,\n\t\t\t\t},\n\t\t\t};\n\t}\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\tif ( typeKey === 'dynamic' || typeKey === 'overridable' ) {\n\t\t\tcontinue;\n\t\t}\n\t\tconst subSchema = convertPropTypeToJsonSchema( subPropType );\n\t\tschemas.push( subSchema );\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\tconst internalStructure: {\n\t\tproperties: {\n\t\t\t$$type: JsonSchema7;\n\t\t\tvalue: JsonSchema7;\n\t\t};\n\t} = {\n\t\tproperties: {\n\t\t\t$$type: {\n\t\t\t\ttype: 'string',\n\t\t\t\tconst: propType.key,\n\t\t\t},\n\t\t\tvalue: {\n\t\t\t\ttype: 'object',\n\t\t\t\tproperties: {} as Record< string, JsonSchema7 >,\n\t\t\t\tadditionalProperties: false,\n\t\t\t},\n\t\t},\n\t};\n\n\tconst required: string[] = [ '$$type', 'value' ];\n\tconst valueRequired: 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 = propTypeToJsonSchema( subPropType );\n\n\t\t// Check if this property is required\n\t\tif ( subPropType.settings?.required === true ) {\n\t\t\tvalueRequired.push( key );\n\t\t}\n\n\t\tif ( internalStructure.properties.value.properties ) {\n\t\t\tinternalStructure.properties.value.properties[ key ] = propSchema;\n\t\t}\n\t}\n\n\tschema.required = required;\n\tif ( valueRequired.length > 0 ) {\n\t\tinternalStructure.properties.value.required = valueRequired;\n\t}\n\n\treturn {\n\t\t...schema,\n\t\t...internalStructure,\n\t};\n}\n\nfunction convertArrayPropType( propType: PropType & { kind: 'array' }, baseSchema: JsonSchema7 ): JsonSchema7 {\n\tconst schema = structuredClone( baseSchema );\n\n\tschema.type = 'object';\n\tlet items: unknown;\n\n\tconst itemPropType = propType.item_prop_type;\n\n\tif ( itemPropType ) {\n\t\titems = convertPropTypeToJsonSchema( itemPropType );\n\t}\n\n\tschema.properties = {\n\t\t$$type: {\n\t\t\ttype: 'string',\n\t\t\tconst: propType.key,\n\t\t},\n\t\tvalue: {\n\t\t\ttype: 'array',\n\t\t\t...( items ? { items } : {} ),\n\t\t} as JsonSchema7,\n\t};\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 { validate, type ValidationError } from 'jsonschema';\n\nimport { type PropType } from '../types';\nimport { propTypeToJsonSchema } from './props-to-llm-schema';\n\n/**\n * Detailed error information with nested anyOf variant errors\n */\nexport interface DetailedValidationError {\n\tpath: ( string | number )[];\n\tmessage: string;\n\tschema?: unknown;\n\tinstance?: unknown;\n\tname: string;\n\t/**\n\t * If this was an anyOf failure, contains errors for each variant\n\t */\n\tvariants?: {\n\t\tdiscriminator: string;\n\t\terrors: DetailedValidationError[];\n\t}[];\n}\n\n/**\n * Recursively processes validation errors to provide detailed information about anyOf failures\n *\n * @param error The validation error to process\n */\nfunction processValidationError( error: ValidationError ): DetailedValidationError {\n\tconst detailed: DetailedValidationError = {\n\t\tpath: error.path,\n\t\tmessage: error.message,\n\t\tschema: error.schema,\n\t\tinstance: error.instance,\n\t\tname: error.name,\n\t};\n\n\t// If this is an anyOf error, re-validate against each variant to get nested errors\n\tif ( error.name === 'anyOf' && error.schema && typeof error.schema === 'object' && 'anyOf' in error.schema ) {\n\t\tconst anyOfSchema = error.schema as { anyOf?: unknown[] };\n\t\tconst variants = ( anyOfSchema.anyOf || [] ).map( ( variantSchema, idx ) => {\n\t\t\t// Re-validate the instance against this specific variant\n\t\t\tconst variantResult = validate( error.instance, variantSchema );\n\n\t\t\t// Get discriminator from schema if available\n\t\t\tlet discriminator = `variant-${ idx }`;\n\t\t\tif (\n\t\t\t\tvariantSchema &&\n\t\t\t\ttypeof variantSchema === 'object' &&\n\t\t\t\t'properties' in variantSchema &&\n\t\t\t\tvariantSchema.properties &&\n\t\t\t\ttypeof variantSchema.properties === 'object' &&\n\t\t\t\t'$$type' in variantSchema.properties\n\t\t\t) {\n\t\t\t\tconst typeProperty = variantSchema.properties.$$type;\n\t\t\t\tif (\n\t\t\t\t\ttypeProperty &&\n\t\t\t\t\ttypeof typeProperty === 'object' &&\n\t\t\t\t\t'const' in typeProperty &&\n\t\t\t\t\ttypeof typeProperty.const === 'string'\n\t\t\t\t) {\n\t\t\t\t\tdiscriminator = typeProperty.const;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tdiscriminator,\n\t\t\t\terrors: variantResult.errors.map( processValidationError ),\n\t\t\t};\n\t\t} );\n\n\t\tdetailed.variants = variants;\n\t}\n\n\treturn detailed;\n}\n\n/**\n * Formats detailed errors into a human-readable string\n * @param errors\n * @param indent\n */\nfunction formatDetailedErrors( errors: DetailedValidationError[], indent = '' ): string {\n\tconst lines: string[] = [];\n\n\tfor ( const error of errors ) {\n\t\tconst pathStr = error.path.length > 0 ? error.path.join( '.' ) : 'root';\n\t\tlines.push( `${ indent }Error at ${ pathStr }: ${ error.message }` );\n\n\t\tif ( error.variants && error.variants.length > 0 ) {\n\t\t\tlines.push( `${ indent } Tried ${ error.variants.length } variant(s):` );\n\t\t\tfor ( const variant of error.variants ) {\n\t\t\t\tlines.push( `${ indent } - ${ variant.discriminator }:` );\n\t\t\t\tif ( variant.errors.length === 0 ) {\n\t\t\t\t\tlines.push( `${ indent } (no errors - this variant matched!)` );\n\t\t\t\t} else {\n\t\t\t\t\tfor ( const nestedError of variant.errors ) {\n\t\t\t\t\t\tconst nestedPathStr = nestedError.path.length > 0 ? nestedError.path.join( '.' ) : 'root';\n\t\t\t\t\t\tlines.push( `${ indent } ${ nestedPathStr }: ${ nestedError.message }` );\n\n\t\t\t\t\t\t// Recursively format nested variant errors\n\t\t\t\t\t\tif ( nestedError.variants && nestedError.variants.length > 0 ) {\n\t\t\t\t\t\t\tlines.push( formatDetailedErrors( [ nestedError ], `${ indent } ` ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn lines.join( '\\n' );\n}\n\nexport const validatePropValue = ( schema: PropType, value: unknown ) => {\n\tconst jsonSchema = propTypeToJsonSchema( schema );\n\tconst result = validate( value, jsonSchema );\n\tconst detailedErrors = result.errors.map( processValidationError );\n\treturn {\n\t\tvalid: result.valid,\n\t\terrors: result.errors,\n\t\terrorMessages: formatDetailedErrors( detailedErrors ),\n\t\tjsonSchema: JSON.stringify( jsonSchema ),\n\t};\n};\n\n/**\n * Validates a prop value with detailed error reporting for anyOf failures\n *\n * This function provides enhanced error messages that show exactly which nested\n * properties failed validation in anyOf schemas, making debugging much easier.\n *\n * @param schema The PropType schema to validate against\n * @param value The value to validate\n * @return Validation result with detailed error information\n */\nexport const validatePropValueDetailed = ( schema: PropType, value: unknown ) => {\n\tconst jsonSchema = propTypeToJsonSchema( schema );\n\tconst result = validate( value, jsonSchema );\n\n\t// Process all errors to add detailed anyOf information\n\tconst detailedErrors = result.errors.map( processValidationError );\n\n\treturn {\n\t\tvalid: result.valid,\n\t\terrors: detailedErrors,\n\t\terrorMessages: detailedErrors.map( ( err ) => err.message ),\n\t\tformattedErrors: formatDetailedErrors( detailedErrors ),\n\t\tjsonSchema: JSON.stringify( jsonSchema ),\n\t};\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';\nimport { validatePropValue } from './utils/validate-prop-value';\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\tvalidatePropValue,\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,gBACf,KACA,aACC;AACD,QAAM,SAAS,EAAE,aAAc;AAAA,IAC9B,QAAQ,EAAE,QAAS,GAAI;AAAA,IACvB,OAAO;AAAA,IACP,UAAU,EAAE,QAAQ,EAAE,SAAS;AAAA,EAChC,CAAE;AAIF,WAAS,QAAS,MAA8B;AAC/C,WAAO,OAAO,UAAW,IAAK,EAAE;AAAA,EACjC;AAKA,WAAS,OAAQ,OAAmC,eAAsC;AACzF,UAAM,KAAO,OAAO,UAAU,aAAa,QAAQ,MAAM;AAEzD,UAAM,EAAE,MAAM,SAAS,IAAI,iBAAiB,CAAC;AAE7C,QAAK,CAAE,MAAO;AACb,aAAO;AAAA,QACN,QAAQ;AAAA,QACR,OAAO,GAAG;AAAA,QACV,GAAK,YAAY,EAAE,SAAS;AAAA,MAC7B;AAAA,IACD;AAEA,QAAK,CAAE,QAAS,IAAK,GAAI;AACxB,YAAM,IAAI,MAAO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AAc;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;;;AC7BO,IAAM,SAAS;AAAA,EACrB;AAAA,EACA;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/validate-prop-value.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', 'ch' ] ),\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\ntype PropConverter = ( value: unknown ) => PropValue;\n\ntype Options = {\n\tforceKey?: string;\n\ttransformers?: Record< string, PropConverter >;\n};\n\nconst defaultOptions: Options = {\n\ttransformers: {},\n};\n\nexport const adjustLlmPropValueSchema = (\n\tvalue: Readonly< PropValue >,\n\t{ transformers = {}, forceKey = undefined }: Options = defaultOptions\n): PropValue => {\n\tconst clone = structuredClone( value );\n\tif ( typeof clone !== 'object' || clone === null ) {\n\t\treturn null;\n\t}\n\t// Check for transformable types\n\tif ( Array.isArray( clone ) ) {\n\t\treturn clone.map( ( item ) => adjustLlmPropValueSchema( item, { forceKey, transformers } ) ) as PropValue;\n\t}\n\tconst transformablePropValue = clone as TransformablePropValue< string >;\n\tif ( forceKey ) {\n\t\ttransformablePropValue.$$type = forceKey;\n\t}\n\n\t// fix by type - Size is the only case where we have a non-valid structure\n\tswitch ( transformablePropValue.$$type ) {\n\t\tcase 'size': {\n\t\t\tconst { value: rawSizePropValue } = transformablePropValue as TransformablePropValue<\n\t\t\t\tstring,\n\t\t\t\t{ size: StringPropValue | NumberPropValue; unit: StringPropValue }\n\t\t\t>;\n\t\t\tconst unit =\n\t\t\t\ttypeof rawSizePropValue.unit === 'string'\n\t\t\t\t\t? rawSizePropValue.unit\n\t\t\t\t\t: ensureNotNull( stringPropTypeUtil.extract( rawSizePropValue.unit ), 'px' );\n\t\t\tconst size =\n\t\t\t\ttypeof rawSizePropValue.size === 'string' || typeof rawSizePropValue.size === 'number'\n\t\t\t\t\t? rawSizePropValue.size\n\t\t\t\t\t: ensureNotNull(\n\t\t\t\t\t\t\tstringPropTypeUtil.extract( rawSizePropValue.size ),\n\t\t\t\t\t\t\tnumberPropTypeUtil.extract( rawSizePropValue.size )\n\t\t\t\t\t );\n\t\t\treturn {\n\t\t\t\t$$type: 'size',\n\t\t\t\tvalue: {\n\t\t\t\t\tunit,\n\t\t\t\t\tsize,\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\tdefault:\n\t\t\tconst transformer = transformers?.[ transformablePropValue.$$type ];\n\t\t\tif ( transformer ) {\n\t\t\t\treturn transformer( transformablePropValue.value );\n\t\t\t}\n\t}\n\n\tif ( typeof transformablePropValue.value === 'object' ) {\n\t\tif ( Array.isArray( transformablePropValue.value ) ) {\n\t\t\ttransformablePropValue.value = adjustLlmPropValueSchema( transformablePropValue.value, {\n\t\t\t\ttransformers,\n\t\t\t} ) as PropValue[];\n\t\t} else {\n\t\t\tconst { value: objectValue } = transformablePropValue as ObjectPropValue;\n\t\t\tconst clonedObject = clone as ObjectPropValue;\n\t\t\tclonedObject.value = {} as ( typeof clonedObject )[ 'value' ]; // Record< string, PropValue >;\n\t\t\tObject.entries( objectValue ).forEach( ( [ key, childProp ] ) => {\n\t\t\t\tclonedObject.value[ key ] = adjustLlmPropValueSchema( childProp as PropValue, { transformers } );\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// Add example from initial_value if it exists\n\tif ( propType.initial_value !== null && propType.initial_value !== undefined ) {\n\t\tschema.examples = [ propType.initial_value ];\n\t}\n\n\t// Handle different kinds of prop types\n\tswitch ( propType.kind ) {\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\nfunction convertPlainPropType(\n\tpropType: PropType & { key: string; kind: string },\n\tbaseSchema: JsonSchema7\n): JsonSchema7 {\n\tconst schema = { ...baseSchema };\n\n\t// This could happen when data is malformed due to a bug, added this as a safeguard.\n\tif ( ! Object.hasOwn( propType, 'kind' ) ) {\n\t\tthrow new Error( `PropType kind is undefined for propType with key: ${ propType.key ?? '[unknown key]' }` );\n\t}\n\n\tconst enumValues = ( propType.settings?.enum || [] ) as string[] | number[];\n\n\tswitch ( propType.kind ) {\n\t\tcase 'string':\n\t\tcase 'number':\n\t\tcase 'boolean':\n\t\t\treturn {\n\t\t\t\t...schema,\n\t\t\t\ttype: 'object',\n\t\t\t\tproperties: {\n\t\t\t\t\t$$type: {\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tconst: propType.key ?? propType.kind,\n\t\t\t\t\t},\n\t\t\t\t\tvalue: {\n\t\t\t\t\t\ttype: propType.kind,\n\t\t\t\t\t\t...( enumValues.length > 0 ? { enum: enumValues } : {} ),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\trequired: [ '$$type', 'value' ],\n\t\t\t};\n\t\tdefault:\n\t\t\treturn {\n\t\t\t\t...schema,\n\t\t\t\ttype: 'object',\n\t\t\t\t$$type: propType.kind,\n\t\t\t\tvalue: {\n\t\t\t\t\ttype: propType.kind,\n\t\t\t\t},\n\t\t\t};\n\t}\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\tif ( typeKey === 'dynamic' || typeKey === 'overridable' ) {\n\t\t\tcontinue;\n\t\t}\n\t\tconst subSchema = convertPropTypeToJsonSchema( subPropType );\n\t\tschemas.push( subSchema );\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\tconst internalStructure: {\n\t\tproperties: {\n\t\t\t$$type: JsonSchema7;\n\t\t\tvalue: JsonSchema7;\n\t\t};\n\t} = {\n\t\tproperties: {\n\t\t\t$$type: {\n\t\t\t\ttype: 'string',\n\t\t\t\tconst: propType.key,\n\t\t\t},\n\t\t\tvalue: {\n\t\t\t\ttype: 'object',\n\t\t\t\tproperties: {} as Record< string, JsonSchema7 >,\n\t\t\t\tadditionalProperties: false,\n\t\t\t},\n\t\t},\n\t};\n\n\tconst required: string[] = [ '$$type', 'value' ];\n\tconst valueRequired: 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 = propTypeToJsonSchema( subPropType );\n\n\t\t// Check if this property is required\n\t\tif ( subPropType.settings?.required === true ) {\n\t\t\tvalueRequired.push( key );\n\t\t}\n\n\t\tif ( internalStructure.properties.value.properties ) {\n\t\t\tinternalStructure.properties.value.properties[ key ] = propSchema;\n\t\t}\n\t}\n\n\tschema.required = required;\n\tif ( valueRequired.length > 0 ) {\n\t\tinternalStructure.properties.value.required = valueRequired;\n\t}\n\n\treturn {\n\t\t...schema,\n\t\t...internalStructure,\n\t};\n}\n\nfunction convertArrayPropType( propType: PropType & { kind: 'array' }, baseSchema: JsonSchema7 ): JsonSchema7 {\n\tconst schema = structuredClone( baseSchema );\n\n\tschema.type = 'object';\n\tlet items: unknown;\n\n\tconst itemPropType = propType.item_prop_type;\n\n\tif ( itemPropType ) {\n\t\titems = convertPropTypeToJsonSchema( itemPropType );\n\t}\n\n\tschema.properties = {\n\t\t$$type: {\n\t\t\ttype: 'string',\n\t\t\tconst: propType.key,\n\t\t},\n\t\tvalue: {\n\t\t\ttype: 'array',\n\t\t\t...( items ? { items } : {} ),\n\t\t} as JsonSchema7,\n\t};\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 { validate, type ValidationError } from 'jsonschema';\n\nimport { type PropType } from '../types';\nimport { propTypeToJsonSchema } from './props-to-llm-schema';\n\n/**\n * Detailed error information with nested anyOf variant errors\n */\nexport interface DetailedValidationError {\n\tpath: ( string | number )[];\n\tmessage: string;\n\tschema?: unknown;\n\tinstance?: unknown;\n\tname: string;\n\t/**\n\t * If this was an anyOf failure, contains errors for each variant\n\t */\n\tvariants?: {\n\t\tdiscriminator: string;\n\t\terrors: DetailedValidationError[];\n\t}[];\n}\n\n/**\n * Recursively processes validation errors to provide detailed information about anyOf failures\n *\n * @param error The validation error to process\n */\nfunction processValidationError( error: ValidationError ): DetailedValidationError {\n\tconst detailed: DetailedValidationError = {\n\t\tpath: error.path,\n\t\tmessage: error.message,\n\t\tschema: error.schema,\n\t\tinstance: error.instance,\n\t\tname: error.name,\n\t};\n\n\t// If this is an anyOf error, re-validate against each variant to get nested errors\n\tif ( error.name === 'anyOf' && error.schema && typeof error.schema === 'object' && 'anyOf' in error.schema ) {\n\t\tconst anyOfSchema = error.schema as { anyOf?: unknown[] };\n\t\tconst variants = ( anyOfSchema.anyOf || [] ).map( ( variantSchema, idx ) => {\n\t\t\t// Re-validate the instance against this specific variant\n\t\t\tconst variantResult = validate( error.instance, variantSchema );\n\n\t\t\t// Get discriminator from schema if available\n\t\t\tlet discriminator = `variant-${ idx }`;\n\t\t\tif (\n\t\t\t\tvariantSchema &&\n\t\t\t\ttypeof variantSchema === 'object' &&\n\t\t\t\t'properties' in variantSchema &&\n\t\t\t\tvariantSchema.properties &&\n\t\t\t\ttypeof variantSchema.properties === 'object' &&\n\t\t\t\t'$$type' in variantSchema.properties\n\t\t\t) {\n\t\t\t\tconst typeProperty = variantSchema.properties.$$type;\n\t\t\t\tif (\n\t\t\t\t\ttypeProperty &&\n\t\t\t\t\ttypeof typeProperty === 'object' &&\n\t\t\t\t\t'const' in typeProperty &&\n\t\t\t\t\ttypeof typeProperty.const === 'string'\n\t\t\t\t) {\n\t\t\t\t\tdiscriminator = typeProperty.const;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tdiscriminator,\n\t\t\t\terrors: variantResult.errors.map( processValidationError ),\n\t\t\t};\n\t\t} );\n\n\t\tdetailed.variants = variants;\n\t}\n\n\treturn detailed;\n}\n\n/**\n * Formats detailed errors into a human-readable string\n * @param errors\n * @param indent\n */\nfunction formatDetailedErrors( errors: DetailedValidationError[], indent = '' ): string {\n\tconst lines: string[] = [];\n\n\tfor ( const error of errors ) {\n\t\tconst pathStr = error.path.length > 0 ? error.path.join( '.' ) : 'root';\n\t\tlines.push( `${ indent }Error at ${ pathStr }: ${ error.message }` );\n\n\t\tif ( error.variants && error.variants.length > 0 ) {\n\t\t\tlines.push( `${ indent } Tried ${ error.variants.length } variant(s):` );\n\t\t\tfor ( const variant of error.variants ) {\n\t\t\t\tlines.push( `${ indent } - ${ variant.discriminator }:` );\n\t\t\t\tif ( variant.errors.length === 0 ) {\n\t\t\t\t\tlines.push( `${ indent } (no errors - this variant matched!)` );\n\t\t\t\t} else {\n\t\t\t\t\tfor ( const nestedError of variant.errors ) {\n\t\t\t\t\t\tconst nestedPathStr = nestedError.path.length > 0 ? nestedError.path.join( '.' ) : 'root';\n\t\t\t\t\t\tlines.push( `${ indent } ${ nestedPathStr }: ${ nestedError.message }` );\n\n\t\t\t\t\t\t// Recursively format nested variant errors\n\t\t\t\t\t\tif ( nestedError.variants && nestedError.variants.length > 0 ) {\n\t\t\t\t\t\t\tlines.push( formatDetailedErrors( [ nestedError ], `${ indent } ` ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn lines.join( '\\n' );\n}\n\nexport const validatePropValue = ( schema: PropType, value: unknown ) => {\n\tconst jsonSchema = propTypeToJsonSchema( schema );\n\tif ( value === null ) {\n\t\treturn {\n\t\t\tvalid: true,\n\t\t\terrors: [],\n\t\t\terrorMessages: [],\n\t\t\tjsonSchema: JSON.stringify( propTypeToJsonSchema( schema ) ),\n\t\t};\n\t}\n\tconst result = validate( value, jsonSchema );\n\tconst detailedErrors = result.errors.map( processValidationError );\n\treturn {\n\t\tvalid: result.valid,\n\t\terrors: result.errors,\n\t\terrorMessages: formatDetailedErrors( detailedErrors ),\n\t\tjsonSchema: JSON.stringify( jsonSchema ),\n\t};\n};\n\n/**\n * Validates a prop value with detailed error reporting for anyOf failures\n *\n * This function provides enhanced error messages that show exactly which nested\n * properties failed validation in anyOf schemas, making debugging much easier.\n *\n * @param schema The PropType schema to validate against\n * @param value The value to validate\n * @return Validation result with detailed error information\n */\nexport const validatePropValueDetailed = ( schema: PropType, value: unknown ) => {\n\tconst jsonSchema = propTypeToJsonSchema( schema );\n\tconst result = validate( value, jsonSchema );\n\n\t// Process all errors to add detailed anyOf information\n\tconst detailedErrors = result.errors.map( processValidationError );\n\n\treturn {\n\t\tvalid: result.valid,\n\t\terrors: detailedErrors,\n\t\terrorMessages: detailedErrors.map( ( err ) => err.message ),\n\t\tformattedErrors: formatDetailedErrors( detailedErrors ),\n\t\tjsonSchema: JSON.stringify( jsonSchema ),\n\t};\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';\nimport { validatePropValue } from './utils/validate-prop-value';\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\tvalidatePropValue,\n};\n"],"mappings":";AAAA,SAAS,KAAAA,UAAS;;;ACAlB,SAAS,SAAuB;AAWhC,IAAM,eAAe,oBAAI,IAAuB;AAqBzC,SAAS,uBAAwB,KAAc;AACrD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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-
|
|
4
|
+
"version": "3.35.0-355",
|
|
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-
|
|
43
|
+
"@elementor/schema": "3.35.0-355",
|
|
44
44
|
"jsonschema": "1.5.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
@@ -113,6 +113,14 @@ function formatDetailedErrors( errors: DetailedValidationError[], indent = '' ):
|
|
|
113
113
|
|
|
114
114
|
export const validatePropValue = ( schema: PropType, value: unknown ) => {
|
|
115
115
|
const jsonSchema = propTypeToJsonSchema( schema );
|
|
116
|
+
if ( value === null ) {
|
|
117
|
+
return {
|
|
118
|
+
valid: true,
|
|
119
|
+
errors: [],
|
|
120
|
+
errorMessages: [],
|
|
121
|
+
jsonSchema: JSON.stringify( propTypeToJsonSchema( schema ) ),
|
|
122
|
+
};
|
|
123
|
+
}
|
|
116
124
|
const result = validate( value, jsonSchema );
|
|
117
125
|
const detailedErrors = result.errors.map( processValidationError );
|
|
118
126
|
return {
|