@contentful/experiences-core 0.0.1 → 0.2.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/CHANGELOG.md +9 -0
- package/README.md +16 -0
- package/dist/index.d.ts +2 -24
- package/dist/index.js +5 -2402
- package/dist/index.js.map +1 -1
- package/dist/resolve-experience.d.ts +35 -0
- package/dist/resolve-experience.js +117 -0
- package/dist/resolve-experience.js.map +1 -0
- package/dist/types.d.ts +191 -235
- package/dist/types.js +1 -0
- package/dist/types.js.map +1 -0
- package/package.json +23 -66
- package/LICENSE +0 -21
- package/dist/communication/sendMessage.d.ts +0 -6
- package/dist/constants.d.ts +0 -106
- package/dist/constants.js +0 -144
- package/dist/constants.js.map +0 -1
- package/dist/deep-binding/DeepReference.d.ts +0 -28
- package/dist/definitions/components.d.ts +0 -8
- package/dist/definitions/styles.d.ts +0 -11
- package/dist/entity/EditorEntityStore.d.ts +0 -34
- package/dist/entity/EditorModeEntityStore.d.ts +0 -29
- package/dist/entity/EntityStore.d.ts +0 -68
- package/dist/entity/EntityStoreBase.d.ts +0 -49
- package/dist/enums.d.ts +0 -6
- package/dist/exports.d.ts +0 -3
- package/dist/exports.js +0 -2
- package/dist/exports.js.map +0 -1
- package/dist/fetchers/createExperience.d.ts +0 -20
- package/dist/fetchers/fetchById.d.ts +0 -20
- package/dist/fetchers/fetchBySlug.d.ts +0 -20
- package/dist/registries/designTokenRegistry.d.ts +0 -12
- package/dist/utils/breakpoints.d.ts +0 -12
- package/dist/utils/components.d.ts +0 -4
- package/dist/utils/domValues.d.ts +0 -15
- package/dist/utils/isLink.d.ts +0 -5
- package/dist/utils/isLinkToAsset.d.ts +0 -5
- package/dist/utils/pathSchema.d.ts +0 -30
- package/dist/utils/styleUtils/stylesUtils.d.ts +0 -20
- package/dist/utils/supportedModes.d.ts +0 -5
- package/dist/utils/transformers/transformBoundContentValue.d.ts +0 -8
- package/dist/utils/typeguards.d.ts +0 -6
- package/dist/utils/utils.d.ts +0 -46
- package/dist/utils/validations.d.ts +0 -15
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
## 0.2.0 (2026-06-24)
|
|
2
|
+
|
|
3
|
+
This was a version bump only for core to align it with other projects, there were no code changes.
|
|
4
|
+
|
|
5
|
+
## 0.1.0 (2026-06-23)
|
|
6
|
+
|
|
7
|
+
### 🚀 Features
|
|
8
|
+
|
|
9
|
+
- initial Experiences SDK monorepo with React adapter [] ([#16](https://github.com/contentful/experiences/pull/16))
|
package/README.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# @contentful/experiences-core
|
|
2
|
+
|
|
3
|
+
> ⚠️ **Internal package.** Customers do not install this directly. The framework adapter (e.g. [`@contentful/experiences-react`](../adapter-react/)) re-exports everything customers need.
|
|
4
|
+
|
|
5
|
+
Runtime-neutral primitives shared across all framework adapters.
|
|
6
|
+
|
|
7
|
+
## What lives here
|
|
8
|
+
|
|
9
|
+
- **Types** — `PortableRenderPlan`, `PortableRenderNode`, `PortableTemplate`, `ExperiencePayload`, `ExperienceNode`, the discriminated `DesignPropValue` union (`ManualDesignValue` / `DesignToken` / `ValuesByViewport`), `ViewportDef`, `ExperienceContext`, `ResolveContext`.
|
|
10
|
+
- **`resolveExperience(payload, config, opts)`** — single async entry that walks an XDA payload, classifies content vs. design properties, captures slots, runs any component-declared `resolveData` hooks in parallel, and emits a runtime-neutral `PortableRenderPlan` ready for any framework adapter to render.
|
|
11
|
+
|
|
12
|
+
## Why a separate package?
|
|
13
|
+
|
|
14
|
+
Future Angular, Svelte, Vue, SwiftUI, and Compose adapters consume the same plan. Sharing core means each adapter has zero plan-building or prop-classification logic to duplicate — the seam is the `PortableRenderPlan` contract.
|
|
15
|
+
|
|
16
|
+
See [`../../AGENTS.md`](../../AGENTS.md) for the full architecture and design decisions.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,24 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export { VisualEditorMessagePayload, doesMismatchMessageSchema, tryParseMessage, validateExperienceBuilderConfig } from './utils/validations.js';
|
|
4
|
-
export { buildCfStyles, buildStyleTag, calculateNodeDefaultHeight } from './utils/styleUtils/stylesUtils.js';
|
|
5
|
-
export { transformBoundContentValue } from './utils/transformers/transformBoundContentValue.js';
|
|
6
|
-
export { checkIsAssembly, checkIsAssemblyDefinition, checkIsAssemblyEntry, checkIsAssemblyNode, generateRandomId, getDataFromTree, getInsertionData } from './utils/utils.js';
|
|
7
|
-
export { isExperienceEntry } from './utils/typeguards.js';
|
|
8
|
-
export { supportedModes } from './utils/supportedModes.js';
|
|
9
|
-
export { MEDIA_QUERY_REGEXP, getActiveBreakpointIndex, getFallbackBreakpointIndex, getValueForBreakpoint, mediaQueryMatcher } from './utils/breakpoints.js';
|
|
10
|
-
export { isLinkToAsset } from './utils/isLinkToAsset.js';
|
|
11
|
-
export { isLink } from './utils/isLink.js';
|
|
12
|
-
export { Fieldset, UnresolvedFieldset, isDeepPath, parseDataSourcePathIntoFieldset, parseDataSourcePathWithL1DeepBindings } from './utils/pathSchema.js';
|
|
13
|
-
export { columnsDefinition, containerDefinition, sectionDefinition, singleColumnDefinition } from './definitions/components.js';
|
|
14
|
-
export { builtInStyles, columnsBuiltInStyles, containerBuiltInStyles, optionalBuiltInStyles, sectionBuiltInStyles, singleColumnBuiltInStyles } from './definitions/styles.js';
|
|
15
|
-
export { EditorModeEntityStore } from './entity/EditorModeEntityStore.js';
|
|
16
|
-
export { EntityStore } from './entity/EntityStore.js';
|
|
17
|
-
export { EntityStoreBase } from './entity/EntityStoreBase.js';
|
|
18
|
-
export { sendMessage } from './communication/sendMessage.js';
|
|
19
|
-
export { VisualEditorMode } from './enums.js';
|
|
20
|
-
export { fetchBySlug } from './fetchers/fetchBySlug.js';
|
|
21
|
-
export { fetchById } from './fetchers/fetchById.js';
|
|
22
|
-
export { createExperience } from './fetchers/createExperience.js';
|
|
23
|
-
export { defineDesignTokens, designTokensRegistry, getDesignTokenRegistration } from './registries/designTokenRegistry.js';
|
|
24
|
-
export { DeepReference, gatherDeepReferencesFromExperienceEntry, gatherDeepReferencesFromTree } from './deep-binding/DeepReference.js';
|
|
1
|
+
export { ComponentTypeNode, ComponentTypeRef, DesignPropValue, DesignToken, ExperienceContext, ExperienceNode, ExperiencePayload, ExperienceSys, ManualDesignValue, PortableRegistration, PortableRenderNode, PortableRenderPlan, PortableTemplate, ResolveContext, TemplateNode, TemplateRef, ValuesByViewport, ViewportDef } from './types.js';
|
|
2
|
+
export { ResolveExperienceOptions, ResolverConfig, resolveExperience } from './resolve-experience.js';
|