@contentful/experiences-components-react 3.2.0 → 3.2.1-dev-20250819T1408-2dcca7e.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
@@ -570,7 +570,6 @@ const CONTENTFUL_COMPONENTS = {
570
570
  name: 'Carousel',
571
571
  },
572
572
  };
573
- const DEFAULT_IMAGE_WIDTH = '500px';
574
573
  var PostMessageMethods;
575
574
  (function (PostMessageMethods) {
576
575
  PostMessageMethods["REQUEST_ENTITIES"] = "REQUEST_ENTITIES";
@@ -779,9 +778,9 @@ const optionalBuiltInStyles = {
779
778
  type: 'Object',
780
779
  group: 'style',
781
780
  defaultValue: {
782
- width: DEFAULT_IMAGE_WIDTH,
781
+ width: '100%',
783
782
  height: '100%',
784
- targetSize: DEFAULT_IMAGE_WIDTH,
783
+ targetSize: 'unset',
785
784
  },
786
785
  },
787
786
  cfBackgroundColor: {
@@ -1334,10 +1333,12 @@ const ParameterSchema = z.object({
1334
1333
  path: z.string(),
1335
1334
  });
1336
1335
  const ParametersSchema = z.record(propertyKeySchema, ParameterSchema);
1336
+ const BREAKPOINT_QUERY_REGEX = /^\*$|^[<>][0-9]+px$/;
1337
1337
  const BreakpointSchema = z
1338
1338
  .object({
1339
1339
  id: propertyKeySchema,
1340
- query: z.string().regex(/^\*$|^[<>][0-9*]+px$/),
1340
+ // Can be replace with z.templateLiteral when upgrading to zod v4
1341
+ query: z.string().refine((s) => BREAKPOINT_QUERY_REGEX.test(s)),
1341
1342
  previewSize: z.string(),
1342
1343
  displayName: z.string(),
1343
1344
  displayIcon: z.enum(['desktop', 'tablet', 'mobile']).optional(),