@contentful/experiences-core 1.35.0-dev-20250324T2005-a11cb8e.0 → 1.35.0-prerelease-20250414T1325-5725f29.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/types.d.ts CHANGED
@@ -129,7 +129,6 @@ type ExperienceTreeNode = {
129
129
  id: string;
130
130
  nodeId: string;
131
131
  nodeLocation: string;
132
- nodeIdOnPattern: string;
133
132
  isVisibilityPropertyExposed: boolean;
134
133
  variableNameToComponentValueKeyMap: Record<string, string>;
135
134
  };
@@ -0,0 +1,20 @@
1
+ import { Asset, Entry } from 'contentful';
2
+
3
+ /**
4
+ * Localizes the provided entry or asset to match the regular format of CDA/CPA entities.
5
+ * Note that this function does not apply a fallback to the default locale nor does it check
6
+ * the content type for the localization setting of each field.
7
+ * It will simply resolve each field to the requested locale.
8
+ *
9
+ * If the entity is already localized, it will return the entity as is.
10
+ *
11
+ * @example
12
+ * ```
13
+ * const multiLocaleEntry = { fields: { title: { 'en-US': 'Hello' } } };
14
+ * const localizedEntry = localizeEntity(multiLocaleEntry, 'en-US');
15
+ * console.log(localizedEntry.fields.title); // 'Hello'
16
+ * ```
17
+ */
18
+ declare function localizeEntity<T extends Asset | Entry>(entity: T, locale: string): T;
19
+
20
+ export { localizeEntity };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experiences-core",
3
- "version": "1.35.0-dev-20250324T2005-a11cb8e.0",
3
+ "version": "1.35.0-prerelease-20250414T1325-5725f29.0",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -70,11 +70,11 @@
70
70
  "vitest": "^2.1.1"
71
71
  },
72
72
  "dependencies": {
73
- "@contentful/experiences-validators": "1.35.0-dev-20250324T2005-a11cb8e.0",
73
+ "@contentful/experiences-validators": "1.35.0-prerelease-20250414T1325-5725f29.0",
74
74
  "@contentful/rich-text-types": "^17.0.0"
75
75
  },
76
76
  "peerDependencies": {
77
77
  "contentful": ">=10.6.0"
78
78
  },
79
- "gitHead": "5b84528a3a59a5445773309f5271bb6fdae56ef5"
79
+ "gitHead": "353c5494f903fafb7c01821f002725bdbd119dbc"
80
80
  }