@contentful/experiences-core 1.9.0-dev-20240628T2235-7a4f71f.0 → 1.9.0-dev-20240628T2250-7a4f71f.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/communication/sendMessage.d.ts +5 -0
- package/dist/constants.d.ts +112 -0
- package/dist/constants.js +150 -0
- package/dist/constants.js.map +1 -0
- package/dist/deep-binding/DeepReference.d.ts +27 -0
- package/dist/definitions/components.d.ts +9 -0
- package/dist/definitions/styles.d.ts +12 -0
- package/dist/entity/EditorEntityStore.d.ts +34 -0
- package/dist/entity/EditorModeEntityStore.d.ts +29 -0
- package/dist/entity/EntityStore.d.ts +69 -0
- package/dist/entity/EntityStoreBase.d.ts +49 -0
- package/dist/enums.d.ts +6 -0
- package/dist/exports.d.ts +3 -0
- package/dist/exports.js +2 -0
- package/dist/exports.js.map +1 -0
- package/dist/fetchers/createExperience.d.ts +20 -0
- package/dist/fetchers/fetchById.d.ts +20 -0
- package/dist/fetchers/fetchBySlug.d.ts +20 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.js +3370 -0
- package/dist/index.js.map +1 -0
- package/dist/registries/breakpointsRegistry.d.ts +20 -0
- package/dist/registries/designTokenRegistry.d.ts +13 -0
- package/dist/types.d.ts +451 -0
- package/dist/utils/breakpoints.d.ts +12 -0
- package/dist/utils/components.d.ts +5 -0
- package/dist/utils/domValues.d.ts +15 -0
- package/dist/utils/isLink.d.ts +5 -0
- package/dist/utils/isLinkToAsset.d.ts +5 -0
- package/dist/utils/pathSchema.d.ts +31 -0
- package/dist/utils/resolveHyperlinkPattern.d.ts +17 -0
- package/dist/utils/styleUtils/ssrStyles.d.ts +51 -0
- package/dist/utils/styleUtils/stylesUtils.d.ts +21 -0
- package/dist/utils/supportedModes.d.ts +5 -0
- package/dist/utils/transformers/transformBoundContentValue.d.ts +8 -0
- package/dist/utils/typeguards.d.ts +6 -0
- package/dist/utils/utils.d.ts +46 -0
- package/dist/utils/validations.d.ts +10 -0
- package/package.json +3 -3
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ExperienceTree, ExperienceEntry, ComponentDefinition, ExperienceTreeNode, StyleProps } from '../types.js';
|
|
2
|
+
import { Entry } from 'contentful';
|
|
3
|
+
import { ExperienceDataSource, ExperienceUnboundValues } from '@contentful/experiences-validators';
|
|
4
|
+
|
|
5
|
+
declare const getDataFromTree: (tree: ExperienceTree) => {
|
|
6
|
+
dataSource: ExperienceDataSource;
|
|
7
|
+
unboundValues: ExperienceUnboundValues;
|
|
8
|
+
};
|
|
9
|
+
type GetInsertionDataParams = {
|
|
10
|
+
dropReceiverNode: ExperienceTreeNode;
|
|
11
|
+
dropReceiverParentNode: ExperienceTreeNode;
|
|
12
|
+
flexDirection?: StyleProps['cfFlexDirection'];
|
|
13
|
+
isMouseAtTopBorder: boolean;
|
|
14
|
+
isMouseAtBottomBorder: boolean;
|
|
15
|
+
isMouseInLeftHalf: boolean;
|
|
16
|
+
isMouseInUpperHalf: boolean;
|
|
17
|
+
isOverTopIndicator: boolean;
|
|
18
|
+
isOverBottomIndicator: boolean;
|
|
19
|
+
};
|
|
20
|
+
type InsertionData = {
|
|
21
|
+
node: ExperienceTreeNode;
|
|
22
|
+
index: number;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Gets calculates the index to drop the dragged component based on the mouse position
|
|
26
|
+
* @returns {InsertionData} a object containing a node that will become a parent for dragged component and index at which it must be inserted
|
|
27
|
+
*/
|
|
28
|
+
declare const getInsertionData: ({ dropReceiverParentNode, dropReceiverNode, flexDirection, isMouseAtTopBorder, isMouseAtBottomBorder, isMouseInLeftHalf, isMouseInUpperHalf, isOverTopIndicator, isOverBottomIndicator, }: GetInsertionDataParams) => InsertionData;
|
|
29
|
+
declare const generateRandomId: (letterCount: number) => string;
|
|
30
|
+
declare const checkIsAssemblyNode: ({ componentId, usedComponents, }: {
|
|
31
|
+
componentId: string;
|
|
32
|
+
usedComponents: ExperienceEntry["fields"]["usedComponents"];
|
|
33
|
+
}) => boolean;
|
|
34
|
+
/** @deprecated use `checkIsAssemblyNode` instead. Will be removed with SDK v5. */
|
|
35
|
+
declare const checkIsAssembly: ({ componentId, usedComponents, }: {
|
|
36
|
+
componentId: string;
|
|
37
|
+
usedComponents: ExperienceEntry["fields"]["usedComponents"];
|
|
38
|
+
}) => boolean;
|
|
39
|
+
/**
|
|
40
|
+
* This check assumes that the entry is already ensured to be an experience, i.e. the
|
|
41
|
+
* content type of the entry is an experience type with the necessary annotations.
|
|
42
|
+
**/
|
|
43
|
+
declare const checkIsAssemblyEntry: (entry: Entry) => boolean;
|
|
44
|
+
declare const checkIsAssemblyDefinition: (component?: ComponentDefinition) => boolean;
|
|
45
|
+
|
|
46
|
+
export { checkIsAssembly, checkIsAssemblyDefinition, checkIsAssemblyEntry, checkIsAssemblyNode, generateRandomId, getDataFromTree, getInsertionData };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IncomingMessage } from '../types.js';
|
|
2
|
+
|
|
3
|
+
declare const doesMismatchMessageSchema: (event: MessageEvent) => false | string;
|
|
4
|
+
declare const tryParseMessage: (event: MessageEvent) => IncomingMessage;
|
|
5
|
+
declare const validateExperienceBuilderConfig: ({ locale, isEditorMode, }: {
|
|
6
|
+
locale: string;
|
|
7
|
+
isEditorMode: boolean;
|
|
8
|
+
}) => void;
|
|
9
|
+
|
|
10
|
+
export { doesMismatchMessageSchema, tryParseMessage, validateExperienceBuilderConfig };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/experiences-core",
|
|
3
|
-
"version": "1.9.0-dev-
|
|
3
|
+
"version": "1.9.0-dev-20240628T2250-7a4f71f.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -65,11 +65,11 @@
|
|
|
65
65
|
"vitest": "^1.0.4"
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@contentful/experiences-validators": "1.9.0-dev-
|
|
68
|
+
"@contentful/experiences-validators": "1.9.0-dev-20240628T2250-7a4f71f.0",
|
|
69
69
|
"@contentful/rich-text-types": "^16.3.0"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"contentful": ">=10.6.0"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "c3f3148a243e3141c941677371c69bd3a7ccdabb"
|
|
75
75
|
}
|