@contentful/experiences-react 0.14.4 → 0.14.6

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,26 @@
1
+ ## 0.14.6 (2026-10-26)
2
+
3
+ ### 🚀 Features
4
+
5
+ - improve Node/Web handoffs, event APIs, and diagnostics ([#264](https://github.com/contentful/experiences/pull/264))
6
+
7
+ ### 🧱 Updated Dependencies
8
+
9
+ - Updated live-preview to 0.7.6
10
+ - Updated runtime to 0.2.6
11
+ - Updated client to 0.10.6
12
+ - Updated core to 0.13.5
13
+
14
+ ## 0.14.5 (2026-10-24)
15
+
16
+ ### 🧱 Updated Dependencies
17
+
18
+ - Updated live-preview to 0.7.5
19
+ - Updated runtime to 0.2.5
20
+ - Updated client to 0.10.5
21
+ - Updated design to 0.13.4
22
+ - Updated core to 0.13.4
23
+
1
24
  ## 0.14.4 (2026-10-23)
2
25
 
3
26
  ### 🧱 Updated Dependencies
@@ -63,7 +63,8 @@ function safeStringify(value) {
63
63
  try {
64
64
  return JSON.stringify(
65
65
  value,
66
- (_key, val) => {
66
+ function(key, val) {
67
+ if (this === value && key === "deliveryDiagnostics") return void 0;
67
68
  if (typeof val === "object" && val !== null) {
68
69
  if (seen.has(val)) return "[Circular]";
69
70
  seen.add(val);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/debug-experience.tsx"],"sourcesContent":["/*\n * First-party debug panel. Renders the resolved Experience plan as pretty\n * JSON so a customer can see exactly what the SDK interpreted from the payload\n * — node tree, registrations, and resolved props.\n *\n * Two ways to use it:\n * - Auto-mounted by the renderers when `debug` is on (above the tree).\n * - Mounted manually anywhere: `<DebugExperience experience={plan} />`.\n *\n * v1 is just the JSON dump wrapped in a native <details> so it collapses\n * without any client JS (safe in server components). Room to grow into a\n * node-tree explorer and resolveData timing panel — kept\n * deliberately small for now.\n *\n * No React hooks here on purpose: it must render in both server and client\n * renderer subtrees.\n */\n\nimport type { ReactNode } from 'react';\n\nimport type { PortableRenderPlan } from '@contentful/experiences-sdk-core';\n\nexport interface DebugExperienceProps {\n /** The resolved plan to inspect (what a renderer receives as `experience`). */\n experience: PortableRenderPlan;\n /** Start expanded. Defaults to collapsed to stay out of the way. */\n defaultOpen?: boolean;\n /**\n * Resolve-time + render-time diagnostics for this render, merged by the\n * caller (`ServerExperienceRenderer` / `ClientExperienceRenderer`). Plain\n * `Error`s — the two cases that wrap a real caught exception\n * (`component-render-error`, `resolve-data-failed`) set `.cause` to the\n * original error, inspectable via `console.error` or `error.cause.stack`.\n * Defaults to `[]` for a manually-mounted `<DebugExperience>`.\n */\n errors?: Error[];\n}\n\nexport function DebugExperience({\n experience,\n defaultOpen = false,\n errors = [],\n}: DebugExperienceProps): ReactNode {\n const nodeCount = experience.nodes.length;\n // Coded Experience Templates are ordinary top-level nodes, so name them from\n // the node list — a composite Experience simply has none to report.\n const templateIds = experience.nodes\n .filter((node) => node.registration.kind === 'experienceTemplate')\n .map((node) => node.registration.id);\n const summary = `Experience debug — ${nodeCount} top-level node${nodeCount === 1 ? '' : 's'}${\n templateIds.length\n ? `, experience template${templateIds.length === 1 ? '' : 's'}: ${templateIds.join(', ')}`\n : ''\n }`;\n\n // Auto-expand whenever there's something to see, even if the caller didn't\n // explicitly ask — a beta customer shouldn't have to know to click into a\n // collapsed panel to discover that something went wrong.\n const open = defaultOpen || errors.length > 0;\n\n return (\n <details\n open={open}\n data-experiences-debug\n style={{\n margin: '1rem 0',\n border: '1px solid #6b7280',\n borderRadius: '6px',\n background: '#0b1021',\n color: '#e2e8f0',\n fontFamily: 'ui-monospace, SFMono-Regular, Menlo, monospace',\n fontSize: '0.75rem',\n overflow: 'hidden',\n }}\n >\n <summary\n style={{\n cursor: 'pointer',\n padding: '0.5rem 0.75rem',\n background: '#111827',\n userSelect: 'none',\n }}\n >\n {summary}\n </summary>\n {errors.length > 0 ? <DiagnosticList errors={errors} /> : null}\n <pre\n style={{\n margin: 0,\n padding: '0.75rem',\n overflow: 'auto',\n maxHeight: '32rem',\n whiteSpace: 'pre-wrap',\n wordBreak: 'break-word',\n }}\n >\n {safeStringify(experience)}\n </pre>\n </details>\n );\n}\n\n// Deliberately unstyled for now — this just needs to make the data visible,\n// not console-only. Visual treatment (grouping, color, counts) can grow later.\nfunction DiagnosticList({ errors }: { errors: Error[] }): ReactNode {\n return (\n <ul data-experiences-debug-errors>\n {errors.map((error, index) => (\n <li key={index}>{error.message}</li>\n ))}\n </ul>\n );\n}\n\n/**\n * JSON.stringify with a circular-reference guard. A resolved plan is plain\n * data, but a customer's `resolveData` could stash a non-serializable value on\n * `props.resolved` — degrade to a placeholder rather than throwing inside a\n * debug panel.\n */\nfunction safeStringify(value: unknown): string {\n const seen = new WeakSet<object>();\n try {\n return JSON.stringify(\n value,\n (_key, val) => {\n if (typeof val === 'object' && val !== null) {\n if (seen.has(val)) return '[Circular]';\n seen.add(val);\n }\n if (typeof val === 'function') return `[Function ${val.name || 'anonymous'}]`;\n if (typeof val === 'undefined') return '[undefined]';\n return val;\n },\n 2\n );\n } catch (err) {\n // `err` isn't guaranteed to be an Error — a getter deep in customer data\n // (a resolveData result, resolved design values) can `throw null` or\n // `throw 'reason'` during JSON.stringify's replacer walk, and this\n // fallback's whole job is to never throw itself.\n const reason = err instanceof Error ? err.message : String(err);\n return `[DebugExperience: could not serialize plan — ${reason}]`;\n }\n}\n"],"mappings":"AA6DI,SAcE,KAdF;AAvBG,SAAS,gBAAgB;AAAA,EAC9B;AAAA,EACA,cAAc;AAAA,EACd,SAAS,CAAC;AACZ,GAAoC;AAClC,QAAM,YAAY,WAAW,MAAM;AAGnC,QAAM,cAAc,WAAW,MAC5B,OAAO,CAAC,SAAS,KAAK,aAAa,SAAS,oBAAoB,EAChE,IAAI,CAAC,SAAS,KAAK,aAAa,EAAE;AACrC,QAAM,UAAU,2BAAsB,SAAS,kBAAkB,cAAc,IAAI,KAAK,GAAG,GACzF,YAAY,SACR,wBAAwB,YAAY,WAAW,IAAI,KAAK,GAAG,KAAK,YAAY,KAAK,IAAI,CAAC,KACtF,EACN;AAKA,QAAM,OAAO,eAAe,OAAO,SAAS;AAE5C,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,0BAAsB;AAAA,MACtB,OAAO;AAAA,QACL,QAAQ;AAAA,QACR,QAAQ;AAAA,QACR,cAAc;AAAA,QACd,YAAY;AAAA,QACZ,OAAO;AAAA,QACP,YAAY;AAAA,QACZ,UAAU;AAAA,QACV,UAAU;AAAA,MACZ;AAAA,MAEA;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,cACL,QAAQ;AAAA,cACR,SAAS;AAAA,cACT,YAAY;AAAA,cACZ,YAAY;AAAA,YACd;AAAA,YAEC;AAAA;AAAA,QACH;AAAA,QACC,OAAO,SAAS,IAAI,oBAAC,kBAAe,QAAgB,IAAK;AAAA,QAC1D;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,cACL,QAAQ;AAAA,cACR,SAAS;AAAA,cACT,UAAU;AAAA,cACV,WAAW;AAAA,cACX,YAAY;AAAA,cACZ,WAAW;AAAA,YACb;AAAA,YAEC,wBAAc,UAAU;AAAA;AAAA,QAC3B;AAAA;AAAA;AAAA,EACF;AAEJ;AAIA,SAAS,eAAe,EAAE,OAAO,GAAmC;AAClE,SACE,oBAAC,QAAG,iCAA6B,MAC9B,iBAAO,IAAI,CAAC,OAAO,UAClB,oBAAC,QAAgB,gBAAM,WAAd,KAAsB,CAChC,GACH;AAEJ;AAQA,SAAS,cAAc,OAAwB;AAC7C,QAAM,OAAO,oBAAI,QAAgB;AACjC,MAAI;AACF,WAAO,KAAK;AAAA,MACV;AAAA,MACA,CAAC,MAAM,QAAQ;AACb,YAAI,OAAO,QAAQ,YAAY,QAAQ,MAAM;AAC3C,cAAI,KAAK,IAAI,GAAG,EAAG,QAAO;AAC1B,eAAK,IAAI,GAAG;AAAA,QACd;AACA,YAAI,OAAO,QAAQ,WAAY,QAAO,aAAa,IAAI,QAAQ,WAAW;AAC1E,YAAI,OAAO,QAAQ,YAAa,QAAO;AACvC,eAAO;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,EACF,SAAS,KAAK;AAKZ,UAAM,SAAS,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG;AAC9D,WAAO,qDAAgD,MAAM;AAAA,EAC/D;AACF;","names":[]}
1
+ {"version":3,"sources":["../src/debug-experience.tsx"],"sourcesContent":["/*\n * First-party debug panel. Renders the resolved Experience plan as pretty\n * JSON so a customer can see exactly what the SDK interpreted from the payload\n * — node tree, registrations, and resolved props.\n *\n * Two ways to use it:\n * - Auto-mounted by the renderers when `debug` is on (above the tree).\n * - Mounted manually anywhere: `<DebugExperience experience={plan} />`.\n *\n * v1 is just the JSON dump wrapped in a native <details> so it collapses\n * without any client JS (safe in server components). Room to grow into a\n * node-tree explorer and resolveData timing panel — kept\n * deliberately small for now.\n *\n * No React hooks here on purpose: it must render in both server and client\n * renderer subtrees.\n */\n\nimport type { ReactNode } from 'react';\n\nimport type { PortableRenderPlan } from '@contentful/experiences-sdk-core';\n\nexport interface DebugExperienceProps {\n /** The resolved plan to inspect (what a renderer receives as `experience`). */\n experience: PortableRenderPlan;\n /** Start expanded. Defaults to collapsed to stay out of the way. */\n defaultOpen?: boolean;\n /**\n * Resolve-time + render-time diagnostics for this render, merged by the\n * caller (`ServerExperienceRenderer` / `ClientExperienceRenderer`). Plain\n * `Error`s — the two cases that wrap a real caught exception\n * (`component-render-error`, `resolve-data-failed`) set `.cause` to the\n * original error, inspectable via `console.error` or `error.cause.stack`.\n * Defaults to `[]` for a manually-mounted `<DebugExperience>`.\n */\n errors?: Error[];\n}\n\nexport function DebugExperience({\n experience,\n defaultOpen = false,\n errors = [],\n}: DebugExperienceProps): ReactNode {\n const nodeCount = experience.nodes.length;\n // Coded Experience Templates are ordinary top-level nodes, so name them from\n // the node list — a composite Experience simply has none to report.\n const templateIds = experience.nodes\n .filter((node) => node.registration.kind === 'experienceTemplate')\n .map((node) => node.registration.id);\n const summary = `Experience debug — ${nodeCount} top-level node${nodeCount === 1 ? '' : 's'}${\n templateIds.length\n ? `, experience template${templateIds.length === 1 ? '' : 's'}: ${templateIds.join(', ')}`\n : ''\n }`;\n\n // Auto-expand whenever there's something to see, even if the caller didn't\n // explicitly ask — a beta customer shouldn't have to know to click into a\n // collapsed panel to discover that something went wrong.\n const open = defaultOpen || errors.length > 0;\n\n return (\n <details\n open={open}\n data-experiences-debug\n style={{\n margin: '1rem 0',\n border: '1px solid #6b7280',\n borderRadius: '6px',\n background: '#0b1021',\n color: '#e2e8f0',\n fontFamily: 'ui-monospace, SFMono-Regular, Menlo, monospace',\n fontSize: '0.75rem',\n overflow: 'hidden',\n }}\n >\n <summary\n style={{\n cursor: 'pointer',\n padding: '0.5rem 0.75rem',\n background: '#111827',\n userSelect: 'none',\n }}\n >\n {summary}\n </summary>\n {errors.length > 0 ? <DiagnosticList errors={errors} /> : null}\n <pre\n style={{\n margin: 0,\n padding: '0.75rem',\n overflow: 'auto',\n maxHeight: '32rem',\n whiteSpace: 'pre-wrap',\n wordBreak: 'break-word',\n }}\n >\n {safeStringify(experience)}\n </pre>\n </details>\n );\n}\n\n// Deliberately unstyled for now — this just needs to make the data visible,\n// not console-only. Visual treatment (grouping, color, counts) can grow later.\nfunction DiagnosticList({ errors }: { errors: Error[] }): ReactNode {\n return (\n <ul data-experiences-debug-errors>\n {errors.map((error, index) => (\n <li key={index}>{error.message}</li>\n ))}\n </ul>\n );\n}\n\n/**\n * JSON.stringify with a circular-reference guard. A resolved plan is plain\n * data, but a customer's `resolveData` could stash a non-serializable value on\n * `props.resolved` — degrade to a placeholder rather than throwing inside a\n * debug panel.\n */\nfunction safeStringify(value: unknown): string {\n const seen = new WeakSet<object>();\n try {\n return JSON.stringify(\n value,\n function (this: unknown, key, val) {\n // Delivery diagnostics can contain private upstream details. Keep them\n // on the plan for explicit inspection, outside automatic debug output.\n if (this === value && key === 'deliveryDiagnostics') return undefined;\n if (typeof val === 'object' && val !== null) {\n if (seen.has(val)) return '[Circular]';\n seen.add(val);\n }\n if (typeof val === 'function') return `[Function ${val.name || 'anonymous'}]`;\n if (typeof val === 'undefined') return '[undefined]';\n return val;\n },\n 2\n );\n } catch (err) {\n // `err` isn't guaranteed to be an Error — a getter deep in customer data\n // (a resolveData result, resolved design values) can `throw null` or\n // `throw 'reason'` during JSON.stringify's replacer walk, and this\n // fallback's whole job is to never throw itself.\n const reason = err instanceof Error ? err.message : String(err);\n return `[DebugExperience: could not serialize plan — ${reason}]`;\n }\n}\n"],"mappings":"AA6DI,SAcE,KAdF;AAvBG,SAAS,gBAAgB;AAAA,EAC9B;AAAA,EACA,cAAc;AAAA,EACd,SAAS,CAAC;AACZ,GAAoC;AAClC,QAAM,YAAY,WAAW,MAAM;AAGnC,QAAM,cAAc,WAAW,MAC5B,OAAO,CAAC,SAAS,KAAK,aAAa,SAAS,oBAAoB,EAChE,IAAI,CAAC,SAAS,KAAK,aAAa,EAAE;AACrC,QAAM,UAAU,2BAAsB,SAAS,kBAAkB,cAAc,IAAI,KAAK,GAAG,GACzF,YAAY,SACR,wBAAwB,YAAY,WAAW,IAAI,KAAK,GAAG,KAAK,YAAY,KAAK,IAAI,CAAC,KACtF,EACN;AAKA,QAAM,OAAO,eAAe,OAAO,SAAS;AAE5C,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,0BAAsB;AAAA,MACtB,OAAO;AAAA,QACL,QAAQ;AAAA,QACR,QAAQ;AAAA,QACR,cAAc;AAAA,QACd,YAAY;AAAA,QACZ,OAAO;AAAA,QACP,YAAY;AAAA,QACZ,UAAU;AAAA,QACV,UAAU;AAAA,MACZ;AAAA,MAEA;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,cACL,QAAQ;AAAA,cACR,SAAS;AAAA,cACT,YAAY;AAAA,cACZ,YAAY;AAAA,YACd;AAAA,YAEC;AAAA;AAAA,QACH;AAAA,QACC,OAAO,SAAS,IAAI,oBAAC,kBAAe,QAAgB,IAAK;AAAA,QAC1D;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,cACL,QAAQ;AAAA,cACR,SAAS;AAAA,cACT,UAAU;AAAA,cACV,WAAW;AAAA,cACX,YAAY;AAAA,cACZ,WAAW;AAAA,YACb;AAAA,YAEC,wBAAc,UAAU;AAAA;AAAA,QAC3B;AAAA;AAAA;AAAA,EACF;AAEJ;AAIA,SAAS,eAAe,EAAE,OAAO,GAAmC;AAClE,SACE,oBAAC,QAAG,iCAA6B,MAC9B,iBAAO,IAAI,CAAC,OAAO,UAClB,oBAAC,QAAgB,gBAAM,WAAd,KAAsB,CAChC,GACH;AAEJ;AAQA,SAAS,cAAc,OAAwB;AAC7C,QAAM,OAAO,oBAAI,QAAgB;AACjC,MAAI;AACF,WAAO,KAAK;AAAA,MACV;AAAA,MACA,SAAyB,KAAK,KAAK;AAGjC,YAAI,SAAS,SAAS,QAAQ,sBAAuB,QAAO;AAC5D,YAAI,OAAO,QAAQ,YAAY,QAAQ,MAAM;AAC3C,cAAI,KAAK,IAAI,GAAG,EAAG,QAAO;AAC1B,eAAK,IAAI,GAAG;AAAA,QACd;AACA,YAAI,OAAO,QAAQ,WAAY,QAAO,aAAa,IAAI,QAAQ,WAAW;AAC1E,YAAI,OAAO,QAAQ,YAAa,QAAO;AACvC,eAAO;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,EACF,SAAS,KAAK;AAKZ,UAAM,SAAS,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG;AAC9D,WAAO,qDAAgD,MAAM;AAAA,EAC/D;AACF;","names":[]}
package/dist/index.d.ts CHANGED
@@ -12,7 +12,7 @@ export { useContentfulComponent, useContentfulExperienceTemplate, useExperience
12
12
  export { useDesignValues } from './use-design-values.js';
13
13
  export { ToCssOptions, toCss } from './design-utils.js';
14
14
  export { ComponentConfig, Components, Config, ContentfulComponent, ContentfulExperienceTemplate, ExperienceTemplateConfig, ExperienceTemplateRegistration, ExperienceTemplates, Registration, defineComponent, defineExperienceTemplate, normalizeComponentRegistration, normalizeExperienceTemplateRegistration } from './types.js';
15
- export { ComponentNode, ComponentRef, DesignPropValue, DesignToken, ExperienceContext, ExperienceNode, ExperiencePayload, ExperienceSourceMap, ExperienceSys, ExperienceTemplateNode, ExperienceTemplateRef, ManualDesignValue, PortableRegistration, PortableRenderNode, PortableRenderPlan, RenderContext, ResolveContext, ResolveExperienceOptions, ResolveToken, ResolverConfig, TRACKING_CLICKABLE_ATTRIBUTE, TRACKING_SCOPES_ATTRIBUTE, TrackingAttributes, getTrackingAttributes, resolveExperience } from '@contentful/experiences-sdk-core';
15
+ export { ComponentNode, ComponentRef, DesignPropValue, DesignToken, ExperienceContext, ExperienceDeliveryDiagnostic, ExperienceNode, ExperiencePayload, ExperienceSourceMap, ExperienceSys, ExperienceTemplateNode, ExperienceTemplateRef, ManualDesignValue, PortableRegistration, PortableRenderNode, PortableRenderPlan, RenderContext, ResolveContext, ResolveExperienceOptions, ResolveToken, ResolverConfig, TRACKING_CLICKABLE_ATTRIBUTE, TRACKING_SCOPES_ATTRIBUTE, TrackingAttributes, getTrackingAttributes, resolveExperience } from '@contentful/experiences-sdk-core';
16
16
  export { ANONYMOUS_ID_COOKIE, ClickBuilderArgs, DEFAULT_PAGE_PROPERTIES, EventBuilder, EventBuilderConfig, FlagViewBuilderArgs, HoverBuilderArgs, IdentifyBuilderArgs, InteractionBuilderArgsBase, PageViewBuilderArgs, TrackBuilderArgs, UniversalEventBuilderArgs, ViewBuilderArgs } from '@contentful/experiences-runtime';
17
17
  export { CSS_PROPERTIES, isCssProperty, toCssKey } from '@contentful/experiences-design';
18
18
  export { ByDestinationNodeIdExperienceOptions, ByDestinationPathExperienceOptions, ByIdExperienceOptions, ClientOptions, ContentfulViewDelivery, ContentfulViewDeliveryClient, CreateClientOptions, DELIVERY_HOST, DestinationRedirectResult, DestinationSitemapResult, ExperienceFetchError, ExperienceOptions, ExperienceParameterOrder, ExperienceParameterRecord, ExperienceParameterValue, ExperienceParameters, ExperienceResponse, FetchDestinationSitemapOptions, FetchDestinationSitemapPaginationOptions, NotFoundError, PREVIEW_HOST, ResolveOptions, SitemapPathItem, createClient, fetchDestinationSitemap, fetchExperience, readSourceMap, toExperiencePayload, toExperiencePayloadFromDestination } from '@contentful/experiences-client';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/*\n * Public API surface for `@contentful/experiences-react`.\n *\n * Customers add ONLY this package to their app's dependencies. Everything\n * needed to render an Experience — types, the resolver, design utilities,\n * the renderer components, the authoring helpers — is re-exported from here.\n * The internal `@contentful/experiences-sdk-core` and\n * `@contentful/experiences-design` packages are workspace-only implementation\n * details; they are not part of the public API.\n *\n * `ExperienceRenderer` is an alias for `ClientExperienceRenderer`; SSR\n * consumers explicitly import `ServerExperienceRenderer`.\n */\n\n// ─── Renderers ─────────────────────────────────────────────────────────────\nexport {\n ClientExperienceRenderer as ExperienceRenderer,\n ClientExperienceRenderer,\n} from './client-renderer.js';\nexport type { ClientExperienceRendererProps as ExperienceRendererProps } from './client-renderer.js';\nexport type { ClientExperienceRendererProps } from './client-renderer.js';\n\nexport { ServerExperienceRenderer } from './server-renderer.js';\nexport type { ServerExperienceRendererProps } from './server-renderer.js';\n\nexport { MissingComponent } from './missing-component.js';\nexport type { MissingComponentProps } from './missing-component.js';\n\nexport { ComponentError } from './component-error.js';\nexport type { ComponentErrorProps } from './component-error.js';\n\nexport { DebugExperience } from './debug-experience.js';\nexport type { DebugExperienceProps } from './debug-experience.js';\n\nexport type { DiagnosticReporter, RenderError, RenderUnknown } from './nodes-renderer.js';\n\nexport { useLivePreviewExperience } from './use-live-preview-experience.js';\nexport type {\n UseLivePreviewExperienceOptions,\n UseLivePreviewExperienceResult,\n} from './use-live-preview-experience.js';\nexport { useLivePreview } from './use-live-preview.js';\nexport type { UseLivePreviewOptions, UseLivePreviewResult } from './use-live-preview.js';\n\nexport { useExperiencePlan } from './use-experience-plan.js';\nexport type {\n ExperiencePlanResolveOptions,\n UseExperiencePlanOptions,\n UseExperiencePlanResult,\n} from './use-experience-plan.js';\nexport type {\n LivePreviewClient,\n LivePreviewResult,\n PreviewSessionClientOptions,\n PreviewSessionExperienceOptions,\n PreviewSessionOptions,\n PreviewSessionResolveOptions,\n} from '@contentful/experiences-live-preview';\nexport {\n fetchPreviewSession,\n LivePreviewConnectionError,\n PREVIEW_WEBSOCKET_HOST,\n PreviewSessionFetchError,\n} from '@contentful/experiences-live-preview';\n\n// ─── Runtime context hooks ───────────────────────────────────────────────\nexport {\n useExperience,\n useContentfulComponent,\n useContentfulExperienceTemplate,\n} from './context.js';\nexport { useDesignValues } from './use-design-values.js';\nexport { toCss } from './design-utils.js';\nexport type { ToCssOptions } from './design-utils.js';\n\n// ─── Authoring helpers + Config types ─────────────────────────────────────\nexport {\n defineComponent,\n defineExperienceTemplate,\n normalizeComponentRegistration,\n normalizeExperienceTemplateRegistration,\n} from './types.js';\nexport type {\n ComponentConfig,\n Components,\n Config,\n ContentfulComponent,\n ContentfulExperienceTemplate,\n ExperienceTemplateConfig,\n ExperienceTemplateRegistration,\n ExperienceTemplates,\n Registration,\n RenderContext,\n ResolveToken,\n} from './types.js';\n\n// ─── Resolver (re-exported from render-core) ──────────────────────────────\nexport { resolveExperience } from '@contentful/experiences-sdk-core';\nexport {\n getTrackingAttributes,\n TRACKING_CLICKABLE_ATTRIBUTE,\n TRACKING_SCOPES_ATTRIBUTE,\n} from '@contentful/experiences-sdk-core';\nexport type { TrackingAttributes } from '@contentful/experiences-sdk-core';\nexport type { ResolverConfig, ResolveExperienceOptions } from '@contentful/experiences-sdk-core';\n\n// ─── Event builder (re-exported from runtime) ─────────────────────────────\nexport { DEFAULT_PAGE_PROPERTIES, EventBuilder } from '@contentful/experiences-runtime';\nexport type {\n ClickBuilderArgs,\n EventBuilderConfig,\n FlagViewBuilderArgs,\n HoverBuilderArgs,\n IdentifyBuilderArgs,\n InteractionBuilderArgsBase,\n PageViewBuilderArgs,\n TrackBuilderArgs,\n UniversalEventBuilderArgs,\n ViewBuilderArgs,\n} from '@contentful/experiences-runtime';\n\n// ─── Core IR + payload types (re-exported from render-core) ───────────────\nexport type {\n ComponentNode,\n ComponentRef,\n DesignPropValue,\n DesignToken,\n ExperienceContext,\n ExperienceNode,\n ExperiencePayload,\n ExperienceSourceMap,\n ExperienceSys,\n ExperienceTemplateNode,\n ExperienceTemplateRef,\n ManualDesignValue,\n PortableRegistration,\n PortableRenderNode,\n PortableRenderPlan,\n ResolveContext,\n} from '@contentful/experiences-sdk-core';\n\n// ─── Design utilities (re-exported from design) ───────────────────────────\nexport { CSS_PROPERTIES, isCssProperty, toCssKey } from '@contentful/experiences-design';\n\n// ─── Delivery client + fetchExperience ────────────────────────────────────\nexport {\n ContentfulViewDelivery,\n ContentfulViewDeliveryClient,\n DELIVERY_HOST,\n ExperienceFetchError,\n NotFoundError,\n PREVIEW_HOST,\n createClient,\n fetchExperience,\n fetchDestinationSitemap,\n readSourceMap,\n toExperiencePayload,\n toExperiencePayloadFromDestination,\n} from '@contentful/experiences-client';\nexport { ANONYMOUS_ID_COOKIE } from '@contentful/experiences-runtime';\nexport type {\n ByDestinationNodeIdExperienceOptions,\n ByDestinationPathExperienceOptions,\n ByIdExperienceOptions,\n ClientOptions,\n CreateClientOptions,\n DestinationRedirectResult,\n DestinationSitemapResult,\n ExperienceOptions,\n ExperienceParameters,\n ExperienceParameterValue,\n ExperienceParameterRecord,\n ExperienceParameterOrder,\n ExperienceResponse,\n FetchDestinationSitemapOptions,\n FetchDestinationSitemapPaginationOptions,\n ResolveOptions,\n SitemapPathItem,\n} from '@contentful/experiences-client';\n"],"mappings":"AAeA;AAAA,EAC8B;AAAA,EAC5B,4BAAAA;AAAA,OACK;AAIP,SAAS,gCAAgC;AAGzC,SAAS,wBAAwB;AAGjC,SAAS,sBAAsB;AAG/B,SAAS,uBAAuB;AAKhC,SAAS,gCAAgC;AAKzC,SAAS,sBAAsB;AAG/B,SAAS,yBAAyB;AAclC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,uBAAuB;AAChC,SAAS,aAAa;AAItB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAgBP,SAAS,yBAAyB;AAClC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAKP,SAAS,yBAAyB,oBAAoB;AAmCtD,SAAS,gBAAgB,eAAe,gBAAgB;AAGxD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,2BAA2B;","names":["ClientExperienceRenderer"]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/*\n * Public API surface for `@contentful/experiences-react`.\n *\n * Customers add ONLY this package to their app's dependencies. Everything\n * needed to render an Experience — types, the resolver, design utilities,\n * the renderer components, the authoring helpers — is re-exported from here.\n * The internal `@contentful/experiences-sdk-core` and\n * `@contentful/experiences-design` packages are workspace-only implementation\n * details; they are not part of the public API.\n *\n * `ExperienceRenderer` is an alias for `ClientExperienceRenderer`; SSR\n * consumers explicitly import `ServerExperienceRenderer`.\n */\n\n// ─── Renderers ─────────────────────────────────────────────────────────────\nexport {\n ClientExperienceRenderer as ExperienceRenderer,\n ClientExperienceRenderer,\n} from './client-renderer.js';\nexport type { ClientExperienceRendererProps as ExperienceRendererProps } from './client-renderer.js';\nexport type { ClientExperienceRendererProps } from './client-renderer.js';\n\nexport { ServerExperienceRenderer } from './server-renderer.js';\nexport type { ServerExperienceRendererProps } from './server-renderer.js';\n\nexport { MissingComponent } from './missing-component.js';\nexport type { MissingComponentProps } from './missing-component.js';\n\nexport { ComponentError } from './component-error.js';\nexport type { ComponentErrorProps } from './component-error.js';\n\nexport { DebugExperience } from './debug-experience.js';\nexport type { DebugExperienceProps } from './debug-experience.js';\n\nexport type { DiagnosticReporter, RenderError, RenderUnknown } from './nodes-renderer.js';\n\nexport { useLivePreviewExperience } from './use-live-preview-experience.js';\nexport type {\n UseLivePreviewExperienceOptions,\n UseLivePreviewExperienceResult,\n} from './use-live-preview-experience.js';\nexport { useLivePreview } from './use-live-preview.js';\nexport type { UseLivePreviewOptions, UseLivePreviewResult } from './use-live-preview.js';\n\nexport { useExperiencePlan } from './use-experience-plan.js';\nexport type {\n ExperiencePlanResolveOptions,\n UseExperiencePlanOptions,\n UseExperiencePlanResult,\n} from './use-experience-plan.js';\nexport type {\n LivePreviewClient,\n LivePreviewResult,\n PreviewSessionClientOptions,\n PreviewSessionExperienceOptions,\n PreviewSessionOptions,\n PreviewSessionResolveOptions,\n} from '@contentful/experiences-live-preview';\nexport {\n fetchPreviewSession,\n LivePreviewConnectionError,\n PREVIEW_WEBSOCKET_HOST,\n PreviewSessionFetchError,\n} from '@contentful/experiences-live-preview';\n\n// ─── Runtime context hooks ───────────────────────────────────────────────\nexport {\n useExperience,\n useContentfulComponent,\n useContentfulExperienceTemplate,\n} from './context.js';\nexport { useDesignValues } from './use-design-values.js';\nexport { toCss } from './design-utils.js';\nexport type { ToCssOptions } from './design-utils.js';\n\n// ─── Authoring helpers + Config types ─────────────────────────────────────\nexport {\n defineComponent,\n defineExperienceTemplate,\n normalizeComponentRegistration,\n normalizeExperienceTemplateRegistration,\n} from './types.js';\nexport type {\n ComponentConfig,\n Components,\n Config,\n ContentfulComponent,\n ContentfulExperienceTemplate,\n ExperienceTemplateConfig,\n ExperienceTemplateRegistration,\n ExperienceTemplates,\n Registration,\n RenderContext,\n ResolveToken,\n} from './types.js';\n\n// ─── Resolver (re-exported from render-core) ──────────────────────────────\nexport { resolveExperience } from '@contentful/experiences-sdk-core';\nexport {\n getTrackingAttributes,\n TRACKING_CLICKABLE_ATTRIBUTE,\n TRACKING_SCOPES_ATTRIBUTE,\n} from '@contentful/experiences-sdk-core';\nexport type { TrackingAttributes } from '@contentful/experiences-sdk-core';\nexport type { ResolverConfig, ResolveExperienceOptions } from '@contentful/experiences-sdk-core';\n\n// ─── Event builder (re-exported from runtime) ─────────────────────────────\nexport { DEFAULT_PAGE_PROPERTIES, EventBuilder } from '@contentful/experiences-runtime';\nexport type {\n ClickBuilderArgs,\n EventBuilderConfig,\n FlagViewBuilderArgs,\n HoverBuilderArgs,\n IdentifyBuilderArgs,\n InteractionBuilderArgsBase,\n PageViewBuilderArgs,\n TrackBuilderArgs,\n UniversalEventBuilderArgs,\n ViewBuilderArgs,\n} from '@contentful/experiences-runtime';\n\n// ─── Core IR + payload types (re-exported from render-core) ───────────────\nexport type {\n ComponentNode,\n ComponentRef,\n DesignPropValue,\n DesignToken,\n ExperienceContext,\n ExperienceDeliveryDiagnostic,\n ExperienceNode,\n ExperiencePayload,\n ExperienceSourceMap,\n ExperienceSys,\n ExperienceTemplateNode,\n ExperienceTemplateRef,\n ManualDesignValue,\n PortableRegistration,\n PortableRenderNode,\n PortableRenderPlan,\n ResolveContext,\n} from '@contentful/experiences-sdk-core';\n\n// ─── Design utilities (re-exported from design) ───────────────────────────\nexport { CSS_PROPERTIES, isCssProperty, toCssKey } from '@contentful/experiences-design';\n\n// ─── Delivery client + fetchExperience ────────────────────────────────────\nexport {\n ContentfulViewDelivery,\n ContentfulViewDeliveryClient,\n DELIVERY_HOST,\n ExperienceFetchError,\n NotFoundError,\n PREVIEW_HOST,\n createClient,\n fetchExperience,\n fetchDestinationSitemap,\n readSourceMap,\n toExperiencePayload,\n toExperiencePayloadFromDestination,\n} from '@contentful/experiences-client';\nexport { ANONYMOUS_ID_COOKIE } from '@contentful/experiences-runtime';\nexport type {\n ByDestinationNodeIdExperienceOptions,\n ByDestinationPathExperienceOptions,\n ByIdExperienceOptions,\n ClientOptions,\n CreateClientOptions,\n DestinationRedirectResult,\n DestinationSitemapResult,\n ExperienceOptions,\n ExperienceParameters,\n ExperienceParameterValue,\n ExperienceParameterRecord,\n ExperienceParameterOrder,\n ExperienceResponse,\n FetchDestinationSitemapOptions,\n FetchDestinationSitemapPaginationOptions,\n ResolveOptions,\n SitemapPathItem,\n} from '@contentful/experiences-client';\n"],"mappings":"AAeA;AAAA,EAC8B;AAAA,EAC5B,4BAAAA;AAAA,OACK;AAIP,SAAS,gCAAgC;AAGzC,SAAS,wBAAwB;AAGjC,SAAS,sBAAsB;AAG/B,SAAS,uBAAuB;AAKhC,SAAS,gCAAgC;AAKzC,SAAS,sBAAsB;AAG/B,SAAS,yBAAyB;AAclC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,uBAAuB;AAChC,SAAS,aAAa;AAItB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAgBP,SAAS,yBAAyB;AAClC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAKP,SAAS,yBAAyB,oBAAoB;AAoCtD,SAAS,gBAAgB,eAAe,gBAAgB;AAGxD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,2BAA2B;","names":["ClientExperienceRenderer"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experiences-react",
3
- "version": "0.14.4",
3
+ "version": "0.14.6",
4
4
  "description": "React adapter for Contentful Experiences — Server and Client renderers over a PortableRenderPlan",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -30,11 +30,11 @@
30
30
  "directory": "packages/adapter-react"
31
31
  },
32
32
  "dependencies": {
33
- "@contentful/experiences-client": "0.10.4",
34
- "@contentful/experiences-runtime": "0.2.4",
35
- "@contentful/experiences-sdk-core": "0.13.3",
36
- "@contentful/experiences-design": "0.13.3",
37
- "@contentful/experiences-live-preview": "0.7.4"
33
+ "@contentful/experiences-client": "0.10.6",
34
+ "@contentful/experiences-runtime": "0.2.6",
35
+ "@contentful/experiences-sdk-core": "0.13.5",
36
+ "@contentful/experiences-design": "0.13.4",
37
+ "@contentful/experiences-live-preview": "0.7.6"
38
38
  },
39
39
  "devDependencies": {
40
40
  "jsdom": "^30.0.1"