@aifeatures/react 0.8.0 → 0.9.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/index.d.cts CHANGED
@@ -1,5 +1,25 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { CSSProperties, ReactNode } from 'react';
2
+ import { ReactNode, CSSProperties } from 'react';
3
+
4
+ interface AifeaturesProviderProps {
5
+ /** Public feature API base, such as `/_ls` for the current site's origin. */
6
+ apiUrl: string;
7
+ children?: ReactNode;
8
+ }
9
+ /**
10
+ * Configures forms, commerce, and customer-account requests for descendants.
11
+ * ConsentProvider keeps its independent API configuration.
12
+ */
13
+ declare function AifeaturesProvider({ apiUrl, children }: AifeaturesProviderProps): react_jsx_runtime.JSX.Element;
14
+ declare namespace AifeaturesProvider {
15
+ var neverConsentGate: string;
16
+ }
17
+ /**
18
+ * Resolves an explicit override, then the nearest provider, then the existing
19
+ * platform default. Relative bases remain relative, including during SSR.
20
+ * Use this for authored form actions/fetches as well as package components.
21
+ */
22
+ declare function useAifeaturesApiUrl(explicitApiUrl?: string): string;
3
23
 
4
24
  type AifeaturesCaptchaStatus =
5
25
  /** Fetching the form's config; nothing rendered yet. */
@@ -18,7 +38,7 @@ type AifeaturesCaptchaStatus =
18
38
  interface AifeaturesCaptchaProps {
19
39
  /** Form ID from aifeatures - used to fetch the Turnstile sitekey */
20
40
  formId: string;
21
- /** Base URL for the aifeatures API (defaults to https://aifeatures.dev) */
41
+ /** API base override; falls back to AifeaturesProvider, then https://aifeatures.dev. */
22
42
  apiUrl?: string;
23
43
  /** Called when CAPTCHA verification succeeds */
24
44
  onVerify?: (token: string) => void;
@@ -67,7 +87,7 @@ interface AifeaturesCaptchaProps {
67
87
  * </form>
68
88
  * ```
69
89
  */
70
- declare function AifeaturesCaptcha({ formId, apiUrl, onVerify, onError, onStatusChange, className, }: AifeaturesCaptchaProps): react_jsx_runtime.JSX.Element | null;
90
+ declare function AifeaturesCaptcha({ formId, apiUrl: explicitApiUrl, onVerify, onError, onStatusChange, className, }: AifeaturesCaptchaProps): react_jsx_runtime.JSX.Element | null;
71
91
  declare namespace AifeaturesCaptcha {
72
92
  var neverConsentGate: string;
73
93
  }
@@ -273,7 +293,7 @@ interface PublicProduct {
273
293
  subscription?: PublicProductSubscription | null;
274
294
  }
275
295
  interface UseProductOptions {
276
- /** Base URL for the aifeatures API (defaults to https://aifeatures.dev) */
296
+ /** API base override; falls back to AifeaturesProvider, then https://aifeatures.dev. */
277
297
  apiUrl?: string;
278
298
  /**
279
299
  * Buyer-declared market country (ISO 3166-1 alpha-2) — pass `useMarket()`'s
@@ -453,7 +473,7 @@ declare function selectedImages(product: Pick<PublicProduct, 'options' | 'images
453
473
  declare function applySelectionToUrl(product: Pick<PublicProduct, 'options'>, selection: VariantSelection): void;
454
474
 
455
475
  interface UseCheckoutOptions {
456
- /** Base URL for the aifeatures API (defaults to https://aifeatures.dev) */
476
+ /** API base override; falls back to AifeaturesProvider, then https://aifeatures.dev. */
457
477
  apiUrl?: string;
458
478
  }
459
479
  interface StartCheckoutOptions {
@@ -662,7 +682,7 @@ interface CartItemLine extends CartLine {
662
682
  status: CartLineStatus;
663
683
  }
664
684
  interface UseCartItemsOptions {
665
- /** Base URL for the aifeatures API (defaults to https://aifeatures.dev) */
685
+ /** API base override; falls back to AifeaturesProvider, then https://aifeatures.dev. */
666
686
  apiUrl?: string;
667
687
  }
668
688
  interface UseCartItemsResult {
@@ -805,7 +825,7 @@ interface CartSummary {
805
825
  tax: CartSummaryTax | null;
806
826
  }
807
827
  interface UseCartSummaryOptions {
808
- /** Base URL for the aifeatures API (defaults to https://aifeatures.dev) */
828
+ /** API base override; falls back to AifeaturesProvider, then https://aifeatures.dev. */
809
829
  apiUrl?: string;
810
830
  /**
811
831
  * Milliseconds to wait after a cart change before pricing it. Quantity
@@ -847,7 +867,7 @@ interface UseCartSummaryResult {
847
867
  declare function useCartSummary(options?: UseCartSummaryOptions): UseCartSummaryResult;
848
868
 
849
869
  interface UseCartCheckoutOptions {
850
- /** Base URL for the aifeatures API (defaults to https://aifeatures.dev) */
870
+ /** API base override; falls back to AifeaturesProvider, then https://aifeatures.dev. */
851
871
  apiUrl?: string;
852
872
  }
853
873
  /**
@@ -964,7 +984,7 @@ interface MarketCountry {
964
984
  */
965
985
  declare const MARKET_COUNTRIES: readonly MarketCountry[];
966
986
  interface UseMarketOptions {
967
- /** Base URL for the aifeatures API (defaults to https://aifeatures.dev) */
987
+ /** API base override; falls back to AifeaturesProvider, then https://aifeatures.dev. */
968
988
  apiUrl?: string;
969
989
  }
970
990
  interface UseMarketResult {
@@ -1010,7 +1030,7 @@ interface ProductPriceProps {
1010
1030
  * the price tracks the buyer's selection.
1011
1031
  */
1012
1032
  variantId?: string;
1013
- /** Base URL for the aifeatures API (defaults to https://aifeatures.dev) */
1033
+ /** API base override; falls back to AifeaturesProvider, then https://aifeatures.dev. */
1014
1034
  apiUrl?: string;
1015
1035
  /** Optional BCP 47 locale for formatting (defaults to the browser locale) */
1016
1036
  locale?: string;
@@ -1138,7 +1158,7 @@ interface BuyButtonProps {
1138
1158
  cancelUrl?: string;
1139
1159
  /** Prefills the email field on the Stripe Checkout page. */
1140
1160
  customerEmail?: string;
1141
- /** Base URL for the aifeatures API (defaults to https://aifeatures.dev) */
1161
+ /** API base override; falls back to AifeaturesProvider, then https://aifeatures.dev. */
1142
1162
  apiUrl?: string;
1143
1163
  /** Force-disable the button (combined with the automatic disabled states). */
1144
1164
  disabled?: boolean;
@@ -1193,7 +1213,7 @@ interface AddToCartButtonProps {
1193
1213
  selection?: VariantSelection;
1194
1214
  /** Units to add per click (default 1). */
1195
1215
  quantity?: number;
1196
- /** Base URL for the aifeatures API (defaults to https://aifeatures.dev) */
1216
+ /** API base override; falls back to AifeaturesProvider, then https://aifeatures.dev. */
1197
1217
  apiUrl?: string;
1198
1218
  /** Force-disable the button (combined with the automatic disabled states). */
1199
1219
  disabled?: boolean;
@@ -1235,7 +1255,7 @@ declare namespace AddToCartButton {
1235
1255
  }
1236
1256
 
1237
1257
  interface CartCheckoutButtonProps {
1238
- /** Base URL for the aifeatures API (defaults to https://aifeatures.dev) */
1258
+ /** API base override; falls back to AifeaturesProvider, then https://aifeatures.dev. */
1239
1259
  apiUrl?: string;
1240
1260
  /** Defaults to `${window.location.origin}/order/confirmation`. */
1241
1261
  successUrl?: string;
@@ -1430,7 +1450,7 @@ interface OrderSession {
1430
1450
  subscription?: OrderSessionSubscription;
1431
1451
  }
1432
1452
  interface OrderConfirmationProps {
1433
- /** Base URL for the aifeatures API (defaults to https://aifeatures.dev) */
1453
+ /** API base override; falls back to AifeaturesProvider, then https://aifeatures.dev. */
1434
1454
  apiUrl?: string;
1435
1455
  /** Class name for the container of the default-rendered states */
1436
1456
  className?: string;
@@ -1467,7 +1487,7 @@ interface OrderConfirmationProps {
1467
1487
  /** Rendered for failed/expired (and refunded/disputed) orders */
1468
1488
  renderFailed?: (session: OrderSession) => ReactNode;
1469
1489
  }
1470
- declare function OrderConfirmation({ apiUrl, className, style, sessionId: sessionIdProp, pollIntervalMs, pollTimeoutMs, followRedirect, redirectDelayMs, renderNoSession, renderPending, renderPaid, renderFailed, }: OrderConfirmationProps): react_jsx_runtime.JSX.Element | null;
1490
+ declare function OrderConfirmation({ apiUrl: explicitApiUrl, className, style, sessionId: sessionIdProp, pollIntervalMs, pollTimeoutMs, followRedirect, redirectDelayMs, renderNoSession, renderPending, renderPaid, renderFailed, }: OrderConfirmationProps): react_jsx_runtime.JSX.Element | null;
1471
1491
  declare namespace OrderConfirmation {
1472
1492
  var neverConsentGate: string;
1473
1493
  }
@@ -2129,7 +2149,7 @@ type SessionCustomer = StoredSessionCustomer;
2129
2149
  /** Why the hook is signed_out, when it wasn't a plain fresh visit. */
2130
2150
  type SessionReason = 'session_expired' | 'invalid_code' | null;
2131
2151
  interface UseSessionOptions {
2132
- /** Base URL for the aifeatures API (defaults to https://aifeatures.dev) */
2152
+ /** API base override; falls back to AifeaturesProvider, then https://aifeatures.dev. */
2133
2153
  apiUrl?: string;
2134
2154
  /**
2135
2155
  * Whether THIS instance consumes a `?code=` magic-link param from the URL
@@ -2227,7 +2247,7 @@ interface AccountLoginSentContext {
2227
2247
  reset: () => void;
2228
2248
  }
2229
2249
  interface AccountLoginProps {
2230
- /** Base URL for the aifeatures API (defaults to https://aifeatures.dev) */
2250
+ /** API base override; falls back to AifeaturesProvider, then https://aifeatures.dev. */
2231
2251
  apiUrl?: string;
2232
2252
  /**
2233
2253
  * Share a parent's useSession() (AccountPage passes its own so the login
@@ -2281,7 +2301,7 @@ interface AccountPagePmBannerContext {
2281
2301
  checking: boolean;
2282
2302
  }
2283
2303
  interface AccountPageProps {
2284
- /** Base URL for the aifeatures API (defaults to https://aifeatures.dev) */
2304
+ /** API base override; falls back to AifeaturesProvider, then https://aifeatures.dev. */
2285
2305
  apiUrl?: string;
2286
2306
  className?: string;
2287
2307
  style?: CSSProperties;
@@ -2336,7 +2356,7 @@ interface AccountPageProps {
2336
2356
  * the stored token and returns to email entry with a brief message, keeping
2337
2357
  * the buyer on this page.
2338
2358
  */
2339
- declare function AccountPage({ apiUrl, className, style, resendDelayMs, loginProps, renderLoading, renderError, renderEmpty, renderHeader, renderPmBanner, renderManageExpired, }: AccountPageProps): react_jsx_runtime.JSX.Element;
2359
+ declare function AccountPage({ apiUrl: explicitApiUrl, className, style, resendDelayMs, loginProps, renderLoading, renderError, renderEmpty, renderHeader, renderPmBanner, renderManageExpired, }: AccountPageProps): react_jsx_runtime.JSX.Element;
2340
2360
  declare namespace AccountPage {
2341
2361
  var neverConsentGate: string;
2342
2362
  }
@@ -2520,7 +2540,7 @@ interface SubscriptionRowContext {
2520
2540
  openPortal: () => void;
2521
2541
  }
2522
2542
  interface SubscriptionListProps {
2523
- /** Base URL for the aifeatures API (defaults to https://aifeatures.dev) */
2543
+ /** API base override; falls back to AifeaturesProvider, then https://aifeatures.dev. */
2524
2544
  apiUrl?: string;
2525
2545
  subscriptions: AccountSubscription[];
2526
2546
  auth: SubscriptionListAuth;
@@ -2558,7 +2578,7 @@ interface SubscriptionListProps {
2558
2578
  * than erroring — the copy is "this subscription has ended", and the only
2559
2579
  * path onward is resubscribing on the product page.
2560
2580
  */
2561
- declare function SubscriptionList({ apiUrl, subscriptions, auth, onAuthError, onUnavailable, onSubscriptionChange, className, style, heading, renderEmpty, renderRow, }: SubscriptionListProps): react_jsx_runtime.JSX.Element;
2581
+ declare function SubscriptionList({ apiUrl: explicitApiUrl, subscriptions, auth, onAuthError, onUnavailable, onSubscriptionChange, className, style, heading, renderEmpty, renderRow, }: SubscriptionListProps): react_jsx_runtime.JSX.Element;
2562
2582
  declare namespace SubscriptionList {
2563
2583
  var neverConsentGate: string;
2564
2584
  }
@@ -2575,4 +2595,4 @@ interface ConsentPolicyDetailsProps {
2575
2595
  * facts around this section. It is not a complete legal policy. */
2576
2596
  declare function ConsentPolicyDetails({ className, style }: ConsentPolicyDetailsProps): react_jsx_runtime.JSX.Element;
2577
2597
 
2578
- export { AccountLogin, type AccountLoginFormContext, type AccountLoginProps, type AccountLoginSentContext, type AccountMePayload, type AccountOrder, AccountOrders, type AccountOrdersProps, AccountPage, type AccountPagePmBannerContext, type AccountPageProps, type AccountShippingAddressInput, type AccountSubscription, type AddCartLineInput, AddToCartButton, type AddToCartButtonProps, type AddToCartResult, AifeaturesCaptcha, type AifeaturesCaptchaProps, BuyButton, type BuyButtonProps, CartCheckoutButton, type CartCheckoutButtonProps, type CartCheckoutLine, type CartConflictItem, type CartItemLine, type CartLine, type CartLineDisplay, type CartLineStatus, type CartSummary, type CartSummaryShipping, type CartSummaryShippingOption, ConsentBanner, type ConsentBannerDisclosureProps, type ConsentBannerProps, type ConsentCategory, type ConsentDisclosureStrings, type ConsentGrants, type ConsentIntegration, type ConsentLocale, type ConsentManifest, ConsentPolicyDetails, type ConsentPolicyDetailsProps, ConsentProvider, type ConsentProviderProps, type ConsentThemeTokens, CookieSettingsLink, type CookieSettingsLinkProps, GatedContent, type GatedContentProps, type GatedContentStrings, GatedScript, type GatedScriptProps, type LoginResult, MARKET_COUNTRIES, MAX_CART_LINES, type MarketCountry, OrderConfirmation, type OrderConfirmationProps, type OrderFulfillment, type OrderSession, type OrderSessionLineItem, type OrderSessionSubscription, type OrderStatus, PlanPicker, type PlanPickerOptionContext, type PlanPickerProps, PreferencesPanel, type PreferencesPanelProps, type PreferencesStrings, ProductPrice, type ProductPriceProps, type PublicOption, type PublicOptionValue, type PublicProduct, type PublicProductSubscription, type PublicSubscriptionPlan, type PublicVariant, type PublicVariantOptionValue, type SessionCustomer, type SessionReason, type SessionStatus, type ShippingOptionConflict, type StartCartCheckoutOptions, type StartCheckoutOptions, SubscriptionList, type SubscriptionListAuth, type SubscriptionListProps, type SubscriptionMutationState, type SubscriptionRowContext, type UseCartCheckoutOptions, type UseCartCheckoutResult, type UseCartItemsOptions, type UseCartItemsResult, type UseCartResult, type UseCartSummaryOptions, type UseCartSummaryResult, type UseCheckoutOptions, type UseCheckoutResult, type UseConsentResult, type UseMarketOptions, type UseMarketResult, type UseProductOptions, type UseProductResult, type UseSessionOptions, type UseSessionResult, VariantPicker, type VariantPickerProps, type VariantSelection, type VerifyResult, ZERO_DECIMAL_CURRENCIES, applySelectionToUrl, consentLocales, formatPrice, getOptions, getVariants, isMultiVariant, isValueAvailable, isValueInCatalog, planRecurringAmount, reanchorSelection, resolveVariant, searchFromSelection, selectedImages, selectedValues, selectionFromSearch, useCart, useCartCheckout, useCartItems, useCartSummary, useCheckout, useConsent, useMarket, useProduct, useSession, valueSlug, variantPriceRange };
2598
+ export { AccountLogin, type AccountLoginFormContext, type AccountLoginProps, type AccountLoginSentContext, type AccountMePayload, type AccountOrder, AccountOrders, type AccountOrdersProps, AccountPage, type AccountPagePmBannerContext, type AccountPageProps, type AccountShippingAddressInput, type AccountSubscription, type AddCartLineInput, AddToCartButton, type AddToCartButtonProps, type AddToCartResult, AifeaturesCaptcha, type AifeaturesCaptchaProps, AifeaturesProvider, type AifeaturesProviderProps, BuyButton, type BuyButtonProps, CartCheckoutButton, type CartCheckoutButtonProps, type CartCheckoutLine, type CartConflictItem, type CartItemLine, type CartLine, type CartLineDisplay, type CartLineStatus, type CartSummary, type CartSummaryShipping, type CartSummaryShippingOption, ConsentBanner, type ConsentBannerDisclosureProps, type ConsentBannerProps, type ConsentCategory, type ConsentDisclosureStrings, type ConsentGrants, type ConsentIntegration, type ConsentLocale, type ConsentManifest, ConsentPolicyDetails, type ConsentPolicyDetailsProps, ConsentProvider, type ConsentProviderProps, type ConsentThemeTokens, CookieSettingsLink, type CookieSettingsLinkProps, GatedContent, type GatedContentProps, type GatedContentStrings, GatedScript, type GatedScriptProps, type LoginResult, MARKET_COUNTRIES, MAX_CART_LINES, type MarketCountry, OrderConfirmation, type OrderConfirmationProps, type OrderFulfillment, type OrderSession, type OrderSessionLineItem, type OrderSessionSubscription, type OrderStatus, PlanPicker, type PlanPickerOptionContext, type PlanPickerProps, PreferencesPanel, type PreferencesPanelProps, type PreferencesStrings, ProductPrice, type ProductPriceProps, type PublicOption, type PublicOptionValue, type PublicProduct, type PublicProductSubscription, type PublicSubscriptionPlan, type PublicVariant, type PublicVariantOptionValue, type SessionCustomer, type SessionReason, type SessionStatus, type ShippingOptionConflict, type StartCartCheckoutOptions, type StartCheckoutOptions, SubscriptionList, type SubscriptionListAuth, type SubscriptionListProps, type SubscriptionMutationState, type SubscriptionRowContext, type UseCartCheckoutOptions, type UseCartCheckoutResult, type UseCartItemsOptions, type UseCartItemsResult, type UseCartResult, type UseCartSummaryOptions, type UseCartSummaryResult, type UseCheckoutOptions, type UseCheckoutResult, type UseConsentResult, type UseMarketOptions, type UseMarketResult, type UseProductOptions, type UseProductResult, type UseSessionOptions, type UseSessionResult, VariantPicker, type VariantPickerProps, type VariantSelection, type VerifyResult, ZERO_DECIMAL_CURRENCIES, applySelectionToUrl, consentLocales, formatPrice, getOptions, getVariants, isMultiVariant, isValueAvailable, isValueInCatalog, planRecurringAmount, reanchorSelection, resolveVariant, searchFromSelection, selectedImages, selectedValues, selectionFromSearch, useAifeaturesApiUrl, useCart, useCartCheckout, useCartItems, useCartSummary, useCheckout, useConsent, useMarket, useProduct, useSession, valueSlug, variantPriceRange };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,25 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { CSSProperties, ReactNode } from 'react';
2
+ import { ReactNode, CSSProperties } from 'react';
3
+
4
+ interface AifeaturesProviderProps {
5
+ /** Public feature API base, such as `/_ls` for the current site's origin. */
6
+ apiUrl: string;
7
+ children?: ReactNode;
8
+ }
9
+ /**
10
+ * Configures forms, commerce, and customer-account requests for descendants.
11
+ * ConsentProvider keeps its independent API configuration.
12
+ */
13
+ declare function AifeaturesProvider({ apiUrl, children }: AifeaturesProviderProps): react_jsx_runtime.JSX.Element;
14
+ declare namespace AifeaturesProvider {
15
+ var neverConsentGate: string;
16
+ }
17
+ /**
18
+ * Resolves an explicit override, then the nearest provider, then the existing
19
+ * platform default. Relative bases remain relative, including during SSR.
20
+ * Use this for authored form actions/fetches as well as package components.
21
+ */
22
+ declare function useAifeaturesApiUrl(explicitApiUrl?: string): string;
3
23
 
4
24
  type AifeaturesCaptchaStatus =
5
25
  /** Fetching the form's config; nothing rendered yet. */
@@ -18,7 +38,7 @@ type AifeaturesCaptchaStatus =
18
38
  interface AifeaturesCaptchaProps {
19
39
  /** Form ID from aifeatures - used to fetch the Turnstile sitekey */
20
40
  formId: string;
21
- /** Base URL for the aifeatures API (defaults to https://aifeatures.dev) */
41
+ /** API base override; falls back to AifeaturesProvider, then https://aifeatures.dev. */
22
42
  apiUrl?: string;
23
43
  /** Called when CAPTCHA verification succeeds */
24
44
  onVerify?: (token: string) => void;
@@ -67,7 +87,7 @@ interface AifeaturesCaptchaProps {
67
87
  * </form>
68
88
  * ```
69
89
  */
70
- declare function AifeaturesCaptcha({ formId, apiUrl, onVerify, onError, onStatusChange, className, }: AifeaturesCaptchaProps): react_jsx_runtime.JSX.Element | null;
90
+ declare function AifeaturesCaptcha({ formId, apiUrl: explicitApiUrl, onVerify, onError, onStatusChange, className, }: AifeaturesCaptchaProps): react_jsx_runtime.JSX.Element | null;
71
91
  declare namespace AifeaturesCaptcha {
72
92
  var neverConsentGate: string;
73
93
  }
@@ -273,7 +293,7 @@ interface PublicProduct {
273
293
  subscription?: PublicProductSubscription | null;
274
294
  }
275
295
  interface UseProductOptions {
276
- /** Base URL for the aifeatures API (defaults to https://aifeatures.dev) */
296
+ /** API base override; falls back to AifeaturesProvider, then https://aifeatures.dev. */
277
297
  apiUrl?: string;
278
298
  /**
279
299
  * Buyer-declared market country (ISO 3166-1 alpha-2) — pass `useMarket()`'s
@@ -453,7 +473,7 @@ declare function selectedImages(product: Pick<PublicProduct, 'options' | 'images
453
473
  declare function applySelectionToUrl(product: Pick<PublicProduct, 'options'>, selection: VariantSelection): void;
454
474
 
455
475
  interface UseCheckoutOptions {
456
- /** Base URL for the aifeatures API (defaults to https://aifeatures.dev) */
476
+ /** API base override; falls back to AifeaturesProvider, then https://aifeatures.dev. */
457
477
  apiUrl?: string;
458
478
  }
459
479
  interface StartCheckoutOptions {
@@ -662,7 +682,7 @@ interface CartItemLine extends CartLine {
662
682
  status: CartLineStatus;
663
683
  }
664
684
  interface UseCartItemsOptions {
665
- /** Base URL for the aifeatures API (defaults to https://aifeatures.dev) */
685
+ /** API base override; falls back to AifeaturesProvider, then https://aifeatures.dev. */
666
686
  apiUrl?: string;
667
687
  }
668
688
  interface UseCartItemsResult {
@@ -805,7 +825,7 @@ interface CartSummary {
805
825
  tax: CartSummaryTax | null;
806
826
  }
807
827
  interface UseCartSummaryOptions {
808
- /** Base URL for the aifeatures API (defaults to https://aifeatures.dev) */
828
+ /** API base override; falls back to AifeaturesProvider, then https://aifeatures.dev. */
809
829
  apiUrl?: string;
810
830
  /**
811
831
  * Milliseconds to wait after a cart change before pricing it. Quantity
@@ -847,7 +867,7 @@ interface UseCartSummaryResult {
847
867
  declare function useCartSummary(options?: UseCartSummaryOptions): UseCartSummaryResult;
848
868
 
849
869
  interface UseCartCheckoutOptions {
850
- /** Base URL for the aifeatures API (defaults to https://aifeatures.dev) */
870
+ /** API base override; falls back to AifeaturesProvider, then https://aifeatures.dev. */
851
871
  apiUrl?: string;
852
872
  }
853
873
  /**
@@ -964,7 +984,7 @@ interface MarketCountry {
964
984
  */
965
985
  declare const MARKET_COUNTRIES: readonly MarketCountry[];
966
986
  interface UseMarketOptions {
967
- /** Base URL for the aifeatures API (defaults to https://aifeatures.dev) */
987
+ /** API base override; falls back to AifeaturesProvider, then https://aifeatures.dev. */
968
988
  apiUrl?: string;
969
989
  }
970
990
  interface UseMarketResult {
@@ -1010,7 +1030,7 @@ interface ProductPriceProps {
1010
1030
  * the price tracks the buyer's selection.
1011
1031
  */
1012
1032
  variantId?: string;
1013
- /** Base URL for the aifeatures API (defaults to https://aifeatures.dev) */
1033
+ /** API base override; falls back to AifeaturesProvider, then https://aifeatures.dev. */
1014
1034
  apiUrl?: string;
1015
1035
  /** Optional BCP 47 locale for formatting (defaults to the browser locale) */
1016
1036
  locale?: string;
@@ -1138,7 +1158,7 @@ interface BuyButtonProps {
1138
1158
  cancelUrl?: string;
1139
1159
  /** Prefills the email field on the Stripe Checkout page. */
1140
1160
  customerEmail?: string;
1141
- /** Base URL for the aifeatures API (defaults to https://aifeatures.dev) */
1161
+ /** API base override; falls back to AifeaturesProvider, then https://aifeatures.dev. */
1142
1162
  apiUrl?: string;
1143
1163
  /** Force-disable the button (combined with the automatic disabled states). */
1144
1164
  disabled?: boolean;
@@ -1193,7 +1213,7 @@ interface AddToCartButtonProps {
1193
1213
  selection?: VariantSelection;
1194
1214
  /** Units to add per click (default 1). */
1195
1215
  quantity?: number;
1196
- /** Base URL for the aifeatures API (defaults to https://aifeatures.dev) */
1216
+ /** API base override; falls back to AifeaturesProvider, then https://aifeatures.dev. */
1197
1217
  apiUrl?: string;
1198
1218
  /** Force-disable the button (combined with the automatic disabled states). */
1199
1219
  disabled?: boolean;
@@ -1235,7 +1255,7 @@ declare namespace AddToCartButton {
1235
1255
  }
1236
1256
 
1237
1257
  interface CartCheckoutButtonProps {
1238
- /** Base URL for the aifeatures API (defaults to https://aifeatures.dev) */
1258
+ /** API base override; falls back to AifeaturesProvider, then https://aifeatures.dev. */
1239
1259
  apiUrl?: string;
1240
1260
  /** Defaults to `${window.location.origin}/order/confirmation`. */
1241
1261
  successUrl?: string;
@@ -1430,7 +1450,7 @@ interface OrderSession {
1430
1450
  subscription?: OrderSessionSubscription;
1431
1451
  }
1432
1452
  interface OrderConfirmationProps {
1433
- /** Base URL for the aifeatures API (defaults to https://aifeatures.dev) */
1453
+ /** API base override; falls back to AifeaturesProvider, then https://aifeatures.dev. */
1434
1454
  apiUrl?: string;
1435
1455
  /** Class name for the container of the default-rendered states */
1436
1456
  className?: string;
@@ -1467,7 +1487,7 @@ interface OrderConfirmationProps {
1467
1487
  /** Rendered for failed/expired (and refunded/disputed) orders */
1468
1488
  renderFailed?: (session: OrderSession) => ReactNode;
1469
1489
  }
1470
- declare function OrderConfirmation({ apiUrl, className, style, sessionId: sessionIdProp, pollIntervalMs, pollTimeoutMs, followRedirect, redirectDelayMs, renderNoSession, renderPending, renderPaid, renderFailed, }: OrderConfirmationProps): react_jsx_runtime.JSX.Element | null;
1490
+ declare function OrderConfirmation({ apiUrl: explicitApiUrl, className, style, sessionId: sessionIdProp, pollIntervalMs, pollTimeoutMs, followRedirect, redirectDelayMs, renderNoSession, renderPending, renderPaid, renderFailed, }: OrderConfirmationProps): react_jsx_runtime.JSX.Element | null;
1471
1491
  declare namespace OrderConfirmation {
1472
1492
  var neverConsentGate: string;
1473
1493
  }
@@ -2129,7 +2149,7 @@ type SessionCustomer = StoredSessionCustomer;
2129
2149
  /** Why the hook is signed_out, when it wasn't a plain fresh visit. */
2130
2150
  type SessionReason = 'session_expired' | 'invalid_code' | null;
2131
2151
  interface UseSessionOptions {
2132
- /** Base URL for the aifeatures API (defaults to https://aifeatures.dev) */
2152
+ /** API base override; falls back to AifeaturesProvider, then https://aifeatures.dev. */
2133
2153
  apiUrl?: string;
2134
2154
  /**
2135
2155
  * Whether THIS instance consumes a `?code=` magic-link param from the URL
@@ -2227,7 +2247,7 @@ interface AccountLoginSentContext {
2227
2247
  reset: () => void;
2228
2248
  }
2229
2249
  interface AccountLoginProps {
2230
- /** Base URL for the aifeatures API (defaults to https://aifeatures.dev) */
2250
+ /** API base override; falls back to AifeaturesProvider, then https://aifeatures.dev. */
2231
2251
  apiUrl?: string;
2232
2252
  /**
2233
2253
  * Share a parent's useSession() (AccountPage passes its own so the login
@@ -2281,7 +2301,7 @@ interface AccountPagePmBannerContext {
2281
2301
  checking: boolean;
2282
2302
  }
2283
2303
  interface AccountPageProps {
2284
- /** Base URL for the aifeatures API (defaults to https://aifeatures.dev) */
2304
+ /** API base override; falls back to AifeaturesProvider, then https://aifeatures.dev. */
2285
2305
  apiUrl?: string;
2286
2306
  className?: string;
2287
2307
  style?: CSSProperties;
@@ -2336,7 +2356,7 @@ interface AccountPageProps {
2336
2356
  * the stored token and returns to email entry with a brief message, keeping
2337
2357
  * the buyer on this page.
2338
2358
  */
2339
- declare function AccountPage({ apiUrl, className, style, resendDelayMs, loginProps, renderLoading, renderError, renderEmpty, renderHeader, renderPmBanner, renderManageExpired, }: AccountPageProps): react_jsx_runtime.JSX.Element;
2359
+ declare function AccountPage({ apiUrl: explicitApiUrl, className, style, resendDelayMs, loginProps, renderLoading, renderError, renderEmpty, renderHeader, renderPmBanner, renderManageExpired, }: AccountPageProps): react_jsx_runtime.JSX.Element;
2340
2360
  declare namespace AccountPage {
2341
2361
  var neverConsentGate: string;
2342
2362
  }
@@ -2520,7 +2540,7 @@ interface SubscriptionRowContext {
2520
2540
  openPortal: () => void;
2521
2541
  }
2522
2542
  interface SubscriptionListProps {
2523
- /** Base URL for the aifeatures API (defaults to https://aifeatures.dev) */
2543
+ /** API base override; falls back to AifeaturesProvider, then https://aifeatures.dev. */
2524
2544
  apiUrl?: string;
2525
2545
  subscriptions: AccountSubscription[];
2526
2546
  auth: SubscriptionListAuth;
@@ -2558,7 +2578,7 @@ interface SubscriptionListProps {
2558
2578
  * than erroring — the copy is "this subscription has ended", and the only
2559
2579
  * path onward is resubscribing on the product page.
2560
2580
  */
2561
- declare function SubscriptionList({ apiUrl, subscriptions, auth, onAuthError, onUnavailable, onSubscriptionChange, className, style, heading, renderEmpty, renderRow, }: SubscriptionListProps): react_jsx_runtime.JSX.Element;
2581
+ declare function SubscriptionList({ apiUrl: explicitApiUrl, subscriptions, auth, onAuthError, onUnavailable, onSubscriptionChange, className, style, heading, renderEmpty, renderRow, }: SubscriptionListProps): react_jsx_runtime.JSX.Element;
2562
2582
  declare namespace SubscriptionList {
2563
2583
  var neverConsentGate: string;
2564
2584
  }
@@ -2575,4 +2595,4 @@ interface ConsentPolicyDetailsProps {
2575
2595
  * facts around this section. It is not a complete legal policy. */
2576
2596
  declare function ConsentPolicyDetails({ className, style }: ConsentPolicyDetailsProps): react_jsx_runtime.JSX.Element;
2577
2597
 
2578
- export { AccountLogin, type AccountLoginFormContext, type AccountLoginProps, type AccountLoginSentContext, type AccountMePayload, type AccountOrder, AccountOrders, type AccountOrdersProps, AccountPage, type AccountPagePmBannerContext, type AccountPageProps, type AccountShippingAddressInput, type AccountSubscription, type AddCartLineInput, AddToCartButton, type AddToCartButtonProps, type AddToCartResult, AifeaturesCaptcha, type AifeaturesCaptchaProps, BuyButton, type BuyButtonProps, CartCheckoutButton, type CartCheckoutButtonProps, type CartCheckoutLine, type CartConflictItem, type CartItemLine, type CartLine, type CartLineDisplay, type CartLineStatus, type CartSummary, type CartSummaryShipping, type CartSummaryShippingOption, ConsentBanner, type ConsentBannerDisclosureProps, type ConsentBannerProps, type ConsentCategory, type ConsentDisclosureStrings, type ConsentGrants, type ConsentIntegration, type ConsentLocale, type ConsentManifest, ConsentPolicyDetails, type ConsentPolicyDetailsProps, ConsentProvider, type ConsentProviderProps, type ConsentThemeTokens, CookieSettingsLink, type CookieSettingsLinkProps, GatedContent, type GatedContentProps, type GatedContentStrings, GatedScript, type GatedScriptProps, type LoginResult, MARKET_COUNTRIES, MAX_CART_LINES, type MarketCountry, OrderConfirmation, type OrderConfirmationProps, type OrderFulfillment, type OrderSession, type OrderSessionLineItem, type OrderSessionSubscription, type OrderStatus, PlanPicker, type PlanPickerOptionContext, type PlanPickerProps, PreferencesPanel, type PreferencesPanelProps, type PreferencesStrings, ProductPrice, type ProductPriceProps, type PublicOption, type PublicOptionValue, type PublicProduct, type PublicProductSubscription, type PublicSubscriptionPlan, type PublicVariant, type PublicVariantOptionValue, type SessionCustomer, type SessionReason, type SessionStatus, type ShippingOptionConflict, type StartCartCheckoutOptions, type StartCheckoutOptions, SubscriptionList, type SubscriptionListAuth, type SubscriptionListProps, type SubscriptionMutationState, type SubscriptionRowContext, type UseCartCheckoutOptions, type UseCartCheckoutResult, type UseCartItemsOptions, type UseCartItemsResult, type UseCartResult, type UseCartSummaryOptions, type UseCartSummaryResult, type UseCheckoutOptions, type UseCheckoutResult, type UseConsentResult, type UseMarketOptions, type UseMarketResult, type UseProductOptions, type UseProductResult, type UseSessionOptions, type UseSessionResult, VariantPicker, type VariantPickerProps, type VariantSelection, type VerifyResult, ZERO_DECIMAL_CURRENCIES, applySelectionToUrl, consentLocales, formatPrice, getOptions, getVariants, isMultiVariant, isValueAvailable, isValueInCatalog, planRecurringAmount, reanchorSelection, resolveVariant, searchFromSelection, selectedImages, selectedValues, selectionFromSearch, useCart, useCartCheckout, useCartItems, useCartSummary, useCheckout, useConsent, useMarket, useProduct, useSession, valueSlug, variantPriceRange };
2598
+ export { AccountLogin, type AccountLoginFormContext, type AccountLoginProps, type AccountLoginSentContext, type AccountMePayload, type AccountOrder, AccountOrders, type AccountOrdersProps, AccountPage, type AccountPagePmBannerContext, type AccountPageProps, type AccountShippingAddressInput, type AccountSubscription, type AddCartLineInput, AddToCartButton, type AddToCartButtonProps, type AddToCartResult, AifeaturesCaptcha, type AifeaturesCaptchaProps, AifeaturesProvider, type AifeaturesProviderProps, BuyButton, type BuyButtonProps, CartCheckoutButton, type CartCheckoutButtonProps, type CartCheckoutLine, type CartConflictItem, type CartItemLine, type CartLine, type CartLineDisplay, type CartLineStatus, type CartSummary, type CartSummaryShipping, type CartSummaryShippingOption, ConsentBanner, type ConsentBannerDisclosureProps, type ConsentBannerProps, type ConsentCategory, type ConsentDisclosureStrings, type ConsentGrants, type ConsentIntegration, type ConsentLocale, type ConsentManifest, ConsentPolicyDetails, type ConsentPolicyDetailsProps, ConsentProvider, type ConsentProviderProps, type ConsentThemeTokens, CookieSettingsLink, type CookieSettingsLinkProps, GatedContent, type GatedContentProps, type GatedContentStrings, GatedScript, type GatedScriptProps, type LoginResult, MARKET_COUNTRIES, MAX_CART_LINES, type MarketCountry, OrderConfirmation, type OrderConfirmationProps, type OrderFulfillment, type OrderSession, type OrderSessionLineItem, type OrderSessionSubscription, type OrderStatus, PlanPicker, type PlanPickerOptionContext, type PlanPickerProps, PreferencesPanel, type PreferencesPanelProps, type PreferencesStrings, ProductPrice, type ProductPriceProps, type PublicOption, type PublicOptionValue, type PublicProduct, type PublicProductSubscription, type PublicSubscriptionPlan, type PublicVariant, type PublicVariantOptionValue, type SessionCustomer, type SessionReason, type SessionStatus, type ShippingOptionConflict, type StartCartCheckoutOptions, type StartCheckoutOptions, SubscriptionList, type SubscriptionListAuth, type SubscriptionListProps, type SubscriptionMutationState, type SubscriptionRowContext, type UseCartCheckoutOptions, type UseCartCheckoutResult, type UseCartItemsOptions, type UseCartItemsResult, type UseCartResult, type UseCartSummaryOptions, type UseCartSummaryResult, type UseCheckoutOptions, type UseCheckoutResult, type UseConsentResult, type UseMarketOptions, type UseMarketResult, type UseProductOptions, type UseProductResult, type UseSessionOptions, type UseSessionResult, VariantPicker, type VariantPickerProps, type VariantSelection, type VerifyResult, ZERO_DECIMAL_CURRENCIES, applySelectionToUrl, consentLocales, formatPrice, getOptions, getVariants, isMultiVariant, isValueAvailable, isValueInCatalog, planRecurringAmount, reanchorSelection, resolveVariant, searchFromSelection, selectedImages, selectedValues, selectionFromSearch, useAifeaturesApiUrl, useCart, useCartCheckout, useCartItems, useCartSummary, useCheckout, useConsent, useMarket, useProduct, useSession, valueSlug, variantPriceRange };