@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.
- package/dist/constants.d.ts +0 -2
- package/dist/constants.js +0 -2
- package/dist/constants.js.map +1 -1
- package/dist/entity/EntityStore.d.ts +1 -1
- package/dist/exports.js +2 -0
- package/dist/exports.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +21 -189
- package/dist/index.js.map +1 -1
- package/dist/registries/breakpointsRegistry.d.ts +13 -36
- package/dist/types.d.ts +5 -1
- package/dist/utils/sanitizeNodeProps.d.ts +2 -3
- package/dist/utils/utils.d.ts +1 -6
- package/package.json +8 -21
- package/dist/constants.cjs +0 -198
- package/dist/constants.cjs.map +0 -1
- package/dist/index.cjs +0 -5412
- package/dist/index.cjs.map +0 -1
|
@@ -1,43 +1,20 @@
|
|
|
1
1
|
import { Breakpoint } from '@contentful/experiences-validators';
|
|
2
2
|
|
|
3
|
-
declare
|
|
3
|
+
declare let breakpointsRegistry: Breakpoint[];
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* - query: a media query string that defines when this breakpoint is active
|
|
9
|
-
* - previewSize: an optional fixed preview size to be used in the Studio editor when selecting this breakpoint
|
|
10
|
-
* - displayName: the name to be displayed in the Studio editor for this breakpoint
|
|
11
|
-
* - displayIcon: an optional icon to be displayed in the Studio editor for this breakpoint
|
|
12
|
-
*
|
|
13
|
-
* The first breakpoint must use a wildcard query (`*`) to match all sizes.
|
|
14
|
-
*
|
|
15
|
-
* Every subsequent breakpoint inherits the designs of the previous ones by default.
|
|
16
|
-
*
|
|
17
|
-
* The order of breakpoints must be either:
|
|
18
|
-
* - desktop first: from largest to smallest, using `<` operators
|
|
19
|
-
* - mobile first: from smallest to largest, using `>` operators
|
|
20
|
-
*
|
|
21
|
-
* @note changing breakpoints after you have created experiences may break those experiences
|
|
22
|
-
* @example
|
|
23
|
-
* defineBreakpoints([{
|
|
24
|
-
* id: 'desktop',
|
|
25
|
-
* query: '*',
|
|
26
|
-
* displayName: 'Desktop',
|
|
27
|
-
* displayIcon: 'desktop',
|
|
28
|
-
* }, {
|
|
29
|
-
* id: 'tablet',
|
|
30
|
-
* query: '<992px',
|
|
31
|
-
* displayName: 'Tablet',
|
|
32
|
-
* displayIcon: 'tablet',
|
|
33
|
-
* }, {
|
|
34
|
-
* id: 'mobile',
|
|
35
|
-
* query: '<576px',
|
|
36
|
-
* displayName: 'Mobile',
|
|
37
|
-
* displayIcon: 'mobile',
|
|
38
|
-
* }]);
|
|
5
|
+
* Register custom breakpoints
|
|
6
|
+
* @param breakpoints - [{[key:string]: string}]
|
|
7
|
+
* @returns void
|
|
39
8
|
*/
|
|
40
9
|
declare const defineBreakpoints: (breakpoints: Breakpoint[]) => void;
|
|
41
10
|
declare const runBreakpointsValidation: () => void;
|
|
11
|
+
declare const getBreakpointRegistration: (id: string) => {
|
|
12
|
+
id: string;
|
|
13
|
+
query: "*" | `>${number}px` | `<${number}px`;
|
|
14
|
+
previewSize: string;
|
|
15
|
+
displayName: string;
|
|
16
|
+
displayIcon?: "desktop" | "tablet" | "mobile" | undefined;
|
|
17
|
+
} | undefined;
|
|
18
|
+
declare const resetBreakpointsRegistry: () => void;
|
|
42
19
|
|
|
43
|
-
export { breakpointsRegistry, defineBreakpoints, runBreakpointsValidation };
|
|
20
|
+
export { breakpointsRegistry, defineBreakpoints, getBreakpointRegistration, resetBreakpointsRegistry, runBreakpointsValidation };
|
package/dist/types.d.ts
CHANGED
|
@@ -191,6 +191,11 @@ type ExperienceTreeNode = {
|
|
|
191
191
|
id: string;
|
|
192
192
|
blockId?: string;
|
|
193
193
|
slotId?: string;
|
|
194
|
+
assembly?: {
|
|
195
|
+
id: string;
|
|
196
|
+
componentId: string;
|
|
197
|
+
nodeLocation: string | null;
|
|
198
|
+
};
|
|
194
199
|
displayName?: string;
|
|
195
200
|
props: Record<string, ComponentPropertyValue>;
|
|
196
201
|
dataSource: ExperienceDataSource;
|
|
@@ -547,7 +552,6 @@ type RequestReadOnlyModePayload = undefined;
|
|
|
547
552
|
type RequestEditorModePayload = undefined;
|
|
548
553
|
type ExperienceUpdatedPayload = {
|
|
549
554
|
tree: ExperienceTree;
|
|
550
|
-
/** @deprecated not needed after `patternResolution` was introduced. Will be removed in the next major version. */
|
|
551
555
|
assemblies?: ExperienceUsedComponents;
|
|
552
556
|
locale: string;
|
|
553
557
|
changedNode?: ExperienceTreeNode;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
import * as lodash from 'lodash';
|
|
1
2
|
import { PrimitiveValue } from '@contentful/experiences-validators';
|
|
2
3
|
|
|
3
|
-
declare const sanitizeNodeProps: (nodeProps: Record<PropertyKey, PrimitiveValue>) =>
|
|
4
|
-
[k: string]: string | number | boolean | Record<any, any> | undefined;
|
|
5
|
-
};
|
|
4
|
+
declare const sanitizeNodeProps: (nodeProps: Record<PropertyKey, PrimitiveValue>) => lodash.Omit<Record<PropertyKey, string | number | boolean | Record<any, any> | undefined>, string>;
|
|
6
5
|
|
|
7
6
|
export { sanitizeNodeProps };
|
package/dist/utils/utils.d.ts
CHANGED
|
@@ -23,10 +23,5 @@ interface ParsedValue {
|
|
|
23
23
|
}
|
|
24
24
|
declare function parseCSSValue(input: string): ParsedValue | null;
|
|
25
25
|
declare function getTargetValueInPixels(targetWidthObject: ParsedValue): number;
|
|
26
|
-
/**
|
|
27
|
-
* Creates a component definition for an assembly. As all assemblies use the same definition in the SDK,
|
|
28
|
-
* all should be registered via this function.
|
|
29
|
-
*/
|
|
30
|
-
declare const createAssemblyDefinition: (definitionId: string) => ComponentDefinition;
|
|
31
26
|
|
|
32
|
-
export { checkIsAssemblyDefinition, checkIsAssemblyEntry, checkIsAssemblyNode,
|
|
27
|
+
export { checkIsAssemblyDefinition, checkIsAssemblyEntry, checkIsAssemblyNode, generateRandomId, getDataFromTree, getTargetValueInPixels, parseCSSValue };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/experiences-core",
|
|
3
|
-
"version": "3.7.0-
|
|
3
|
+
"version": "3.7.0-dev-20250917T1203-0e23897.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -20,22 +20,8 @@
|
|
|
20
20
|
"dist/**/*.*"
|
|
21
21
|
],
|
|
22
22
|
"exports": {
|
|
23
|
-
".":
|
|
24
|
-
|
|
25
|
-
"require": "./dist/index.cjs",
|
|
26
|
-
"default": "./dist/index.js",
|
|
27
|
-
"types": [
|
|
28
|
-
"./dist/index.d.ts"
|
|
29
|
-
]
|
|
30
|
-
},
|
|
31
|
-
"./constants": {
|
|
32
|
-
"import": "./dist/constants.js",
|
|
33
|
-
"require": "./dist/constants.cjs",
|
|
34
|
-
"default": "./dist/constants.js",
|
|
35
|
-
"types": [
|
|
36
|
-
"./dist/constants.d.ts"
|
|
37
|
-
]
|
|
38
|
-
},
|
|
23
|
+
".": "./dist/index.js",
|
|
24
|
+
"./constants": "./dist/constants.js",
|
|
39
25
|
"./types": "./dist/types.d.ts"
|
|
40
26
|
},
|
|
41
27
|
"publishConfig": {
|
|
@@ -68,8 +54,9 @@
|
|
|
68
54
|
"devDependencies": {
|
|
69
55
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
70
56
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
57
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
71
58
|
"@rollup/plugin-typescript": "^11.1.5",
|
|
72
|
-
"@types/lodash
|
|
59
|
+
"@types/lodash-es": "^4.17.12",
|
|
73
60
|
"@vitest/coverage-v8": "^2.1.1",
|
|
74
61
|
"contentful": "^10.6.4",
|
|
75
62
|
"happy-dom": "^13.3.8",
|
|
@@ -80,13 +67,13 @@
|
|
|
80
67
|
"vitest": "^2.1.1"
|
|
81
68
|
},
|
|
82
69
|
"dependencies": {
|
|
83
|
-
"@contentful/experiences-validators": "3.7.0-
|
|
70
|
+
"@contentful/experiences-validators": "3.7.0-dev-20250917T1203-0e23897.0",
|
|
84
71
|
"@contentful/rich-text-types": "^17.0.0",
|
|
85
|
-
"lodash
|
|
72
|
+
"lodash-es": "^4.17.21",
|
|
86
73
|
"zustand": "^4.4.7"
|
|
87
74
|
},
|
|
88
75
|
"peerDependencies": {
|
|
89
76
|
"contentful": ">=10.6.0"
|
|
90
77
|
},
|
|
91
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "ab59b2e2b9fde75b3c6b2ad1d999a34dea2d9772"
|
|
92
79
|
}
|
package/dist/constants.cjs
DELETED
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/** @deprecated will be removed when dropping backward compatibility for old DND */
|
|
4
|
-
const SCROLL_STATES = {
|
|
5
|
-
Start: 'scrollStart',
|
|
6
|
-
IsScrolling: 'isScrolling',
|
|
7
|
-
End: 'scrollEnd',
|
|
8
|
-
};
|
|
9
|
-
const OUTGOING_EVENTS = {
|
|
10
|
-
Connected: 'connected',
|
|
11
|
-
DesignTokens: 'registerDesignTokens',
|
|
12
|
-
RegisteredBreakpoints: 'registeredBreakpoints',
|
|
13
|
-
/** @deprecated will be removed when dropping backward compatibility for old DND */
|
|
14
|
-
MouseMove: 'mouseMove',
|
|
15
|
-
/** @deprecated will be removed when dropping backward compatibility for old DND */
|
|
16
|
-
ComponentSelected: 'componentSelected',
|
|
17
|
-
RegisteredComponents: 'registeredComponents',
|
|
18
|
-
RequestComponentTreeUpdate: 'requestComponentTreeUpdate',
|
|
19
|
-
CanvasReload: 'canvasReload',
|
|
20
|
-
/** @deprecated will be removed when dropping backward compatibility for old DND */
|
|
21
|
-
UpdateSelectedComponentCoordinates: 'updateSelectedComponentCoordinates',
|
|
22
|
-
/** @deprecated will be removed when dropping backward compatibility for old DND */
|
|
23
|
-
CanvasScroll: 'canvasScrolling',
|
|
24
|
-
CanvasError: 'canvasError',
|
|
25
|
-
/** @deprecated will be removed when dropping backward compatibility for old DND */
|
|
26
|
-
OutsideCanvasClick: 'outsideCanvasClick',
|
|
27
|
-
SDKFeatures: 'sdkFeatures',
|
|
28
|
-
RequestEntities: 'REQUEST_ENTITIES',
|
|
29
|
-
CanvasGeometryUpdated: 'canvasGeometryUpdated',
|
|
30
|
-
CanvasPan: 'canvasPan',
|
|
31
|
-
};
|
|
32
|
-
const INCOMING_EVENTS = {
|
|
33
|
-
RequestEditorMode: 'requestEditorMode',
|
|
34
|
-
RequestReadOnlyMode: 'requestReadOnlyMode',
|
|
35
|
-
ExperienceUpdated: 'componentTreeUpdated',
|
|
36
|
-
/** @deprecated will be removed when dropping backward compatibility for old DND */
|
|
37
|
-
ComponentDraggingChanged: 'componentDraggingChanged',
|
|
38
|
-
/** @deprecated will be removed when dropping backward compatibility for old DND */
|
|
39
|
-
ComponentDragCanceled: 'componentDragCanceled',
|
|
40
|
-
/** @deprecated will be removed when dropping backward compatibility for old DND */
|
|
41
|
-
ComponentDragStarted: 'componentDragStarted',
|
|
42
|
-
/** @deprecated will be removed when dropping backward compatibility for old DND */
|
|
43
|
-
ComponentDragEnded: 'componentDragEnded',
|
|
44
|
-
/** @deprecated will be removed when dropping backward compatibility for old DND */
|
|
45
|
-
ComponentMoveEnded: 'componentMoveEnded',
|
|
46
|
-
/** @deprecated will be removed when dropping backward compatibility for old DND */
|
|
47
|
-
CanvasResized: 'canvasResized',
|
|
48
|
-
/** @deprecated will be removed when dropping backward compatibility for old DND */
|
|
49
|
-
SelectComponent: 'selectComponent',
|
|
50
|
-
/** @deprecated will be removed when dropping backward compatibility for old DND */
|
|
51
|
-
HoverComponent: 'hoverComponent',
|
|
52
|
-
UpdatedEntity: 'updatedEntity',
|
|
53
|
-
/** @deprecated not needed after `patternResolution` was introduced. Will be removed in the next major version. */
|
|
54
|
-
AssembliesAdded: 'assembliesAdded',
|
|
55
|
-
/** @deprecated not needed after `patternResolution` was introduced. Will be removed in the next major version. */
|
|
56
|
-
AssembliesRegistered: 'assembliesRegistered',
|
|
57
|
-
/** @deprecated will be removed when dropping backward compatibility for old DND */
|
|
58
|
-
MouseMove: 'mouseMove',
|
|
59
|
-
RequestedEntities: 'REQUESTED_ENTITIES',
|
|
60
|
-
};
|
|
61
|
-
const INTERNAL_EVENTS = {
|
|
62
|
-
ComponentsRegistered: 'cfComponentsRegistered',
|
|
63
|
-
VisualEditorInitialize: 'cfVisualEditorInitialize',
|
|
64
|
-
};
|
|
65
|
-
const VISUAL_EDITOR_EVENTS = {
|
|
66
|
-
Ready: 'cfVisualEditorReady',
|
|
67
|
-
};
|
|
68
|
-
/**
|
|
69
|
-
* These modes are ONLY intended to be internally used within the context of
|
|
70
|
-
* editing an experience inside of Contentful Studio. i.e. these modes
|
|
71
|
-
* intentionally do not include preview/delivery modes.
|
|
72
|
-
*/
|
|
73
|
-
exports.StudioCanvasMode = void 0;
|
|
74
|
-
(function (StudioCanvasMode) {
|
|
75
|
-
StudioCanvasMode["READ_ONLY"] = "readOnlyMode";
|
|
76
|
-
StudioCanvasMode["EDITOR"] = "editorMode";
|
|
77
|
-
StudioCanvasMode["NONE"] = "none";
|
|
78
|
-
})(exports.StudioCanvasMode || (exports.StudioCanvasMode = {}));
|
|
79
|
-
const VISUAL_EDITOR_CONTAINER_ID = 'cf-visual-editor';
|
|
80
|
-
const CONTENTFUL_COMPONENT_CATEGORY = 'contentful-component';
|
|
81
|
-
const CONTENTFUL_DEFAULT_CATEGORY = 'Contentful';
|
|
82
|
-
const CONTENTFUL_COMPONENTS = {
|
|
83
|
-
section: {
|
|
84
|
-
id: 'contentful-section',
|
|
85
|
-
name: 'Section',
|
|
86
|
-
},
|
|
87
|
-
container: {
|
|
88
|
-
id: 'contentful-container',
|
|
89
|
-
name: 'Container',
|
|
90
|
-
},
|
|
91
|
-
columns: {
|
|
92
|
-
id: 'contentful-columns',
|
|
93
|
-
name: 'Columns',
|
|
94
|
-
},
|
|
95
|
-
singleColumn: {
|
|
96
|
-
id: 'contentful-single-column',
|
|
97
|
-
name: 'Column',
|
|
98
|
-
},
|
|
99
|
-
button: {
|
|
100
|
-
id: 'contentful-button',
|
|
101
|
-
name: 'Button',
|
|
102
|
-
},
|
|
103
|
-
heading: {
|
|
104
|
-
id: 'contentful-heading',
|
|
105
|
-
name: 'Heading',
|
|
106
|
-
},
|
|
107
|
-
image: {
|
|
108
|
-
id: 'contentful-image',
|
|
109
|
-
name: 'Image',
|
|
110
|
-
},
|
|
111
|
-
richText: {
|
|
112
|
-
id: 'contentful-richText',
|
|
113
|
-
name: 'Rich Text',
|
|
114
|
-
},
|
|
115
|
-
text: {
|
|
116
|
-
id: 'contentful-text',
|
|
117
|
-
name: 'Text',
|
|
118
|
-
},
|
|
119
|
-
divider: {
|
|
120
|
-
id: 'contentful-divider',
|
|
121
|
-
name: 'Divider',
|
|
122
|
-
},
|
|
123
|
-
carousel: {
|
|
124
|
-
id: 'contentful-carousel',
|
|
125
|
-
name: 'Carousel',
|
|
126
|
-
},
|
|
127
|
-
};
|
|
128
|
-
const ASSEMBLY_NODE_TYPE = 'assembly';
|
|
129
|
-
const ASSEMBLY_DEFAULT_CATEGORY = 'Assemblies';
|
|
130
|
-
const ASSEMBLY_BLOCK_NODE_TYPE = 'assemblyBlock';
|
|
131
|
-
const ASSEMBLY_NODE_TYPES = [ASSEMBLY_NODE_TYPE, ASSEMBLY_BLOCK_NODE_TYPE];
|
|
132
|
-
const LATEST_SCHEMA_VERSION = '2023-09-28';
|
|
133
|
-
const CF_STYLE_ATTRIBUTES = [
|
|
134
|
-
'cfVisibility',
|
|
135
|
-
'cfHorizontalAlignment',
|
|
136
|
-
'cfVerticalAlignment',
|
|
137
|
-
'cfMargin',
|
|
138
|
-
'cfPadding',
|
|
139
|
-
'cfBackgroundColor',
|
|
140
|
-
'cfWidth',
|
|
141
|
-
'cfMaxWidth',
|
|
142
|
-
'cfHeight',
|
|
143
|
-
'cfImageAsset',
|
|
144
|
-
'cfImageOptions',
|
|
145
|
-
'cfBackgroundImageUrl',
|
|
146
|
-
'cfBackgroundImageOptions',
|
|
147
|
-
'cfFlexDirection',
|
|
148
|
-
'cfFlexWrap',
|
|
149
|
-
'cfFlexReverse',
|
|
150
|
-
'cfBorder',
|
|
151
|
-
'cfBorderRadius',
|
|
152
|
-
'cfGap',
|
|
153
|
-
'cfColumnSpan',
|
|
154
|
-
'cfColumnSpanLock',
|
|
155
|
-
'cfColumns',
|
|
156
|
-
'cfFontSize',
|
|
157
|
-
'cfFontWeight',
|
|
158
|
-
'cfLineHeight',
|
|
159
|
-
'cfLetterSpacing',
|
|
160
|
-
'cfTextColor',
|
|
161
|
-
'cfTextAlign',
|
|
162
|
-
'cfTextTransform',
|
|
163
|
-
'cfTextBold',
|
|
164
|
-
'cfTextItalic',
|
|
165
|
-
'cfTextUnderline',
|
|
166
|
-
];
|
|
167
|
-
const EMPTY_CONTAINER_SIZE = '80px';
|
|
168
|
-
const HYPERLINK_DEFAULT_PATTERN = `/{locale}/{entry.fields.slug}/`;
|
|
169
|
-
exports.PostMessageMethods = void 0;
|
|
170
|
-
(function (PostMessageMethods) {
|
|
171
|
-
PostMessageMethods["REQUEST_ENTITIES"] = "REQUEST_ENTITIES";
|
|
172
|
-
PostMessageMethods["REQUESTED_ENTITIES"] = "REQUESTED_ENTITIES";
|
|
173
|
-
})(exports.PostMessageMethods || (exports.PostMessageMethods = {}));
|
|
174
|
-
const SUPPORTED_IMAGE_FORMATS = ['jpg', 'png', 'webp', 'gif', 'avif'];
|
|
175
|
-
const PATTERN_PROPERTY_DIVIDER = '-----';
|
|
176
|
-
const SIDELOADED_PREFIX = 'sideloaded_';
|
|
177
|
-
|
|
178
|
-
exports.ASSEMBLY_BLOCK_NODE_TYPE = ASSEMBLY_BLOCK_NODE_TYPE;
|
|
179
|
-
exports.ASSEMBLY_DEFAULT_CATEGORY = ASSEMBLY_DEFAULT_CATEGORY;
|
|
180
|
-
exports.ASSEMBLY_NODE_TYPE = ASSEMBLY_NODE_TYPE;
|
|
181
|
-
exports.ASSEMBLY_NODE_TYPES = ASSEMBLY_NODE_TYPES;
|
|
182
|
-
exports.CF_STYLE_ATTRIBUTES = CF_STYLE_ATTRIBUTES;
|
|
183
|
-
exports.CONTENTFUL_COMPONENTS = CONTENTFUL_COMPONENTS;
|
|
184
|
-
exports.CONTENTFUL_COMPONENT_CATEGORY = CONTENTFUL_COMPONENT_CATEGORY;
|
|
185
|
-
exports.CONTENTFUL_DEFAULT_CATEGORY = CONTENTFUL_DEFAULT_CATEGORY;
|
|
186
|
-
exports.EMPTY_CONTAINER_SIZE = EMPTY_CONTAINER_SIZE;
|
|
187
|
-
exports.HYPERLINK_DEFAULT_PATTERN = HYPERLINK_DEFAULT_PATTERN;
|
|
188
|
-
exports.INCOMING_EVENTS = INCOMING_EVENTS;
|
|
189
|
-
exports.INTERNAL_EVENTS = INTERNAL_EVENTS;
|
|
190
|
-
exports.LATEST_SCHEMA_VERSION = LATEST_SCHEMA_VERSION;
|
|
191
|
-
exports.OUTGOING_EVENTS = OUTGOING_EVENTS;
|
|
192
|
-
exports.PATTERN_PROPERTY_DIVIDER = PATTERN_PROPERTY_DIVIDER;
|
|
193
|
-
exports.SCROLL_STATES = SCROLL_STATES;
|
|
194
|
-
exports.SIDELOADED_PREFIX = SIDELOADED_PREFIX;
|
|
195
|
-
exports.SUPPORTED_IMAGE_FORMATS = SUPPORTED_IMAGE_FORMATS;
|
|
196
|
-
exports.VISUAL_EDITOR_CONTAINER_ID = VISUAL_EDITOR_CONTAINER_ID;
|
|
197
|
-
exports.VISUAL_EDITOR_EVENTS = VISUAL_EDITOR_EVENTS;
|
|
198
|
-
//# sourceMappingURL=constants.cjs.map
|
package/dist/constants.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.cjs","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":["StudioCanvasMode","PostMessageMethods"],"mappings":";;AAAA;AACa,MAAA,aAAa,GAAG;AAC3B,IAAA,KAAK,EAAE,aAAa;AACpB,IAAA,WAAW,EAAE,aAAa;AAC1B,IAAA,GAAG,EAAE,WAAW;EACP;AAEE,MAAA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