@contentful/experiences-core 1.9.0-dev-20240628T2235-7a4f71f.0 → 1.9.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.
Files changed (39) hide show
  1. package/dist/communication/sendMessage.d.ts +5 -0
  2. package/dist/constants.d.ts +112 -0
  3. package/dist/constants.js +150 -0
  4. package/dist/constants.js.map +1 -0
  5. package/dist/deep-binding/DeepReference.d.ts +27 -0
  6. package/dist/definitions/components.d.ts +9 -0
  7. package/dist/definitions/styles.d.ts +12 -0
  8. package/dist/entity/EditorEntityStore.d.ts +34 -0
  9. package/dist/entity/EditorModeEntityStore.d.ts +29 -0
  10. package/dist/entity/EntityStore.d.ts +69 -0
  11. package/dist/entity/EntityStoreBase.d.ts +49 -0
  12. package/dist/enums.d.ts +6 -0
  13. package/dist/exports.d.ts +3 -0
  14. package/dist/exports.js +2 -0
  15. package/dist/exports.js.map +1 -0
  16. package/dist/fetchers/createExperience.d.ts +20 -0
  17. package/dist/fetchers/fetchById.d.ts +20 -0
  18. package/dist/fetchers/fetchBySlug.d.ts +20 -0
  19. package/dist/index.d.ts +27 -0
  20. package/dist/index.js +3370 -0
  21. package/dist/index.js.map +1 -0
  22. package/dist/registries/breakpointsRegistry.d.ts +20 -0
  23. package/dist/registries/designTokenRegistry.d.ts +13 -0
  24. package/dist/types.d.ts +451 -0
  25. package/dist/utils/breakpoints.d.ts +12 -0
  26. package/dist/utils/components.d.ts +5 -0
  27. package/dist/utils/domValues.d.ts +15 -0
  28. package/dist/utils/isLink.d.ts +5 -0
  29. package/dist/utils/isLinkToAsset.d.ts +5 -0
  30. package/dist/utils/pathSchema.d.ts +31 -0
  31. package/dist/utils/resolveHyperlinkPattern.d.ts +17 -0
  32. package/dist/utils/styleUtils/ssrStyles.d.ts +51 -0
  33. package/dist/utils/styleUtils/stylesUtils.d.ts +21 -0
  34. package/dist/utils/supportedModes.d.ts +5 -0
  35. package/dist/utils/transformers/transformBoundContentValue.d.ts +8 -0
  36. package/dist/utils/typeguards.d.ts +6 -0
  37. package/dist/utils/utils.d.ts +46 -0
  38. package/dist/utils/validations.d.ts +10 -0
  39. package/package.json +3 -3
@@ -0,0 +1,6 @@
1
+ import { ExperienceEntry } from '../types.js';
2
+ import { Entry } from 'contentful';
3
+
4
+ declare const isExperienceEntry: (entry: ExperienceEntry | Entry) => entry is ExperienceEntry;
5
+
6
+ export { isExperienceEntry };
@@ -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-20240628T2235-7a4f71f.0",
3
+ "version": "1.9.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-20240628T2235-7a4f71f.0",
68
+ "@contentful/experiences-validators": "1.9.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": "2794272dc185d96f5c3a3c0ada65b2c872c744b8"
74
+ "gitHead": "28fbaa3b62e017af49094bcb16a9968c2fd01bc8"
75
75
  }