@elementor/editor-props 4.0.0-552 → 4.0.0-564
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 +155 -24
- package/dist/index.d.ts +155 -24
- package/dist/index.js +108 -34
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +106 -34
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +1 -0
- package/src/prop-types/html-v2.ts +30 -0
- package/src/prop-types/index.ts +1 -0
- package/src/prop-types/string-array.ts +4 -3
- package/src/utils/parse-html-children.ts +82 -0
package/dist/index.d.mts
CHANGED
|
@@ -138,23 +138,15 @@ declare function createPropUtils<TKey extends string, TValue extends PropValue>(
|
|
|
138
138
|
$$type: z.ZodLiteral<TKey>;
|
|
139
139
|
value: z.ZodType<TValue, z.ZodTypeDef, TValue>;
|
|
140
140
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
141
|
-
}, "strict", z.ZodTypeAny,
|
|
141
|
+
}, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
142
142
|
$$type: z.ZodLiteral<TKey>;
|
|
143
143
|
value: z.ZodType<TValue, z.ZodTypeDef, TValue>;
|
|
144
144
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
145
|
-
}>, any>]: z.
|
|
145
|
+
}>, any> extends infer T ? { [k in keyof T]: T[k]; } : never, z.baseObjectInputType<{
|
|
146
146
|
$$type: z.ZodLiteral<TKey>;
|
|
147
147
|
value: z.ZodType<TValue, z.ZodTypeDef, TValue>;
|
|
148
148
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
149
|
-
}
|
|
150
|
-
$$type: z.ZodLiteral<TKey>;
|
|
151
|
-
value: z.ZodType<TValue, z.ZodTypeDef, TValue>;
|
|
152
|
-
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
153
|
-
}>]: z.baseObjectInputType<{
|
|
154
|
-
$$type: z.ZodLiteral<TKey>;
|
|
155
|
-
value: z.ZodType<TValue, z.ZodTypeDef, TValue>;
|
|
156
|
-
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
157
|
-
}>[k_1]; }>;
|
|
149
|
+
}> extends infer T_1 ? { [k_1 in keyof T_1]: T_1[k_1]; } : never>;
|
|
158
150
|
key: TKey;
|
|
159
151
|
};
|
|
160
152
|
declare function createArrayPropUtils<TKey extends string, TValue extends PropValue>(key: TKey, valueSchema: ZodType<TValue>, overrideKey?: string): {
|
|
@@ -1326,27 +1318,79 @@ declare const stringPropTypeUtil: {
|
|
|
1326
1318
|
type StringPropValue = z.infer<typeof stringPropTypeUtil.schema>;
|
|
1327
1319
|
|
|
1328
1320
|
declare const stringArrayPropTypeUtil: {
|
|
1329
|
-
extract: (prop: unknown) =>
|
|
1330
|
-
|
|
1321
|
+
extract: (prop: unknown) => {
|
|
1322
|
+
$$type: "string";
|
|
1323
|
+
value: string | null;
|
|
1324
|
+
disabled?: boolean | undefined;
|
|
1325
|
+
}[] | null;
|
|
1326
|
+
isValid: (prop: unknown) => prop is TransformablePropValue$1<string, {
|
|
1327
|
+
$$type: "string";
|
|
1328
|
+
value: string | null;
|
|
1329
|
+
disabled?: boolean | undefined;
|
|
1330
|
+
}[]>;
|
|
1331
1331
|
create: {
|
|
1332
|
-
(value:
|
|
1333
|
-
|
|
1334
|
-
|
|
1332
|
+
(value: {
|
|
1333
|
+
$$type: "string";
|
|
1334
|
+
value: string | null;
|
|
1335
|
+
disabled?: boolean | undefined;
|
|
1336
|
+
}[]): TransformablePropValue$1<string, {
|
|
1337
|
+
$$type: "string";
|
|
1338
|
+
value: string | null;
|
|
1339
|
+
disabled?: boolean | undefined;
|
|
1340
|
+
}[]>;
|
|
1341
|
+
(value: {
|
|
1342
|
+
$$type: "string";
|
|
1343
|
+
value: string | null;
|
|
1344
|
+
disabled?: boolean | undefined;
|
|
1345
|
+
}[], createOptions?: CreateOptions): TransformablePropValue$1<string, {
|
|
1346
|
+
$$type: "string";
|
|
1347
|
+
value: string | null;
|
|
1348
|
+
disabled?: boolean | undefined;
|
|
1349
|
+
}[]>;
|
|
1350
|
+
(value: (prev?: {
|
|
1351
|
+
$$type: "string";
|
|
1352
|
+
value: string | null;
|
|
1353
|
+
disabled?: boolean | undefined;
|
|
1354
|
+
}[] | undefined) => {
|
|
1355
|
+
$$type: "string";
|
|
1356
|
+
value: string | null;
|
|
1357
|
+
disabled?: boolean | undefined;
|
|
1358
|
+
}[], createOptions: CreateOptions): TransformablePropValue$1<string, {
|
|
1359
|
+
$$type: "string";
|
|
1360
|
+
value: string | null;
|
|
1361
|
+
disabled?: boolean | undefined;
|
|
1362
|
+
}[]>;
|
|
1335
1363
|
};
|
|
1336
1364
|
schema: z.ZodObject<{
|
|
1337
|
-
$$type: z.ZodLiteral<
|
|
1338
|
-
value: z.ZodType<
|
|
1365
|
+
$$type: z.ZodLiteral<string>;
|
|
1366
|
+
value: z.ZodType<{
|
|
1367
|
+
$$type: "string";
|
|
1368
|
+
value: string | null;
|
|
1369
|
+
disabled?: boolean | undefined;
|
|
1370
|
+
}[], z.ZodTypeDef, {
|
|
1371
|
+
$$type: "string";
|
|
1372
|
+
value: string | null;
|
|
1373
|
+
disabled?: boolean | undefined;
|
|
1374
|
+
}[]>;
|
|
1339
1375
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
1340
1376
|
}, "strict", z.ZodTypeAny, {
|
|
1341
|
-
$$type:
|
|
1342
|
-
value:
|
|
1377
|
+
$$type: string;
|
|
1378
|
+
value: {
|
|
1379
|
+
$$type: "string";
|
|
1380
|
+
value: string | null;
|
|
1381
|
+
disabled?: boolean | undefined;
|
|
1382
|
+
}[];
|
|
1343
1383
|
disabled?: boolean | undefined;
|
|
1344
1384
|
}, {
|
|
1345
|
-
$$type:
|
|
1346
|
-
value:
|
|
1385
|
+
$$type: string;
|
|
1386
|
+
value: {
|
|
1387
|
+
$$type: "string";
|
|
1388
|
+
value: string | null;
|
|
1389
|
+
disabled?: boolean | undefined;
|
|
1390
|
+
}[];
|
|
1347
1391
|
disabled?: boolean | undefined;
|
|
1348
1392
|
}>;
|
|
1349
|
-
key:
|
|
1393
|
+
key: string;
|
|
1350
1394
|
};
|
|
1351
1395
|
type StringArrayPropValue = z.infer<typeof stringArrayPropTypeUtil.schema>;
|
|
1352
1396
|
|
|
@@ -2694,6 +2738,87 @@ declare const htmlPropTypeUtil: {
|
|
|
2694
2738
|
};
|
|
2695
2739
|
type HtmlPropValue = z.infer<typeof htmlPropTypeUtil.schema>;
|
|
2696
2740
|
|
|
2741
|
+
interface ChildElement {
|
|
2742
|
+
id: string;
|
|
2743
|
+
type: string;
|
|
2744
|
+
content?: string;
|
|
2745
|
+
children?: ChildElement[];
|
|
2746
|
+
}
|
|
2747
|
+
declare const htmlV2ValueSchema: z.ZodObject<{
|
|
2748
|
+
content: z.ZodNullable<z.ZodString>;
|
|
2749
|
+
children: z.ZodArray<z.ZodType<ChildElement, z.ZodTypeDef, ChildElement>, "many">;
|
|
2750
|
+
}, "strip", z.ZodTypeAny, {
|
|
2751
|
+
content: string | null;
|
|
2752
|
+
children: ChildElement[];
|
|
2753
|
+
}, {
|
|
2754
|
+
content: string | null;
|
|
2755
|
+
children: ChildElement[];
|
|
2756
|
+
}>;
|
|
2757
|
+
declare const htmlV2PropTypeUtil: {
|
|
2758
|
+
extract: (prop: unknown) => {
|
|
2759
|
+
content: string | null;
|
|
2760
|
+
children: ChildElement[];
|
|
2761
|
+
} | null;
|
|
2762
|
+
isValid: (prop: unknown) => prop is TransformablePropValue$1<"html-v2", {
|
|
2763
|
+
content: string | null;
|
|
2764
|
+
children: ChildElement[];
|
|
2765
|
+
}>;
|
|
2766
|
+
create: {
|
|
2767
|
+
(value: {
|
|
2768
|
+
content: string | null;
|
|
2769
|
+
children: ChildElement[];
|
|
2770
|
+
}): TransformablePropValue$1<"html-v2", {
|
|
2771
|
+
content: string | null;
|
|
2772
|
+
children: ChildElement[];
|
|
2773
|
+
}>;
|
|
2774
|
+
(value: {
|
|
2775
|
+
content: string | null;
|
|
2776
|
+
children: ChildElement[];
|
|
2777
|
+
}, createOptions?: CreateOptions): TransformablePropValue$1<"html-v2", {
|
|
2778
|
+
content: string | null;
|
|
2779
|
+
children: ChildElement[];
|
|
2780
|
+
}>;
|
|
2781
|
+
(value: (prev?: {
|
|
2782
|
+
content: string | null;
|
|
2783
|
+
children: ChildElement[];
|
|
2784
|
+
} | undefined) => {
|
|
2785
|
+
content: string | null;
|
|
2786
|
+
children: ChildElement[];
|
|
2787
|
+
}, createOptions: CreateOptions): TransformablePropValue$1<"html-v2", {
|
|
2788
|
+
content: string | null;
|
|
2789
|
+
children: ChildElement[];
|
|
2790
|
+
}>;
|
|
2791
|
+
};
|
|
2792
|
+
schema: z.ZodObject<{
|
|
2793
|
+
$$type: z.ZodLiteral<"html-v2">;
|
|
2794
|
+
value: z.ZodType<{
|
|
2795
|
+
content: string | null;
|
|
2796
|
+
children: ChildElement[];
|
|
2797
|
+
}, z.ZodTypeDef, {
|
|
2798
|
+
content: string | null;
|
|
2799
|
+
children: ChildElement[];
|
|
2800
|
+
}>;
|
|
2801
|
+
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
2802
|
+
}, "strict", z.ZodTypeAny, {
|
|
2803
|
+
$$type: "html-v2";
|
|
2804
|
+
value: {
|
|
2805
|
+
content: string | null;
|
|
2806
|
+
children: ChildElement[];
|
|
2807
|
+
};
|
|
2808
|
+
disabled?: boolean | undefined;
|
|
2809
|
+
}, {
|
|
2810
|
+
$$type: "html-v2";
|
|
2811
|
+
value: {
|
|
2812
|
+
content: string | null;
|
|
2813
|
+
children: ChildElement[];
|
|
2814
|
+
};
|
|
2815
|
+
disabled?: boolean | undefined;
|
|
2816
|
+
}>;
|
|
2817
|
+
key: "html-v2";
|
|
2818
|
+
};
|
|
2819
|
+
type HtmlV2PropValue = z.infer<typeof htmlV2PropTypeUtil.schema>;
|
|
2820
|
+
type HtmlV2Value = z.infer<typeof htmlV2ValueSchema>;
|
|
2821
|
+
|
|
2697
2822
|
declare const cssFilterFunctionPropUtil: {
|
|
2698
2823
|
extract: (prop: unknown) => {
|
|
2699
2824
|
func: {
|
|
@@ -6179,6 +6304,12 @@ declare function evaluateTerm(term: DependencyTerm, actualValue: unknown): boole
|
|
|
6179
6304
|
declare function extractValue(path: string[], elementValues: PropValue, nestedPath?: string[]): TransformablePropValue$1<PropKey> | null;
|
|
6180
6305
|
declare function isDependency(term: DependencyTerm | Dependency): term is Dependency;
|
|
6181
6306
|
|
|
6307
|
+
interface ParseResult {
|
|
6308
|
+
content: string;
|
|
6309
|
+
children: ChildElement[];
|
|
6310
|
+
}
|
|
6311
|
+
declare function parseHtmlChildren(html: string): ParseResult;
|
|
6312
|
+
|
|
6182
6313
|
declare const Schema: {
|
|
6183
6314
|
jsonSchemaToPropType: typeof jsonSchemaToPropType;
|
|
6184
6315
|
propTypeToJsonSchema: typeof propTypeToJsonSchema;
|
|
@@ -6204,4 +6335,4 @@ declare const Schema: {
|
|
|
6204
6335
|
removeIntention: typeof removeIntention;
|
|
6205
6336
|
};
|
|
6206
6337
|
|
|
6207
|
-
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 StringArrayPropValue, 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, stringArrayPropTypeUtil, stringPropTypeUtil, strokePropTypeUtil, transformFunctionsPropTypeUtil, transformOriginPropTypeUtil, transformPropTypeUtil, urlPropTypeUtil };
|
|
6338
|
+
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 ChildElement, 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 HtmlV2PropValue, type HtmlV2Value, type ImageAttachmentIdPropValue, type ImagePropValue, type ImageSrcPropValue, type JsonSchema7, type KeyValuePropValue, type LayoutDirectionPropValue, type LinkPropValue, type MoveTransformPropValue, type NumberPropValue, type ObjectPropType, type ObjectPropValue, type ParseResult, 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 StringArrayPropValue, 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, htmlV2PropTypeUtil, hueRotateFilterPropTypeUtil, imageAttachmentIdPropType, imagePropTypeUtil, imageSrcPropTypeUtil, intensityFilterPropTypeUtil, isDependency, isDependencyMet, isEmpty, isTransformable, keyValuePropTypeUtil, layoutDirectionPropTypeUtil, linkPropTypeUtil, mergeProps, moveTransformPropTypeUtil, numberPropTypeUtil, parseHtmlChildren, perspectiveOriginPropTypeUtil, positionPropTypeUtil, queryPropTypeUtil, rotateTransformPropTypeUtil, scaleTransformPropTypeUtil, selectionSizePropTypeUtil, shadowPropTypeUtil, sizePropTypeUtil, skewTransformPropTypeUtil, stringArrayPropTypeUtil, stringPropTypeUtil, strokePropTypeUtil, transformFunctionsPropTypeUtil, transformOriginPropTypeUtil, transformPropTypeUtil, urlPropTypeUtil };
|
package/dist/index.d.ts
CHANGED
|
@@ -138,23 +138,15 @@ declare function createPropUtils<TKey extends string, TValue extends PropValue>(
|
|
|
138
138
|
$$type: z.ZodLiteral<TKey>;
|
|
139
139
|
value: z.ZodType<TValue, z.ZodTypeDef, TValue>;
|
|
140
140
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
141
|
-
}, "strict", z.ZodTypeAny,
|
|
141
|
+
}, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
142
142
|
$$type: z.ZodLiteral<TKey>;
|
|
143
143
|
value: z.ZodType<TValue, z.ZodTypeDef, TValue>;
|
|
144
144
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
145
|
-
}>, any>]: z.
|
|
145
|
+
}>, any> extends infer T ? { [k in keyof T]: T[k]; } : never, z.baseObjectInputType<{
|
|
146
146
|
$$type: z.ZodLiteral<TKey>;
|
|
147
147
|
value: z.ZodType<TValue, z.ZodTypeDef, TValue>;
|
|
148
148
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
149
|
-
}
|
|
150
|
-
$$type: z.ZodLiteral<TKey>;
|
|
151
|
-
value: z.ZodType<TValue, z.ZodTypeDef, TValue>;
|
|
152
|
-
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
153
|
-
}>]: z.baseObjectInputType<{
|
|
154
|
-
$$type: z.ZodLiteral<TKey>;
|
|
155
|
-
value: z.ZodType<TValue, z.ZodTypeDef, TValue>;
|
|
156
|
-
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
157
|
-
}>[k_1]; }>;
|
|
149
|
+
}> extends infer T_1 ? { [k_1 in keyof T_1]: T_1[k_1]; } : never>;
|
|
158
150
|
key: TKey;
|
|
159
151
|
};
|
|
160
152
|
declare function createArrayPropUtils<TKey extends string, TValue extends PropValue>(key: TKey, valueSchema: ZodType<TValue>, overrideKey?: string): {
|
|
@@ -1326,27 +1318,79 @@ declare const stringPropTypeUtil: {
|
|
|
1326
1318
|
type StringPropValue = z.infer<typeof stringPropTypeUtil.schema>;
|
|
1327
1319
|
|
|
1328
1320
|
declare const stringArrayPropTypeUtil: {
|
|
1329
|
-
extract: (prop: unknown) =>
|
|
1330
|
-
|
|
1321
|
+
extract: (prop: unknown) => {
|
|
1322
|
+
$$type: "string";
|
|
1323
|
+
value: string | null;
|
|
1324
|
+
disabled?: boolean | undefined;
|
|
1325
|
+
}[] | null;
|
|
1326
|
+
isValid: (prop: unknown) => prop is TransformablePropValue$1<string, {
|
|
1327
|
+
$$type: "string";
|
|
1328
|
+
value: string | null;
|
|
1329
|
+
disabled?: boolean | undefined;
|
|
1330
|
+
}[]>;
|
|
1331
1331
|
create: {
|
|
1332
|
-
(value:
|
|
1333
|
-
|
|
1334
|
-
|
|
1332
|
+
(value: {
|
|
1333
|
+
$$type: "string";
|
|
1334
|
+
value: string | null;
|
|
1335
|
+
disabled?: boolean | undefined;
|
|
1336
|
+
}[]): TransformablePropValue$1<string, {
|
|
1337
|
+
$$type: "string";
|
|
1338
|
+
value: string | null;
|
|
1339
|
+
disabled?: boolean | undefined;
|
|
1340
|
+
}[]>;
|
|
1341
|
+
(value: {
|
|
1342
|
+
$$type: "string";
|
|
1343
|
+
value: string | null;
|
|
1344
|
+
disabled?: boolean | undefined;
|
|
1345
|
+
}[], createOptions?: CreateOptions): TransformablePropValue$1<string, {
|
|
1346
|
+
$$type: "string";
|
|
1347
|
+
value: string | null;
|
|
1348
|
+
disabled?: boolean | undefined;
|
|
1349
|
+
}[]>;
|
|
1350
|
+
(value: (prev?: {
|
|
1351
|
+
$$type: "string";
|
|
1352
|
+
value: string | null;
|
|
1353
|
+
disabled?: boolean | undefined;
|
|
1354
|
+
}[] | undefined) => {
|
|
1355
|
+
$$type: "string";
|
|
1356
|
+
value: string | null;
|
|
1357
|
+
disabled?: boolean | undefined;
|
|
1358
|
+
}[], createOptions: CreateOptions): TransformablePropValue$1<string, {
|
|
1359
|
+
$$type: "string";
|
|
1360
|
+
value: string | null;
|
|
1361
|
+
disabled?: boolean | undefined;
|
|
1362
|
+
}[]>;
|
|
1335
1363
|
};
|
|
1336
1364
|
schema: z.ZodObject<{
|
|
1337
|
-
$$type: z.ZodLiteral<
|
|
1338
|
-
value: z.ZodType<
|
|
1365
|
+
$$type: z.ZodLiteral<string>;
|
|
1366
|
+
value: z.ZodType<{
|
|
1367
|
+
$$type: "string";
|
|
1368
|
+
value: string | null;
|
|
1369
|
+
disabled?: boolean | undefined;
|
|
1370
|
+
}[], z.ZodTypeDef, {
|
|
1371
|
+
$$type: "string";
|
|
1372
|
+
value: string | null;
|
|
1373
|
+
disabled?: boolean | undefined;
|
|
1374
|
+
}[]>;
|
|
1339
1375
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
1340
1376
|
}, "strict", z.ZodTypeAny, {
|
|
1341
|
-
$$type:
|
|
1342
|
-
value:
|
|
1377
|
+
$$type: string;
|
|
1378
|
+
value: {
|
|
1379
|
+
$$type: "string";
|
|
1380
|
+
value: string | null;
|
|
1381
|
+
disabled?: boolean | undefined;
|
|
1382
|
+
}[];
|
|
1343
1383
|
disabled?: boolean | undefined;
|
|
1344
1384
|
}, {
|
|
1345
|
-
$$type:
|
|
1346
|
-
value:
|
|
1385
|
+
$$type: string;
|
|
1386
|
+
value: {
|
|
1387
|
+
$$type: "string";
|
|
1388
|
+
value: string | null;
|
|
1389
|
+
disabled?: boolean | undefined;
|
|
1390
|
+
}[];
|
|
1347
1391
|
disabled?: boolean | undefined;
|
|
1348
1392
|
}>;
|
|
1349
|
-
key:
|
|
1393
|
+
key: string;
|
|
1350
1394
|
};
|
|
1351
1395
|
type StringArrayPropValue = z.infer<typeof stringArrayPropTypeUtil.schema>;
|
|
1352
1396
|
|
|
@@ -2694,6 +2738,87 @@ declare const htmlPropTypeUtil: {
|
|
|
2694
2738
|
};
|
|
2695
2739
|
type HtmlPropValue = z.infer<typeof htmlPropTypeUtil.schema>;
|
|
2696
2740
|
|
|
2741
|
+
interface ChildElement {
|
|
2742
|
+
id: string;
|
|
2743
|
+
type: string;
|
|
2744
|
+
content?: string;
|
|
2745
|
+
children?: ChildElement[];
|
|
2746
|
+
}
|
|
2747
|
+
declare const htmlV2ValueSchema: z.ZodObject<{
|
|
2748
|
+
content: z.ZodNullable<z.ZodString>;
|
|
2749
|
+
children: z.ZodArray<z.ZodType<ChildElement, z.ZodTypeDef, ChildElement>, "many">;
|
|
2750
|
+
}, "strip", z.ZodTypeAny, {
|
|
2751
|
+
content: string | null;
|
|
2752
|
+
children: ChildElement[];
|
|
2753
|
+
}, {
|
|
2754
|
+
content: string | null;
|
|
2755
|
+
children: ChildElement[];
|
|
2756
|
+
}>;
|
|
2757
|
+
declare const htmlV2PropTypeUtil: {
|
|
2758
|
+
extract: (prop: unknown) => {
|
|
2759
|
+
content: string | null;
|
|
2760
|
+
children: ChildElement[];
|
|
2761
|
+
} | null;
|
|
2762
|
+
isValid: (prop: unknown) => prop is TransformablePropValue$1<"html-v2", {
|
|
2763
|
+
content: string | null;
|
|
2764
|
+
children: ChildElement[];
|
|
2765
|
+
}>;
|
|
2766
|
+
create: {
|
|
2767
|
+
(value: {
|
|
2768
|
+
content: string | null;
|
|
2769
|
+
children: ChildElement[];
|
|
2770
|
+
}): TransformablePropValue$1<"html-v2", {
|
|
2771
|
+
content: string | null;
|
|
2772
|
+
children: ChildElement[];
|
|
2773
|
+
}>;
|
|
2774
|
+
(value: {
|
|
2775
|
+
content: string | null;
|
|
2776
|
+
children: ChildElement[];
|
|
2777
|
+
}, createOptions?: CreateOptions): TransformablePropValue$1<"html-v2", {
|
|
2778
|
+
content: string | null;
|
|
2779
|
+
children: ChildElement[];
|
|
2780
|
+
}>;
|
|
2781
|
+
(value: (prev?: {
|
|
2782
|
+
content: string | null;
|
|
2783
|
+
children: ChildElement[];
|
|
2784
|
+
} | undefined) => {
|
|
2785
|
+
content: string | null;
|
|
2786
|
+
children: ChildElement[];
|
|
2787
|
+
}, createOptions: CreateOptions): TransformablePropValue$1<"html-v2", {
|
|
2788
|
+
content: string | null;
|
|
2789
|
+
children: ChildElement[];
|
|
2790
|
+
}>;
|
|
2791
|
+
};
|
|
2792
|
+
schema: z.ZodObject<{
|
|
2793
|
+
$$type: z.ZodLiteral<"html-v2">;
|
|
2794
|
+
value: z.ZodType<{
|
|
2795
|
+
content: string | null;
|
|
2796
|
+
children: ChildElement[];
|
|
2797
|
+
}, z.ZodTypeDef, {
|
|
2798
|
+
content: string | null;
|
|
2799
|
+
children: ChildElement[];
|
|
2800
|
+
}>;
|
|
2801
|
+
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
2802
|
+
}, "strict", z.ZodTypeAny, {
|
|
2803
|
+
$$type: "html-v2";
|
|
2804
|
+
value: {
|
|
2805
|
+
content: string | null;
|
|
2806
|
+
children: ChildElement[];
|
|
2807
|
+
};
|
|
2808
|
+
disabled?: boolean | undefined;
|
|
2809
|
+
}, {
|
|
2810
|
+
$$type: "html-v2";
|
|
2811
|
+
value: {
|
|
2812
|
+
content: string | null;
|
|
2813
|
+
children: ChildElement[];
|
|
2814
|
+
};
|
|
2815
|
+
disabled?: boolean | undefined;
|
|
2816
|
+
}>;
|
|
2817
|
+
key: "html-v2";
|
|
2818
|
+
};
|
|
2819
|
+
type HtmlV2PropValue = z.infer<typeof htmlV2PropTypeUtil.schema>;
|
|
2820
|
+
type HtmlV2Value = z.infer<typeof htmlV2ValueSchema>;
|
|
2821
|
+
|
|
2697
2822
|
declare const cssFilterFunctionPropUtil: {
|
|
2698
2823
|
extract: (prop: unknown) => {
|
|
2699
2824
|
func: {
|
|
@@ -6179,6 +6304,12 @@ declare function evaluateTerm(term: DependencyTerm, actualValue: unknown): boole
|
|
|
6179
6304
|
declare function extractValue(path: string[], elementValues: PropValue, nestedPath?: string[]): TransformablePropValue$1<PropKey> | null;
|
|
6180
6305
|
declare function isDependency(term: DependencyTerm | Dependency): term is Dependency;
|
|
6181
6306
|
|
|
6307
|
+
interface ParseResult {
|
|
6308
|
+
content: string;
|
|
6309
|
+
children: ChildElement[];
|
|
6310
|
+
}
|
|
6311
|
+
declare function parseHtmlChildren(html: string): ParseResult;
|
|
6312
|
+
|
|
6182
6313
|
declare const Schema: {
|
|
6183
6314
|
jsonSchemaToPropType: typeof jsonSchemaToPropType;
|
|
6184
6315
|
propTypeToJsonSchema: typeof propTypeToJsonSchema;
|
|
@@ -6204,4 +6335,4 @@ declare const Schema: {
|
|
|
6204
6335
|
removeIntention: typeof removeIntention;
|
|
6205
6336
|
};
|
|
6206
6337
|
|
|
6207
|
-
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 StringArrayPropValue, 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, stringArrayPropTypeUtil, stringPropTypeUtil, strokePropTypeUtil, transformFunctionsPropTypeUtil, transformOriginPropTypeUtil, transformPropTypeUtil, urlPropTypeUtil };
|
|
6338
|
+
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 ChildElement, 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 HtmlV2PropValue, type HtmlV2Value, type ImageAttachmentIdPropValue, type ImagePropValue, type ImageSrcPropValue, type JsonSchema7, type KeyValuePropValue, type LayoutDirectionPropValue, type LinkPropValue, type MoveTransformPropValue, type NumberPropValue, type ObjectPropType, type ObjectPropValue, type ParseResult, 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 StringArrayPropValue, 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, htmlV2PropTypeUtil, hueRotateFilterPropTypeUtil, imageAttachmentIdPropType, imagePropTypeUtil, imageSrcPropTypeUtil, intensityFilterPropTypeUtil, isDependency, isDependencyMet, isEmpty, isTransformable, keyValuePropTypeUtil, layoutDirectionPropTypeUtil, linkPropTypeUtil, mergeProps, moveTransformPropTypeUtil, numberPropTypeUtil, parseHtmlChildren, perspectiveOriginPropTypeUtil, positionPropTypeUtil, queryPropTypeUtil, rotateTransformPropTypeUtil, scaleTransformPropTypeUtil, selectionSizePropTypeUtil, shadowPropTypeUtil, sizePropTypeUtil, skewTransformPropTypeUtil, stringArrayPropTypeUtil, stringPropTypeUtil, strokePropTypeUtil, transformFunctionsPropTypeUtil, transformOriginPropTypeUtil, transformPropTypeUtil, urlPropTypeUtil };
|