@contentful/experiences-core 1.17.1-beta.0 → 1.17.1-dev-20240930T2125-003fb9f.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.d.ts +0 -1
- package/dist/index.js +5 -12
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/dist/utils/sanitizeNodeProps.d.ts +0 -6
package/dist/index.d.ts
CHANGED
|
@@ -12,7 +12,6 @@ export { isLink } from './utils/isLink.js';
|
|
|
12
12
|
export { Fieldset, UnresolvedFieldset, isDeepPath, lastPathNamedSegmentEq, parseDataSourcePathIntoFieldset, parseDataSourcePathWithL1DeepBindings } from './utils/pathSchema.js';
|
|
13
13
|
export { addLocale, buildTemplate, getTemplateValue, resolveHyperlinkPattern } from './utils/resolveHyperlinkPattern.js';
|
|
14
14
|
export { deserializePatternVariables } from './utils/patternUtils.js';
|
|
15
|
-
export { sanitizeNodeProps } from './utils/sanitizeNodeProps.js';
|
|
16
15
|
export { columnsDefinition, containerDefinition, dividerDefinition, sectionDefinition, singleColumnDefinition } from './definitions/components.js';
|
|
17
16
|
export { builtInStyles, columnsBuiltInStyles, containerBuiltInStyles, dividerBuiltInStyles, optionalBuiltInStyles, sectionBuiltInStyles, singleColumnBuiltInStyles } from './definitions/styles.js';
|
|
18
17
|
export { EditorModeEntityStore } from './entity/EditorModeEntityStore.js';
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import md5 from 'md5';
|
|
2
2
|
import { z, ZodIssueCode } from 'zod';
|
|
3
3
|
import { BLOCKS } from '@contentful/rich-text-types';
|
|
4
|
-
import { isArray,
|
|
4
|
+
import { isArray, uniqBy } from 'lodash-es';
|
|
5
5
|
|
|
6
6
|
const INCOMING_EVENTS = {
|
|
7
7
|
RequestEditorMode: 'requestEditorMode',
|
|
@@ -786,7 +786,7 @@ const dividerBuiltInStyles = {
|
|
|
786
786
|
type: 'Text',
|
|
787
787
|
group: 'style',
|
|
788
788
|
description: 'The height of the divider',
|
|
789
|
-
defaultValue: '
|
|
789
|
+
defaultValue: '2px',
|
|
790
790
|
},
|
|
791
791
|
cfMaxWidth: {
|
|
792
792
|
displayName: 'Max width',
|
|
@@ -800,7 +800,7 @@ const dividerBuiltInStyles = {
|
|
|
800
800
|
type: 'Text',
|
|
801
801
|
group: 'style',
|
|
802
802
|
description: 'The background color of the divider',
|
|
803
|
-
defaultValue: 'rgba(
|
|
803
|
+
defaultValue: 'rgba(0, 0, 0, 0)',
|
|
804
804
|
},
|
|
805
805
|
};
|
|
806
806
|
const singleColumnBuiltInStyles = {
|
|
@@ -2200,7 +2200,7 @@ const transformMedia = (asset, variables, resolveDesignValue, variableName, path
|
|
|
2200
2200
|
return;
|
|
2201
2201
|
}
|
|
2202
2202
|
if (variableName === 'cfBackgroundImageUrl') {
|
|
2203
|
-
const width = resolveDesignValue(variables['cfWidth']?.type === 'DesignValue' ? variables['cfWidth'].valuesByBreakpoint : {}, 'cfWidth')
|
|
2203
|
+
const width = resolveDesignValue(variables['cfWidth']?.type === 'DesignValue' ? variables['cfWidth'].valuesByBreakpoint : {}, 'cfWidth');
|
|
2204
2204
|
const optionsVariableName = 'cfBackgroundImageOptions';
|
|
2205
2205
|
const options = resolveDesignValue(variables[optionsVariableName]?.type === 'DesignValue'
|
|
2206
2206
|
? variables[optionsVariableName].valuesByBreakpoint
|
|
@@ -2723,13 +2723,6 @@ const deserializePatternVariables = ({ nodeVariables, componentInstanceProps, co
|
|
|
2723
2723
|
return { childNodeVariable, dataSource, unboundValues };
|
|
2724
2724
|
};
|
|
2725
2725
|
|
|
2726
|
-
const stylesToKeep = ['cfImageAsset'];
|
|
2727
|
-
const stylesToRemove = CF_STYLE_ATTRIBUTES.filter((style) => !stylesToKeep.includes(style));
|
|
2728
|
-
const propsToRemove = ['cfHyperlink', 'cfOpenInNewTab', 'cfSsrClassName'];
|
|
2729
|
-
const sanitizeNodeProps = (nodeProps) => {
|
|
2730
|
-
return omit(nodeProps, stylesToRemove, propsToRemove);
|
|
2731
|
-
};
|
|
2732
|
-
|
|
2733
2726
|
const sendMessage = (eventType, data) => {
|
|
2734
2727
|
if (typeof window === 'undefined') {
|
|
2735
2728
|
return;
|
|
@@ -3663,5 +3656,5 @@ async function fetchById({ client, experienceTypeId, id, localeCode, }) {
|
|
|
3663
3656
|
}
|
|
3664
3657
|
}
|
|
3665
3658
|
|
|
3666
|
-
export { DeepReference, EditorModeEntityStore, EntityStore, EntityStoreBase, MEDIA_QUERY_REGEXP, VisualEditorMode, addLocale, breakpointsRegistry, buildCfStyles, buildStyleTag, buildTemplate, builtInStyles, calculateNodeDefaultHeight, checkIsAssembly, checkIsAssemblyDefinition, checkIsAssemblyEntry, checkIsAssemblyNode, columnsBuiltInStyles, columnsDefinition, containerBuiltInStyles, containerDefinition, createExperience, defineBreakpoints, defineDesignTokens, deserializePatternVariables, designTokensRegistry, detachExperienceStyles, dividerBuiltInStyles, dividerDefinition, doesMismatchMessageSchema, fetchAllAssets, fetchAllEntries, fetchById, fetchBySlug, findOutermostCoordinates, flattenDesignTokenRegistry, gatherDeepReferencesFromExperienceEntry, gatherDeepReferencesFromTree, generateRandomId, getActiveBreakpointIndex, getBreakpointRegistration, getDataFromTree, getDesignTokenRegistration, getElementCoordinates, getFallbackBreakpointIndex, getInsertionData, getTemplateValue, getValueForBreakpoint, indexByBreakpoint, isCfStyleAttribute, isComponentAllowedOnRoot, isContentfulComponent, isContentfulStructureComponent, isDeepPath, isExperienceEntry, isLink, isLinkToAsset, isPatternComponent, isStructureWithRelativeHeight, isValidBreakpointValue, lastPathNamedSegmentEq, maybePopulateDesignTokenValue, mediaQueryMatcher, optionalBuiltInStyles, parseDataSourcePathIntoFieldset, parseDataSourcePathWithL1DeepBindings, resetBreakpointsRegistry, resetDesignTokenRegistry, resolveBackgroundImageBinding, resolveHyperlinkPattern, runBreakpointsValidation,
|
|
3659
|
+
export { DeepReference, EditorModeEntityStore, EntityStore, EntityStoreBase, MEDIA_QUERY_REGEXP, VisualEditorMode, addLocale, breakpointsRegistry, buildCfStyles, buildStyleTag, buildTemplate, builtInStyles, calculateNodeDefaultHeight, checkIsAssembly, checkIsAssemblyDefinition, checkIsAssemblyEntry, checkIsAssemblyNode, columnsBuiltInStyles, columnsDefinition, containerBuiltInStyles, containerDefinition, createExperience, defineBreakpoints, defineDesignTokens, deserializePatternVariables, designTokensRegistry, detachExperienceStyles, dividerBuiltInStyles, dividerDefinition, doesMismatchMessageSchema, fetchAllAssets, fetchAllEntries, fetchById, fetchBySlug, findOutermostCoordinates, flattenDesignTokenRegistry, gatherDeepReferencesFromExperienceEntry, gatherDeepReferencesFromTree, generateRandomId, getActiveBreakpointIndex, getBreakpointRegistration, getDataFromTree, getDesignTokenRegistration, getElementCoordinates, getFallbackBreakpointIndex, getInsertionData, getTemplateValue, getValueForBreakpoint, indexByBreakpoint, isCfStyleAttribute, isComponentAllowedOnRoot, isContentfulComponent, isContentfulStructureComponent, isDeepPath, isExperienceEntry, isLink, isLinkToAsset, isPatternComponent, isStructureWithRelativeHeight, isValidBreakpointValue, lastPathNamedSegmentEq, maybePopulateDesignTokenValue, mediaQueryMatcher, optionalBuiltInStyles, parseDataSourcePathIntoFieldset, parseDataSourcePathWithL1DeepBindings, resetBreakpointsRegistry, resetDesignTokenRegistry, resolveBackgroundImageBinding, resolveHyperlinkPattern, runBreakpointsValidation, sectionBuiltInStyles, sectionDefinition, sendMessage, singleColumnBuiltInStyles, singleColumnDefinition, toCSSAttribute, toCSSString, toMediaQuery, transformBoundContentValue, tryParseMessage, validateExperienceBuilderConfig };
|
|
3667
3660
|
//# sourceMappingURL=index.js.map
|