@contentful/experiences-components-react 1.42.0-prerelease-20250630T1135-a8b68d4.0 → 1.42.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
@@ -1371,18 +1371,14 @@ const VariableMappingSchema = z.object({
1371
1371
  // TODO: finalize schema structure before release
1372
1372
  // https://contentful.atlassian.net/browse/LUMOS-523
1373
1373
  const ParameterDefinitionSchema = 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
- }),
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({
@@ -1396,29 +1392,13 @@ const ParameterDefinitionsSchema = z.record(propertyKeySchema, ParameterDefiniti
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);
1399
- const PassToNodeSchema = z
1400
- .object({
1401
- nodeId: propertyKeySchema,
1402
- parameterId: propertyKeySchema,
1403
- prebindingId: propertyKeySchema,
1404
- })
1405
- .strict();
1406
- const PrebindingDefinitionSchema = z
1407
- .object({
1408
- id: propertyKeySchema,
1409
- variableMappings: VariableMappingsSchema.optional(),
1410
- parameterDefinitions: ParameterDefinitionsSchema,
1411
- passToNodes: z.array(PassToNodeSchema).optional(),
1412
- })
1413
- .strict();
1414
- const ComponentSettingsSchema = z
1415
- .object({
1395
+ const ComponentSettingsSchema = z.object({
1416
1396
  variableDefinitions: ComponentVariablesSchema,
1417
1397
  thumbnailId: z.enum(THUMBNAIL_IDS).optional(),
1418
1398
  category: z.string().max(50, 'Category must contain at most 50 characters').optional(),
1419
- prebindingDefinitions: z.array(PrebindingDefinitionSchema).optional(),
1420
- })
1421
- .strict();
1399
+ variableMappings: VariableMappingsSchema.optional(),
1400
+ parameterDefinitions: ParameterDefinitionsSchema.optional(),
1401
+ });
1422
1402
  z.object({
1423
1403
  componentTree: localeWrapper(ComponentTreeSchema),
1424
1404
  dataSource: localeWrapper(DataSourceSchema),