@appfunnel-dev/sdk 2.0.0-canary.5 → 2.0.0-canary.7

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/index.d.cts CHANGED
@@ -1,10 +1,10 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, ComponentType, ButtonHTMLAttributes } from 'react';
3
- import { V as VariableValue, a as VariableConfig, A as Acquisition, P as Product, D as Direction, F as FunnelContext, R as RuntimeExperiment, b as FunnelSnapshot, c as FunnelDefinition, d as buildContext, e as ProductInput, f as PageMeta, g as PageContext } from './manifest-Dl7faaKe.cjs';
4
- export { B as BrowserContext, h as BuildContextOptions, C as ClickIdContext, i as CompileInput, j as Condition, k as ConditionOp, l as DeviceContext, E as EdgeCondition, m as ExperimentIssue, n as ExperimentResolution, o as ExperimentValidation, p as ExperimentVariant, q as FlowPage, r as FunnelLocales, s as FunnelManifest, G as Gate, I as IdentityContext, t as Interval, L as LocaleContext, M as ManifestEdge, u as ManifestPage, v as ManifestValidation, w as Money, O as OsContext, x as PageType, y as Predicate, z as ResolvedProduct, H as Route, S as SessionContext, J as SystemContext, U as UtmContext, K as assignVariant, N as bucketingSeed, Q as buildAcquisition, T as buildCatalog, W as compileManifest, X as currencyExponent, Y as defineFunnel, Z as definePage, _ as entryGuard, $ as evaluateCondition, a0 as evaluateGate, a1 as expectedPathLength, a2 as fnv1a, a3 as formatMoney, a4 as formatProduct, a5 as hashToUnit, a6 as isRtl, a7 as isVariantKey, a8 as nextPage, a9 as outgoingKeys, aa as pageMeta, ab as parseSlotKey, ac as pickByWeight, ad as resolveExperiments, ae as resolveLocale, af as resolveProduct, ag as resolveRoute, ah as validateExperiments } from './manifest-Dl7faaKe.cjs';
3
+ import { V as VariableValue, a as VariableConfig, A as Acquisition, O as Offering, D as Direction, F as FunnelContext, R as RuntimeExperiment, b as FunnelSnapshot, c as FunnelDefinition, d as buildContext, e as OfferingInput, P as PageMeta, f as PageContext } from './manifest-CMe8yVkr.cjs';
4
+ export { B as BrowserContext, g as BuildContextOptions, C as ClickIdContext, h as CompileInput, i as Condition, j as ConditionOp, k as DeviceContext, E as EdgeCondition, l as ExperimentArm, m as ExperimentResolution, n as FlowPage, o as FunnelLocales, p as FunnelManifest, G as Gate, I as IdentityContext, q as Interval, L as LocaleContext, M as ManifestEdge, r as ManifestPage, s as ManifestValidation, t as Money, u as OsContext, v as PageType, w as Predicate, x as ResolvedOffering, y as Route, S as SessionContext, z as SystemContext, U as UtmContext, H as assignVariant, J as bucketingSeed, K as buildAcquisition, N as buildCatalog, Q as compileManifest, T as currencyExponent, W as defineFunnel, X as definePage, Y as entryGuard, Z as evaluateCondition, _ as evaluateGate, $ as expectedPathLength, a0 as fnv1a, a1 as formatMoney, a2 as formatOffering, a3 as hashToUnit, a4 as isRtl, a5 as isVariantKey, a6 as nextPage, a7 as outgoingKeys, a8 as pageMeta, a9 as parseSlotKey, aa as pickByWeight, ab as resolveExperiments, ac as resolveLocale, ad as resolveOffering, ae as resolveRoute } from './manifest-CMe8yVkr.cjs';
5
5
  import { NavSnapshot } from './protocol.cjs';
6
- import { a as CheckoutDriver, C as CheckoutDriverContext } from './checkout-Dz8cGkB_.cjs';
7
- export { b as Checkout, c as CheckoutCallbacks, d as CheckoutHandle, e as CheckoutProps, f as CheckoutRequest, g as CheckoutResult, h as CheckoutResume, i as CheckoutStatus, F as FailureModalProps, j as FailureRoute, M as MockDriverOptions, O as OnFailedMap, U as Upsell, k as UpsellProps, l as UseCheckoutOptions, m as createMockDriver, n as driverWithEmail, u as useCheckout } from './checkout-Dz8cGkB_.cjs';
6
+ import { a as CheckoutDriver, C as CheckoutDriverContext } from './checkout-CMEdxpgo.cjs';
7
+ export { b as Checkout, c as CheckoutCallbacks, d as CheckoutHandle, e as CheckoutProps, f as CheckoutRequest, g as CheckoutResult, h as CheckoutResume, i as CheckoutStatus, F as FailureModalProps, j as FailureRoute, M as MockDriverOptions, O as OnFailedMap, U as Upsell, k as UpsellProps, l as UseCheckoutOptions, m as createMockDriver, n as driverWithEmail, u as useCheckout } from './checkout-CMEdxpgo.cjs';
8
8
  import { ToasterProps } from 'sonner';
9
9
  export { ToasterProps, toast } from 'sonner';
10
10
  export { C as CheckoutError, a as CheckoutErrorCategory, b as CheckoutIntent, c as CheckoutProvider, d as CheckoutSurface, I as INLINE_SURFACES, O as OffSessionReliability, P as PROVIDER_PROFILES, e as ProviderProfile, S as SurfaceCapability, U as UpsellKind, V as ValidationResult, f as checkoutError, i as isInlineSurface, g as isMerchantOfRecord, h as isOrchestrator, s as surfacesFor, v as validateCheckout, j as validateUpsell } from './capabilities-7_hy5f5G.cjs';
@@ -237,7 +237,7 @@ interface NavigationControl {
237
237
  * The public `window.appfunnel` surface — subscribe + read + drive the flow. It never
238
238
  * exposes `emit` (no forged events) or `setVariable` (state stays funnel-owned).
239
239
  */
240
- interface AppFunnelBusApi extends BusAccessors {
240
+ interface AppfunnelBusApi extends BusAccessors {
241
241
  /** Subscribe to an event (or `'*'` for all). Returns an unsubscribe fn. */
242
242
  on(event: string, cb: Listener): () => void;
243
243
  off(event: string, cb: Listener): void;
@@ -253,10 +253,10 @@ interface AppFunnelBusApi extends BusAccessors {
253
253
  navigation(): NavSnapshot | null;
254
254
  }
255
255
  /**
256
- * The internal bus: the public {@link AppFunnelBusApi} plus `emit` (SDK-only) and
257
- * `now` injection. The SDK holds this; only {@link AppFunnelBusApi} reaches `window`.
256
+ * The internal bus: the public {@link AppfunnelBusApi} plus `emit` (SDK-only) and
257
+ * `now` injection. The SDK holds this; only {@link AppfunnelBusApi} reaches `window`.
258
258
  */
259
- interface FunnelBus extends AppFunnelBusApi {
259
+ interface FunnelBus extends AppfunnelBusApi {
260
260
  emit(event: string, data?: unknown): void;
261
261
  /** SDK-only: a mounted `<FunnelView>` registers its flow control; returns an unregister fn. */
262
262
  registerNavigation(nav: NavigationControl): () => void;
@@ -271,7 +271,7 @@ declare function createBus(accessors: BusAccessors, now?: () => number): FunnelB
271
271
  declare function withBus(tracker: Tracker, bus: FunnelBus): Tracker;
272
272
  declare global {
273
273
  interface Window {
274
- appfunnel?: AppFunnelBusApi;
274
+ appfunnel?: AppfunnelBusApi;
275
275
  }
276
276
  }
277
277
  /**
@@ -281,30 +281,30 @@ declare global {
281
281
  declare function attachBus(bus: FunnelBus): () => void;
282
282
 
283
283
  /**
284
- * v2 `products` — the **read-only** product catalog.
284
+ * v2 `offerings` — the **read-only** offering catalog.
285
285
  *
286
- * **AppFunnel does not manage currency.** Multi-currency is entirely the payment
286
+ * **Appfunnel does not manage currency.** Multi-currency is entirely the payment
287
287
  * provider's job: the provider (or its preview API) resolves the visitor's price,
288
- * and we receive a single resolved `{ amount, currency }` per product. No FX, no
288
+ * and we receive a single resolved `{ amount, currency }` per offering. No FX, no
289
289
  * currency selection, no conversion on our side. (FX appears only for frozen-USD
290
290
  * *reporting*, never display — phase-3 §3.6b.) A provider that doesn't localize
291
291
  * simply gives one currency.
292
292
  *
293
- * Our only job is **display**: pick the product by logical id and **format** its
293
+ * Our only job is **display**: pick the offering by logical id and **format** its
294
294
  * amount. Formatting happens at read time in the funnel's **active locale** (so
295
295
  * switching language reformats `kr 79,00` ⇄ `$9.99`), while the **currency** is
296
296
  * whatever the provider resolved. Currency selection is the platform's; the
297
- * authoring funnel only ever names a product id.
297
+ * authoring funnel only ever names an offering id.
298
298
  *
299
299
  * The math itself (resolve/format/exponents) is pure and lives in {@link ./money}
300
300
  * so the server/tooling entry can use it without React — this module re-exports
301
301
  * it and adds the React wiring (provider + hooks).
302
302
  */
303
303
 
304
- /** `useProduct('monthly')` — one product, formatted in the active locale. */
305
- declare function useProduct(id: string | undefined): Product | undefined;
306
- /** `useProducts()` — every product, formatted in the active locale, in order. */
307
- declare function useProducts(): Product[];
304
+ /** `useOffering('monthly')` — one offering, formatted in the active locale. */
305
+ declare function useOffering(id: string | undefined): Offering | undefined;
306
+ /** `useOfferings()` — every offering, formatted in the active locale, in order. */
307
+ declare function useOfferings(): Offering[];
308
308
 
309
309
  /**
310
310
  * v2 localization — translated **text** (prices already localize via `Intl` in
@@ -447,8 +447,8 @@ interface FunnelProviderProps {
447
447
  tracker?: Tracker;
448
448
  /** Computed-context seed (funnel id, test/live mode, server-hydrated utm/session). */
449
449
  context?: Parameters<typeof buildContext>[0];
450
- /** Products with their provider-resolved price (`{ amount, currency }`). */
451
- products?: ProductInput[];
450
+ /** Offerings with their provider-resolved price (`{ amount, currency }`). */
451
+ offerings?: OfferingInput[];
452
452
  /** Live page-level experiment records, platform/DB-sourced (not authored in funnel code). */
453
453
  experiments?: RuntimeExperiment[];
454
454
  /** The platform checkout driver; defaults to a mock that resolves successfully. */
@@ -467,7 +467,7 @@ interface FunnelProviderProps {
467
467
  * Mounts a funnel: builds the writable {@link VariableStore} + the read-only
468
468
  * {@link FunnelContext} (once) and provides the runtime to the tree via hooks.
469
469
  */
470
- declare function FunnelProvider({ config, sessionValues, deferSessionValues, tracker, context: contextOpts, products, experiments, checkout, messages, locale: localeOverride, toaster, store, children, }: FunnelProviderProps): ReactNode;
470
+ declare function FunnelProvider({ config, sessionValues, deferSessionValues, tracker, context: contextOpts, offerings, experiments, checkout, messages, locale: localeOverride, toaster, store, children, }: FunnelProviderProps): ReactNode;
471
471
  /**
472
472
  * The imperative handle. Does **not** subscribe — use it in event handlers and
473
473
  * effects (`useFunnel().responses.set({...})`). For reactive reads use the hooks.
@@ -638,8 +638,8 @@ declare function useAssets(): Record<string, string>;
638
638
  declare function useAsset(name: string): string | undefined;
639
639
  /** What the renderer injects when mounting a funnel build (SSR and hydration). */
640
640
  interface MountOpts {
641
- /** Platform-resolved product prices (one currency per visitor). */
642
- products?: ProductInput[];
641
+ /** Platform-resolved offering prices (one currency per visitor). */
642
+ offerings?: OfferingInput[];
643
643
  /** Explicit locale override (URL/param/geo); wins over the detected device locale. */
644
644
  locale?: string;
645
645
  mode?: 'test' | 'live';
@@ -1082,4 +1082,4 @@ interface ScriptProps {
1082
1082
  */
1083
1083
  declare function Script({ src, strategy, id, async, defer, nonce, attributes, onLoad, onError, }: ScriptProps): null;
1084
1084
 
1085
- export { Acquisition, type AppFunnelBusApi, AssetsContext, AssetsProvider, Back, type BackProps, type BusAccessors, type BusEvent, type CatalogEvent, CheckoutDriver, CheckoutDriverContext, Choice, type ChoiceOption, type ChoiceProps, type CreateFunnelTreeInput, Direction, EVENT_CATALOG, type EventMeta, type EventSource, type Formatters, type Funnel, type FunnelBus, FunnelContext, FunnelDefinition, type FunnelEventDataMap, FunnelProvider, type FunnelProviderProps, FunnelSnapshot, FunnelToaster, FunnelView, type KnownFunnelEvent, type MessageCatalog, Modal, type ModalHandler, type ModalHocProps, type ModalProps, type ModalState, type MountModule, type MountOpts, Namespace, type NavigationState, Next, type NextProps, PageContext, PageMeta, type PageModule, type PlatformTrackingConfig, type PluralCategory, Product, ProductInput, RuntimeExperiment, type RuntimePage, Script, type ScriptProps, Sheet, type SheetProps, type SheetSide, type TFunction, type Tracker, type Translation, VariableStore, attachBus, buildContext, createBus, createConsoleTracker, createFunnelStore, createFunnelTree, createPlatformTracker, defineModal, hideModal, integrationEvents, isIntegrationEvent, isTrackableEvent, newEventId, registerModal, removeModal, showModal, unregisterModal, useActiveLocale, useAsset, useAssets, useClickIds, useContextValue, useData, useDevice, useExperiment, useField, useFunnel, useLocale, useModal, useNavigation, usePage, useProduct, useProducts, useResponse, useSystem, useTracker, useTranslation, useUserAttribute, useUtm, withBus };
1085
+ export { Acquisition, type AppfunnelBusApi, AssetsContext, AssetsProvider, Back, type BackProps, type BusAccessors, type BusEvent, type CatalogEvent, CheckoutDriver, CheckoutDriverContext, Choice, type ChoiceOption, type ChoiceProps, type CreateFunnelTreeInput, Direction, EVENT_CATALOG, type EventMeta, type EventSource, type Formatters, type Funnel, type FunnelBus, FunnelContext, FunnelDefinition, type FunnelEventDataMap, FunnelProvider, type FunnelProviderProps, FunnelSnapshot, FunnelToaster, FunnelView, type KnownFunnelEvent, type MessageCatalog, Modal, type ModalHandler, type ModalHocProps, type ModalProps, type ModalState, type MountModule, type MountOpts, Namespace, type NavigationState, Next, type NextProps, Offering, OfferingInput, PageContext, PageMeta, type PageModule, type PlatformTrackingConfig, type PluralCategory, RuntimeExperiment, type RuntimePage, Script, type ScriptProps, Sheet, type SheetProps, type SheetSide, type TFunction, type Tracker, type Translation, VariableStore, attachBus, buildContext, createBus, createConsoleTracker, createFunnelStore, createFunnelTree, createPlatformTracker, defineModal, hideModal, integrationEvents, isIntegrationEvent, isTrackableEvent, newEventId, registerModal, removeModal, showModal, unregisterModal, useActiveLocale, useAsset, useAssets, useClickIds, useContextValue, useData, useDevice, useExperiment, useField, useFunnel, useLocale, useModal, useNavigation, useOffering, useOfferings, usePage, useResponse, useSystem, useTracker, useTranslation, useUserAttribute, useUtm, withBus };
package/dist/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, ComponentType, ButtonHTMLAttributes } from 'react';
3
- import { V as VariableValue, a as VariableConfig, A as Acquisition, P as Product, D as Direction, F as FunnelContext, R as RuntimeExperiment, b as FunnelSnapshot, c as FunnelDefinition, d as buildContext, e as ProductInput, f as PageMeta, g as PageContext } from './manifest-Dl7faaKe.js';
4
- export { B as BrowserContext, h as BuildContextOptions, C as ClickIdContext, i as CompileInput, j as Condition, k as ConditionOp, l as DeviceContext, E as EdgeCondition, m as ExperimentIssue, n as ExperimentResolution, o as ExperimentValidation, p as ExperimentVariant, q as FlowPage, r as FunnelLocales, s as FunnelManifest, G as Gate, I as IdentityContext, t as Interval, L as LocaleContext, M as ManifestEdge, u as ManifestPage, v as ManifestValidation, w as Money, O as OsContext, x as PageType, y as Predicate, z as ResolvedProduct, H as Route, S as SessionContext, J as SystemContext, U as UtmContext, K as assignVariant, N as bucketingSeed, Q as buildAcquisition, T as buildCatalog, W as compileManifest, X as currencyExponent, Y as defineFunnel, Z as definePage, _ as entryGuard, $ as evaluateCondition, a0 as evaluateGate, a1 as expectedPathLength, a2 as fnv1a, a3 as formatMoney, a4 as formatProduct, a5 as hashToUnit, a6 as isRtl, a7 as isVariantKey, a8 as nextPage, a9 as outgoingKeys, aa as pageMeta, ab as parseSlotKey, ac as pickByWeight, ad as resolveExperiments, ae as resolveLocale, af as resolveProduct, ag as resolveRoute, ah as validateExperiments } from './manifest-Dl7faaKe.js';
3
+ import { V as VariableValue, a as VariableConfig, A as Acquisition, O as Offering, D as Direction, F as FunnelContext, R as RuntimeExperiment, b as FunnelSnapshot, c as FunnelDefinition, d as buildContext, e as OfferingInput, P as PageMeta, f as PageContext } from './manifest-CMe8yVkr.js';
4
+ export { B as BrowserContext, g as BuildContextOptions, C as ClickIdContext, h as CompileInput, i as Condition, j as ConditionOp, k as DeviceContext, E as EdgeCondition, l as ExperimentArm, m as ExperimentResolution, n as FlowPage, o as FunnelLocales, p as FunnelManifest, G as Gate, I as IdentityContext, q as Interval, L as LocaleContext, M as ManifestEdge, r as ManifestPage, s as ManifestValidation, t as Money, u as OsContext, v as PageType, w as Predicate, x as ResolvedOffering, y as Route, S as SessionContext, z as SystemContext, U as UtmContext, H as assignVariant, J as bucketingSeed, K as buildAcquisition, N as buildCatalog, Q as compileManifest, T as currencyExponent, W as defineFunnel, X as definePage, Y as entryGuard, Z as evaluateCondition, _ as evaluateGate, $ as expectedPathLength, a0 as fnv1a, a1 as formatMoney, a2 as formatOffering, a3 as hashToUnit, a4 as isRtl, a5 as isVariantKey, a6 as nextPage, a7 as outgoingKeys, a8 as pageMeta, a9 as parseSlotKey, aa as pickByWeight, ab as resolveExperiments, ac as resolveLocale, ad as resolveOffering, ae as resolveRoute } from './manifest-CMe8yVkr.js';
5
5
  import { NavSnapshot } from './protocol.js';
6
- import { a as CheckoutDriver, C as CheckoutDriverContext } from './checkout-7Dy6IedP.js';
7
- export { b as Checkout, c as CheckoutCallbacks, d as CheckoutHandle, e as CheckoutProps, f as CheckoutRequest, g as CheckoutResult, h as CheckoutResume, i as CheckoutStatus, F as FailureModalProps, j as FailureRoute, M as MockDriverOptions, O as OnFailedMap, U as Upsell, k as UpsellProps, l as UseCheckoutOptions, m as createMockDriver, n as driverWithEmail, u as useCheckout } from './checkout-7Dy6IedP.js';
6
+ import { a as CheckoutDriver, C as CheckoutDriverContext } from './checkout-D1NUPv4p.js';
7
+ export { b as Checkout, c as CheckoutCallbacks, d as CheckoutHandle, e as CheckoutProps, f as CheckoutRequest, g as CheckoutResult, h as CheckoutResume, i as CheckoutStatus, F as FailureModalProps, j as FailureRoute, M as MockDriverOptions, O as OnFailedMap, U as Upsell, k as UpsellProps, l as UseCheckoutOptions, m as createMockDriver, n as driverWithEmail, u as useCheckout } from './checkout-D1NUPv4p.js';
8
8
  import { ToasterProps } from 'sonner';
9
9
  export { ToasterProps, toast } from 'sonner';
10
10
  export { C as CheckoutError, a as CheckoutErrorCategory, b as CheckoutIntent, c as CheckoutProvider, d as CheckoutSurface, I as INLINE_SURFACES, O as OffSessionReliability, P as PROVIDER_PROFILES, e as ProviderProfile, S as SurfaceCapability, U as UpsellKind, V as ValidationResult, f as checkoutError, i as isInlineSurface, g as isMerchantOfRecord, h as isOrchestrator, s as surfacesFor, v as validateCheckout, j as validateUpsell } from './capabilities-7_hy5f5G.js';
@@ -237,7 +237,7 @@ interface NavigationControl {
237
237
  * The public `window.appfunnel` surface — subscribe + read + drive the flow. It never
238
238
  * exposes `emit` (no forged events) or `setVariable` (state stays funnel-owned).
239
239
  */
240
- interface AppFunnelBusApi extends BusAccessors {
240
+ interface AppfunnelBusApi extends BusAccessors {
241
241
  /** Subscribe to an event (or `'*'` for all). Returns an unsubscribe fn. */
242
242
  on(event: string, cb: Listener): () => void;
243
243
  off(event: string, cb: Listener): void;
@@ -253,10 +253,10 @@ interface AppFunnelBusApi extends BusAccessors {
253
253
  navigation(): NavSnapshot | null;
254
254
  }
255
255
  /**
256
- * The internal bus: the public {@link AppFunnelBusApi} plus `emit` (SDK-only) and
257
- * `now` injection. The SDK holds this; only {@link AppFunnelBusApi} reaches `window`.
256
+ * The internal bus: the public {@link AppfunnelBusApi} plus `emit` (SDK-only) and
257
+ * `now` injection. The SDK holds this; only {@link AppfunnelBusApi} reaches `window`.
258
258
  */
259
- interface FunnelBus extends AppFunnelBusApi {
259
+ interface FunnelBus extends AppfunnelBusApi {
260
260
  emit(event: string, data?: unknown): void;
261
261
  /** SDK-only: a mounted `<FunnelView>` registers its flow control; returns an unregister fn. */
262
262
  registerNavigation(nav: NavigationControl): () => void;
@@ -271,7 +271,7 @@ declare function createBus(accessors: BusAccessors, now?: () => number): FunnelB
271
271
  declare function withBus(tracker: Tracker, bus: FunnelBus): Tracker;
272
272
  declare global {
273
273
  interface Window {
274
- appfunnel?: AppFunnelBusApi;
274
+ appfunnel?: AppfunnelBusApi;
275
275
  }
276
276
  }
277
277
  /**
@@ -281,30 +281,30 @@ declare global {
281
281
  declare function attachBus(bus: FunnelBus): () => void;
282
282
 
283
283
  /**
284
- * v2 `products` — the **read-only** product catalog.
284
+ * v2 `offerings` — the **read-only** offering catalog.
285
285
  *
286
- * **AppFunnel does not manage currency.** Multi-currency is entirely the payment
286
+ * **Appfunnel does not manage currency.** Multi-currency is entirely the payment
287
287
  * provider's job: the provider (or its preview API) resolves the visitor's price,
288
- * and we receive a single resolved `{ amount, currency }` per product. No FX, no
288
+ * and we receive a single resolved `{ amount, currency }` per offering. No FX, no
289
289
  * currency selection, no conversion on our side. (FX appears only for frozen-USD
290
290
  * *reporting*, never display — phase-3 §3.6b.) A provider that doesn't localize
291
291
  * simply gives one currency.
292
292
  *
293
- * Our only job is **display**: pick the product by logical id and **format** its
293
+ * Our only job is **display**: pick the offering by logical id and **format** its
294
294
  * amount. Formatting happens at read time in the funnel's **active locale** (so
295
295
  * switching language reformats `kr 79,00` ⇄ `$9.99`), while the **currency** is
296
296
  * whatever the provider resolved. Currency selection is the platform's; the
297
- * authoring funnel only ever names a product id.
297
+ * authoring funnel only ever names an offering id.
298
298
  *
299
299
  * The math itself (resolve/format/exponents) is pure and lives in {@link ./money}
300
300
  * so the server/tooling entry can use it without React — this module re-exports
301
301
  * it and adds the React wiring (provider + hooks).
302
302
  */
303
303
 
304
- /** `useProduct('monthly')` — one product, formatted in the active locale. */
305
- declare function useProduct(id: string | undefined): Product | undefined;
306
- /** `useProducts()` — every product, formatted in the active locale, in order. */
307
- declare function useProducts(): Product[];
304
+ /** `useOffering('monthly')` — one offering, formatted in the active locale. */
305
+ declare function useOffering(id: string | undefined): Offering | undefined;
306
+ /** `useOfferings()` — every offering, formatted in the active locale, in order. */
307
+ declare function useOfferings(): Offering[];
308
308
 
309
309
  /**
310
310
  * v2 localization — translated **text** (prices already localize via `Intl` in
@@ -447,8 +447,8 @@ interface FunnelProviderProps {
447
447
  tracker?: Tracker;
448
448
  /** Computed-context seed (funnel id, test/live mode, server-hydrated utm/session). */
449
449
  context?: Parameters<typeof buildContext>[0];
450
- /** Products with their provider-resolved price (`{ amount, currency }`). */
451
- products?: ProductInput[];
450
+ /** Offerings with their provider-resolved price (`{ amount, currency }`). */
451
+ offerings?: OfferingInput[];
452
452
  /** Live page-level experiment records, platform/DB-sourced (not authored in funnel code). */
453
453
  experiments?: RuntimeExperiment[];
454
454
  /** The platform checkout driver; defaults to a mock that resolves successfully. */
@@ -467,7 +467,7 @@ interface FunnelProviderProps {
467
467
  * Mounts a funnel: builds the writable {@link VariableStore} + the read-only
468
468
  * {@link FunnelContext} (once) and provides the runtime to the tree via hooks.
469
469
  */
470
- declare function FunnelProvider({ config, sessionValues, deferSessionValues, tracker, context: contextOpts, products, experiments, checkout, messages, locale: localeOverride, toaster, store, children, }: FunnelProviderProps): ReactNode;
470
+ declare function FunnelProvider({ config, sessionValues, deferSessionValues, tracker, context: contextOpts, offerings, experiments, checkout, messages, locale: localeOverride, toaster, store, children, }: FunnelProviderProps): ReactNode;
471
471
  /**
472
472
  * The imperative handle. Does **not** subscribe — use it in event handlers and
473
473
  * effects (`useFunnel().responses.set({...})`). For reactive reads use the hooks.
@@ -638,8 +638,8 @@ declare function useAssets(): Record<string, string>;
638
638
  declare function useAsset(name: string): string | undefined;
639
639
  /** What the renderer injects when mounting a funnel build (SSR and hydration). */
640
640
  interface MountOpts {
641
- /** Platform-resolved product prices (one currency per visitor). */
642
- products?: ProductInput[];
641
+ /** Platform-resolved offering prices (one currency per visitor). */
642
+ offerings?: OfferingInput[];
643
643
  /** Explicit locale override (URL/param/geo); wins over the detected device locale. */
644
644
  locale?: string;
645
645
  mode?: 'test' | 'live';
@@ -1082,4 +1082,4 @@ interface ScriptProps {
1082
1082
  */
1083
1083
  declare function Script({ src, strategy, id, async, defer, nonce, attributes, onLoad, onError, }: ScriptProps): null;
1084
1084
 
1085
- export { Acquisition, type AppFunnelBusApi, AssetsContext, AssetsProvider, Back, type BackProps, type BusAccessors, type BusEvent, type CatalogEvent, CheckoutDriver, CheckoutDriverContext, Choice, type ChoiceOption, type ChoiceProps, type CreateFunnelTreeInput, Direction, EVENT_CATALOG, type EventMeta, type EventSource, type Formatters, type Funnel, type FunnelBus, FunnelContext, FunnelDefinition, type FunnelEventDataMap, FunnelProvider, type FunnelProviderProps, FunnelSnapshot, FunnelToaster, FunnelView, type KnownFunnelEvent, type MessageCatalog, Modal, type ModalHandler, type ModalHocProps, type ModalProps, type ModalState, type MountModule, type MountOpts, Namespace, type NavigationState, Next, type NextProps, PageContext, PageMeta, type PageModule, type PlatformTrackingConfig, type PluralCategory, Product, ProductInput, RuntimeExperiment, type RuntimePage, Script, type ScriptProps, Sheet, type SheetProps, type SheetSide, type TFunction, type Tracker, type Translation, VariableStore, attachBus, buildContext, createBus, createConsoleTracker, createFunnelStore, createFunnelTree, createPlatformTracker, defineModal, hideModal, integrationEvents, isIntegrationEvent, isTrackableEvent, newEventId, registerModal, removeModal, showModal, unregisterModal, useActiveLocale, useAsset, useAssets, useClickIds, useContextValue, useData, useDevice, useExperiment, useField, useFunnel, useLocale, useModal, useNavigation, usePage, useProduct, useProducts, useResponse, useSystem, useTracker, useTranslation, useUserAttribute, useUtm, withBus };
1085
+ export { Acquisition, type AppfunnelBusApi, AssetsContext, AssetsProvider, Back, type BackProps, type BusAccessors, type BusEvent, type CatalogEvent, CheckoutDriver, CheckoutDriverContext, Choice, type ChoiceOption, type ChoiceProps, type CreateFunnelTreeInput, Direction, EVENT_CATALOG, type EventMeta, type EventSource, type Formatters, type Funnel, type FunnelBus, FunnelContext, FunnelDefinition, type FunnelEventDataMap, FunnelProvider, type FunnelProviderProps, FunnelSnapshot, FunnelToaster, FunnelView, type KnownFunnelEvent, type MessageCatalog, Modal, type ModalHandler, type ModalHocProps, type ModalProps, type ModalState, type MountModule, type MountOpts, Namespace, type NavigationState, Next, type NextProps, Offering, OfferingInput, PageContext, PageMeta, type PageModule, type PlatformTrackingConfig, type PluralCategory, RuntimeExperiment, type RuntimePage, Script, type ScriptProps, Sheet, type SheetProps, type SheetSide, type TFunction, type Tracker, type Translation, VariableStore, attachBus, buildContext, createBus, createConsoleTracker, createFunnelStore, createFunnelTree, createPlatformTracker, defineModal, hideModal, integrationEvents, isIntegrationEvent, isTrackableEvent, newEventId, registerModal, removeModal, showModal, unregisterModal, useActiveLocale, useAsset, useAssets, useClickIds, useContextValue, useData, useDevice, useExperiment, useField, useFunnel, useLocale, useModal, useNavigation, useOffering, useOfferings, usePage, useResponse, useSystem, useTracker, useTranslation, useUserAttribute, useUtm, withBus };