@contentful/experiences-core 0.0.1-alpha.5 → 0.0.1-alpha.6
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/constants.d.ts +3 -1
- package/dist/constants.js +9 -4
- package/dist/constants.js.map +1 -1
- package/dist/definitions/styles.d.ts +8 -6
- package/dist/entity/EditorModeEntityStore.d.ts +1 -1
- package/dist/entity/EntityStoreBase.d.ts +3 -2
- package/dist/exports.d.ts +2 -2
- package/dist/exports.js +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +386 -254
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +41 -5
- package/dist/utils/{stylesUtils.d.ts → styleUtils/stylesUtils.d.ts} +3 -3
- package/dist/utils/transformers/transformBoundContentValue.d.ts +8 -0
- package/package.json +3 -3
- package/dist/utils/transformers.d.ts +0 -24
package/dist/constants.d.ts
CHANGED
|
@@ -96,9 +96,11 @@ declare const ASSEMBLY_NODE_TYPES: string[];
|
|
|
96
96
|
declare const LATEST_SCHEMA_VERSION = "2023-09-28";
|
|
97
97
|
declare const CF_STYLE_ATTRIBUTES: string[];
|
|
98
98
|
declare const EMPTY_CONTAINER_HEIGHT = "80px";
|
|
99
|
+
declare const DEFAULT_IMAGE_WIDTH = "500px";
|
|
99
100
|
declare enum PostMessageMethods {
|
|
100
101
|
REQUEST_ENTITIES = "REQUEST_ENTITIES",
|
|
101
102
|
REQUESTED_ENTITIES = "REQUESTED_ENTITIES"
|
|
102
103
|
}
|
|
104
|
+
declare const SUPPORTED_IMAGE_FORMATS: readonly ["jpg", "png", "webp", "gif", "avif"];
|
|
103
105
|
|
|
104
|
-
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_HEIGHT, INCOMING_EVENTS, INTERNAL_EVENTS, LATEST_SCHEMA_VERSION, OUTGOING_EVENTS, PostMessageMethods, SCROLL_STATES, VISUAL_EDITOR_CONTAINER_ID, VISUAL_EDITOR_EVENTS };
|
|
106
|
+
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, DEFAULT_IMAGE_WIDTH, EMPTY_CONTAINER_HEIGHT, INCOMING_EVENTS, INTERNAL_EVENTS, LATEST_SCHEMA_VERSION, OUTGOING_EVENTS, PostMessageMethods, SCROLL_STATES, SUPPORTED_IMAGE_FORMATS, VISUAL_EDITOR_CONTAINER_ID, VISUAL_EDITOR_EVENTS };
|
package/dist/constants.js
CHANGED
|
@@ -103,13 +103,14 @@ const CF_STYLE_ATTRIBUTES = [
|
|
|
103
103
|
'cfWidth',
|
|
104
104
|
'cfMaxWidth',
|
|
105
105
|
'cfHeight',
|
|
106
|
+
'cfImageAsset',
|
|
107
|
+
'cfImageOptions',
|
|
108
|
+
'cfBackgroundImageUrl',
|
|
109
|
+
'cfBackgroundImageOptions',
|
|
106
110
|
'cfFlexDirection',
|
|
107
111
|
'cfFlexWrap',
|
|
108
112
|
'cfBorder',
|
|
109
113
|
'cfGap',
|
|
110
|
-
'cfBackgroundImageUrl',
|
|
111
|
-
'cfBackgroundImageScaling',
|
|
112
|
-
'cfBackgroundImageAlignment',
|
|
113
114
|
'cfFontSize',
|
|
114
115
|
'cfFontWeight',
|
|
115
116
|
'cfLineHeight',
|
|
@@ -124,15 +125,19 @@ const CF_STYLE_ATTRIBUTES = [
|
|
|
124
125
|
// we need to keep those in this constant array
|
|
125
126
|
// so that omit() in <VisualEditorBlock> and <CompositionBlock>
|
|
126
127
|
// can filter them out and not pass as props
|
|
128
|
+
'cfBackgroundImageScaling',
|
|
129
|
+
'cfBackgroundImageAlignment',
|
|
127
130
|
'cfBackgroundImageAlignmentVertical',
|
|
128
131
|
'cfBackgroundImageAlignmentHorizontal',
|
|
129
132
|
];
|
|
130
133
|
const EMPTY_CONTAINER_HEIGHT = '80px';
|
|
134
|
+
const DEFAULT_IMAGE_WIDTH = '500px';
|
|
131
135
|
var PostMessageMethods;
|
|
132
136
|
(function (PostMessageMethods) {
|
|
133
137
|
PostMessageMethods["REQUEST_ENTITIES"] = "REQUEST_ENTITIES";
|
|
134
138
|
PostMessageMethods["REQUESTED_ENTITIES"] = "REQUESTED_ENTITIES";
|
|
135
139
|
})(PostMessageMethods || (PostMessageMethods = {}));
|
|
140
|
+
const SUPPORTED_IMAGE_FORMATS = ['jpg', 'png', 'webp', 'gif', 'avif'];
|
|
136
141
|
|
|
137
|
-
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_HEIGHT, INCOMING_EVENTS, INTERNAL_EVENTS, LATEST_SCHEMA_VERSION, OUTGOING_EVENTS, PostMessageMethods, SCROLL_STATES, VISUAL_EDITOR_CONTAINER_ID, VISUAL_EDITOR_EVENTS };
|
|
142
|
+
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, DEFAULT_IMAGE_WIDTH, EMPTY_CONTAINER_HEIGHT, INCOMING_EVENTS, INTERNAL_EVENTS, LATEST_SCHEMA_VERSION, OUTGOING_EVENTS, PostMessageMethods, SCROLL_STATES, SUPPORTED_IMAGE_FORMATS, VISUAL_EDITOR_CONTAINER_ID, VISUAL_EDITOR_EVENTS };
|
|
138
143
|
//# sourceMappingURL=constants.js.map
|
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../src/constants.ts"],"sourcesContent":["export const SCROLL_STATES = {\n Start: 'scrollStart',\n IsScrolling: 'isScrolling',\n End: 'scrollEnd',\n};\n\nexport const OUTGOING_EVENTS = {\n Connected: 'connected',\n DesignTokens: 'registerDesignTokens',\n HoveredSection: 'hoveredSection',\n MouseMove: 'mouseMove',\n NewHoveredElement: 'newHoveredElement',\n ComponentSelected: 'componentSelected',\n RegisteredComponents: 'registeredComponents',\n RequestComponentTreeUpdate: 'requestComponentTreeUpdate',\n ComponentDragCanceled: 'componentDragCanceled',\n ComponentDropped: 'componentDropped',\n ComponentMoved: 'componentMoved',\n CanvasReload: 'canvasReload',\n UpdateSelectedComponentCoordinates: 'updateSelectedComponentCoordinates',\n UpdateHoveredComponentCoordinates: 'updateHoveredComponentCoordinates',\n CanvasScroll: 'canvasScrolling',\n CanvasError: 'canvasError',\n ComponentMoveStarted: 'componentMoveStarted',\n ComponentMoveEnded: 'componentMoveEnded',\n OutsideCanvasClick: 'outsideCanvasClick',\n};\n\nexport const INCOMING_EVENTS = {\n RequestEditorMode: 'requestEditorMode',\n ExperienceUpdated: 'componentTreeUpdated',\n ComponentDraggingChanged: 'componentDraggingChanged',\n ComponentDragCanceled: 'componentDragCanceled',\n ComponentDragStarted: 'componentDragStarted',\n ComponentDragEnded: 'componentDragEnded',\n ComponentMoveEnded: 'componentMoveEnded',\n CanvasResized: 'canvasResized',\n SelectComponent: 'selectComponent',\n HoverComponent: 'hoverComponent',\n UpdatedEntity: 'updatedEntity',\n AssembliesAdded: 'assembliesAdded',\n AssembliesRegistered: 'assembliesRegistered',\n InitEditor: 'initEditor',\n MouseMove: 'mouseMove',\n};\n\nexport const INTERNAL_EVENTS = {\n ComponentsRegistered: 'cfComponentsRegistered',\n VisualEditorInitialize: 'cfVisualEditorInitialize',\n};\n\nexport const VISUAL_EDITOR_EVENTS = {\n Ready: 'cfVisualEditorReady',\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: 'button',\n name: 'Button',\n },\n heading: {\n id: 'heading',\n name: 'Heading',\n },\n image: {\n id: 'image',\n name: 'Image',\n },\n richText: {\n id: 'richText',\n name: 'Rich Text',\n },\n text: {\n id: 'text',\n name: 'Text',\n },\n};\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 'cfHorizontalAlignment',\n 'cfVerticalAlignment',\n 'cfMargin',\n 'cfPadding',\n 'cfBackgroundColor',\n 'cfWidth',\n 'cfMaxWidth',\n 'cfHeight',\n '
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../src/constants.ts"],"sourcesContent":["export const SCROLL_STATES = {\n Start: 'scrollStart',\n IsScrolling: 'isScrolling',\n End: 'scrollEnd',\n};\n\nexport const OUTGOING_EVENTS = {\n Connected: 'connected',\n DesignTokens: 'registerDesignTokens',\n HoveredSection: 'hoveredSection',\n MouseMove: 'mouseMove',\n NewHoveredElement: 'newHoveredElement',\n ComponentSelected: 'componentSelected',\n RegisteredComponents: 'registeredComponents',\n RequestComponentTreeUpdate: 'requestComponentTreeUpdate',\n ComponentDragCanceled: 'componentDragCanceled',\n ComponentDropped: 'componentDropped',\n ComponentMoved: 'componentMoved',\n CanvasReload: 'canvasReload',\n UpdateSelectedComponentCoordinates: 'updateSelectedComponentCoordinates',\n UpdateHoveredComponentCoordinates: 'updateHoveredComponentCoordinates',\n CanvasScroll: 'canvasScrolling',\n CanvasError: 'canvasError',\n ComponentMoveStarted: 'componentMoveStarted',\n ComponentMoveEnded: 'componentMoveEnded',\n OutsideCanvasClick: 'outsideCanvasClick',\n};\n\nexport const INCOMING_EVENTS = {\n RequestEditorMode: 'requestEditorMode',\n ExperienceUpdated: 'componentTreeUpdated',\n ComponentDraggingChanged: 'componentDraggingChanged',\n ComponentDragCanceled: 'componentDragCanceled',\n ComponentDragStarted: 'componentDragStarted',\n ComponentDragEnded: 'componentDragEnded',\n ComponentMoveEnded: 'componentMoveEnded',\n CanvasResized: 'canvasResized',\n SelectComponent: 'selectComponent',\n HoverComponent: 'hoverComponent',\n UpdatedEntity: 'updatedEntity',\n AssembliesAdded: 'assembliesAdded',\n AssembliesRegistered: 'assembliesRegistered',\n InitEditor: 'initEditor',\n MouseMove: 'mouseMove',\n};\n\nexport const INTERNAL_EVENTS = {\n ComponentsRegistered: 'cfComponentsRegistered',\n VisualEditorInitialize: 'cfVisualEditorInitialize',\n};\n\nexport const VISUAL_EDITOR_EVENTS = {\n Ready: 'cfVisualEditorReady',\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: 'button',\n name: 'Button',\n },\n heading: {\n id: 'heading',\n name: 'Heading',\n },\n image: {\n id: 'image',\n name: 'Image',\n },\n richText: {\n id: 'richText',\n name: 'Rich Text',\n },\n text: {\n id: 'text',\n name: 'Text',\n },\n};\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 '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 'cfBorder',\n 'cfGap',\n 'cfFontSize',\n 'cfFontWeight',\n 'cfLineHeight',\n 'cfLetterSpacing',\n 'cfTextColor',\n 'cfTextAlign',\n 'cfTextTransform',\n 'cfTextBold',\n 'cfTextItalic',\n 'cfTextUnderline',\n // For backwards compatibility\n // we need to keep those in this constant array\n // so that omit() in <VisualEditorBlock> and <CompositionBlock>\n // can filter them out and not pass as props\n 'cfBackgroundImageScaling',\n 'cfBackgroundImageAlignment',\n 'cfBackgroundImageAlignmentVertical',\n 'cfBackgroundImageAlignmentHorizontal',\n];\n\nexport const EMPTY_CONTAINER_HEIGHT = '80px';\n\nexport const DEFAULT_IMAGE_WIDTH = '500px';\n\nexport enum PostMessageMethods {\n REQUEST_ENTITIES = 'REQUEST_ENTITIES',\n REQUEST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'../types.js';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
declare const
|
|
5
|
-
declare const
|
|
6
|
-
declare const
|
|
7
|
-
declare const
|
|
3
|
+
type VariableDefinitions = Partial<Record<ContainerStyleVariableName, ComponentDefinitionVariable<'Text' | 'Boolean' | 'Media' | 'Object'>>>;
|
|
4
|
+
declare const builtInStyles: VariableDefinitions;
|
|
5
|
+
declare const optionalBuiltInStyles: VariableDefinitions;
|
|
6
|
+
declare const sectionBuiltInStyles: VariableDefinitions;
|
|
7
|
+
declare const containerBuiltInStyles: VariableDefinitions;
|
|
8
|
+
declare const singleColumnBuiltInStyles: VariableDefinitions;
|
|
9
|
+
declare const columnsBuiltInStyles: VariableDefinitions;
|
|
8
10
|
|
|
9
|
-
export { builtInStyles, columnsBuiltInStyles, containerBuiltInStyles, optionalBuiltInStyles, singleColumnBuiltInStyles };
|
|
11
|
+
export { builtInStyles, columnsBuiltInStyles, containerBuiltInStyles, optionalBuiltInStyles, sectionBuiltInStyles, singleColumnBuiltInStyles };
|
|
@@ -23,7 +23,7 @@ declare class EditorModeEntityStore extends EditorEntityStore {
|
|
|
23
23
|
missingEntryIds: string[];
|
|
24
24
|
missingAssetIds: string[];
|
|
25
25
|
};
|
|
26
|
-
getValue(
|
|
26
|
+
getValue(entityLinkOrEntity: UnresolvedLink<'Entry' | 'Asset'> | Entry | Asset, path: string[]): string | undefined;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
export { EditorModeEntityStore };
|
|
@@ -2,7 +2,7 @@ import { Entry, Asset, ChainModifiers, UnresolvedLink } from 'contentful';
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Base Store for entities
|
|
5
|
-
* Can be
|
|
5
|
+
* Can be extended for the different loading behaviours (editor, production, ..)
|
|
6
6
|
*/
|
|
7
7
|
declare abstract class EntityStoreBase {
|
|
8
8
|
protected locale: string;
|
|
@@ -14,7 +14,7 @@ declare abstract class EntityStoreBase {
|
|
|
14
14
|
});
|
|
15
15
|
get entities(): (Entry | Asset<ChainModifiers, string>)[];
|
|
16
16
|
updateEntity(entity: Entry | Asset): void;
|
|
17
|
-
|
|
17
|
+
getEntryOrAsset(linkOrEntryOrAsset: UnresolvedLink<'Entry' | 'Asset'> | Asset | Entry, path: string): Entry | Asset | undefined;
|
|
18
18
|
/**
|
|
19
19
|
* @deprecated in the base class this should be simply an abstract method
|
|
20
20
|
* @param entityLink
|
|
@@ -32,6 +32,7 @@ declare abstract class EntityStoreBase {
|
|
|
32
32
|
fetchAssets(ids: string[]): Promise<Asset[]>;
|
|
33
33
|
fetchEntry(id: string): Promise<Entry | undefined>;
|
|
34
34
|
fetchEntries(ids: string[]): Promise<Entry[]>;
|
|
35
|
+
private getDeepEntry;
|
|
35
36
|
private isAsset;
|
|
36
37
|
private getEntity;
|
|
37
38
|
toJSON(): {
|
package/dist/exports.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
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_HEIGHT, INCOMING_EVENTS, INTERNAL_EVENTS, LATEST_SCHEMA_VERSION, OUTGOING_EVENTS, PostMessageMethods, SCROLL_STATES, VISUAL_EDITOR_CONTAINER_ID, VISUAL_EDITOR_EVENTS } from './constants.js';
|
|
2
|
-
export { Binding, BindingMap, BindingMapByBlockId, CSSProperties, ComponentBinding, ComponentDefinition, ComponentDefinitionVariable, ComponentDefinitionVariableBase, ComponentDefinitionVariableType, ComponentDefinitionVariableValidation, ComponentRegistration, ComponentRegistrationOptions, ContainerStyleVariableName, Coordinates, DataSourceEntryValueType, DesignTokensDefinition, Experience, ExperienceEntry, ExperienceFields, ExperienceTree, ExperienceTreeNode, ExternalSDKMode, HoveredElement, IncomingEvent, InternalEvent, InternalSDKMode, Link, ManagementEntity, OutgoingEvent, RawCoordinates, RecursiveDesignTokenDefinition, RequestEntitiesMessage, RequestedEntitiesMessage, ResolveDesignValueType, ScrollState, StyleProps, ValidationOption, VariableFormats } from './types.js';
|
|
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, DEFAULT_IMAGE_WIDTH, EMPTY_CONTAINER_HEIGHT, INCOMING_EVENTS, INTERNAL_EVENTS, LATEST_SCHEMA_VERSION, OUTGOING_EVENTS, PostMessageMethods, SCROLL_STATES, SUPPORTED_IMAGE_FORMATS, VISUAL_EDITOR_CONTAINER_ID, VISUAL_EDITOR_EVENTS } from './constants.js';
|
|
2
|
+
export { BackgroundImageAlignmentOption, BackgroundImageOptions, BackgroundImageScalingOption, Binding, BindingMap, BindingMapByBlockId, BoundComponentPropertyTypes, CSSProperties, ComponentBinding, ComponentDefinition, ComponentDefinitionVariable, ComponentDefinitionVariableBase, ComponentDefinitionVariableType, ComponentDefinitionVariableValidation, ComponentRegistration, ComponentRegistrationOptions, ContainerStyleVariableName, Coordinates, DataSourceEntryValueType, DesignTokensDefinition, Experience, ExperienceEntry, ExperienceFields, ExperienceTree, ExperienceTreeNode, ExternalSDKMode, HoveredElement, ImageObjectFitOption, ImageObjectPositionOption, ImageOptions, IncomingEvent, InternalEvent, InternalSDKMode, Link, ManagementEntity, OptimizedBackgroundImageAsset, OptimizedImageAsset, OutgoingEvent, RawCoordinates, RecursiveDesignTokenDefinition, RequestEntitiesMessage, RequestedEntitiesMessage, ResolveDesignValueType, ScrollState, StyleProps, ValidationOption, VariableFormats } from './types.js';
|
|
3
3
|
export { BoundValue, Breakpoint, ComponentPropertyValue, ComponentTreeNode, ComponentValue, DesignValue, ExperienceComponentSettings, ExperienceDataSource, ExperienceUnboundValues, PrimitiveValue, SchemaVersions, UnboundValue, ValuesByBreakpoint } from '@contentful/experiences-validators';
|
package/dist/exports.js
CHANGED
|
@@ -1,2 +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_HEIGHT, INCOMING_EVENTS, INTERNAL_EVENTS, LATEST_SCHEMA_VERSION, OUTGOING_EVENTS, PostMessageMethods, SCROLL_STATES, VISUAL_EDITOR_CONTAINER_ID, VISUAL_EDITOR_EVENTS } from './constants.js';
|
|
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, DEFAULT_IMAGE_WIDTH, EMPTY_CONTAINER_HEIGHT, INCOMING_EVENTS, INTERNAL_EVENTS, LATEST_SCHEMA_VERSION, OUTGOING_EVENTS, PostMessageMethods, SCROLL_STATES, SUPPORTED_IMAGE_FORMATS, VISUAL_EDITOR_CONTAINER_ID, VISUAL_EDITOR_EVENTS } from './constants.js';
|
|
2
2
|
//# sourceMappingURL=exports.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { isContentfulStructureComponent, isEmptyStructureWithRelativeHeight } from './utils/components.js';
|
|
2
2
|
export { findOutermostCoordinates, getElementCoordinates } from './utils/domValues.js';
|
|
3
3
|
export { VisualEditorMessagePayload, doesMismatchMessageSchema, tryParseMessage, validateExperienceBuilderConfig } from './utils/validations.js';
|
|
4
|
-
export { buildCfStyles, buildStyleTag, calculateNodeDefaultHeight } from './utils/stylesUtils.js';
|
|
5
|
-
export {
|
|
4
|
+
export { buildCfStyles, buildStyleTag, calculateNodeDefaultHeight } from './utils/styleUtils/stylesUtils.js';
|
|
5
|
+
export { transformBoundContentValue } from './utils/transformers/transformBoundContentValue.js';
|
|
6
6
|
export { checkIsAssembly, checkIsAssemblyDefinition, checkIsAssemblyEntry, checkIsAssemblyNode, generateRandomId, getDataFromTree, getInsertionData } from './utils/utils.js';
|
|
7
7
|
export { isExperienceEntry } from './utils/typeguards.js';
|
|
8
8
|
export { supportedModes } from './utils/supportedModes.js';
|
|
@@ -11,7 +11,7 @@ export { isLinkToAsset } from './utils/isLinkToAsset.js';
|
|
|
11
11
|
export { isLink } from './utils/isLink.js';
|
|
12
12
|
export { Fieldset, UnresolvedFieldset, isDeepPath, parseDataSourcePathIntoFieldset, parseDataSourcePathWithL1DeepBindings } from './utils/pathSchema.js';
|
|
13
13
|
export { columnsDefinition, containerDefinition, sectionDefinition, singleColumnDefinition } from './definitions/components.js';
|
|
14
|
-
export { builtInStyles, columnsBuiltInStyles, containerBuiltInStyles, optionalBuiltInStyles, singleColumnBuiltInStyles } from './definitions/styles.js';
|
|
14
|
+
export { builtInStyles, columnsBuiltInStyles, containerBuiltInStyles, optionalBuiltInStyles, sectionBuiltInStyles, singleColumnBuiltInStyles } from './definitions/styles.js';
|
|
15
15
|
export { EditorModeEntityStore } from './entity/EditorModeEntityStore.js';
|
|
16
16
|
export { EntityStore } from './entity/EntityStore.js';
|
|
17
17
|
export { EntityStoreBase } from './entity/EntityStoreBase.js';
|