@contentful/experiences-visual-editor-react 1.42.0-dev-20250625T1537-8a20b16.0 → 1.42.0-dev-20250627T1316-d74dad7.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,21 +811,25 @@ 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
- 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']),
820
+ const ParameterDefinitionSchema$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
+ }),
827
831
  }),
828
- }))
832
+ })
829
833
  .optional(),
830
834
  contentTypes: z.record(z.string(), z.object({
831
835
  sys: z.object({
@@ -835,7 +839,7 @@ const PatternPropertyDefinitionSchema$1 = z.object({
835
839
  }),
836
840
  })),
837
841
  });
838
- const PatternPropertyDefinitionsSchema$1 = z.record(propertyKeySchema$1, PatternPropertyDefinitionSchema$1);
842
+ const ParameterDefinitionsSchema$1 = z.record(propertyKeySchema$1, ParameterDefinitionSchema$1);
839
843
  const VariableMappingsSchema$1 = z.record(propertyKeySchema$1, VariableMappingSchema$1);
840
844
  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
841
845
  ComponentVariableSchema$1);
@@ -844,7 +848,7 @@ const ComponentSettingsSchema$1 = z.object({
844
848
  thumbnailId: z.enum(THUMBNAIL_IDS$1).optional(),
845
849
  category: z.string().max(50, 'Category must contain at most 50 characters').optional(),
846
850
  variableMappings: VariableMappingsSchema$1.optional(),
847
- patternPropertyDefinitions: PatternPropertyDefinitionsSchema$1.optional(),
851
+ parameterDefinitions: ParameterDefinitionsSchema$1.optional(),
848
852
  });
849
853
  z.object({
850
854
  componentTree: localeWrapper$1(ComponentTreeSchema$1),
@@ -3560,11 +3564,11 @@ const ComponentPropertyValueSchema = z.discriminatedUnion('type', [
3560
3564
  ]);
3561
3565
  // TODO: finalize schema structure before release
3562
3566
  // https://contentful.atlassian.net/browse/LUMOS-523
3563
- const PatternPropertySchema = z.object({
3567
+ const ParameterSchema = z.object({
3564
3568
  type: z.literal('BoundValue'),
3565
3569
  path: z.string(),
3566
3570
  });
3567
- const PatternPropertiesSchema = z.record(propertyKeySchema, PatternPropertySchema);
3571
+ const ParametersSchema = z.record(propertyKeySchema, ParameterSchema);
3568
3572
  const BreakpointSchema = z
3569
3573
  .object({
3570
3574
  id: propertyKeySchema,
@@ -3581,7 +3585,7 @@ const BaseComponentTreeNodeSchema = z.object({
3581
3585
  displayName: z.string().optional(),
3582
3586
  slotId: z.string().optional(),
3583
3587
  variables: z.record(propertyKeySchema, ComponentPropertyValueSchema),
3584
- patternProperties: PatternPropertiesSchema.optional(),
3588
+ parameters: ParametersSchema.optional(),
3585
3589
  });
3586
3590
  const ComponentVariableSchema = z.object({
3587
3591
  displayName: z.string().optional(),
@@ -3650,21 +3654,25 @@ const THUMBNAIL_IDS = [
3650
3654
  // TODO: finalize schema structure before release
3651
3655
  // https://contentful.atlassian.net/browse/LUMOS-523
3652
3656
  const VariableMappingSchema = z.object({
3653
- patternPropertyDefinitionId: propertyKeySchema,
3657
+ parameterId: propertyKeySchema,
3654
3658
  type: z.literal('ContentTypeMapping'),
3655
3659
  pathsByContentType: z.record(z.string(), z.object({ path: z.string() })),
3656
3660
  });
3657
3661
  // TODO: finalize schema structure before release
3658
3662
  // https://contentful.atlassian.net/browse/LUMOS-523
3659
- const PatternPropertyDefinitionSchema = 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']),
3663
+ const ParameterDefinitionSchema = 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
+ }),
3666
3674
  }),
3667
- }))
3675
+ })
3668
3676
  .optional(),
3669
3677
  contentTypes: z.record(z.string(), z.object({
3670
3678
  sys: z.object({
@@ -3674,7 +3682,7 @@ const PatternPropertyDefinitionSchema = z.object({
3674
3682
  }),
3675
3683
  })),
3676
3684
  });
3677
- const PatternPropertyDefinitionsSchema = z.record(propertyKeySchema, PatternPropertyDefinitionSchema);
3685
+ const ParameterDefinitionsSchema = z.record(propertyKeySchema, ParameterDefinitionSchema);
3678
3686
  const VariableMappingsSchema = z.record(propertyKeySchema, VariableMappingSchema);
3679
3687
  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
3680
3688
  ComponentVariableSchema);
@@ -3683,7 +3691,7 @@ const ComponentSettingsSchema = z.object({
3683
3691
  thumbnailId: z.enum(THUMBNAIL_IDS).optional(),
3684
3692
  category: z.string().max(50, 'Category must contain at most 50 characters').optional(),
3685
3693
  variableMappings: VariableMappingsSchema.optional(),
3686
- patternPropertyDefinitions: PatternPropertyDefinitionsSchema.optional(),
3694
+ parameterDefinitions: ParameterDefinitionsSchema.optional(),
3687
3695
  });
3688
3696
  z.object({
3689
3697
  componentTree: localeWrapper(ComponentTreeSchema),