@contentful/experiences-components-react 1.42.0-prerelease-20250625T0902-d9db401.0 → 1.42.0-prerelease-20250626T1154-6ca57b0.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 PatternPropertySchema = z.object({
1277
+ const ParameterSchema = z.object({
1278
1278
  type: z.literal('BoundValue'),
1279
1279
  path: z.string(),
1280
1280
  });
1281
- const PatternPropertiesSchema = z.record(propertyKeySchema, PatternPropertySchema);
1281
+ const ParametersSchema = z.record(propertyKeySchema, ParameterSchema);
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
- patternProperties: PatternPropertiesSchema.optional(),
1298
+ parameters: ParametersSchema.optional(),
1299
1299
  });
1300
1300
  const ComponentVariableSchema = z.object({
1301
1301
  displayName: z.string().optional(),
@@ -1364,25 +1364,21 @@ 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
- patternPropertyDefinitionId: propertyKeySchema,
1367
+ parameterId: 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 PatternPropertyDefinitionSchema = z.object({
1374
- defaultSource: z
1375
- .strictObject({
1376
- type: z.enum(['Entry']),
1377
- contentTypeId: z.string(),
1378
- link: z.strictObject({
1379
- sys: z.strictObject({
1380
- type: z.literal('Link'),
1381
- id: z.string(),
1382
- linkType: z.enum(['Entry']),
1383
- }),
1373
+ const ParameterDefinitionSchema = z.object({
1374
+ defaultValue: z
1375
+ .record(z.string(), z.object({
1376
+ sys: z.object({
1377
+ type: z.literal('Link'),
1378
+ id: z.string(),
1379
+ linkType: z.enum(['Entry']),
1384
1380
  }),
1385
- })
1381
+ }))
1386
1382
  .optional(),
1387
1383
  contentTypes: z.record(z.string(), z.object({
1388
1384
  sys: z.object({
@@ -1392,7 +1388,7 @@ const PatternPropertyDefinitionSchema = z.object({
1392
1388
  }),
1393
1389
  })),
1394
1390
  });
1395
- const PatternPropertyDefinitionsSchema = z.record(propertyKeySchema, PatternPropertyDefinitionSchema);
1391
+ const ParameterDefinitionsSchema = z.record(propertyKeySchema, ParameterDefinitionSchema);
1396
1392
  const VariableMappingsSchema = z.record(propertyKeySchema, VariableMappingSchema);
1397
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
1398
1394
  ComponentVariableSchema);
@@ -1401,7 +1397,7 @@ const ComponentSettingsSchema = z.object({
1401
1397
  thumbnailId: z.enum(THUMBNAIL_IDS).optional(),
1402
1398
  category: z.string().max(50, 'Category must contain at most 50 characters').optional(),
1403
1399
  variableMappings: VariableMappingsSchema.optional(),
1404
- patternPropertyDefinitions: PatternPropertyDefinitionsSchema.optional(),
1400
+ parameterDefinitions: ParameterDefinitionsSchema.optional(),
1405
1401
  });
1406
1402
  z.object({
1407
1403
  componentTree: localeWrapper(ComponentTreeSchema),