@contentful/experiences-visual-editor-react 1.32.0-prerelease-20250220T1615-2f40399.0 → 1.32.0
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 +21 -19
- package/dist/index.js.map +1 -1
- package/dist/renderApp.js +21 -19
- package/dist/renderApp.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -926,14 +926,14 @@ const ComponentValueSchema$1 = z
|
|
|
926
926
|
.strict();
|
|
927
927
|
// TODO: finalize schema structure before release
|
|
928
928
|
// https://contentful.atlassian.net/browse/LUMOS-523
|
|
929
|
-
const
|
|
929
|
+
const EmptyObjectSchema$1 = z.object({ type: z.undefined() });
|
|
930
930
|
const ComponentPropertyValueSchema$1 = z.discriminatedUnion('type', [
|
|
931
931
|
DesignValueSchema$1,
|
|
932
932
|
BoundValueSchema$1,
|
|
933
933
|
UnboundValueSchema$1,
|
|
934
934
|
HyperlinkValueSchema$1,
|
|
935
935
|
ComponentValueSchema$1,
|
|
936
|
-
|
|
936
|
+
EmptyObjectSchema$1,
|
|
937
937
|
]);
|
|
938
938
|
// TODO: finalize schema structure before release
|
|
939
939
|
// https://contentful.atlassian.net/browse/LUMOS-523
|
|
@@ -946,12 +946,13 @@ const VariableMappingsSchema$1 = z.record(propertyKeySchema$1, VariableMappingSc
|
|
|
946
946
|
// TODO: finalize schema structure before release
|
|
947
947
|
// https://contentful.atlassian.net/browse/LUMOS-523
|
|
948
948
|
const PatternPropertyDefinitionSchema$1 = z.object({
|
|
949
|
-
defaultValue: z
|
|
950
|
-
.object({
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
.
|
|
949
|
+
defaultValue: z.union([
|
|
950
|
+
z.object({
|
|
951
|
+
path: z.string(),
|
|
952
|
+
type: z.literal('BoundValue'),
|
|
953
|
+
}),
|
|
954
|
+
z.null(),
|
|
955
|
+
]),
|
|
955
956
|
contentTypes: z.record(z.string(), z.any()),
|
|
956
957
|
});
|
|
957
958
|
const PatternPropertyDefinitionsSchema$1 = z.record(propertyKeySchema$1, PatternPropertyDefinitionSchema$1);
|
|
@@ -960,7 +961,6 @@ const PatternPropertyDefinitionsSchema$1 = z.record(propertyKeySchema$1, Pattern
|
|
|
960
961
|
const PatternPropertySchema$1 = z.object({
|
|
961
962
|
type: z.literal('BoundValue'),
|
|
962
963
|
path: z.string(),
|
|
963
|
-
contenType: z.string(),
|
|
964
964
|
});
|
|
965
965
|
const PatternPropertysSchema$1 = z.record(propertyKeySchema$1, PatternPropertySchema$1);
|
|
966
966
|
const BreakpointSchema$1 = z
|
|
@@ -3358,14 +3358,14 @@ const ComponentValueSchema = z
|
|
|
3358
3358
|
.strict();
|
|
3359
3359
|
// TODO: finalize schema structure before release
|
|
3360
3360
|
// https://contentful.atlassian.net/browse/LUMOS-523
|
|
3361
|
-
const
|
|
3361
|
+
const EmptyObjectSchema = z.object({ type: z.undefined() });
|
|
3362
3362
|
const ComponentPropertyValueSchema = z.discriminatedUnion('type', [
|
|
3363
3363
|
DesignValueSchema,
|
|
3364
3364
|
BoundValueSchema,
|
|
3365
3365
|
UnboundValueSchema,
|
|
3366
3366
|
HyperlinkValueSchema,
|
|
3367
3367
|
ComponentValueSchema,
|
|
3368
|
-
|
|
3368
|
+
EmptyObjectSchema,
|
|
3369
3369
|
]);
|
|
3370
3370
|
// TODO: finalize schema structure before release
|
|
3371
3371
|
// https://contentful.atlassian.net/browse/LUMOS-523
|
|
@@ -3378,12 +3378,13 @@ const VariableMappingsSchema = z.record(propertyKeySchema, VariableMappingSchema
|
|
|
3378
3378
|
// TODO: finalize schema structure before release
|
|
3379
3379
|
// https://contentful.atlassian.net/browse/LUMOS-523
|
|
3380
3380
|
const PatternPropertyDefinitionSchema = z.object({
|
|
3381
|
-
defaultValue: z
|
|
3382
|
-
.object({
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
.
|
|
3381
|
+
defaultValue: z.union([
|
|
3382
|
+
z.object({
|
|
3383
|
+
path: z.string(),
|
|
3384
|
+
type: z.literal('BoundValue'),
|
|
3385
|
+
}),
|
|
3386
|
+
z.null(),
|
|
3387
|
+
]),
|
|
3387
3388
|
contentTypes: z.record(z.string(), z.any()),
|
|
3388
3389
|
});
|
|
3389
3390
|
const PatternPropertyDefinitionsSchema = z.record(propertyKeySchema, PatternPropertyDefinitionSchema);
|
|
@@ -3392,7 +3393,6 @@ const PatternPropertyDefinitionsSchema = z.record(propertyKeySchema, PatternProp
|
|
|
3392
3393
|
const PatternPropertySchema = z.object({
|
|
3393
3394
|
type: z.literal('BoundValue'),
|
|
3394
3395
|
path: z.string(),
|
|
3395
|
-
contenType: z.string(),
|
|
3396
3396
|
});
|
|
3397
3397
|
const PatternPropertysSchema = z.record(propertyKeySchema, PatternPropertySchema);
|
|
3398
3398
|
const BreakpointSchema = z
|
|
@@ -4688,7 +4688,9 @@ const useComponentProps = ({ node, areEntitiesFetched, resolveDesignValue, rende
|
|
|
4688
4688
|
};
|
|
4689
4689
|
const customComponentProps = {
|
|
4690
4690
|
...sharedProps,
|
|
4691
|
-
|
|
4691
|
+
// Allows custom components to render differently in the editor. This needs to be activated
|
|
4692
|
+
// through options as the component has to be aware of this prop to not cause any React warnings.
|
|
4693
|
+
...(options?.enableCustomEditorView ? { isInExpEditorMode: true } : {}),
|
|
4692
4694
|
...sanitizeNodeProps(props),
|
|
4693
4695
|
};
|
|
4694
4696
|
const structuralOrPatternComponentProps = {
|