@contentful/experiences-components-react 1.42.0-beta.0 → 1.42.0-dev-20250624T0633-2ccc3ab.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
@@ -1274,11 +1274,11 @@ const ComponentPropertyValueSchema = z.discriminatedUnion('type', [
1274
1274
  ]);
1275
1275
  // TODO: finalize schema structure before release
1276
1276
  // https://contentful.atlassian.net/browse/LUMOS-523
1277
- const ParameterSchema = z.object({
1277
+ const PatternPropertySchema = z.object({
1278
1278
  type: z.literal('BoundValue'),
1279
1279
  path: z.string(),
1280
1280
  });
1281
- const ParametersSchema = z.record(propertyKeySchema, ParameterSchema);
1281
+ const PatternPropertiesSchema = z.record(propertyKeySchema, PatternPropertySchema);
1282
1282
  const BreakpointSchema = z
1283
1283
  .object({
1284
1284
  id: propertyKeySchema,
@@ -1295,7 +1295,7 @@ const BaseComponentTreeNodeSchema = z.object({
1295
1295
  displayName: z.string().optional(),
1296
1296
  slotId: z.string().optional(),
1297
1297
  variables: z.record(propertyKeySchema, ComponentPropertyValueSchema),
1298
- parameters: ParametersSchema.optional(),
1298
+ patternProperties: PatternPropertiesSchema.optional(),
1299
1299
  });
1300
1300
  const ComponentVariableSchema = z.object({
1301
1301
  displayName: z.string().optional(),
@@ -1364,13 +1364,13 @@ const THUMBNAIL_IDS = [
1364
1364
  // TODO: finalize schema structure before release
1365
1365
  // https://contentful.atlassian.net/browse/LUMOS-523
1366
1366
  const VariableMappingSchema = z.object({
1367
- parameterId: propertyKeySchema,
1367
+ patternPropertyDefinitionId: propertyKeySchema,
1368
1368
  type: z.literal('ContentTypeMapping'),
1369
1369
  pathsByContentType: z.record(z.string(), z.object({ path: z.string() })),
1370
1370
  });
1371
1371
  // TODO: finalize schema structure before release
1372
1372
  // https://contentful.atlassian.net/browse/LUMOS-523
1373
- const ParameterDefinitionSchema = z.object({
1373
+ const PatternPropertyDefinitionSchema = z.object({
1374
1374
  defaultValue: z
1375
1375
  .record(z.string(), z.object({
1376
1376
  sys: z.object({
@@ -1388,7 +1388,7 @@ const ParameterDefinitionSchema = z.object({
1388
1388
  }),
1389
1389
  })),
1390
1390
  });
1391
- const ParameterDefinitionsSchema = z.record(propertyKeySchema, ParameterDefinitionSchema);
1391
+ const PatternPropertyDefinitionsSchema = z.record(propertyKeySchema, PatternPropertyDefinitionSchema);
1392
1392
  const VariableMappingsSchema = z.record(propertyKeySchema, VariableMappingSchema);
1393
1393
  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
1394
1394
  ComponentVariableSchema);
@@ -1397,7 +1397,7 @@ const ComponentSettingsSchema = z.object({
1397
1397
  thumbnailId: z.enum(THUMBNAIL_IDS).optional(),
1398
1398
  category: z.string().max(50, 'Category must contain at most 50 characters').optional(),
1399
1399
  variableMappings: VariableMappingsSchema.optional(),
1400
- parameterDefinitions: ParameterDefinitionsSchema.optional(),
1400
+ patternPropertyDefinitions: PatternPropertyDefinitionsSchema.optional(),
1401
1401
  });
1402
1402
  z.object({
1403
1403
  componentTree: localeWrapper(ComponentTreeSchema),