@contentful/experiences-visual-editor-react 1.42.0-prerelease-20250626T1154-6ca57b0.0 → 1.42.0-prerelease-20250630T1135-a8b68d4.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
@@ -818,14 +818,18 @@ const VariableMappingSchema$1 = z.object({
818
818
  // TODO: finalize schema structure before release
819
819
  // https://contentful.atlassian.net/browse/LUMOS-523
820
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']),
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({
@@ -839,13 +843,29 @@ const ParameterDefinitionsSchema$1 = z.record(propertyKeySchema$1, ParameterDefi
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);
842
- const ComponentSettingsSchema$1 = z.object({
846
+ const PassToNodeSchema$1 = z
847
+ .object({
848
+ nodeId: propertyKeySchema$1,
849
+ parameterId: propertyKeySchema$1,
850
+ prebindingId: propertyKeySchema$1,
851
+ })
852
+ .strict();
853
+ const PrebindingDefinitionSchema$1 = z
854
+ .object({
855
+ id: propertyKeySchema$1,
856
+ variableMappings: VariableMappingsSchema$1.optional(),
857
+ parameterDefinitions: ParameterDefinitionsSchema$1,
858
+ passToNodes: z.array(PassToNodeSchema$1).optional(),
859
+ })
860
+ .strict();
861
+ const ComponentSettingsSchema$1 = z
862
+ .object({
843
863
  variableDefinitions: ComponentVariablesSchema$1,
844
864
  thumbnailId: z.enum(THUMBNAIL_IDS$1).optional(),
845
865
  category: z.string().max(50, 'Category must contain at most 50 characters').optional(),
846
- variableMappings: VariableMappingsSchema$1.optional(),
847
- parameterDefinitions: ParameterDefinitionsSchema$1.optional(),
848
- });
866
+ prebindingDefinitions: z.array(PrebindingDefinitionSchema$1).optional(),
867
+ })
868
+ .strict();
849
869
  z.object({
850
870
  componentTree: localeWrapper$1(ComponentTreeSchema$1),
851
871
  dataSource: localeWrapper$1(DataSourceSchema$1),
@@ -3657,14 +3677,18 @@ const VariableMappingSchema = z.object({
3657
3677
  // TODO: finalize schema structure before release
3658
3678
  // https://contentful.atlassian.net/browse/LUMOS-523
3659
3679
  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']),
3680
+ defaultSource: z
3681
+ .strictObject({
3682
+ type: z.enum(['Entry']),
3683
+ contentTypeId: z.string(),
3684
+ link: z.strictObject({
3685
+ sys: z.strictObject({
3686
+ type: z.literal('Link'),
3687
+ id: z.string(),
3688
+ linkType: z.enum(['Entry']),
3689
+ }),
3666
3690
  }),
3667
- }))
3691
+ })
3668
3692
  .optional(),
3669
3693
  contentTypes: z.record(z.string(), z.object({
3670
3694
  sys: z.object({
@@ -3678,13 +3702,29 @@ const ParameterDefinitionsSchema = z.record(propertyKeySchema, ParameterDefiniti
3678
3702
  const VariableMappingsSchema = z.record(propertyKeySchema, VariableMappingSchema);
3679
3703
  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
3704
  ComponentVariableSchema);
3681
- const ComponentSettingsSchema = z.object({
3705
+ const PassToNodeSchema = z
3706
+ .object({
3707
+ nodeId: propertyKeySchema,
3708
+ parameterId: propertyKeySchema,
3709
+ prebindingId: propertyKeySchema,
3710
+ })
3711
+ .strict();
3712
+ const PrebindingDefinitionSchema = z
3713
+ .object({
3714
+ id: propertyKeySchema,
3715
+ variableMappings: VariableMappingsSchema.optional(),
3716
+ parameterDefinitions: ParameterDefinitionsSchema,
3717
+ passToNodes: z.array(PassToNodeSchema).optional(),
3718
+ })
3719
+ .strict();
3720
+ const ComponentSettingsSchema = z
3721
+ .object({
3682
3722
  variableDefinitions: ComponentVariablesSchema,
3683
3723
  thumbnailId: z.enum(THUMBNAIL_IDS).optional(),
3684
3724
  category: z.string().max(50, 'Category must contain at most 50 characters').optional(),
3685
- variableMappings: VariableMappingsSchema.optional(),
3686
- parameterDefinitions: ParameterDefinitionsSchema.optional(),
3687
- });
3725
+ prebindingDefinitions: z.array(PrebindingDefinitionSchema).optional(),
3726
+ })
3727
+ .strict();
3688
3728
  z.object({
3689
3729
  componentTree: localeWrapper(ComponentTreeSchema),
3690
3730
  dataSource: localeWrapper(DataSourceSchema),