@contentful/experiences-core 1.17.1-dev-20241001T2117-38a2023.0 → 1.17.1-dev-20241003T1341-e0d12f6.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 +1 -0
- package/dist/index.js +11 -4
- package/dist/index.js.map +1 -1
- package/dist/utils/sanitizeNodeProps.d.ts +6 -0
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ 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';
|
|
15
16
|
export { columnsDefinition, containerDefinition, dividerDefinition, sectionDefinition, singleColumnDefinition } from './definitions/components.js';
|
|
16
17
|
export { builtInStyles, columnsBuiltInStyles, containerBuiltInStyles, dividerBuiltInStyles, optionalBuiltInStyles, sectionBuiltInStyles, singleColumnBuiltInStyles } from './definitions/styles.js';
|
|
17
18
|
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, uniqBy } from 'lodash-es';
|
|
4
|
+
import { isArray, omit, 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: '1px',
|
|
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(204, 204, 204, 1)',
|
|
804
804
|
},
|
|
805
805
|
};
|
|
806
806
|
const singleColumnBuiltInStyles = {
|
|
@@ -2723,6 +2723,13 @@ 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
|
+
|
|
2726
2733
|
const sendMessage = (eventType, data) => {
|
|
2727
2734
|
if (typeof window === 'undefined') {
|
|
2728
2735
|
return;
|
|
@@ -3656,5 +3663,5 @@ async function fetchById({ client, experienceTypeId, id, localeCode, }) {
|
|
|
3656
3663
|
}
|
|
3657
3664
|
}
|
|
3658
3665
|
|
|
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 };
|
|
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, sanitizeNodeProps, sectionBuiltInStyles, sectionDefinition, sendMessage, singleColumnBuiltInStyles, singleColumnDefinition, toCSSAttribute, toCSSString, toMediaQuery, transformBoundContentValue, tryParseMessage, validateExperienceBuilderConfig };
|
|
3660
3667
|
//# sourceMappingURL=index.js.map
|