@contentful/experiences-core 2.0.0-dev-20250704T1052-fad2ef4.0 → 2.0.0-prerelease-20250703T1150-c529c88.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.
@@ -29,7 +29,13 @@ declare class EntityStore extends EntityStoreBase {
29
29
  }>;
30
30
  }>;
31
31
  get hoistedParameterDefinitions(): Record<string, {
32
- contentTypes: string[];
32
+ contentTypes: Record<string, {
33
+ sys: {
34
+ type: "Link";
35
+ id: string;
36
+ linkType: "ContentType";
37
+ };
38
+ }>;
33
39
  defaultSource?: {
34
40
  type: "Entry";
35
41
  contentTypeId: string;
package/dist/index.js CHANGED
@@ -1059,7 +1059,13 @@ const ParameterDefinitionSchema = z.object({
1059
1059
  }),
1060
1060
  })
1061
1061
  .optional(),
1062
- contentTypes: z.array(z.string()),
1062
+ contentTypes: z.record(z.string(), z.object({
1063
+ sys: z.object({
1064
+ type: z.literal('Link'),
1065
+ id: z.string(),
1066
+ linkType: z.enum(['ContentType']),
1067
+ }),
1068
+ })),
1063
1069
  passToNodes: z.array(PassToNodeSchema).optional(),
1064
1070
  });
1065
1071
  const ParameterDefinitionsSchema = z.record(propertyKeySchema, ParameterDefinitionSchema);
@@ -1079,7 +1085,7 @@ const ComponentSettingsSchema = z
1079
1085
  variableDefinitions: ComponentVariablesSchema,
1080
1086
  thumbnailId: z.enum(THUMBNAIL_IDS).optional(),
1081
1087
  category: z.string().max(50, 'Category must contain at most 50 characters').optional(),
1082
- prebindingDefinitions: z.array(PrebindingDefinitionSchema).length(1).optional(),
1088
+ prebindingDefinitions: z.array(PrebindingDefinitionSchema).max(1).optional(),
1083
1089
  })
1084
1090
  .strict();
1085
1091
  z.object({
@@ -1452,10 +1458,7 @@ propertyName, resolveDesignTokens = true) => {
1452
1458
  };
1453
1459
  /** Overwrites the default value breakpoint by breakpoint. If a breakpoint
1454
1460
  * is not overwritten, it will fall back to the default. */
1455
- function mergeDesignValuesByBreakpoint(defaultValue, overwriteValue) {
1456
- if (!defaultValue || !overwriteValue) {
1457
- return defaultValue ?? overwriteValue;
1458
- }
1461
+ const mergeDesignValuesByBreakpoint = (defaultValue, overwriteValue) => {
1459
1462
  const mergedValuesByBreakpoint = { ...defaultValue.valuesByBreakpoint };
1460
1463
  for (const [breakpointId, value] of Object.entries(overwriteValue.valuesByBreakpoint)) {
1461
1464
  if (!isValidBreakpointValue(value)) {
@@ -1467,7 +1470,7 @@ function mergeDesignValuesByBreakpoint(defaultValue, overwriteValue) {
1467
1470
  type: 'DesignValue',
1468
1471
  valuesByBreakpoint: mergedValuesByBreakpoint,
1469
1472
  };
1470
- }
1473
+ };
1471
1474
 
1472
1475
  const CF_DEBUG_KEY = 'cf_debug';
1473
1476
  /**