@contentful/experiences-core 1.18.1-dev-20241011T1817-82c8221.0 → 1.19.0-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
@@ -1282,20 +1282,6 @@ const breakpointsRefinement = (value, ctx) => {
1282
1282
  });
1283
1283
  }
1284
1284
  };
1285
- const componentSettingsRefinement = (value, ctx) => {
1286
- const { componentSettings, usedComponents } = value;
1287
- if (!componentSettings || !usedComponents) {
1288
- return;
1289
- }
1290
- const localeKey = Object.keys(componentSettings ?? {})[0];
1291
- if (componentSettings[localeKey] !== undefined && usedComponents[localeKey] !== undefined) {
1292
- ctx.addIssue({
1293
- code: z.ZodIssueCode.custom,
1294
- message: `'componentSettings' field cannot be used in conjunction with 'usedComponents' field`,
1295
- path: ['componentSettings', localeKey],
1296
- });
1297
- }
1298
- };
1299
1285
  const ComponentTreeSchema = z
1300
1286
  .object({
1301
1287
  breakpoints: z.array(BreakpointSchema).superRefine(breakpointsRefinement),
@@ -1304,15 +1290,13 @@ const ComponentTreeSchema = z
1304
1290
  })
1305
1291
  .strict();
1306
1292
  const localeWrapper = (fieldSchema) => z.record(z.string(), fieldSchema);
1307
- z
1308
- .object({
1293
+ z.object({
1309
1294
  componentTree: localeWrapper(ComponentTreeSchema),
1310
1295
  dataSource: localeWrapper(DataSourceSchema),
1311
1296
  unboundValues: localeWrapper(UnboundValuesSchema),
1312
1297
  usedComponents: localeWrapper(UsedComponentsSchema).optional(),
1313
1298
  componentSettings: localeWrapper(ComponentSettingsSchema).optional(),
1314
- })
1315
- .superRefine(componentSettingsRefinement);
1299
+ });
1316
1300
 
1317
1301
  z.object({
1318
1302
  id: DefinitionPropertyKeySchema,