@elementor/editor-props 3.33.0-99 → 3.35.0-324
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 +231 -31
- package/dist/index.d.ts +231 -31
- package/dist/index.js +416 -77
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +411 -77
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +25 -5
- package/src/prop-types/background-prop-types/background.ts +1 -0
- package/src/prop-types/date-time.ts +14 -0
- package/src/prop-types/html.ts +7 -0
- package/src/prop-types/index.ts +3 -0
- package/src/prop-types/link.ts +0 -1
- package/src/prop-types/query.ts +14 -0
- package/src/types.ts +10 -3
- package/src/utils/adjust-llm-prop-value-schema.ts +82 -0
- package/src/utils/create-prop-utils.ts +10 -1
- package/src/utils/llm-schema-to-props.ts +190 -0
- package/src/utils/merge-props.ts +6 -1
- package/src/utils/prop-dependency-utils.ts +20 -7
- package/src/utils/prop-json-schema.ts +17 -0
- package/src/utils/props-to-llm-schema.ts +177 -0
package/dist/index.d.mts
CHANGED
|
@@ -6,15 +6,21 @@ type DependencyTerm = {
|
|
|
6
6
|
operator: DependencyOperator;
|
|
7
7
|
path: string[];
|
|
8
8
|
value: PropValue;
|
|
9
|
+
newValue?: TransformablePropValue$1<string>;
|
|
9
10
|
};
|
|
10
11
|
type Dependency = {
|
|
11
12
|
relation: 'or' | 'and';
|
|
12
13
|
terms: (DependencyTerm | Dependency)[];
|
|
13
14
|
};
|
|
15
|
+
type BasePropTypeMeta = {
|
|
16
|
+
description?: string;
|
|
17
|
+
[key: string]: unknown;
|
|
18
|
+
};
|
|
14
19
|
type BasePropType<TValue> = {
|
|
15
20
|
default?: TValue | null;
|
|
21
|
+
initial_value?: TValue | null;
|
|
16
22
|
settings: Record<string, unknown>;
|
|
17
|
-
meta:
|
|
23
|
+
meta: BasePropTypeMeta;
|
|
18
24
|
dependencies?: Dependency;
|
|
19
25
|
};
|
|
20
26
|
type PlainPropType = BasePropType<PlainPropValue> & {
|
|
@@ -52,8 +58,10 @@ type UnionPropType = BasePropType<PropValue> & {
|
|
|
52
58
|
kind: 'union';
|
|
53
59
|
prop_types: Record<string, TransformablePropType>;
|
|
54
60
|
};
|
|
55
|
-
type PropType = TransformablePropType | UnionPropType;
|
|
56
|
-
type PropsSchema = Record<string, PropType
|
|
61
|
+
type PropType<T = object> = (TransformablePropType | UnionPropType) & T;
|
|
62
|
+
type PropsSchema = Record<string, PropType<{
|
|
63
|
+
key?: string;
|
|
64
|
+
}>>;
|
|
57
65
|
type MaybeArray<T> = T | T[];
|
|
58
66
|
type TransformablePropValue$1<Type extends string, Value = unknown> = {
|
|
59
67
|
$$type: Type;
|
|
@@ -68,6 +76,30 @@ type PropValue = PlainPropValue | TransformablePropValue$1<string>;
|
|
|
68
76
|
type PropKey = string;
|
|
69
77
|
type Props = Record<PropKey, PropValue>;
|
|
70
78
|
|
|
79
|
+
type JsonSchema7 = {
|
|
80
|
+
type?: string | string[];
|
|
81
|
+
properties?: Record<string, JsonSchema7>;
|
|
82
|
+
items?: JsonSchema7;
|
|
83
|
+
enum?: unknown[];
|
|
84
|
+
anyOf?: JsonSchema7[];
|
|
85
|
+
oneOf?: JsonSchema7[];
|
|
86
|
+
allOf?: JsonSchema7[];
|
|
87
|
+
required?: string[];
|
|
88
|
+
description?: string;
|
|
89
|
+
default?: unknown;
|
|
90
|
+
if?: JsonSchema7;
|
|
91
|
+
then?: JsonSchema7;
|
|
92
|
+
else?: JsonSchema7;
|
|
93
|
+
key?: string;
|
|
94
|
+
[key: string]: unknown;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
declare function jsonSchemaToPropType(schema: JsonSchema7, key?: string): PropType;
|
|
98
|
+
|
|
99
|
+
declare function propTypeToJsonSchema(propType: PropType): JsonSchema7;
|
|
100
|
+
declare function isPropKeyConfigurable(propKey: string): boolean;
|
|
101
|
+
declare function configurableKeys(schema: PropsSchema): string[];
|
|
102
|
+
|
|
71
103
|
type Updater<T> = (prev?: T) => T;
|
|
72
104
|
type CreateOptions = {
|
|
73
105
|
base?: unknown;
|
|
@@ -88,6 +120,7 @@ type PropTypeUtil<TKey extends string, TValue extends PropValue> = ReturnType<ty
|
|
|
88
120
|
*
|
|
89
121
|
* ```
|
|
90
122
|
*/
|
|
123
|
+
declare function getPropSchemaFromCache(key: string): PropTypeUtil<string, PropValue> | undefined;
|
|
91
124
|
declare function createPropUtils<TKey extends string, TValue extends PropValue>(key: TKey, valueSchema: ZodType<TValue>): {
|
|
92
125
|
extract: (prop: unknown) => TValue | null;
|
|
93
126
|
isValid: (prop: unknown) => prop is TransformablePropValue$1<TKey, TValue>;
|
|
@@ -100,23 +133,23 @@ declare function createPropUtils<TKey extends string, TValue extends PropValue>(
|
|
|
100
133
|
$$type: z.ZodLiteral<TKey>;
|
|
101
134
|
value: z.ZodType<TValue, z.ZodTypeDef, TValue>;
|
|
102
135
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
103
|
-
}, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
136
|
+
}, "strict", z.ZodTypeAny, { [k in keyof z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
104
137
|
$$type: z.ZodLiteral<TKey>;
|
|
105
138
|
value: z.ZodType<TValue, z.ZodTypeDef, TValue>;
|
|
106
139
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
107
|
-
}>, any>
|
|
140
|
+
}>, any>]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
108
141
|
$$type: z.ZodLiteral<TKey>;
|
|
109
142
|
value: z.ZodType<TValue, z.ZodTypeDef, TValue>;
|
|
110
143
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
111
|
-
}>, any>[k]; }
|
|
144
|
+
}>, any>[k]; }, { [k_1 in keyof z.baseObjectInputType<{
|
|
112
145
|
$$type: z.ZodLiteral<TKey>;
|
|
113
146
|
value: z.ZodType<TValue, z.ZodTypeDef, TValue>;
|
|
114
147
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
115
|
-
}>
|
|
148
|
+
}>]: z.baseObjectInputType<{
|
|
116
149
|
$$type: z.ZodLiteral<TKey>;
|
|
117
150
|
value: z.ZodType<TValue, z.ZodTypeDef, TValue>;
|
|
118
151
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
119
|
-
}>[k_1]; }
|
|
152
|
+
}>[k_1]; }>;
|
|
120
153
|
key: TKey;
|
|
121
154
|
};
|
|
122
155
|
declare function createArrayPropUtils<TKey extends string, TValue extends PropValue>(key: TKey, valueSchema: ZodType<TValue>, overrideKey?: string): {
|
|
@@ -1443,44 +1476,35 @@ type LayoutDirectionPropValue = z.infer<typeof layoutDirectionPropTypeUtil.schem
|
|
|
1443
1476
|
declare const linkPropTypeUtil: {
|
|
1444
1477
|
extract: (prop: unknown) => {
|
|
1445
1478
|
destination?: any;
|
|
1446
|
-
label?: any;
|
|
1447
1479
|
isTargetBlank?: any;
|
|
1448
1480
|
} | null;
|
|
1449
1481
|
isValid: (prop: unknown) => prop is TransformablePropValue$1<"link", {
|
|
1450
1482
|
destination?: any;
|
|
1451
|
-
label?: any;
|
|
1452
1483
|
isTargetBlank?: any;
|
|
1453
1484
|
}>;
|
|
1454
1485
|
create: {
|
|
1455
1486
|
(value: {
|
|
1456
1487
|
destination?: any;
|
|
1457
|
-
label?: any;
|
|
1458
1488
|
isTargetBlank?: any;
|
|
1459
1489
|
}): TransformablePropValue$1<"link", {
|
|
1460
1490
|
destination?: any;
|
|
1461
|
-
label?: any;
|
|
1462
1491
|
isTargetBlank?: any;
|
|
1463
1492
|
}>;
|
|
1464
1493
|
(value: {
|
|
1465
1494
|
destination?: any;
|
|
1466
|
-
label?: any;
|
|
1467
1495
|
isTargetBlank?: any;
|
|
1468
1496
|
}, createOptions?: CreateOptions): TransformablePropValue$1<"link", {
|
|
1469
1497
|
destination?: any;
|
|
1470
|
-
label?: any;
|
|
1471
1498
|
isTargetBlank?: any;
|
|
1472
1499
|
}>;
|
|
1473
1500
|
(value: (prev?: {
|
|
1474
1501
|
destination?: any;
|
|
1475
|
-
label?: any;
|
|
1476
1502
|
isTargetBlank?: any;
|
|
1477
1503
|
} | undefined) => {
|
|
1478
1504
|
destination?: any;
|
|
1479
|
-
label?: any;
|
|
1480
1505
|
isTargetBlank?: any;
|
|
1481
1506
|
}, createOptions: CreateOptions): TransformablePropValue$1<"link", {
|
|
1482
1507
|
destination?: any;
|
|
1483
|
-
label?: any;
|
|
1484
1508
|
isTargetBlank?: any;
|
|
1485
1509
|
}>;
|
|
1486
1510
|
};
|
|
@@ -1488,11 +1512,9 @@ declare const linkPropTypeUtil: {
|
|
|
1488
1512
|
$$type: z.ZodLiteral<"link">;
|
|
1489
1513
|
value: z.ZodType<{
|
|
1490
1514
|
destination?: any;
|
|
1491
|
-
label?: any;
|
|
1492
1515
|
isTargetBlank?: any;
|
|
1493
1516
|
}, z.ZodTypeDef, {
|
|
1494
1517
|
destination?: any;
|
|
1495
|
-
label?: any;
|
|
1496
1518
|
isTargetBlank?: any;
|
|
1497
1519
|
}>;
|
|
1498
1520
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1500,7 +1522,6 @@ declare const linkPropTypeUtil: {
|
|
|
1500
1522
|
$$type: "link";
|
|
1501
1523
|
value: {
|
|
1502
1524
|
destination?: any;
|
|
1503
|
-
label?: any;
|
|
1504
1525
|
isTargetBlank?: any;
|
|
1505
1526
|
};
|
|
1506
1527
|
disabled?: boolean | undefined;
|
|
@@ -1508,7 +1529,6 @@ declare const linkPropTypeUtil: {
|
|
|
1508
1529
|
$$type: "link";
|
|
1509
1530
|
value: {
|
|
1510
1531
|
destination?: any;
|
|
1511
|
-
label?: any;
|
|
1512
1532
|
isTargetBlank?: any;
|
|
1513
1533
|
};
|
|
1514
1534
|
disabled?: boolean | undefined;
|
|
@@ -1727,35 +1747,44 @@ type SelectionSizePropValue = z.infer<typeof selectionSizePropTypeUtil.schema>;
|
|
|
1727
1747
|
declare const backgroundPropTypeUtil: {
|
|
1728
1748
|
extract: (prop: unknown) => {
|
|
1729
1749
|
color?: any;
|
|
1750
|
+
clip?: any;
|
|
1730
1751
|
'background-overlay'?: any;
|
|
1731
1752
|
} | null;
|
|
1732
1753
|
isValid: (prop: unknown) => prop is TransformablePropValue$1<"background", {
|
|
1733
1754
|
color?: any;
|
|
1755
|
+
clip?: any;
|
|
1734
1756
|
'background-overlay'?: any;
|
|
1735
1757
|
}>;
|
|
1736
1758
|
create: {
|
|
1737
1759
|
(value: {
|
|
1738
1760
|
color?: any;
|
|
1761
|
+
clip?: any;
|
|
1739
1762
|
'background-overlay'?: any;
|
|
1740
1763
|
}): TransformablePropValue$1<"background", {
|
|
1741
1764
|
color?: any;
|
|
1765
|
+
clip?: any;
|
|
1742
1766
|
'background-overlay'?: any;
|
|
1743
1767
|
}>;
|
|
1744
1768
|
(value: {
|
|
1745
1769
|
color?: any;
|
|
1770
|
+
clip?: any;
|
|
1746
1771
|
'background-overlay'?: any;
|
|
1747
1772
|
}, createOptions?: CreateOptions): TransformablePropValue$1<"background", {
|
|
1748
1773
|
color?: any;
|
|
1774
|
+
clip?: any;
|
|
1749
1775
|
'background-overlay'?: any;
|
|
1750
1776
|
}>;
|
|
1751
1777
|
(value: (prev?: {
|
|
1752
1778
|
color?: any;
|
|
1779
|
+
clip?: any;
|
|
1753
1780
|
'background-overlay'?: any;
|
|
1754
1781
|
} | undefined) => {
|
|
1755
1782
|
color?: any;
|
|
1783
|
+
clip?: any;
|
|
1756
1784
|
'background-overlay'?: any;
|
|
1757
1785
|
}, createOptions: CreateOptions): TransformablePropValue$1<"background", {
|
|
1758
1786
|
color?: any;
|
|
1787
|
+
clip?: any;
|
|
1759
1788
|
'background-overlay'?: any;
|
|
1760
1789
|
}>;
|
|
1761
1790
|
};
|
|
@@ -1763,9 +1792,11 @@ declare const backgroundPropTypeUtil: {
|
|
|
1763
1792
|
$$type: z.ZodLiteral<"background">;
|
|
1764
1793
|
value: z.ZodType<{
|
|
1765
1794
|
color?: any;
|
|
1795
|
+
clip?: any;
|
|
1766
1796
|
'background-overlay'?: any;
|
|
1767
1797
|
}, z.ZodTypeDef, {
|
|
1768
1798
|
color?: any;
|
|
1799
|
+
clip?: any;
|
|
1769
1800
|
'background-overlay'?: any;
|
|
1770
1801
|
}>;
|
|
1771
1802
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1773,6 +1804,7 @@ declare const backgroundPropTypeUtil: {
|
|
|
1773
1804
|
$$type: "background";
|
|
1774
1805
|
value: {
|
|
1775
1806
|
color?: any;
|
|
1807
|
+
clip?: any;
|
|
1776
1808
|
'background-overlay'?: any;
|
|
1777
1809
|
};
|
|
1778
1810
|
disabled?: boolean | undefined;
|
|
@@ -1780,6 +1812,7 @@ declare const backgroundPropTypeUtil: {
|
|
|
1780
1812
|
$$type: "background";
|
|
1781
1813
|
value: {
|
|
1782
1814
|
color?: any;
|
|
1815
|
+
clip?: any;
|
|
1783
1816
|
'background-overlay'?: any;
|
|
1784
1817
|
};
|
|
1785
1818
|
disabled?: boolean | undefined;
|
|
@@ -2401,6 +2434,70 @@ declare const keyValuePropTypeUtil: {
|
|
|
2401
2434
|
};
|
|
2402
2435
|
type KeyValuePropValue = z.infer<typeof keyValuePropTypeUtil.schema>;
|
|
2403
2436
|
|
|
2437
|
+
declare const DateTimePropTypeUtil: {
|
|
2438
|
+
extract: (prop: unknown) => {
|
|
2439
|
+
date?: any;
|
|
2440
|
+
time?: any;
|
|
2441
|
+
} | null;
|
|
2442
|
+
isValid: (prop: unknown) => prop is TransformablePropValue$1<"date-time", {
|
|
2443
|
+
date?: any;
|
|
2444
|
+
time?: any;
|
|
2445
|
+
}>;
|
|
2446
|
+
create: {
|
|
2447
|
+
(value: {
|
|
2448
|
+
date?: any;
|
|
2449
|
+
time?: any;
|
|
2450
|
+
}): TransformablePropValue$1<"date-time", {
|
|
2451
|
+
date?: any;
|
|
2452
|
+
time?: any;
|
|
2453
|
+
}>;
|
|
2454
|
+
(value: {
|
|
2455
|
+
date?: any;
|
|
2456
|
+
time?: any;
|
|
2457
|
+
}, createOptions?: CreateOptions): TransformablePropValue$1<"date-time", {
|
|
2458
|
+
date?: any;
|
|
2459
|
+
time?: any;
|
|
2460
|
+
}>;
|
|
2461
|
+
(value: (prev?: {
|
|
2462
|
+
date?: any;
|
|
2463
|
+
time?: any;
|
|
2464
|
+
} | undefined) => {
|
|
2465
|
+
date?: any;
|
|
2466
|
+
time?: any;
|
|
2467
|
+
}, createOptions: CreateOptions): TransformablePropValue$1<"date-time", {
|
|
2468
|
+
date?: any;
|
|
2469
|
+
time?: any;
|
|
2470
|
+
}>;
|
|
2471
|
+
};
|
|
2472
|
+
schema: z.ZodObject<{
|
|
2473
|
+
$$type: z.ZodLiteral<"date-time">;
|
|
2474
|
+
value: z.ZodType<{
|
|
2475
|
+
date?: any;
|
|
2476
|
+
time?: any;
|
|
2477
|
+
}, z.ZodTypeDef, {
|
|
2478
|
+
date?: any;
|
|
2479
|
+
time?: any;
|
|
2480
|
+
}>;
|
|
2481
|
+
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
2482
|
+
}, "strict", z.ZodTypeAny, {
|
|
2483
|
+
$$type: "date-time";
|
|
2484
|
+
value: {
|
|
2485
|
+
date?: any;
|
|
2486
|
+
time?: any;
|
|
2487
|
+
};
|
|
2488
|
+
disabled?: boolean | undefined;
|
|
2489
|
+
}, {
|
|
2490
|
+
$$type: "date-time";
|
|
2491
|
+
value: {
|
|
2492
|
+
date?: any;
|
|
2493
|
+
time?: any;
|
|
2494
|
+
};
|
|
2495
|
+
disabled?: boolean | undefined;
|
|
2496
|
+
}>;
|
|
2497
|
+
key: "date-time";
|
|
2498
|
+
};
|
|
2499
|
+
type DateTimePropValue = z.infer<typeof DateTimePropTypeUtil.schema>;
|
|
2500
|
+
|
|
2404
2501
|
declare const positionPropTypeUtil: {
|
|
2405
2502
|
extract: (prop: unknown) => {
|
|
2406
2503
|
x?: any;
|
|
@@ -2465,6 +2562,95 @@ declare const positionPropTypeUtil: {
|
|
|
2465
2562
|
};
|
|
2466
2563
|
type PositionPropTypeValue = z.infer<typeof positionPropTypeUtil.schema>;
|
|
2467
2564
|
|
|
2565
|
+
declare const queryPropTypeUtil: {
|
|
2566
|
+
extract: (prop: unknown) => {
|
|
2567
|
+
id?: any;
|
|
2568
|
+
label?: any;
|
|
2569
|
+
} | null;
|
|
2570
|
+
isValid: (prop: unknown) => prop is TransformablePropValue$1<"query", {
|
|
2571
|
+
id?: any;
|
|
2572
|
+
label?: any;
|
|
2573
|
+
}>;
|
|
2574
|
+
create: {
|
|
2575
|
+
(value: {
|
|
2576
|
+
id?: any;
|
|
2577
|
+
label?: any;
|
|
2578
|
+
}): TransformablePropValue$1<"query", {
|
|
2579
|
+
id?: any;
|
|
2580
|
+
label?: any;
|
|
2581
|
+
}>;
|
|
2582
|
+
(value: {
|
|
2583
|
+
id?: any;
|
|
2584
|
+
label?: any;
|
|
2585
|
+
}, createOptions?: CreateOptions): TransformablePropValue$1<"query", {
|
|
2586
|
+
id?: any;
|
|
2587
|
+
label?: any;
|
|
2588
|
+
}>;
|
|
2589
|
+
(value: (prev?: {
|
|
2590
|
+
id?: any;
|
|
2591
|
+
label?: any;
|
|
2592
|
+
} | undefined) => {
|
|
2593
|
+
id?: any;
|
|
2594
|
+
label?: any;
|
|
2595
|
+
}, createOptions: CreateOptions): TransformablePropValue$1<"query", {
|
|
2596
|
+
id?: any;
|
|
2597
|
+
label?: any;
|
|
2598
|
+
}>;
|
|
2599
|
+
};
|
|
2600
|
+
schema: z.ZodObject<{
|
|
2601
|
+
$$type: z.ZodLiteral<"query">;
|
|
2602
|
+
value: z.ZodType<{
|
|
2603
|
+
id?: any;
|
|
2604
|
+
label?: any;
|
|
2605
|
+
}, z.ZodTypeDef, {
|
|
2606
|
+
id?: any;
|
|
2607
|
+
label?: any;
|
|
2608
|
+
}>;
|
|
2609
|
+
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
2610
|
+
}, "strict", z.ZodTypeAny, {
|
|
2611
|
+
$$type: "query";
|
|
2612
|
+
value: {
|
|
2613
|
+
id?: any;
|
|
2614
|
+
label?: any;
|
|
2615
|
+
};
|
|
2616
|
+
disabled?: boolean | undefined;
|
|
2617
|
+
}, {
|
|
2618
|
+
$$type: "query";
|
|
2619
|
+
value: {
|
|
2620
|
+
id?: any;
|
|
2621
|
+
label?: any;
|
|
2622
|
+
};
|
|
2623
|
+
disabled?: boolean | undefined;
|
|
2624
|
+
}>;
|
|
2625
|
+
key: "query";
|
|
2626
|
+
};
|
|
2627
|
+
type QueryPropValue = z.infer<typeof queryPropTypeUtil.schema>;
|
|
2628
|
+
|
|
2629
|
+
declare const htmlPropTypeUtil: {
|
|
2630
|
+
extract: (prop: unknown) => string | null;
|
|
2631
|
+
isValid: (prop: unknown) => prop is TransformablePropValue$1<"html", string | null>;
|
|
2632
|
+
create: {
|
|
2633
|
+
(value: string | null): TransformablePropValue$1<"html", string | null>;
|
|
2634
|
+
(value: string | null, createOptions?: CreateOptions): TransformablePropValue$1<"html", string | null>;
|
|
2635
|
+
(value: (prev?: string | null | undefined) => string | null, createOptions: CreateOptions): TransformablePropValue$1<"html", string | null>;
|
|
2636
|
+
};
|
|
2637
|
+
schema: z.ZodObject<{
|
|
2638
|
+
$$type: z.ZodLiteral<"html">;
|
|
2639
|
+
value: z.ZodType<string | null, z.ZodTypeDef, string | null>;
|
|
2640
|
+
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
2641
|
+
}, "strict", z.ZodTypeAny, {
|
|
2642
|
+
$$type: "html";
|
|
2643
|
+
value: string | null;
|
|
2644
|
+
disabled?: boolean | undefined;
|
|
2645
|
+
}, {
|
|
2646
|
+
$$type: "html";
|
|
2647
|
+
value: string | null;
|
|
2648
|
+
disabled?: boolean | undefined;
|
|
2649
|
+
}>;
|
|
2650
|
+
key: "html";
|
|
2651
|
+
};
|
|
2652
|
+
type HtmlPropValue = z.infer<typeof htmlPropTypeUtil.schema>;
|
|
2653
|
+
|
|
2468
2654
|
declare const cssFilterFunctionPropUtil: {
|
|
2469
2655
|
extract: (prop: unknown) => {
|
|
2470
2656
|
func: {
|
|
@@ -5918,12 +6104,9 @@ declare const hueRotateFilterPropTypeUtil: {
|
|
|
5918
6104
|
key: "hue-rotate";
|
|
5919
6105
|
};
|
|
5920
6106
|
|
|
5921
|
-
declare
|
|
5922
|
-
|
|
5923
|
-
declare
|
|
5924
|
-
declare function evaluateTerm(term: DependencyTerm, actualValue: unknown): boolean;
|
|
5925
|
-
declare function extractValue(path: string[], elementValues: PropValue): TransformablePropValue$1<PropKey> | null;
|
|
5926
|
-
declare function isDependency(term: DependencyTerm | Dependency): term is Dependency;
|
|
6107
|
+
declare const filterEmptyValues: <TValue extends PropValue>(value: TValue) => TValue | null;
|
|
6108
|
+
type Nullish = null | undefined | '';
|
|
6109
|
+
declare const isEmpty: (value: PropValue) => value is Nullish;
|
|
5927
6110
|
|
|
5928
6111
|
declare const transformableSchema: z.ZodObject<{
|
|
5929
6112
|
$$type: z.ZodString;
|
|
@@ -5941,8 +6124,25 @@ declare const transformableSchema: z.ZodObject<{
|
|
|
5941
6124
|
type TransformablePropValue = z.infer<typeof transformableSchema>;
|
|
5942
6125
|
declare const isTransformable: (value: unknown) => value is TransformablePropValue;
|
|
5943
6126
|
|
|
5944
|
-
declare
|
|
5945
|
-
|
|
5946
|
-
declare
|
|
6127
|
+
declare function mergeProps(current: Props, updates: Props): Props;
|
|
6128
|
+
|
|
6129
|
+
declare function isDependencyMet(dependency: Dependency | undefined, values: PropValue): {
|
|
6130
|
+
isMet: true;
|
|
6131
|
+
} | {
|
|
6132
|
+
isMet: false;
|
|
6133
|
+
failingDependencies: DependencyTerm[];
|
|
6134
|
+
};
|
|
6135
|
+
declare function evaluateTerm(term: DependencyTerm, actualValue: unknown): boolean;
|
|
6136
|
+
declare function extractValue(path: string[], elementValues: PropValue): TransformablePropValue$1<PropKey> | null;
|
|
6137
|
+
declare function isDependency(term: DependencyTerm | Dependency): term is Dependency;
|
|
6138
|
+
|
|
6139
|
+
declare const Schema: {
|
|
6140
|
+
jsonSchemaToPropType: typeof jsonSchemaToPropType;
|
|
6141
|
+
propTypeToJsonSchema: typeof propTypeToJsonSchema;
|
|
6142
|
+
adjustLlmPropValueSchema: (value: Readonly<PropValue>, forceKey?: string) => PropValue;
|
|
6143
|
+
isPropKeyConfigurable: typeof isPropKeyConfigurable;
|
|
6144
|
+
nonConfigurablePropKeys: readonly string[];
|
|
6145
|
+
configurableKeys: typeof configurableKeys;
|
|
6146
|
+
};
|
|
5947
6147
|
|
|
5948
|
-
export { type AnyTransformable, type ArrayPropType, type ArrayPropValue, type BackdropFilterItemPropValue, type BackdropFilterPropValue, type BackgroundColorOverlayPropValue, type BackgroundGradientOverlayPropValue, type BackgroundImageOverlayPropValue, type BackgroundImagePositionOffsetPropValue, type BackgroundImageSizeScalePropValue, type BackgroundOverlayImagePropType, type BackgroundOverlayItemPropValue, type BackgroundOverlayPropType, type BackgroundOverlayPropValue, type BackgroundPropValue, type BooleanPropValue, type BorderRadiusPropValue, type BorderWidthPropValue, type BoxShadowPropValue, CLASSES_PROP_KEY, type ClassesPropValue, type ColorPropValue, type ColorStopPropValue, type CreateOptions, type Dependency, type DependencyOperator, type DependencyTerm, type DimensionsPropValue, type DropShadowFilterPropValue, type FilterItemPropValue, type FilterPropValue, type FlexPropValue, type GradientColorStopPropValue, type ImageAttachmentIdPropValue, type ImagePropValue, type ImageSrcPropValue, type KeyValuePropValue, type LayoutDirectionPropValue, type LinkPropValue, type MoveTransformPropValue, type NumberPropValue, type ObjectPropType, type ObjectPropValue, type PerspectiveOriginPropValue, type PlainPropType, type PlainPropValue, type PositionPropTypeValue, type PropKey, type PropType, type PropTypeKey, type PropTypeUtil, type PropValue, type Props, type PropsSchema, type RotateTransformPropValue, type ScaleTransformPropValue, type SelectionSizePropValue, type ShadowPropValue, type SizePropValue, type SkewTransformPropValue, type StringPropValue, type StrokePropValue, type TransformFunctionsItemPropValue, type TransformFunctionsPropValue, type TransformOriginPropValue, type TransformPropValue, type TransformablePropType, type TransformablePropValue$1 as TransformablePropValue, type UnionPropType, type UrlPropValue, backdropFilterPropTypeUtil, backgroundColorOverlayPropTypeUtil, backgroundGradientOverlayPropTypeUtil, backgroundImageOverlayPropTypeUtil, backgroundImagePositionOffsetPropTypeUtil, backgroundImageSizeScalePropTypeUtil, backgroundOverlayItem, backgroundOverlayPropTypeUtil, backgroundPropTypeUtil, blurFilterPropTypeUtil, booleanPropTypeUtil, borderRadiusPropTypeUtil, borderWidthPropTypeUtil, boxShadowPropTypeUtil, classesPropTypeUtil, colorPropTypeUtil, colorStopPropTypeUtil, colorToneFilterPropTypeUtil, createArrayPropUtils, createPropUtils, cssFilterFunctionPropUtil, dimensionsPropTypeUtil, dropShadowFilterPropTypeUtil, evaluateTerm, extractValue, filterEmptyValues, filterPropTypeUtil, flexPropTypeUtil, gradientColorStopPropTypeUtil, hueRotateFilterPropTypeUtil, imageAttachmentIdPropType, imagePropTypeUtil, imageSrcPropTypeUtil, intensityFilterPropTypeUtil, isDependency, isDependencyMet, isEmpty, isTransformable, keyValuePropTypeUtil, layoutDirectionPropTypeUtil, linkPropTypeUtil, mergeProps, moveTransformPropTypeUtil, numberPropTypeUtil, perspectiveOriginPropTypeUtil, positionPropTypeUtil, rotateTransformPropTypeUtil, scaleTransformPropTypeUtil, selectionSizePropTypeUtil, shadowPropTypeUtil, sizePropTypeUtil, skewTransformPropTypeUtil, stringPropTypeUtil, strokePropTypeUtil, transformFunctionsPropTypeUtil, transformOriginPropTypeUtil, transformPropTypeUtil, urlPropTypeUtil };
|
|
6148
|
+
export { type AnyTransformable, type ArrayPropType, type ArrayPropValue, type BackdropFilterItemPropValue, type BackdropFilterPropValue, type BackgroundColorOverlayPropValue, type BackgroundGradientOverlayPropValue, type BackgroundImageOverlayPropValue, type BackgroundImagePositionOffsetPropValue, type BackgroundImageSizeScalePropValue, type BackgroundOverlayImagePropType, type BackgroundOverlayItemPropValue, type BackgroundOverlayPropType, type BackgroundOverlayPropValue, type BackgroundPropValue, type BooleanPropValue, type BorderRadiusPropValue, type BorderWidthPropValue, type BoxShadowPropValue, CLASSES_PROP_KEY, type ClassesPropValue, type ColorPropValue, type ColorStopPropValue, type CreateOptions, DateTimePropTypeUtil, type DateTimePropValue, type Dependency, type DependencyOperator, type DependencyTerm, type DimensionsPropValue, type DropShadowFilterPropValue, type FilterItemPropValue, type FilterPropValue, type FlexPropValue, type GradientColorStopPropValue, type HtmlPropValue, type ImageAttachmentIdPropValue, type ImagePropValue, type ImageSrcPropValue, type JsonSchema7, type KeyValuePropValue, type LayoutDirectionPropValue, type LinkPropValue, type MoveTransformPropValue, type NumberPropValue, type ObjectPropType, type ObjectPropValue, type PerspectiveOriginPropValue, type PlainPropType, type PlainPropValue, type PositionPropTypeValue, type PropKey, type PropType, type PropTypeKey, type PropTypeUtil, type PropValue, type Props, type PropsSchema, type QueryPropValue, type RotateTransformPropValue, type ScaleTransformPropValue, Schema, type SelectionSizePropValue, type ShadowPropValue, type SizePropValue, type SkewTransformPropValue, type StringPropValue, type StrokePropValue, type TransformFunctionsItemPropValue, type TransformFunctionsPropValue, type TransformOriginPropValue, type TransformPropValue, type TransformablePropType, type TransformablePropValue$1 as TransformablePropValue, type UnionPropType, type UrlPropValue, backdropFilterPropTypeUtil, backgroundColorOverlayPropTypeUtil, backgroundGradientOverlayPropTypeUtil, backgroundImageOverlayPropTypeUtil, backgroundImagePositionOffsetPropTypeUtil, backgroundImageSizeScalePropTypeUtil, backgroundOverlayItem, backgroundOverlayPropTypeUtil, backgroundPropTypeUtil, blurFilterPropTypeUtil, booleanPropTypeUtil, borderRadiusPropTypeUtil, borderWidthPropTypeUtil, boxShadowPropTypeUtil, classesPropTypeUtil, colorPropTypeUtil, colorStopPropTypeUtil, colorToneFilterPropTypeUtil, createArrayPropUtils, createPropUtils, cssFilterFunctionPropUtil, dimensionsPropTypeUtil, dropShadowFilterPropTypeUtil, evaluateTerm, extractValue, filterEmptyValues, filterPropTypeUtil, flexPropTypeUtil, getPropSchemaFromCache, gradientColorStopPropTypeUtil, htmlPropTypeUtil, hueRotateFilterPropTypeUtil, imageAttachmentIdPropType, imagePropTypeUtil, imageSrcPropTypeUtil, intensityFilterPropTypeUtil, isDependency, isDependencyMet, isEmpty, isTransformable, keyValuePropTypeUtil, layoutDirectionPropTypeUtil, linkPropTypeUtil, mergeProps, moveTransformPropTypeUtil, numberPropTypeUtil, perspectiveOriginPropTypeUtil, positionPropTypeUtil, queryPropTypeUtil, rotateTransformPropTypeUtil, scaleTransformPropTypeUtil, selectionSizePropTypeUtil, shadowPropTypeUtil, sizePropTypeUtil, skewTransformPropTypeUtil, stringPropTypeUtil, strokePropTypeUtil, transformFunctionsPropTypeUtil, transformOriginPropTypeUtil, transformPropTypeUtil, urlPropTypeUtil };
|