@contentful/experiences-core 0.4.0 → 0.5.1

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 CHANGED
@@ -1,3 +1,13 @@
1
+ ## 0.5.1 (2026-07-17)
2
+
3
+ ### 🚀 Features
4
+
5
+ - design-token resolution via resolveToken + useDesignValues [AIS-149] ([#53](https://github.com/contentful/experiences/pull/53))
6
+
7
+ ## 0.5.0 (2026-07-17)
8
+
9
+ This was a version bump only for core to align it with other projects, there were no code changes.
10
+
1
11
  ## 0.4.0 (2026-07-08)
2
12
 
3
13
  ### 🚀 Features
package/README.md CHANGED
@@ -14,3 +14,7 @@ Runtime-neutral primitives shared across all framework adapters.
14
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
15
 
16
16
  See [`../../AGENTS.md`](../../AGENTS.md) for the full architecture and design decisions.
17
+
18
+ ## License
19
+
20
+ MIT. See the repository [`LICENSE`](../../LICENSE) and [`NOTICE`](../../NOTICE) for full attribution.
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { ComponentTypeNode, ComponentTypeRef, DesignPropValue, DesignToken, ExperienceContext, ExperienceNode, ExperiencePayload, ExperienceSys, ManualDesignValue, PortableRegistration, PortableRenderNode, PortableRenderPlan, PortableTemplate, ResolveContext, TemplateNode, TemplateRef, ValuesByViewport, ViewportDef } from './types.js';
1
+ export { ComponentTypeNode, ComponentTypeRef, DesignPropValue, DesignToken, ExperienceContext, ExperienceNode, ExperiencePayload, ExperienceSys, ManualDesignValue, PortableRegistration, PortableRenderNode, PortableRenderPlan, PortableTemplate, ResolveContext, ResolveToken, TemplateNode, TemplateRef, ValuesByViewport, ViewportDef } from './types.js';
2
2
  export { ResolveExperienceOptions, ResolverConfig, resolveExperience } from './resolve-experience.js';
package/dist/types.d.ts CHANGED
@@ -45,6 +45,12 @@ interface DesignToken {
45
45
  type: 'DesignToken';
46
46
  value: string;
47
47
  }
48
+ /**
49
+ * Turns a `DesignToken` envelope into a runtime value. `ref.value` is the
50
+ * customer-defined token id; returning `undefined` means "not resolvable" and
51
+ * the adapter drops the key (with a warning). Sync only — it runs at render time.
52
+ */
53
+ type ResolveToken = (ref: DesignToken) => unknown;
48
54
  interface ValuesByViewport {
49
55
  type: 'ValuesByViewport';
50
56
  values: Record<string, ManualDesignValue | DesignToken>;
@@ -202,4 +208,4 @@ interface PortableRenderPlan {
202
208
  template?: PortableTemplate;
203
209
  }
204
210
 
205
- export type { ComponentTypeNode, ComponentTypeRef, DesignPropValue, DesignToken, ExperienceContext, ExperienceNode, ExperiencePayload, ExperienceSys, ManualDesignValue, PortableRegistration, PortableRenderNode, PortableRenderPlan, PortableTemplate, ResolveContext, TemplateNode, TemplateRef, ValuesByViewport, ViewportDef };
211
+ export type { ComponentTypeNode, ComponentTypeRef, DesignPropValue, DesignToken, ExperienceContext, ExperienceNode, ExperiencePayload, ExperienceSys, ManualDesignValue, PortableRegistration, PortableRenderNode, PortableRenderPlan, PortableTemplate, ResolveContext, ResolveToken, TemplateNode, TemplateRef, ValuesByViewport, ViewportDef };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experiences-core",
3
- "version": "0.4.0",
3
+ "version": "0.5.1",
4
4
  "description": "Runtime-neutral types + experience resolution for Contentful Experiences",
5
5
  "license": "MIT",
6
6
  "type": "module",