@contentful/experiences-visual-editor-react 1.42.0-prerelease-20250625T0902-d9db401.0 → 1.42.0-prerelease-20250626T1154-6ca57b0.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
@@ -721,11 +721,11 @@ const ComponentPropertyValueSchema$1 = z.discriminatedUnion('type', [
721
721
  ]);
722
722
  // TODO: finalize schema structure before release
723
723
  // https://contentful.atlassian.net/browse/LUMOS-523
724
- const PatternPropertySchema$1 = z.object({
724
+ const ParameterSchema$1 = z.object({
725
725
  type: z.literal('BoundValue'),
726
726
  path: z.string(),
727
727
  });
728
- const PatternPropertiesSchema$1 = z.record(propertyKeySchema$1, PatternPropertySchema$1);
728
+ const ParametersSchema$1 = z.record(propertyKeySchema$1, ParameterSchema$1);
729
729
  const BreakpointSchema$1 = z
730
730
  .object({
731
731
  id: propertyKeySchema$1,
@@ -742,7 +742,7 @@ const BaseComponentTreeNodeSchema$1 = z.object({
742
742
  displayName: z.string().optional(),
743
743
  slotId: z.string().optional(),
744
744
  variables: z.record(propertyKeySchema$1, ComponentPropertyValueSchema$1),
745
- patternProperties: PatternPropertiesSchema$1.optional(),
745
+ parameters: ParametersSchema$1.optional(),
746
746
  });
747
747
  const ComponentVariableSchema$1 = z.object({
748
748
  displayName: z.string().optional(),
@@ -811,25 +811,21 @@ const THUMBNAIL_IDS$1 = [
811
811
  // TODO: finalize schema structure before release
812
812
  // https://contentful.atlassian.net/browse/LUMOS-523
813
813
  const VariableMappingSchema$1 = z.object({
814
- patternPropertyDefinitionId: propertyKeySchema$1,
814
+ parameterId: propertyKeySchema$1,
815
815
  type: z.literal('ContentTypeMapping'),
816
816
  pathsByContentType: z.record(z.string(), z.object({ path: z.string() })),
817
817
  });
818
818
  // TODO: finalize schema structure before release
819
819
  // https://contentful.atlassian.net/browse/LUMOS-523
820
- const PatternPropertyDefinitionSchema$1 = z.object({
821
- defaultSource: z
822
- .strictObject({
823
- type: z.enum(['Entry']),
824
- contentTypeId: z.string(),
825
- link: z.strictObject({
826
- sys: z.strictObject({
827
- type: z.literal('Link'),
828
- id: z.string(),
829
- linkType: z.enum(['Entry']),
830
- }),
820
+ const ParameterDefinitionSchema$1 = z.object({
821
+ defaultValue: z
822
+ .record(z.string(), z.object({
823
+ sys: z.object({
824
+ type: z.literal('Link'),
825
+ id: z.string(),
826
+ linkType: z.enum(['Entry']),
831
827
  }),
832
- })
828
+ }))
833
829
  .optional(),
834
830
  contentTypes: z.record(z.string(), z.object({
835
831
  sys: z.object({
@@ -839,7 +835,7 @@ const PatternPropertyDefinitionSchema$1 = z.object({
839
835
  }),
840
836
  })),
841
837
  });
842
- const PatternPropertyDefinitionsSchema$1 = z.record(propertyKeySchema$1, PatternPropertyDefinitionSchema$1);
838
+ const ParameterDefinitionsSchema$1 = z.record(propertyKeySchema$1, ParameterDefinitionSchema$1);
843
839
  const VariableMappingsSchema$1 = z.record(propertyKeySchema$1, VariableMappingSchema$1);
844
840
  const ComponentVariablesSchema$1 = z.record(z.string().regex(/^[a-zA-Z0-9-_]{1,54}$/), // Here the key is <variableName>_<nanoidId> so we need to allow for a longer length
845
841
  ComponentVariableSchema$1);
@@ -848,7 +844,7 @@ const ComponentSettingsSchema$1 = z.object({
848
844
  thumbnailId: z.enum(THUMBNAIL_IDS$1).optional(),
849
845
  category: z.string().max(50, 'Category must contain at most 50 characters').optional(),
850
846
  variableMappings: VariableMappingsSchema$1.optional(),
851
- patternPropertyDefinitions: PatternPropertyDefinitionsSchema$1.optional(),
847
+ parameterDefinitions: ParameterDefinitionsSchema$1.optional(),
852
848
  });
853
849
  z.object({
854
850
  componentTree: localeWrapper$1(ComponentTreeSchema$1),
@@ -3564,11 +3560,11 @@ const ComponentPropertyValueSchema = z.discriminatedUnion('type', [
3564
3560
  ]);
3565
3561
  // TODO: finalize schema structure before release
3566
3562
  // https://contentful.atlassian.net/browse/LUMOS-523
3567
- const PatternPropertySchema = z.object({
3563
+ const ParameterSchema = z.object({
3568
3564
  type: z.literal('BoundValue'),
3569
3565
  path: z.string(),
3570
3566
  });
3571
- const PatternPropertiesSchema = z.record(propertyKeySchema, PatternPropertySchema);
3567
+ const ParametersSchema = z.record(propertyKeySchema, ParameterSchema);
3572
3568
  const BreakpointSchema = z
3573
3569
  .object({
3574
3570
  id: propertyKeySchema,
@@ -3585,7 +3581,7 @@ const BaseComponentTreeNodeSchema = z.object({
3585
3581
  displayName: z.string().optional(),
3586
3582
  slotId: z.string().optional(),
3587
3583
  variables: z.record(propertyKeySchema, ComponentPropertyValueSchema),
3588
- patternProperties: PatternPropertiesSchema.optional(),
3584
+ parameters: ParametersSchema.optional(),
3589
3585
  });
3590
3586
  const ComponentVariableSchema = z.object({
3591
3587
  displayName: z.string().optional(),
@@ -3654,25 +3650,21 @@ const THUMBNAIL_IDS = [
3654
3650
  // TODO: finalize schema structure before release
3655
3651
  // https://contentful.atlassian.net/browse/LUMOS-523
3656
3652
  const VariableMappingSchema = z.object({
3657
- patternPropertyDefinitionId: propertyKeySchema,
3653
+ parameterId: propertyKeySchema,
3658
3654
  type: z.literal('ContentTypeMapping'),
3659
3655
  pathsByContentType: z.record(z.string(), z.object({ path: z.string() })),
3660
3656
  });
3661
3657
  // TODO: finalize schema structure before release
3662
3658
  // https://contentful.atlassian.net/browse/LUMOS-523
3663
- const PatternPropertyDefinitionSchema = z.object({
3664
- defaultSource: z
3665
- .strictObject({
3666
- type: z.enum(['Entry']),
3667
- contentTypeId: z.string(),
3668
- link: z.strictObject({
3669
- sys: z.strictObject({
3670
- type: z.literal('Link'),
3671
- id: z.string(),
3672
- linkType: z.enum(['Entry']),
3673
- }),
3659
+ const ParameterDefinitionSchema = z.object({
3660
+ defaultValue: z
3661
+ .record(z.string(), z.object({
3662
+ sys: z.object({
3663
+ type: z.literal('Link'),
3664
+ id: z.string(),
3665
+ linkType: z.enum(['Entry']),
3674
3666
  }),
3675
- })
3667
+ }))
3676
3668
  .optional(),
3677
3669
  contentTypes: z.record(z.string(), z.object({
3678
3670
  sys: z.object({
@@ -3682,7 +3674,7 @@ const PatternPropertyDefinitionSchema = z.object({
3682
3674
  }),
3683
3675
  })),
3684
3676
  });
3685
- const PatternPropertyDefinitionsSchema = z.record(propertyKeySchema, PatternPropertyDefinitionSchema);
3677
+ const ParameterDefinitionsSchema = z.record(propertyKeySchema, ParameterDefinitionSchema);
3686
3678
  const VariableMappingsSchema = z.record(propertyKeySchema, VariableMappingSchema);
3687
3679
  const ComponentVariablesSchema = z.record(z.string().regex(/^[a-zA-Z0-9-_]{1,54}$/), // Here the key is <variableName>_<nanoidId> so we need to allow for a longer length
3688
3680
  ComponentVariableSchema);
@@ -3691,7 +3683,7 @@ const ComponentSettingsSchema = z.object({
3691
3683
  thumbnailId: z.enum(THUMBNAIL_IDS).optional(),
3692
3684
  category: z.string().max(50, 'Category must contain at most 50 characters').optional(),
3693
3685
  variableMappings: VariableMappingsSchema.optional(),
3694
- patternPropertyDefinitions: PatternPropertyDefinitionsSchema.optional(),
3686
+ parameterDefinitions: ParameterDefinitionsSchema.optional(),
3695
3687
  });
3696
3688
  z.object({
3697
3689
  componentTree: localeWrapper(ComponentTreeSchema),