@contentful/experiences-core 3.7.0-beta.0 → 3.7.0-dev-20250917T1203-0e23897.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.
@@ -48,9 +48,7 @@ declare const INCOMING_EVENTS: {
48
48
  /** @deprecated will be removed when dropping backward compatibility for old DND */
49
49
  readonly HoverComponent: "hoverComponent";
50
50
  readonly UpdatedEntity: "updatedEntity";
51
- /** @deprecated not needed after `patternResolution` was introduced. Will be removed in the next major version. */
52
51
  readonly AssembliesAdded: "assembliesAdded";
53
- /** @deprecated not needed after `patternResolution` was introduced. Will be removed in the next major version. */
54
52
  readonly AssembliesRegistered: "assembliesRegistered";
55
53
  /** @deprecated will be removed when dropping backward compatibility for old DND */
56
54
  readonly MouseMove: "mouseMove";
package/dist/constants.js CHANGED
@@ -48,9 +48,7 @@ const INCOMING_EVENTS = {
48
48
  /** @deprecated will be removed when dropping backward compatibility for old DND */
49
49
  HoverComponent: 'hoverComponent',
50
50
  UpdatedEntity: 'updatedEntity',
51
- /** @deprecated not needed after `patternResolution` was introduced. Will be removed in the next major version. */
52
51
  AssembliesAdded: 'assembliesAdded',
53
- /** @deprecated not needed after `patternResolution` was introduced. Will be removed in the next major version. */
54
52
  AssembliesRegistered: 'assembliesRegistered',
55
53
  /** @deprecated will be removed when dropping backward compatibility for old DND */
56
54
  MouseMove: 'mouseMove',
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sources":["../src/constants.ts"],"sourcesContent":["/** @deprecated will be removed when dropping backward compatibility for old DND */\nexport const SCROLL_STATES = {\n Start: 'scrollStart',\n IsScrolling: 'isScrolling',\n End: 'scrollEnd',\n} as const;\n\nexport const OUTGOING_EVENTS = {\n Connected: 'connected',\n DesignTokens: 'registerDesignTokens',\n RegisteredBreakpoints: 'registeredBreakpoints',\n /** @deprecated will be removed when dropping backward compatibility for old DND */\n MouseMove: 'mouseMove',\n /** @deprecated will be removed when dropping backward compatibility for old DND */\n ComponentSelected: 'componentSelected',\n RegisteredComponents: 'registeredComponents',\n RequestComponentTreeUpdate: 'requestComponentTreeUpdate',\n CanvasReload: 'canvasReload',\n /** @deprecated will be removed when dropping backward compatibility for old DND */\n UpdateSelectedComponentCoordinates: 'updateSelectedComponentCoordinates',\n /** @deprecated will be removed when dropping backward compatibility for old DND */\n CanvasScroll: 'canvasScrolling',\n CanvasError: 'canvasError',\n /** @deprecated will be removed when dropping backward compatibility for old DND */\n OutsideCanvasClick: 'outsideCanvasClick',\n SDKFeatures: 'sdkFeatures',\n RequestEntities: 'REQUEST_ENTITIES',\n CanvasGeometryUpdated: 'canvasGeometryUpdated',\n CanvasPan: 'canvasPan',\n} as const;\n\nexport const INCOMING_EVENTS = {\n RequestEditorMode: 'requestEditorMode',\n RequestReadOnlyMode: 'requestReadOnlyMode',\n ExperienceUpdated: 'componentTreeUpdated',\n /** @deprecated will be removed when dropping backward compatibility for old DND */\n ComponentDraggingChanged: 'componentDraggingChanged',\n /** @deprecated will be removed when dropping backward compatibility for old DND */\n ComponentDragCanceled: 'componentDragCanceled',\n /** @deprecated will be removed when dropping backward compatibility for old DND */\n ComponentDragStarted: 'componentDragStarted',\n /** @deprecated will be removed when dropping backward compatibility for old DND */\n ComponentDragEnded: 'componentDragEnded',\n /** @deprecated will be removed when dropping backward compatibility for old DND */\n ComponentMoveEnded: 'componentMoveEnded',\n /** @deprecated will be removed when dropping backward compatibility for old DND */\n CanvasResized: 'canvasResized',\n /** @deprecated will be removed when dropping backward compatibility for old DND */\n SelectComponent: 'selectComponent',\n /** @deprecated will be removed when dropping backward compatibility for old DND */\n HoverComponent: 'hoverComponent',\n UpdatedEntity: 'updatedEntity',\n /** @deprecated not needed after `patternResolution` was introduced. Will be removed in the next major version. */\n AssembliesAdded: 'assembliesAdded',\n /** @deprecated not needed after `patternResolution` was introduced. Will be removed in the next major version. */\n AssembliesRegistered: 'assembliesRegistered',\n /** @deprecated will be removed when dropping backward compatibility for old DND */\n MouseMove: 'mouseMove',\n RequestedEntities: 'REQUESTED_ENTITIES',\n} as const;\n\nexport const INTERNAL_EVENTS = {\n ComponentsRegistered: 'cfComponentsRegistered',\n VisualEditorInitialize: 'cfVisualEditorInitialize',\n} as const;\n\nexport const VISUAL_EDITOR_EVENTS = {\n Ready: 'cfVisualEditorReady',\n};\n\n/**\n * These modes are ONLY intended to be internally used within the context of\n * editing an experience inside of Contentful Studio. i.e. these modes\n * intentionally do not include preview/delivery modes.\n */\nexport enum StudioCanvasMode {\n READ_ONLY = 'readOnlyMode',\n EDITOR = 'editorMode',\n NONE = 'none',\n}\n\nexport const VISUAL_EDITOR_CONTAINER_ID = 'cf-visual-editor';\nexport const CONTENTFUL_COMPONENT_CATEGORY = 'contentful-component';\nexport const CONTENTFUL_DEFAULT_CATEGORY = 'Contentful';\n\nexport const CONTENTFUL_COMPONENTS = {\n section: {\n id: 'contentful-section',\n name: 'Section',\n },\n container: {\n id: 'contentful-container',\n name: 'Container',\n },\n columns: {\n id: 'contentful-columns',\n name: 'Columns',\n },\n singleColumn: {\n id: 'contentful-single-column',\n name: 'Column',\n },\n button: {\n id: 'contentful-button',\n name: 'Button',\n },\n heading: {\n id: 'contentful-heading',\n name: 'Heading',\n },\n image: {\n id: 'contentful-image',\n name: 'Image',\n },\n richText: {\n id: 'contentful-richText',\n name: 'Rich Text',\n },\n text: {\n id: 'contentful-text',\n name: 'Text',\n },\n divider: {\n id: 'contentful-divider',\n name: 'Divider',\n },\n carousel: {\n id: 'contentful-carousel',\n name: 'Carousel',\n },\n} as const;\n\nexport const ASSEMBLY_NODE_TYPE = 'assembly';\nexport const ASSEMBLY_DEFAULT_CATEGORY = 'Assemblies';\nexport const ASSEMBLY_BLOCK_NODE_TYPE = 'assemblyBlock';\nexport const ASSEMBLY_NODE_TYPES = [ASSEMBLY_NODE_TYPE, ASSEMBLY_BLOCK_NODE_TYPE];\nexport const LATEST_SCHEMA_VERSION = '2023-09-28';\nexport const CF_STYLE_ATTRIBUTES = [\n 'cfVisibility',\n 'cfHorizontalAlignment',\n 'cfVerticalAlignment',\n 'cfMargin',\n 'cfPadding',\n 'cfBackgroundColor',\n 'cfWidth',\n 'cfMaxWidth',\n 'cfHeight',\n 'cfImageAsset',\n 'cfImageOptions',\n 'cfBackgroundImageUrl',\n 'cfBackgroundImageOptions',\n 'cfFlexDirection',\n 'cfFlexWrap',\n 'cfFlexReverse',\n 'cfBorder',\n 'cfBorderRadius',\n 'cfGap',\n 'cfColumnSpan',\n 'cfColumnSpanLock',\n 'cfColumns',\n 'cfFontSize',\n 'cfFontWeight',\n 'cfLineHeight',\n 'cfLetterSpacing',\n 'cfTextColor',\n 'cfTextAlign',\n 'cfTextTransform',\n 'cfTextBold',\n 'cfTextItalic',\n 'cfTextUnderline',\n];\n\nexport const EMPTY_CONTAINER_SIZE = '80px';\n\nexport const HYPERLINK_DEFAULT_PATTERN = `/{locale}/{entry.fields.slug}/`;\n\nexport enum PostMessageMethods {\n REQUEST_ENTITIES = 'REQUEST_ENTITIES',\n REQUESTED_ENTITIES = 'REQUESTED_ENTITIES',\n}\n\nexport const SUPPORTED_IMAGE_FORMATS = ['jpg', 'png', 'webp', 'gif', 'avif'] as const;\n\nexport const PATTERN_PROPERTY_DIVIDER = '-----';\n\nexport const SIDELOADED_PREFIX = 'sideloaded_';\n"],"names":[],"mappings":"AAAA;AACa,MAAA,aAAa,GAAG;AAC3B,IAAA,KAAK,EAAE,aAAa;AACpB,IAAA,WAAW,EAAE,aAAa;AAC1B,IAAA,GAAG,EAAE,WAAW;EACP;AAEE,MAAA,eAAe,GAAG;AAC7B,IAAA,SAAS,EAAE,WAAW;AACtB,IAAA,YAAY,EAAE,sBAAsB;AACpC,IAAA,qBAAqB,EAAE,uBAAuB;;AAE9C,IAAA,SAAS,EAAE,WAAW;;AAEtB,IAAA,iBAAiB,EAAE,mBAAmB;AACtC,IAAA,oBAAoB,EAAE,sBAAsB;AAC5C,IAAA,0BAA0B,EAAE,4BAA4B;AACxD,IAAA,YAAY,EAAE,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ated will be removed when dropping backward compatibility for old DND */\nexport const SCROLL_STATES = {\n Start: 'scrollStart',\n IsScrolling: 'isScrolling',\n End: 'scrollEnd',\n} as const;\n\nexport const OUTGOING_EVENTS = {\n Connected: 'connected',\n DesignTokens: 'registerDesignTokens',\n RegisteredBreakpoints: 'registeredBreakpoints',\n /** @deprecated will be removed when dropping backward compatibility for old DND */\n MouseMove: 'mouseMove',\n /** @deprecated will be removed when dropping backward compatibility for old DND */\n ComponentSelected: 'componentSelected',\n RegisteredComponents: 'registeredComponents',\n RequestComponentTreeUpdate: 'requestComponentTreeUpdate',\n CanvasReload: 'canvasReload',\n /** @deprecated will be removed when dropping backward compatibility for old DND */\n UpdateSelectedComponentCoordinates: 'updateSelectedComponentCoordinates',\n /** @deprecated will be removed when dropping backward compatibility for old DND */\n CanvasScroll: 'canvasScrolling',\n CanvasError: 'canvasError',\n /** @deprecated will be removed when dropping backward compatibility for old DND */\n OutsideCanvasClick: 'outsideCanvasClick',\n SDKFeatures: 'sdkFeatures',\n RequestEntities: 'REQUEST_ENTITIES',\n CanvasGeometryUpdated: 'canvasGeometryUpdated',\n CanvasPan: 'canvasPan',\n} as const;\n\nexport const INCOMING_EVENTS = {\n RequestEditorMode: 'requestEditorMode',\n RequestReadOnlyMode: 'requestReadOnlyMode',\n ExperienceUpdated: 'componentTreeUpdated',\n /** @deprecated will be removed when dropping backward compatibility for old DND */\n ComponentDraggingChanged: 'componentDraggingChanged',\n /** @deprecated will be removed when dropping backward compatibility for old DND */\n ComponentDragCanceled: 'componentDragCanceled',\n /** @deprecated will be removed when dropping backward compatibility for old DND */\n ComponentDragStarted: 'componentDragStarted',\n /** @deprecated will be removed when dropping backward compatibility for old DND */\n ComponentDragEnded: 'componentDragEnded',\n /** @deprecated will be removed when dropping backward compatibility for old DND */\n ComponentMoveEnded: 'componentMoveEnded',\n /** @deprecated will be removed when dropping backward compatibility for old DND */\n CanvasResized: 'canvasResized',\n /** @deprecated will be removed when dropping backward compatibility for old DND */\n SelectComponent: 'selectComponent',\n /** @deprecated will be removed when dropping backward compatibility for old DND */\n HoverComponent: 'hoverComponent',\n UpdatedEntity: 'updatedEntity',\n AssembliesAdded: 'assembliesAdded',\n AssembliesRegistered: 'assembliesRegistered',\n /** @deprecated will be removed when dropping backward compatibility for old DND */\n MouseMove: 'mouseMove',\n RequestedEntities: 'REQUESTED_ENTITIES',\n} as const;\n\nexport const INTERNAL_EVENTS = {\n ComponentsRegistered: 'cfComponentsRegistered',\n VisualEditorInitialize: 'cfVisualEditorInitialize',\n} as const;\n\nexport const VISUAL_EDITOR_EVENTS = {\n Ready: 'cfVisualEditorReady',\n};\n\n/**\n * These modes are ONLY intended to be internally used within the context of\n * editing an experience inside of Contentful Studio. i.e. these modes\n * intentionally do not include preview/delivery modes.\n */\nexport enum StudioCanvasMode {\n READ_ONLY = 'readOnlyMode',\n EDITOR = 'editorMode',\n NONE = 'none',\n}\n\nexport const VISUAL_EDITOR_CONTAINER_ID = 'cf-visual-editor';\nexport const CONTENTFUL_COMPONENT_CATEGORY = 'contentful-component';\nexport const CONTENTFUL_DEFAULT_CATEGORY = 'Contentful';\n\nexport const CONTENTFUL_COMPONENTS = {\n section: {\n id: 'contentful-section',\n name: 'Section',\n },\n container: {\n id: 'contentful-container',\n name: 'Container',\n },\n columns: {\n id: 'contentful-columns',\n name: 'Columns',\n },\n singleColumn: {\n id: 'contentful-single-column',\n name: 'Column',\n },\n button: {\n id: 'contentful-button',\n name: 'Button',\n },\n heading: {\n id: 'contentful-heading',\n name: 'Heading',\n },\n image: {\n id: 'contentful-image',\n name: 'Image',\n },\n richText: {\n id: 'contentful-richText',\n name: 'Rich Text',\n },\n text: {\n id: 'contentful-text',\n name: 'Text',\n },\n divider: {\n id: 'contentful-divider',\n name: 'Divider',\n },\n carousel: {\n id: 'contentful-carousel',\n name: 'Carousel',\n },\n} as const;\n\nexport const ASSEMBLY_NODE_TYPE = 'assembly';\nexport const ASSEMBLY_DEFAULT_CATEGORY = 'Assemblies';\nexport const ASSEMBLY_BLOCK_NODE_TYPE = 'assemblyBlock';\nexport const ASSEMBLY_NODE_TYPES = [ASSEMBLY_NODE_TYPE, ASSEMBLY_BLOCK_NODE_TYPE];\nexport const LATEST_SCHEMA_VERSION = '2023-09-28';\nexport const CF_STYLE_ATTRIBUTES = [\n 'cfVisibility',\n 'cfHorizontalAlignment',\n 'cfVerticalAlignment',\n 'cfMargin',\n 'cfPadding',\n 'cfBackgroundColor',\n 'cfWidth',\n 'cfMaxWidth',\n 'cfHeight',\n 'cfImageAsset',\n 'cfImageOptions',\n 'cfBackgroundImageUrl',\n 'cfBackgroundImageOptions',\n 'cfFlexDirection',\n 'cfFlexWrap',\n 'cfFlexReverse',\n 'cfBorder',\n 'cfBorderRadius',\n 'cfGap',\n 'cfColumnSpan',\n 'cfColumnSpanLock',\n 'cfColumns',\n 'cfFontSize',\n 'cfFontWeight',\n 'cfLineHeight',\n 'cfLetterSpacing',\n 'cfTextColor',\n 'cfTextAlign',\n 'cfTextTransform',\n 'cfTextBold',\n 'cfTextItalic',\n 'cfTextUnderline',\n];\n\nexport const EMPTY_CONTAINER_SIZE = '80px';\n\nexport const HYPERLINK_DEFAULT_PATTERN = `/{locale}/{entry.fields.slug}/`;\n\nexport enum PostMessageMethods {\n REQUEST_ENTITIES = 'REQUEST_ENTITIES',\n REQUESTED_ENTITIES = 'REQUESTED_ENTITIES',\n}\n\nexport const SUPPORTED_IMAGE_FORMATS = ['jpg', 'png', 'webp', 'gif', 'avif'] as const;\n\nexport const PATTERN_PROPERTY_DIVIDER = '-----';\n\nexport const SIDELOADED_PREFIX = 'sideloaded_';\n"],"names":[],"mappings":"AAAA;AACa,MAAA,aAAa,GAAG;AAC3B,IAAA,KAAK,EAAE,aAAa;AACpB,IAAA,WAAW,EAAE,aAAa;AAC1B,IAAA,GAAG,EAAE,WAAW;EACP;AAEE,MAAA,eAAe,GAAG;AAC7B,IAAA,SAAS,EAAE,WAAW;AACtB,IAAA,YAAY,EAAE,sBAAsB;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AG,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAW;AAE/E,MAAM,wBAAwB,GAAG,QAAQ;AAEzC,MAAM,iBAAiB,GAAG;;;;"}
@@ -53,8 +53,8 @@ declare class EntityStore extends EntityStoreBase {
53
53
  get breakpoints(): {
54
54
  id: string;
55
55
  query: "*" | `>${number}px` | `<${number}px`;
56
+ previewSize: string;
56
57
  displayName: string;
57
- previewSize?: string | undefined;
58
58
  displayIcon?: "desktop" | "tablet" | "mobile" | undefined;
59
59
  }[];
60
60
  get dataSource(): Record<string, {
@@ -0,0 +1,2 @@
1
+ export { ASSEMBLY_BLOCK_NODE_TYPE, ASSEMBLY_DEFAULT_CATEGORY, ASSEMBLY_NODE_TYPE, ASSEMBLY_NODE_TYPES, CF_STYLE_ATTRIBUTES, CONTENTFUL_COMPONENTS, CONTENTFUL_COMPONENT_CATEGORY, CONTENTFUL_DEFAULT_CATEGORY, EMPTY_CONTAINER_SIZE, HYPERLINK_DEFAULT_PATTERN, INCOMING_EVENTS, INTERNAL_EVENTS, LATEST_SCHEMA_VERSION, OUTGOING_EVENTS, PATTERN_PROPERTY_DIVIDER, PostMessageMethods, SCROLL_STATES, SIDELOADED_PREFIX, SUPPORTED_IMAGE_FORMATS, StudioCanvasMode, VISUAL_EDITOR_CONTAINER_ID, VISUAL_EDITOR_EVENTS } from './constants.js';
2
+ //# sourceMappingURL=exports.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exports.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/index.d.ts CHANGED
@@ -16,7 +16,7 @@ export { transformVisibility } from './utils/styleUtils/styleTransformers.js';
16
16
  export { transformBoundContentValue } from './utils/transformers/transformBoundContentValue.js';
17
17
  export { treeMap, treeVisit } from './utils/treeTraversal.js';
18
18
  export { isArrayOfLinks, isAsset, isEntry, isExperienceEntry, isPatternEntry } from './utils/typeguards.js';
19
- export { checkIsAssemblyDefinition, checkIsAssemblyEntry, checkIsAssemblyNode, createAssemblyDefinition, generateRandomId, getDataFromTree, getTargetValueInPixels, parseCSSValue } from './utils/utils.js';
19
+ export { checkIsAssemblyDefinition, checkIsAssemblyEntry, checkIsAssemblyNode, generateRandomId, getDataFromTree, getTargetValueInPixels, parseCSSValue } from './utils/utils.js';
20
20
  export { doesMismatchMessageSchema, tryParseMessage, validateExperienceBuilderConfig } from './utils/validations.js';
21
21
  export { extractLeafLinksReferencedFromExperience } from './utils/schema/experienceSchema.js';
22
22
  export { FnShouldFollowReferencesOfEntryField, extractReferencesFromEntries, extractReferencesFromEntriesAsIds, referencesOf, uniqueById } from './utils/schema/references.js';
@@ -37,6 +37,6 @@ export { createExperience } from './fetchers/createExperience.js';
37
37
  export { fetchReferencedEntities } from './fetchers/fetchReferencedEntities.js';
38
38
  export { fetchExperienceEntry } from './fetchers/fetchExperienceEntry.js';
39
39
  export { defineDesignTokens, designTokensRegistry, getDesignTokenRegistration, resetDesignTokenRegistry } from './registries/designTokenRegistry.js';
40
- export { breakpointsRegistry, defineBreakpoints, runBreakpointsValidation } from './registries/breakpointsRegistry.js';
40
+ export { breakpointsRegistry, defineBreakpoints, getBreakpointRegistration, resetBreakpointsRegistry, runBreakpointsValidation } from './registries/breakpointsRegistry.js';
41
41
  export { defineSdkOptions, getSdkOptions, sdkOptionsRegistry } from './registries/sdkOptionsRegistry.js';
42
42
  export { DeepReference, gatherDeepPrebindingReferencesFromExperienceEntry, gatherDeepPrebindingReferencesFromPatternEntry, gatherDeepReferencesFromExperienceEntry, gatherDeepReferencesFromTree } from './deep-binding/DeepReference.js';
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { z, ZodIssueCode } from 'zod';
2
- import cloneDeep from 'lodash.clonedeep';
2
+ import { cloneDeep, omit, isArray, uniqBy } from 'lodash-es';
3
3
  import md5 from 'md5';
4
4
  import { BLOCKS } from '@contentful/rich-text-types';
5
5
  import { create } from 'zustand';
@@ -26,9 +26,7 @@ const INCOMING_EVENTS = {
26
26
  /** @deprecated will be removed when dropping backward compatibility for old DND */
27
27
  HoverComponent: 'hoverComponent',
28
28
  UpdatedEntity: 'updatedEntity',
29
- /** @deprecated not needed after `patternResolution` was introduced. Will be removed in the next major version. */
30
29
  AssembliesAdded: 'assembliesAdded',
31
- /** @deprecated not needed after `patternResolution` was introduced. Will be removed in the next major version. */
32
30
  AssembliesRegistered: 'assembliesRegistered',
33
31
  /** @deprecated will be removed when dropping backward compatibility for old DND */
34
32
  MouseMove: 'mouseMove',
@@ -1000,7 +998,7 @@ const BreakpointSchema = z
1000
998
  id: propertyKeySchema,
1001
999
  // Can be replace with z.templateLiteral when upgrading to zod v4
1002
1000
  query: z.string().refine((s) => BREAKPOINT_QUERY_REGEX.test(s)),
1003
- previewSize: z.string().optional(),
1001
+ previewSize: z.string(),
1004
1002
  displayName: z.string(),
1005
1003
  displayIcon: z.enum(['desktop', 'tablet', 'mobile']).optional(),
1006
1004
  })
@@ -1054,25 +1052,6 @@ z.object({
1054
1052
  usedComponents: localeWrapper(UsedComponentsSchema).optional(),
1055
1053
  });
1056
1054
 
1057
- function treeVisit$1(initialNode, onNode) {
1058
- const _treeVisit = (currentNode) => {
1059
- const children = [...currentNode.children];
1060
- onNode(currentNode);
1061
- for (const child of children) {
1062
- _treeVisit(child);
1063
- }
1064
- };
1065
- if (Array.isArray(initialNode)) {
1066
- for (const node of initialNode) {
1067
- _treeVisit(node);
1068
- }
1069
- }
1070
- else {
1071
- _treeVisit(initialNode);
1072
- }
1073
- }
1074
-
1075
- const MAX_ALLOWED_PATHS = 200;
1076
1055
  const THUMBNAIL_IDS = [
1077
1056
  'columns',
1078
1057
  'columnsPlusRight',
@@ -1103,17 +1082,7 @@ const THUMBNAIL_IDS = [
1103
1082
  const VariableMappingSchema = z.object({
1104
1083
  parameterId: propertyKeySchema,
1105
1084
  type: z.literal('ContentTypeMapping'),
1106
- pathsByContentType: z
1107
- .record(z.string(), z.object({ path: z.string() }))
1108
- .superRefine((paths, ctx) => {
1109
- const variableId = ctx.path[ctx.path.length - 2];
1110
- if (Object.keys(paths).length > MAX_ALLOWED_PATHS) {
1111
- ctx.addIssue({
1112
- code: z.ZodIssueCode.custom,
1113
- message: `Too many paths defined for variable mapping with id "${variableId}", maximum allowed is ${MAX_ALLOWED_PATHS}`,
1114
- });
1115
- }
1116
- }),
1085
+ pathsByContentType: z.record(z.string(), z.object({ path: z.string() })),
1117
1086
  });
1118
1087
  const PassToNodeSchema = z
1119
1088
  .object({
@@ -1137,10 +1106,7 @@ const ParameterDefinitionSchema = z.object({
1137
1106
  })
1138
1107
  .optional(),
1139
1108
  contentTypes: z.array(z.string()).min(1),
1140
- passToNodes: z
1141
- .array(PassToNodeSchema)
1142
- .max(1, 'At most one "passToNodes" element is allowed per parameter definition.')
1143
- .optional(), // we might change this to be empty array for native parameter definitions, that's why we don't use .length(1)
1109
+ passToNodes: z.array(PassToNodeSchema).optional(),
1144
1110
  });
1145
1111
  const ParameterDefinitionsSchema = z.record(propertyKeySchema, ParameterDefinitionSchema);
1146
1112
  const VariableMappingsSchema = z.record(propertyKeySchema, VariableMappingSchema);
@@ -1161,108 +1127,14 @@ const ComponentSettingsSchema = z
1161
1127
  category: z.string().max(50, 'Category must contain at most 50 characters').optional(),
1162
1128
  prebindingDefinitions: z.array(PrebindingDefinitionSchema).length(1).optional(),
1163
1129
  })
1164
- .strict()
1165
- .superRefine((componentSettings, ctx) => {
1166
- const { variableDefinitions, prebindingDefinitions } = componentSettings;
1167
- if (!prebindingDefinitions || prebindingDefinitions.length === 0) {
1168
- return;
1169
- }
1170
- const { parameterDefinitions, variableMappings, allowedVariableOverrides } = prebindingDefinitions[0];
1171
- validateAtMostOneNativeParameterDefinition(parameterDefinitions, ctx);
1172
- validateNoOverlapBetweenMappingAndOverrides(variableMappings, allowedVariableOverrides, ctx);
1173
- validateMappingsAgainstVariableDefinitions(variableMappings, allowedVariableOverrides, variableDefinitions, ctx);
1174
- validateMappingsAgainstParameterDefinitions(variableMappings, parameterDefinitions, ctx);
1175
- });
1176
- z
1177
- .object({
1130
+ .strict();
1131
+ z.object({
1178
1132
  componentTree: localeWrapper(ComponentTreeSchema),
1179
1133
  dataSource: localeWrapper(DataSourceSchema),
1180
1134
  unboundValues: localeWrapper(UnboundValuesSchema),
1181
1135
  usedComponents: localeWrapper(UsedComponentsSchema).optional(),
1182
1136
  componentSettings: localeWrapper(ComponentSettingsSchema),
1183
- })
1184
- .superRefine((patternFields, ctx) => {
1185
- const { componentTree, componentSettings } = patternFields;
1186
- // values at this point are wrapped under locale code
1187
- const nonLocalisedComponentTree = Object.values(componentTree)[0];
1188
- const nonLocalisedComponentSettings = Object.values(componentSettings)[0];
1189
- if (!nonLocalisedComponentSettings || !nonLocalisedComponentTree) {
1190
- return;
1191
- }
1192
- validatePassToNodes(nonLocalisedComponentTree.children || [], nonLocalisedComponentSettings || {}, ctx);
1193
1137
  });
1194
- const validateAtMostOneNativeParameterDefinition = (parameterDefinitions, ctx) => {
1195
- const nativeParamDefinitions = Object.values(parameterDefinitions).filter((paramDefinition) => !(paramDefinition.passToNodes && paramDefinition.passToNodes.length > 0));
1196
- if (nativeParamDefinitions.length > 1) {
1197
- ctx.addIssue({
1198
- code: z.ZodIssueCode.custom,
1199
- message: `Only one native parameter definition (parameter definition without passToNodes) is allowed per prebinding definition.`,
1200
- });
1201
- }
1202
- };
1203
- const validateNoOverlapBetweenMappingAndOverrides = (variableMappings, allowedVariableOverrides, ctx) => {
1204
- const variableMappingKeys = Object.keys(variableMappings || {});
1205
- const overridesSet = new Set(allowedVariableOverrides || []);
1206
- const overlap = variableMappingKeys.filter((key) => overridesSet.has(key));
1207
- if (overlap.length > 0) {
1208
- ctx.addIssue({
1209
- code: z.ZodIssueCode.custom,
1210
- message: `Found both variable mapping and allowed override for the following keys: ${overlap.map((key) => `"${key}"`).join(', ')}.`,
1211
- });
1212
- }
1213
- };
1214
- const validateMappingsAgainstVariableDefinitions = (variableMappings, allowedVariableOverrides, variableDefinitions, ctx) => {
1215
- const nonDesignVariableDefinitionKeys = Object.entries(variableDefinitions)
1216
- .filter(([_, def]) => def.group !== 'style')
1217
- .map(([key]) => key);
1218
- const variableMappingKeys = Object.keys(variableMappings || {});
1219
- const allKeys = [...variableMappingKeys, ...(allowedVariableOverrides || [])];
1220
- const invalidMappings = allKeys.filter((key) => !nonDesignVariableDefinitionKeys.includes(key));
1221
- if (invalidMappings.length > 0) {
1222
- ctx.addIssue({
1223
- code: z.ZodIssueCode.custom,
1224
- message: `The following variable mappings or overrides are missing from the variable definitions: ${invalidMappings.map((key) => `"${key}"`).join(', ')}.`,
1225
- });
1226
- }
1227
- };
1228
- const validateMappingsAgainstParameterDefinitions = (variableMappings, parameterDefinitions, ctx) => {
1229
- const parameterDefinitionKeys = Object.keys(parameterDefinitions || {});
1230
- for (const [mappingKey, mappingValue] of Object.entries(variableMappings || {})) {
1231
- if (!parameterDefinitionKeys.includes(mappingValue.parameterId)) {
1232
- ctx.addIssue({
1233
- code: z.ZodIssueCode.custom,
1234
- message: `The variable mapping with id "${mappingKey}" references a non-existing parameterId "${mappingValue.parameterId}".`,
1235
- });
1236
- }
1237
- }
1238
- };
1239
- const validatePassToNodes = (rootChildren, componentSettings, ctx) => {
1240
- if (!componentSettings.prebindingDefinitions ||
1241
- componentSettings.prebindingDefinitions.length === 0) {
1242
- return;
1243
- }
1244
- const { parameterDefinitions } = componentSettings.prebindingDefinitions[0];
1245
- let nodeIds = new Set();
1246
- for (const paramDef of Object.values(parameterDefinitions || {})) {
1247
- paramDef.passToNodes?.forEach((n) => nodeIds.add(n.nodeId));
1248
- }
1249
- treeVisit$1(rootChildren, (node) => {
1250
- if (!node.id)
1251
- return;
1252
- if (nodeIds.has(node.id)) {
1253
- nodeIds.delete(node.id);
1254
- }
1255
- });
1256
- if (nodeIds.size > 0) {
1257
- const stringifiedNodeIds = Array.from(nodeIds)
1258
- .map((id) => `"${id}"`)
1259
- .join(', ');
1260
- ctx.addIssue({
1261
- code: z.ZodIssueCode.custom,
1262
- message: `The following node IDs referenced in passToNodes are not present in the component tree: ${stringifiedNodeIds}.`,
1263
- });
1264
- }
1265
- };
1266
1138
 
1267
1139
  z
1268
1140
  .object({
@@ -1521,42 +1393,11 @@ const validateBreakpointsDefinition = (breakpoints) => {
1521
1393
  return { success: true };
1522
1394
  };
1523
1395
 
1524
- const breakpointsRegistry = [];
1396
+ let breakpointsRegistry = [];
1525
1397
  /**
1526
- * Define custom breakpoints that should be used for all your experiences.
1527
- * A breakpoint consists of:
1528
- * - id: a unique identifier for this breakpoint
1529
- * - query: a media query string that defines when this breakpoint is active
1530
- * - previewSize: an optional fixed preview size to be used in the Studio editor when selecting this breakpoint
1531
- * - displayName: the name to be displayed in the Studio editor for this breakpoint
1532
- * - displayIcon: an optional icon to be displayed in the Studio editor for this breakpoint
1533
- *
1534
- * The first breakpoint must use a wildcard query (`*`) to match all sizes.
1535
- *
1536
- * Every subsequent breakpoint inherits the designs of the previous ones by default.
1537
- *
1538
- * The order of breakpoints must be either:
1539
- * - desktop first: from largest to smallest, using `<` operators
1540
- * - mobile first: from smallest to largest, using `>` operators
1541
- *
1542
- * @note changing breakpoints after you have created experiences may break those experiences
1543
- * @example
1544
- * defineBreakpoints([{
1545
- * id: 'desktop',
1546
- * query: '*',
1547
- * displayName: 'Desktop',
1548
- * displayIcon: 'desktop',
1549
- * }, {
1550
- * id: 'tablet',
1551
- * query: '<992px',
1552
- * displayName: 'Tablet',
1553
- * displayIcon: 'tablet',
1554
- * }, {
1555
- * id: 'mobile',
1556
- * query: '<576px',
1557
- * displayName: 'Mobile',
1558
- * displayIcon: 'mobile',
1559
- * }]);
1398
+ * Register custom breakpoints
1399
+ * @param breakpoints - [{[key:string]: string}]
1400
+ * @returns void
1560
1401
  */
1561
1402
  const defineBreakpoints = (breakpoints) => {
1562
1403
  Object.assign(breakpointsRegistry, breakpoints);
@@ -1569,6 +1410,12 @@ const runBreakpointsValidation = () => {
1569
1410
  throw new Error(`Invalid breakpoints definition. Failed with errors: \n${JSON.stringify(validation.errors, null, 2)}`);
1570
1411
  }
1571
1412
  };
1413
+ // Used in the tests to get a breakpoint registration
1414
+ const getBreakpointRegistration = (id) => breakpointsRegistry.find((breakpoint) => breakpoint.id === id);
1415
+ // Used in the tests to reset the registry
1416
+ const resetBreakpointsRegistry = () => {
1417
+ breakpointsRegistry = [];
1418
+ };
1572
1419
 
1573
1420
  const sdkOptionsRegistry = {};
1574
1421
  /**
@@ -2175,9 +2022,7 @@ const stylesToRemove = CF_STYLE_ATTRIBUTES.filter((style) => !stylesToKeep.inclu
2175
2022
  // cfWrapColumns & cfWrapColumnsCount are no real style attributes as they are handled on the editor side
2176
2023
  const propsToRemove = ['cfSsrClassName', 'cfWrapColumns', 'cfWrapColumnsCount'];
2177
2024
  const sanitizeNodeProps = (nodeProps) => {
2178
- const keysToRemove = [...stylesToRemove, ...propsToRemove];
2179
- const sanitizedProps = Object.fromEntries(Object.entries(nodeProps).filter(([key]) => !keysToRemove.includes(key)));
2180
- return sanitizedProps;
2025
+ return omit(nodeProps, stylesToRemove, propsToRemove);
2181
2026
  };
2182
2027
 
2183
2028
  /** Turn the visibility value into a style object that can be used for inline styles in React */
@@ -3308,7 +3153,7 @@ function getArrayValue(entryOrAsset, path, entityStore) {
3308
3153
  }
3309
3154
  const fieldName = path.split('/').slice(2, -1);
3310
3155
  const arrayValue = get(entryOrAsset, fieldName);
3311
- if (!Array.isArray(arrayValue)) {
3156
+ if (!isArray(arrayValue)) {
3312
3157
  debug.warn(`[experiences-core::getArrayValue] A field '${fieldName}' of an entity was bound to an Array variable. Expected value of that field to be an array, but got: ${JSON.stringify(arrayValue)}`, { entity: entryOrAsset });
3313
3158
  return;
3314
3159
  }
@@ -3465,19 +3310,6 @@ function getTargetValueInPixels(targetWidthObject) {
3465
3310
  return targetWidthObject.value;
3466
3311
  }
3467
3312
  }
3468
- /**
3469
- * Creates a component definition for an assembly. As all assemblies use the same definition in the SDK,
3470
- * all should be registered via this function.
3471
- */
3472
- const createAssemblyDefinition = (definitionId) => {
3473
- return {
3474
- id: definitionId,
3475
- name: 'Component',
3476
- variables: {},
3477
- children: true,
3478
- category: ASSEMBLY_DEFAULT_CATEGORY,
3479
- };
3480
- };
3481
3313
 
3482
3314
  class ParseError extends Error {
3483
3315
  constructor(message) {
@@ -4848,8 +4680,8 @@ const fetchAllEntries = async ({ client, ids, locale, skip = 0, limit = 100, res
4848
4680
  responseIncludes,
4849
4681
  });
4850
4682
  }
4851
- const dedupedEntries = uniqueById(responseIncludes?.Entry);
4852
- const dedupedAssets = uniqueById(responseIncludes?.Asset);
4683
+ const dedupedEntries = uniqBy(responseIncludes?.Entry, (entry) => entry.sys.id);
4684
+ const dedupedAssets = uniqBy(responseIncludes?.Asset, (asset) => asset.sys.id);
4853
4685
  return {
4854
4686
  items: responseItems,
4855
4687
  includes: {
@@ -5290,5 +5122,5 @@ async function fetchById({ client, experienceTypeId, id, localeCode, isEditorMod
5290
5122
  }
5291
5123
  }
5292
5124
 
5293
- export { BREAKPOINTS_STRATEGY_DESKTOP_FIRST, BREAKPOINTS_STRATEGY_MOBILE_FIRST, DebugLogger, DeepReference, EditorModeEntityStore, EntityStore, EntityStoreBase, MEDIA_QUERY_REGEXP, VisualEditorMode, addLocale, addMinHeightForEmptyStructures, breakpointsRegistry, buildCfStyles, buildStyleTag, buildTemplate, builtInStyles, calculateNodeDefaultHeight, checkIsAssemblyDefinition, checkIsAssemblyEntry, checkIsAssemblyNode, columnsBuiltInStyles, containerBuiltInStyles, createAssemblyDefinition, createExperience, debug, defineBreakpoints, defineDesignTokens, defineSdkOptions, designTokensRegistry, detachExperienceStyles, detectBreakpointsStrategy, disableDebug, dividerBuiltInStyles, doesMismatchMessageSchema, enableDebug, extractLeafLinksReferencedFromExperience, extractPrebindingDataByPatternId, extractReferencesFromEntries, extractReferencesFromEntriesAsIds, fetchAllAssets, fetchAllEntries, fetchById, fetchBySlug, fetchExperienceEntry, fetchReferencedEntities, findOutermostCoordinates, flattenDesignTokenRegistry, flattenNestedPatterns, gatherDeepPrebindingReferencesFromExperienceEntry, gatherDeepPrebindingReferencesFromPatternEntry, gatherDeepReferencesFromExperienceEntry, gatherDeepReferencesFromTree, generateDefaultDataSourceForPrebindingDefinition, generateRandomId, getActiveBreakpointIndex, getDataFromTree, getDesignTokenRegistration, getElementCoordinates, getFallbackBreakpointIndex, getPrebindingPathBySourceEntry, getSdkOptions, getTargetPatternMappingsForParameter, getTargetValueInPixels, getTemplateValue, getValueForBreakpoint, inMemoryEntities, inMemoryEntitiesStore, indexByBreakpoint, isArrayOfLinks, isAsset, isCfStyleAttribute, isComponentAllowedOnRoot, isContentfulComponent, isContentfulStructureComponent, isDeepPath, isDeepPrebinding, isElementHidden, isEntry, isExperienceEntry, isLink, isLinkToAsset, isLinkToEntry, isPatternComponent, isPatternEntry, isPreboundProp, isStructureWithRelativeHeight, isValidBreakpointValue, lastPathNamedSegmentEq, localizeEntity, maybePopulateDesignTokenValue, mediaQueryMatcher, mergeDesignValuesByBreakpoint, optionalBuiltInStyles, parseCSSValue, parseDataSourcePathIntoFieldset, parseDataSourcePathWithL1DeepBindings, referencesOf, resetDesignTokenRegistry, resolveBackgroundImageBinding, resolveHyperlinkPattern, runBreakpointsValidation, sanitizeNodeProps, sdkOptionsRegistry, sectionBuiltInStyles, sendMessage, setDebugLevel, singleColumnBuiltInStyles, splitDirectAndSlotChildren, stringifyCssProperties, toCSSAttribute, toMediaQuery, transformBoundContentValue, transformVisibility, treeMap, treeVisit, tryParseMessage, uniqueById, useInMemoryEntities, validateExperienceBuilderConfig };
5125
+ export { BREAKPOINTS_STRATEGY_DESKTOP_FIRST, BREAKPOINTS_STRATEGY_MOBILE_FIRST, DebugLogger, DeepReference, EditorModeEntityStore, EntityStore, EntityStoreBase, MEDIA_QUERY_REGEXP, VisualEditorMode, addLocale, addMinHeightForEmptyStructures, breakpointsRegistry, buildCfStyles, buildStyleTag, buildTemplate, builtInStyles, calculateNodeDefaultHeight, checkIsAssemblyDefinition, checkIsAssemblyEntry, checkIsAssemblyNode, columnsBuiltInStyles, containerBuiltInStyles, createExperience, debug, defineBreakpoints, defineDesignTokens, defineSdkOptions, designTokensRegistry, detachExperienceStyles, detectBreakpointsStrategy, disableDebug, dividerBuiltInStyles, doesMismatchMessageSchema, enableDebug, extractLeafLinksReferencedFromExperience, extractPrebindingDataByPatternId, extractReferencesFromEntries, extractReferencesFromEntriesAsIds, fetchAllAssets, fetchAllEntries, fetchById, fetchBySlug, fetchExperienceEntry, fetchReferencedEntities, findOutermostCoordinates, flattenDesignTokenRegistry, flattenNestedPatterns, gatherDeepPrebindingReferencesFromExperienceEntry, gatherDeepPrebindingReferencesFromPatternEntry, gatherDeepReferencesFromExperienceEntry, gatherDeepReferencesFromTree, generateDefaultDataSourceForPrebindingDefinition, generateRandomId, getActiveBreakpointIndex, getBreakpointRegistration, getDataFromTree, getDesignTokenRegistration, getElementCoordinates, getFallbackBreakpointIndex, getPrebindingPathBySourceEntry, getSdkOptions, getTargetPatternMappingsForParameter, getTargetValueInPixels, getTemplateValue, getValueForBreakpoint, inMemoryEntities, inMemoryEntitiesStore, indexByBreakpoint, isArrayOfLinks, isAsset, isCfStyleAttribute, isComponentAllowedOnRoot, isContentfulComponent, isContentfulStructureComponent, isDeepPath, isDeepPrebinding, isElementHidden, isEntry, isExperienceEntry, isLink, isLinkToAsset, isLinkToEntry, isPatternComponent, isPatternEntry, isPreboundProp, isStructureWithRelativeHeight, isValidBreakpointValue, lastPathNamedSegmentEq, localizeEntity, maybePopulateDesignTokenValue, mediaQueryMatcher, mergeDesignValuesByBreakpoint, optionalBuiltInStyles, parseCSSValue, parseDataSourcePathIntoFieldset, parseDataSourcePathWithL1DeepBindings, referencesOf, resetBreakpointsRegistry, resetDesignTokenRegistry, resolveBackgroundImageBinding, resolveHyperlinkPattern, runBreakpointsValidation, sanitizeNodeProps, sdkOptionsRegistry, sectionBuiltInStyles, sendMessage, setDebugLevel, singleColumnBuiltInStyles, splitDirectAndSlotChildren, stringifyCssProperties, toCSSAttribute, toMediaQuery, transformBoundContentValue, transformVisibility, treeMap, treeVisit, tryParseMessage, uniqueById, useInMemoryEntities, validateExperienceBuilderConfig };
5294
5126
  //# sourceMappingURL=index.js.map