@elementor/editor-props 0.16.0 → 3.32.0-20

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.js CHANGED
@@ -21,6 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
23
  CLASSES_PROP_KEY: () => CLASSES_PROP_KEY,
24
+ backdropFilterPropTypeUtil: () => backdropFilterPropTypeUtil,
24
25
  backgroundColorOverlayPropTypeUtil: () => backgroundColorOverlayPropTypeUtil,
25
26
  backgroundGradientOverlayPropTypeUtil: () => backgroundGradientOverlayPropTypeUtil,
26
27
  backgroundImageOverlayPropTypeUtil: () => backgroundImageOverlayPropTypeUtil,
@@ -28,25 +29,29 @@ __export(index_exports, {
28
29
  backgroundImageSizeScalePropTypeUtil: () => backgroundImageSizeScalePropTypeUtil,
29
30
  backgroundOverlayPropTypeUtil: () => backgroundOverlayPropTypeUtil,
30
31
  backgroundPropTypeUtil: () => backgroundPropTypeUtil,
31
- blurFilterPropTypeUtil: () => blurFilterPropTypeUtil,
32
32
  booleanPropTypeUtil: () => booleanPropTypeUtil,
33
33
  borderRadiusPropTypeUtil: () => borderRadiusPropTypeUtil,
34
34
  borderWidthPropTypeUtil: () => borderWidthPropTypeUtil,
35
35
  boxShadowPropTypeUtil: () => boxShadowPropTypeUtil,
36
- brightnessFilterPropTypeUtil: () => brightnessFilterPropTypeUtil,
37
36
  classesPropTypeUtil: () => classesPropTypeUtil,
38
37
  colorPropTypeUtil: () => colorPropTypeUtil,
39
38
  colorStopPropTypeUtil: () => colorStopPropTypeUtil,
40
39
  createArrayPropUtils: () => createArrayPropUtils,
41
40
  createPropUtils: () => createPropUtils,
41
+ cssFilterFunctionPropUtil: () => cssFilterFunctionPropUtil,
42
42
  dimensionsPropTypeUtil: () => dimensionsPropTypeUtil,
43
+ dropShadowFilterPropTypeUtil: () => dropShadowFilterPropTypeUtil,
43
44
  evaluateTerm: () => evaluateTerm,
45
+ extractValue: () => extractValue,
44
46
  filterEmptyValues: () => filterEmptyValues,
45
47
  filterPropTypeUtil: () => filterPropTypeUtil,
48
+ flexPropTypeUtil: () => flexPropTypeUtil,
46
49
  gradientColorStopPropTypeUtil: () => gradientColorStopPropTypeUtil,
47
50
  imageAttachmentIdPropType: () => imageAttachmentIdPropType,
48
51
  imagePropTypeUtil: () => imagePropTypeUtil,
49
52
  imageSrcPropTypeUtil: () => imageSrcPropTypeUtil,
53
+ isDependency: () => isDependency,
54
+ isDependencyMet: () => isDependencyMet,
50
55
  isEmpty: () => isEmpty,
51
56
  isTransformable: () => isTransformable,
52
57
  keyValuePropTypeUtil: () => keyValuePropTypeUtil,
@@ -56,9 +61,12 @@ __export(index_exports, {
56
61
  moveTransformPropTypeUtil: () => moveTransformPropTypeUtil,
57
62
  numberPropTypeUtil: () => numberPropTypeUtil,
58
63
  positionPropTypeUtil: () => positionPropTypeUtil,
64
+ rotateTransformPropTypeUtil: () => rotateTransformPropTypeUtil,
65
+ scaleTransformPropTypeUtil: () => scaleTransformPropTypeUtil,
66
+ selectionSizePropTypeUtil: () => selectionSizePropTypeUtil,
59
67
  shadowPropTypeUtil: () => shadowPropTypeUtil,
60
- shouldApplyEffect: () => shouldApplyEffect,
61
68
  sizePropTypeUtil: () => sizePropTypeUtil,
69
+ skewTransformPropTypeUtil: () => skewTransformPropTypeUtil,
62
70
  stringPropTypeUtil: () => stringPropTypeUtil,
63
71
  strokePropTypeUtil: () => strokePropTypeUtil,
64
72
  transformPropTypeUtil: () => transformPropTypeUtil,
@@ -113,8 +121,8 @@ function createPropUtils(key, valueSchema) {
113
121
  key
114
122
  };
115
123
  }
116
- function createArrayPropUtils(key, valueSchema) {
117
- return createPropUtils(`${key}-array`, import_schema.z.array(valueSchema));
124
+ function createArrayPropUtils(key, valueSchema, overrideKey) {
125
+ return createPropUtils(overrideKey || `${key}-array`, import_schema.z.array(valueSchema));
118
126
  }
119
127
 
120
128
  // src/prop-types/shadow.ts
@@ -176,40 +184,51 @@ var classesPropTypeUtil = createPropUtils(
176
184
  var import_schema8 = require("@elementor/schema");
177
185
  var colorPropTypeUtil = createPropUtils("color", import_schema8.z.string());
178
186
 
179
- // src/prop-types/image.ts
187
+ // src/prop-types/flex.ts
180
188
  var import_schema9 = require("@elementor/schema");
189
+ var flexPropTypeUtil = createPropUtils(
190
+ "flex",
191
+ import_schema9.z.strictObject({
192
+ flexGrow: unknownChildrenSchema,
193
+ flexShrink: unknownChildrenSchema,
194
+ flexBasis: unknownChildrenSchema
195
+ })
196
+ );
197
+
198
+ // src/prop-types/image.ts
199
+ var import_schema10 = require("@elementor/schema");
181
200
  var imagePropTypeUtil = createPropUtils(
182
201
  "image",
183
- import_schema9.z.strictObject({
202
+ import_schema10.z.strictObject({
184
203
  src: unknownChildrenSchema,
185
204
  size: unknownChildrenSchema
186
205
  })
187
206
  );
188
207
 
189
208
  // src/prop-types/image-attachment-id.ts
190
- var import_schema10 = require("@elementor/schema");
191
- var imageAttachmentIdPropType = createPropUtils("image-attachment-id", import_schema10.z.number());
209
+ var import_schema11 = require("@elementor/schema");
210
+ var imageAttachmentIdPropType = createPropUtils("image-attachment-id", import_schema11.z.number());
192
211
 
193
212
  // src/prop-types/image-src.ts
194
- var import_schema11 = require("@elementor/schema");
213
+ var import_schema12 = require("@elementor/schema");
195
214
  var imageSrcPropTypeUtil = createPropUtils(
196
215
  "image-src",
197
- import_schema11.z.strictObject({
216
+ import_schema12.z.strictObject({
198
217
  id: unknownChildrenSchema,
199
- url: import_schema11.z.null()
218
+ url: import_schema12.z.null()
200
219
  }).or(
201
- import_schema11.z.strictObject({
202
- id: import_schema11.z.null(),
220
+ import_schema12.z.strictObject({
221
+ id: import_schema12.z.null(),
203
222
  url: unknownChildrenSchema
204
223
  })
205
224
  )
206
225
  );
207
226
 
208
227
  // src/prop-types/dimensions.ts
209
- var import_schema12 = require("@elementor/schema");
228
+ var import_schema13 = require("@elementor/schema");
210
229
  var dimensionsPropTypeUtil = createPropUtils(
211
230
  "dimensions",
212
- import_schema12.z.strictObject({
231
+ import_schema13.z.strictObject({
213
232
  "block-start": unknownChildrenSchema,
214
233
  "block-end": unknownChildrenSchema,
215
234
  "inline-start": unknownChildrenSchema,
@@ -218,80 +237,112 @@ var dimensionsPropTypeUtil = createPropUtils(
218
237
  );
219
238
 
220
239
  // src/prop-types/number.ts
221
- var import_schema13 = require("@elementor/schema");
222
- var numberPropTypeUtil = createPropUtils("number", import_schema13.z.number().nullable());
240
+ var import_schema14 = require("@elementor/schema");
241
+ var numberPropTypeUtil = createPropUtils("number", import_schema14.z.number().nullable());
223
242
 
224
243
  // src/prop-types/size.ts
225
- var import_schema14 = require("@elementor/schema");
244
+ var import_schema15 = require("@elementor/schema");
226
245
  var sizePropTypeUtil = createPropUtils(
227
246
  "size",
228
- import_schema14.z.strictObject({
229
- unit: import_schema14.z.enum(["px", "em", "rem", "%", "vw", "vh"]),
230
- size: import_schema14.z.number()
247
+ import_schema15.z.strictObject({
248
+ unit: import_schema15.z.enum(["px", "em", "rem", "%", "vw", "vh"]),
249
+ size: import_schema15.z.number()
231
250
  }).or(
232
- import_schema14.z.strictObject({
233
- unit: import_schema14.z.literal("auto"),
234
- size: import_schema14.z.literal("")
251
+ import_schema15.z.strictObject({
252
+ unit: import_schema15.z.enum(["deg", "rad", "grad", "turn"]),
253
+ size: import_schema15.z.number()
254
+ })
255
+ ).or(
256
+ import_schema15.z.strictObject({
257
+ unit: import_schema15.z.enum(["s", "ms"]),
258
+ size: import_schema15.z.number()
259
+ })
260
+ ).or(
261
+ import_schema15.z.strictObject({
262
+ unit: import_schema15.z.literal("auto"),
263
+ size: import_schema15.z.literal("")
235
264
  })
236
265
  ).or(
237
- import_schema14.z.strictObject({
238
- unit: import_schema14.z.literal("custom"),
239
- size: import_schema14.z.string()
266
+ import_schema15.z.strictObject({
267
+ unit: import_schema15.z.literal("custom"),
268
+ size: import_schema15.z.string()
240
269
  })
241
270
  )
242
271
  );
243
272
 
244
273
  // src/prop-types/string.ts
245
- var import_schema15 = require("@elementor/schema");
246
- var stringPropTypeUtil = createPropUtils("string", import_schema15.z.string().nullable());
274
+ var import_schema16 = require("@elementor/schema");
275
+ var stringPropTypeUtil = createPropUtils("string", import_schema16.z.string().nullable());
247
276
 
248
277
  // src/prop-types/stroke.ts
249
- var import_schema16 = require("@elementor/schema");
278
+ var import_schema17 = require("@elementor/schema");
250
279
  var strokePropTypeUtil = createPropUtils(
251
280
  "stroke",
252
- import_schema16.z.strictObject({
281
+ import_schema17.z.strictObject({
253
282
  color: unknownChildrenSchema,
254
283
  width: unknownChildrenSchema
255
284
  })
256
285
  );
257
286
 
258
287
  // src/prop-types/url.ts
259
- var import_schema17 = require("@elementor/schema");
260
- var urlPropTypeUtil = createPropUtils("url", import_schema17.z.string().nullable());
288
+ var import_schema18 = require("@elementor/schema");
289
+ var urlPropTypeUtil = createPropUtils("url", import_schema18.z.string().nullable());
261
290
 
262
291
  // src/prop-types/layout-direction.ts
263
- var import_schema18 = require("@elementor/schema");
292
+ var import_schema19 = require("@elementor/schema");
264
293
  var layoutDirectionPropTypeUtil = createPropUtils(
265
294
  "layout-direction",
266
- import_schema18.z.object({
267
- row: import_schema18.z.any(),
268
- column: import_schema18.z.any()
295
+ import_schema19.z.object({
296
+ row: import_schema19.z.any(),
297
+ column: import_schema19.z.any()
269
298
  })
270
299
  );
271
300
 
272
301
  // src/prop-types/link.ts
273
- var import_schema19 = require("@elementor/schema");
302
+ var import_schema20 = require("@elementor/schema");
274
303
  var linkPropTypeUtil = createPropUtils(
275
304
  "link",
276
- import_schema19.z.strictObject({
305
+ import_schema20.z.strictObject({
277
306
  destination: unknownChildrenSchema,
278
307
  label: unknownChildrenSchema,
279
308
  isTargetBlank: unknownChildrenSchema
280
309
  })
281
310
  );
282
311
 
312
+ // src/prop-types/selection-size.ts
313
+ var import_schema22 = require("@elementor/schema");
314
+
315
+ // src/prop-types/key-value.ts
316
+ var import_schema21 = require("@elementor/schema");
317
+ var keyValuePropTypeUtil = createPropUtils(
318
+ "key-value",
319
+ import_schema21.z.strictObject({
320
+ key: unknownChildrenSchema,
321
+ value: unknownChildrenSchema
322
+ })
323
+ );
324
+
325
+ // src/prop-types/selection-size.ts
326
+ var selectionSizePropTypeUtil = createPropUtils(
327
+ "selection-size",
328
+ import_schema22.z.strictObject({
329
+ selection: import_schema22.z.union([keyValuePropTypeUtil.schema, stringPropTypeUtil.schema]),
330
+ size: sizePropTypeUtil.schema
331
+ })
332
+ );
333
+
283
334
  // src/prop-types/background-prop-types/background.ts
284
- var import_schema20 = require("@elementor/schema");
335
+ var import_schema23 = require("@elementor/schema");
285
336
  var backgroundPropTypeUtil = createPropUtils(
286
337
  "background",
287
- import_schema20.z.strictObject({
338
+ import_schema23.z.strictObject({
288
339
  color: unknownChildrenSchema,
289
340
  "background-overlay": unknownChildrenSchema
290
341
  })
291
342
  );
292
343
 
293
344
  // src/prop-types/background-prop-types/background-overlay.ts
294
- var import_schema21 = require("@elementor/schema");
345
+ var import_schema24 = require("@elementor/schema");
295
346
 
296
347
  // src/prop-types/background-prop-types/background-color-overlay.ts
297
348
  var backgroundColorOverlayPropTypeUtil = createPropUtils("background-color-overlay", unknownChildrenSchema);
@@ -307,7 +358,7 @@ var backgroundImageOverlayPropTypeUtil = createPropUtils("background-image-overl
307
358
 
308
359
  // src/prop-types/background-prop-types/background-overlay.ts
309
360
  var backgroundOverlayItem = backgroundColorOverlayPropTypeUtil.schema.or(backgroundGradientOverlayPropTypeUtil.schema).or(backgroundImageOverlayPropTypeUtil.schema);
310
- var backgroundOverlayPropTypeUtil = createPropUtils("background-overlay", import_schema21.z.array(backgroundOverlayItem));
361
+ var backgroundOverlayPropTypeUtil = createPropUtils("background-overlay", import_schema24.z.array(backgroundOverlayItem));
311
362
 
312
363
  // src/prop-types/background-prop-types/background-image-position-offset.ts
313
364
  var backgroundImagePositionOffsetPropTypeUtil = createPropUtils(
@@ -322,87 +373,132 @@ var backgroundImageSizeScalePropTypeUtil = createPropUtils(
322
373
  );
323
374
 
324
375
  // src/prop-types/boolean.ts
325
- var import_schema22 = require("@elementor/schema");
326
- var booleanPropTypeUtil = createPropUtils("boolean", import_schema22.z.boolean().nullable());
376
+ var import_schema25 = require("@elementor/schema");
377
+ var booleanPropTypeUtil = createPropUtils("boolean", import_schema25.z.boolean().nullable());
327
378
 
328
379
  // src/prop-types/color-stop.ts
329
- var import_schema23 = require("@elementor/schema");
380
+ var import_schema26 = require("@elementor/schema");
330
381
  var colorStopPropTypeUtil = createPropUtils(
331
382
  "color-stop",
332
- import_schema23.z.strictObject({
383
+ import_schema26.z.strictObject({
333
384
  color: unknownChildrenSchema,
334
385
  offset: unknownChildrenSchema
335
386
  })
336
387
  );
337
388
 
338
389
  // src/prop-types/gradient-color-stop.ts
339
- var import_schema24 = require("@elementor/schema");
390
+ var import_schema27 = require("@elementor/schema");
340
391
  var gradientColorStopPropTypeUtil = createPropUtils(
341
392
  "gradient-color-stop",
342
- import_schema24.z.array(colorStopPropTypeUtil.schema)
343
- );
344
-
345
- // src/prop-types/key-value.ts
346
- var import_schema25 = require("@elementor/schema");
347
- var keyValuePropTypeUtil = createPropUtils(
348
- "key-value",
349
- import_schema25.z.strictObject({
350
- key: unknownChildrenSchema,
351
- value: unknownChildrenSchema
352
- })
393
+ import_schema27.z.array(colorStopPropTypeUtil.schema)
353
394
  );
354
395
 
355
396
  // src/prop-types/position.ts
356
- var import_schema26 = require("@elementor/schema");
397
+ var import_schema28 = require("@elementor/schema");
357
398
  var positionPropTypeUtil = createPropUtils(
358
399
  "object-position",
359
- import_schema26.z.strictObject({
400
+ import_schema28.z.strictObject({
360
401
  x: sizePropTypeUtil.schema.nullable(),
361
402
  y: sizePropTypeUtil.schema.nullable()
362
403
  })
363
404
  );
364
405
 
365
406
  // src/prop-types/filter-prop-types/filter.ts
366
- var import_schema27 = require("@elementor/schema");
367
-
368
- // src/prop-types/filter-prop-types/blur-filter.ts
369
- var blurFilterPropTypeUtil = createPropUtils("blur", unknownChildrenSchema);
407
+ var import_schema30 = require("@elementor/schema");
370
408
 
371
- // src/prop-types/filter-prop-types/brightness-filter.ts
372
- var brightnessFilterPropTypeUtil = createPropUtils("brightness", unknownChildrenSchema);
409
+ // src/prop-types/filter-prop-types/drop-shadow-filter.ts
410
+ var import_schema29 = require("@elementor/schema");
411
+ var dropShadowFilterPropTypeUtil = createPropUtils(
412
+ "drop-shadow",
413
+ import_schema29.z.object({
414
+ xAxis: sizePropTypeUtil.schema,
415
+ yAxis: sizePropTypeUtil.schema,
416
+ blur: sizePropTypeUtil.schema,
417
+ color: unknownChildrenSchema
418
+ })
419
+ );
373
420
 
374
421
  // src/prop-types/filter-prop-types/filter.ts
375
- var filterTypes = blurFilterPropTypeUtil.schema.or(brightnessFilterPropTypeUtil.schema);
376
- var filterPropTypeUtil = createPropUtils("filter", import_schema27.z.array(filterTypes));
422
+ var cssFilterFunctionPropUtil = createPropUtils(
423
+ "css-filter-func",
424
+ import_schema30.z.object({
425
+ func: stringPropTypeUtil.schema,
426
+ args: import_schema30.z.union([sizePropTypeUtil.schema, dropShadowFilterPropTypeUtil.schema])
427
+ })
428
+ );
429
+ var filterPropTypeUtil = createPropUtils("filter", import_schema30.z.array(cssFilterFunctionPropUtil.schema));
377
430
 
378
431
  // src/prop-types/transform-prop-types/transform.ts
379
- var import_schema30 = require("@elementor/schema");
432
+ var import_schema35 = require("@elementor/schema");
433
+
434
+ // src/prop-types/transform-prop-types/move-transform.ts
435
+ var import_schema31 = require("@elementor/schema");
436
+
437
+ // src/prop-types/transform-prop-types/types.ts
438
+ var TransformFunctionKeys = {
439
+ move: "transform-move",
440
+ scale: "transform-scale",
441
+ rotate: "transform-rotate",
442
+ skew: "transform-skew"
443
+ };
380
444
 
381
445
  // src/prop-types/transform-prop-types/move-transform.ts
382
- var import_schema28 = require("@elementor/schema");
383
446
  var moveTransformPropTypeUtil = createPropUtils(
384
- "transform-move",
385
- import_schema28.z.strictObject({
447
+ TransformFunctionKeys.move,
448
+ import_schema31.z.strictObject({
386
449
  x: sizePropTypeUtil.schema.nullable(),
387
450
  y: sizePropTypeUtil.schema.nullable(),
388
451
  z: sizePropTypeUtil.schema.nullable()
389
452
  })
390
453
  );
391
454
 
392
- // src/prop-types/transform-prop-types/scale-transform.ts
393
- var import_schema29 = require("@elementor/schema");
394
- var scaleTransformPropTypeUtil = createPropUtils(
395
- "scale",
396
- import_schema29.z.strictObject({
455
+ // src/prop-types/transform-prop-types/rotate-transform.ts
456
+ var import_schema32 = require("@elementor/schema");
457
+ var rotateTransformPropTypeUtil = createPropUtils(
458
+ TransformFunctionKeys.rotate,
459
+ import_schema32.z.strictObject({
397
460
  x: sizePropTypeUtil.schema.nullable(),
398
461
  y: sizePropTypeUtil.schema.nullable(),
399
462
  z: sizePropTypeUtil.schema.nullable()
400
463
  })
401
464
  );
402
465
 
466
+ // src/prop-types/transform-prop-types/scale-transform.ts
467
+ var import_schema33 = require("@elementor/schema");
468
+ var scaleTransformPropTypeUtil = createPropUtils(
469
+ TransformFunctionKeys.scale,
470
+ import_schema33.z.strictObject({
471
+ x: numberPropTypeUtil.schema.nullable(),
472
+ y: numberPropTypeUtil.schema.nullable(),
473
+ z: numberPropTypeUtil.schema.nullable()
474
+ })
475
+ );
476
+
477
+ // src/prop-types/transform-prop-types/skew-transform.ts
478
+ var import_schema34 = require("@elementor/schema");
479
+ var skewTransformPropTypeUtil = createPropUtils(
480
+ TransformFunctionKeys.skew,
481
+ import_schema34.z.strictObject({
482
+ x: sizePropTypeUtil.schema.nullable(),
483
+ y: sizePropTypeUtil.schema.nullable()
484
+ })
485
+ );
486
+
403
487
  // src/prop-types/transform-prop-types/transform.ts
404
- var filterTypes2 = moveTransformPropTypeUtil.schema.or(scaleTransformPropTypeUtil.schema);
405
- var transformPropTypeUtil = createPropUtils("transform", import_schema30.z.array(filterTypes2));
488
+ var filterTypes = import_schema35.z.union([
489
+ moveTransformPropTypeUtil.schema,
490
+ scaleTransformPropTypeUtil.schema,
491
+ rotateTransformPropTypeUtil.schema,
492
+ skewTransformPropTypeUtil.schema
493
+ ]);
494
+ var transformPropTypeUtil = createPropUtils("transform", import_schema35.z.array(filterTypes));
495
+
496
+ // src/prop-types/filter-prop-types/backdrop-filter.ts
497
+ var import_schema36 = require("@elementor/schema");
498
+ var backdropFilterPropTypeUtil = createPropUtils(
499
+ "backdrop-filter",
500
+ import_schema36.z.array(cssFilterFunctionPropUtil.schema)
501
+ );
406
502
 
407
503
  // src/utils/merge-props.ts
408
504
  function mergeProps(current, updates) {
@@ -417,14 +513,26 @@ function mergeProps(current, updates) {
417
513
  return props;
418
514
  }
419
515
 
516
+ // src/utils/is-transformable.ts
517
+ var import_schema37 = require("@elementor/schema");
518
+ var transformableSchema = import_schema37.z.object({
519
+ $$type: import_schema37.z.string(),
520
+ value: import_schema37.z.any(),
521
+ disabled: import_schema37.z.boolean().optional()
522
+ });
523
+ var isTransformable = (value) => {
524
+ return transformableSchema.safeParse(value).success;
525
+ };
526
+
420
527
  // src/utils/prop-dependency-utils.ts
421
- function shouldApplyEffect({ relation, terms }, values) {
422
- if (!terms.length) {
423
- return false;
528
+ function isDependencyMet(dependency, values) {
529
+ if (!dependency?.terms.length) {
530
+ return true;
424
531
  }
532
+ const { relation, terms } = dependency;
425
533
  const method = getRelationMethod(relation);
426
534
  return terms[method](
427
- (term) => isDependency(term) ? shouldApplyEffect(term, values) : evaluateTerm(term, getValue(term.path, values))
535
+ (term) => isDependency(term) ? isDependencyMet(term, values) : evaluateTerm(term, extractValue(term.path, values)?.value)
428
536
  );
429
537
  }
430
538
  function evaluateTerm(term, actualValue) {
@@ -435,28 +543,26 @@ function evaluateTerm(term, actualValue) {
435
543
  return actualValue === valueToCompare === ("eq" === operator);
436
544
  case "gt":
437
545
  case "lte":
438
- if (isNaN(Number(actualValue)) || isNaN(Number(valueToCompare))) {
439
- throw new Error("Mathematical comparison requires numeric values.");
546
+ if (!isNumber(actualValue) || !isNumber(valueToCompare)) {
547
+ return false;
440
548
  }
441
549
  return Number(actualValue) > Number(valueToCompare) === ("gt" === operator);
442
550
  case "lt":
443
551
  case "gte":
444
- if (isNaN(Number(actualValue)) || isNaN(Number(valueToCompare))) {
445
- throw new Error("Mathematical comparison requires numeric values.");
552
+ if (!isNumber(actualValue) || !isNumber(valueToCompare)) {
553
+ return false;
446
554
  }
447
555
  return Number(actualValue) < Number(valueToCompare) === ("lt" === operator);
448
556
  case "in":
449
557
  case "nin":
450
558
  if (!Array.isArray(valueToCompare)) {
451
- throw new Error('The "in" and "nin" operators require an array for comparison.');
559
+ return false;
452
560
  }
453
561
  return valueToCompare.includes(actualValue) === ("in" === operator);
454
562
  case "contains":
455
563
  case "ncontains":
456
564
  if (("string" !== typeof actualValue || "string" !== typeof valueToCompare) && !Array.isArray(actualValue)) {
457
- throw new Error(
458
- 'The "contains" and "ncontains" operators require a string or an array for comparison.'
459
- );
565
+ return false;
460
566
  }
461
567
  return "contains" === operator === actualValue.includes(valueToCompare);
462
568
  case "exists":
@@ -464,9 +570,12 @@ function evaluateTerm(term, actualValue) {
464
570
  const evaluation = !!actualValue || 0 === actualValue || false === actualValue;
465
571
  return "exists" === operator === evaluation;
466
572
  default:
467
- return false;
573
+ return true;
468
574
  }
469
575
  }
576
+ function isNumber(value) {
577
+ return typeof value === "number" && !isNaN(value);
578
+ }
470
579
  function getRelationMethod(relation) {
471
580
  switch (relation) {
472
581
  case "or":
@@ -477,26 +586,16 @@ function getRelationMethod(relation) {
477
586
  throw new Error(`Relation not supported ${relation}`);
478
587
  }
479
588
  }
480
- function getValue(path, elementValues) {
481
- return path.reduce((acc, key) => {
482
- return "object" === typeof acc && acc !== null && key in acc ? acc[key]?.value : null;
589
+ function extractValue(path, elementValues) {
590
+ return path.reduce((acc, key, index) => {
591
+ const value = acc?.[key];
592
+ return index !== path.length - 1 && isTransformable(value) ? value.value ?? null : value;
483
593
  }, elementValues);
484
594
  }
485
595
  function isDependency(term) {
486
596
  return "relation" in term;
487
597
  }
488
598
 
489
- // src/utils/is-transformable.ts
490
- var import_schema31 = require("@elementor/schema");
491
- var transformableSchema = import_schema31.z.object({
492
- $$type: import_schema31.z.string(),
493
- value: import_schema31.z.any(),
494
- disabled: import_schema31.z.boolean().optional()
495
- });
496
- var isTransformable = (value) => {
497
- return transformableSchema.safeParse(value).success;
498
- };
499
-
500
599
  // src/utils/filter-empty-values.ts
501
600
  var filterEmptyValues = (value) => {
502
601
  if (isEmpty(value)) {
@@ -526,6 +625,7 @@ var isNullishObject = (value) => {
526
625
  // Annotate the CommonJS export names for ESM import in node:
527
626
  0 && (module.exports = {
528
627
  CLASSES_PROP_KEY,
628
+ backdropFilterPropTypeUtil,
529
629
  backgroundColorOverlayPropTypeUtil,
530
630
  backgroundGradientOverlayPropTypeUtil,
531
631
  backgroundImageOverlayPropTypeUtil,
@@ -533,25 +633,29 @@ var isNullishObject = (value) => {
533
633
  backgroundImageSizeScalePropTypeUtil,
534
634
  backgroundOverlayPropTypeUtil,
535
635
  backgroundPropTypeUtil,
536
- blurFilterPropTypeUtil,
537
636
  booleanPropTypeUtil,
538
637
  borderRadiusPropTypeUtil,
539
638
  borderWidthPropTypeUtil,
540
639
  boxShadowPropTypeUtil,
541
- brightnessFilterPropTypeUtil,
542
640
  classesPropTypeUtil,
543
641
  colorPropTypeUtil,
544
642
  colorStopPropTypeUtil,
545
643
  createArrayPropUtils,
546
644
  createPropUtils,
645
+ cssFilterFunctionPropUtil,
547
646
  dimensionsPropTypeUtil,
647
+ dropShadowFilterPropTypeUtil,
548
648
  evaluateTerm,
649
+ extractValue,
549
650
  filterEmptyValues,
550
651
  filterPropTypeUtil,
652
+ flexPropTypeUtil,
551
653
  gradientColorStopPropTypeUtil,
552
654
  imageAttachmentIdPropType,
553
655
  imagePropTypeUtil,
554
656
  imageSrcPropTypeUtil,
657
+ isDependency,
658
+ isDependencyMet,
555
659
  isEmpty,
556
660
  isTransformable,
557
661
  keyValuePropTypeUtil,
@@ -561,9 +665,12 @@ var isNullishObject = (value) => {
561
665
  moveTransformPropTypeUtil,
562
666
  numberPropTypeUtil,
563
667
  positionPropTypeUtil,
668
+ rotateTransformPropTypeUtil,
669
+ scaleTransformPropTypeUtil,
670
+ selectionSizePropTypeUtil,
564
671
  shadowPropTypeUtil,
565
- shouldApplyEffect,
566
672
  sizePropTypeUtil,
673
+ skewTransformPropTypeUtil,
567
674
  stringPropTypeUtil,
568
675
  strokePropTypeUtil,
569
676
  transformPropTypeUtil,