@contentful/experiences-core 1.12.1-prerelease-20240821T2336-6c0f14a.0 → 1.13.0-beta.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
@@ -710,6 +710,13 @@ const containerBuiltInStyles = {
710
710
  cfBorderRadius: optionalBuiltInStyles.cfBorderRadius,
711
711
  cfBackgroundImageUrl: optionalBuiltInStyles.cfBackgroundImageUrl,
712
712
  cfBackgroundImageOptions: optionalBuiltInStyles.cfBackgroundImageOptions,
713
+ cfMargin: {
714
+ displayName: 'Margin',
715
+ type: 'Text',
716
+ group: 'style',
717
+ description: 'The margin of the section',
718
+ defaultValue: '0 auto 0 auto',
719
+ },
713
720
  cfMaxWidth: {
714
721
  displayName: 'Max Width',
715
722
  type: 'Text',
@@ -1111,6 +1118,7 @@ const HyperlinkValueSchema = z
1111
1118
  .object({
1112
1119
  type: z.literal('HyperlinkValue'),
1113
1120
  linkTargetKey: z.string(),
1121
+ /** Allows to override parts of the URL, e.g. the locale */
1114
1122
  overrides: z.object({}).optional(),
1115
1123
  })
1116
1124
  .strict();
@@ -2411,7 +2419,7 @@ const getValueForBreakpoint = (valuesByBreakpoint, breakpoints, activeBreakpoint
2411
2419
  if (valuesByBreakpoint instanceof Object) {
2412
2420
  // Assume that the values are sorted by media query to apply the cascading CSS logic
2413
2421
  for (let index = activeBreakpointIndex; index >= 0; index--) {
2414
- const breakpointId = breakpoints[index].id;
2422
+ const breakpointId = breakpoints[index]?.id;
2415
2423
  if (valuesByBreakpoint[breakpointId]) {
2416
2424
  // If the value is defined, we use it and stop the breakpoints cascade
2417
2425
  return eventuallyResolveDesignTokens(valuesByBreakpoint[breakpointId]);
@@ -2419,8 +2427,10 @@ const getValueForBreakpoint = (valuesByBreakpoint, breakpoints, activeBreakpoint
2419
2427
  }
2420
2428
  // If no breakpoint matched, we search and apply the fallback breakpoint
2421
2429
  const fallbackBreakpointIndex = getFallbackBreakpointIndex(breakpoints);
2422
- const fallbackBreakpointId = breakpoints[fallbackBreakpointIndex].id;
2423
- return eventuallyResolveDesignTokens(valuesByBreakpoint[fallbackBreakpointId]);
2430
+ const fallbackBreakpointId = breakpoints[fallbackBreakpointIndex]?.id;
2431
+ if (valuesByBreakpoint[fallbackBreakpointId]) {
2432
+ return eventuallyResolveDesignTokens(valuesByBreakpoint[fallbackBreakpointId]);
2433
+ }
2424
2434
  }
2425
2435
  else {
2426
2436
  // Old design properties did not support breakpoints, keep for backward compatibility
@@ -3311,7 +3321,7 @@ const fetchAllEntries = async ({ client, ids, locale, skip = 0, limit = 100, res
3311
3321
  };
3312
3322
  }
3313
3323
  const query = { 'sys.id[in]': ids, locale, limit, skip };
3314
- const { items, includes, total: responseTotal } = await client.getEntries({ ...query });
3324
+ const { items, includes, total: responseTotal, } = await client.withoutLinkResolution.getEntries({ ...query });
3315
3325
  responseItems.push(...items);
3316
3326
  responseIncludes?.Entry?.push(...(includes?.Entry || []));
3317
3327
  responseIncludes?.Asset?.push(...(includes?.Asset || []));