@contentful/experiences-components-react 3.7.2-dev-20250924T1519-77d453c.0 → 3.8.0-dev-20250925T1014-c658e71.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 +3 -4
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1288,7 +1288,7 @@ const BREAKPOINT_QUERY_REGEX = /^\*$|^[<>][0-9]+px$/;
|
|
|
1288
1288
|
const BreakpointSchema = z
|
|
1289
1289
|
.object({
|
|
1290
1290
|
id: propertyKeySchema,
|
|
1291
|
-
// Can be
|
|
1291
|
+
// Can be replaced with z.templateLiteral when upgrading to zod v4
|
|
1292
1292
|
query: z.string().refine((s) => BREAKPOINT_QUERY_REGEX.test(s)),
|
|
1293
1293
|
previewSize: z.string().optional(),
|
|
1294
1294
|
displayName: z.string(),
|
|
@@ -1429,8 +1429,7 @@ const ParameterDefinitionSchema = z.object({
|
|
|
1429
1429
|
contentTypes: z.array(z.string()).min(1),
|
|
1430
1430
|
passToNodes: z
|
|
1431
1431
|
.array(PassToNodeSchema)
|
|
1432
|
-
.max(1, 'At most one "passToNodes" element is allowed per parameter definition.')
|
|
1433
|
-
.optional(), // we might change this to be empty array for native parameter definitions, that's why we don't use .length(1)
|
|
1432
|
+
.max(1, 'At most one "passToNodes" element is allowed per parameter definition.'),
|
|
1434
1433
|
});
|
|
1435
1434
|
const ParameterDefinitionsSchema = z.record(propertyKeySchema, ParameterDefinitionSchema);
|
|
1436
1435
|
const VariableMappingsSchema = z.record(propertyKeySchema, VariableMappingSchema);
|
|
@@ -1532,7 +1531,7 @@ const validatePassToNodes = (rootChildren, componentSettings, ctx) => {
|
|
|
1532
1531
|
return;
|
|
1533
1532
|
}
|
|
1534
1533
|
const { parameterDefinitions } = componentSettings.prebindingDefinitions[0];
|
|
1535
|
-
|
|
1534
|
+
const nodeIds = new Set();
|
|
1536
1535
|
for (const paramDef of Object.values(parameterDefinitions || {})) {
|
|
1537
1536
|
paramDef.passToNodes?.forEach((n) => nodeIds.add(n.nodeId));
|
|
1538
1537
|
}
|