@contentful/experiences-visual-editor-react 1.30.2 → 1.30.3-beta.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 CHANGED
@@ -921,14 +921,18 @@ const ComponentValueSchema$1 = z
921
921
  key: z.string(),
922
922
  })
923
923
  .strict();
924
+ // TODO: finalize schema structure before release
925
+ // https://contentful.atlassian.net/browse/LUMOS-523
926
+ const EmptyObjectSchema$1 = z.object({ type: z.undefined() });
924
927
  const ComponentPropertyValueSchema$1 = z.discriminatedUnion('type', [
925
928
  DesignValueSchema$1,
926
929
  BoundValueSchema$1,
927
930
  UnboundValueSchema$1,
928
931
  HyperlinkValueSchema$1,
929
932
  ComponentValueSchema$1,
933
+ EmptyObjectSchema$1,
930
934
  ]);
931
- // TODO: finalized schema structure before release
935
+ // TODO: finalize schema structure before release
932
936
  // https://contentful.atlassian.net/browse/LUMOS-523
933
937
  const VariableMappingSchema$1 = z.object({
934
938
  patternPropertyDefinitionId: propertyKeySchema$1,
@@ -936,17 +940,20 @@ const VariableMappingSchema$1 = z.object({
936
940
  pathsByContentType: z.record(z.string(), z.object({ path: z.string() })),
937
941
  });
938
942
  const VariableMappingsSchema$1 = z.record(propertyKeySchema$1, VariableMappingSchema$1);
939
- // TODO: finalized schema structure before release
943
+ // TODO: finalize schema structure before release
940
944
  // https://contentful.atlassian.net/browse/LUMOS-523
941
945
  const PatternPropertyDefinitionSchema$1 = z.object({
942
- defaultValue: z.object({
943
- path: z.string(),
944
- type: z.literal('BoundValue'),
945
- }),
946
+ defaultValue: z.union([
947
+ z.object({
948
+ path: z.string(),
949
+ type: z.literal('BoundValue'),
950
+ }),
951
+ z.null(),
952
+ ]),
946
953
  contentTypes: z.record(z.string(), z.any()),
947
954
  });
948
955
  const PatternPropertyDefinitionsSchema$1 = z.record(propertyKeySchema$1, PatternPropertyDefinitionSchema$1);
949
- // TODO: finalized schema structure before release
956
+ // TODO: finalize schema structure before release
950
957
  // https://contentful.atlassian.net/browse/LUMOS-523
951
958
  const PatternPropertySchema$1 = z.object({
952
959
  type: z.literal('BoundValue'),
@@ -3326,14 +3333,18 @@ const ComponentValueSchema = z
3326
3333
  key: z.string(),
3327
3334
  })
3328
3335
  .strict();
3336
+ // TODO: finalize schema structure before release
3337
+ // https://contentful.atlassian.net/browse/LUMOS-523
3338
+ const EmptyObjectSchema = z.object({ type: z.undefined() });
3329
3339
  const ComponentPropertyValueSchema = z.discriminatedUnion('type', [
3330
3340
  DesignValueSchema,
3331
3341
  BoundValueSchema,
3332
3342
  UnboundValueSchema,
3333
3343
  HyperlinkValueSchema,
3334
3344
  ComponentValueSchema,
3345
+ EmptyObjectSchema,
3335
3346
  ]);
3336
- // TODO: finalized schema structure before release
3347
+ // TODO: finalize schema structure before release
3337
3348
  // https://contentful.atlassian.net/browse/LUMOS-523
3338
3349
  const VariableMappingSchema = z.object({
3339
3350
  patternPropertyDefinitionId: propertyKeySchema,
@@ -3341,17 +3352,20 @@ const VariableMappingSchema = z.object({
3341
3352
  pathsByContentType: z.record(z.string(), z.object({ path: z.string() })),
3342
3353
  });
3343
3354
  const VariableMappingsSchema = z.record(propertyKeySchema, VariableMappingSchema);
3344
- // TODO: finalized schema structure before release
3355
+ // TODO: finalize schema structure before release
3345
3356
  // https://contentful.atlassian.net/browse/LUMOS-523
3346
3357
  const PatternPropertyDefinitionSchema = z.object({
3347
- defaultValue: z.object({
3348
- path: z.string(),
3349
- type: z.literal('BoundValue'),
3350
- }),
3358
+ defaultValue: z.union([
3359
+ z.object({
3360
+ path: z.string(),
3361
+ type: z.literal('BoundValue'),
3362
+ }),
3363
+ z.null(),
3364
+ ]),
3351
3365
  contentTypes: z.record(z.string(), z.any()),
3352
3366
  });
3353
3367
  const PatternPropertyDefinitionsSchema = z.record(propertyKeySchema, PatternPropertyDefinitionSchema);
3354
- // TODO: finalized schema structure before release
3368
+ // TODO: finalize schema structure before release
3355
3369
  // https://contentful.atlassian.net/browse/LUMOS-523
3356
3370
  const PatternPropertySchema = z.object({
3357
3371
  type: z.literal('BoundValue'),