@usethrottle/auth 0.10.0 → 0.11.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.
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ComponentType, ReactNode } from 'react';
3
3
  import { ThrottleAuthConfig, ThrottleAuth } from '../index.cjs';
4
- export { Address, AddressInput, AuthSnapshot, AuthStatus, AuthStorage, Customer, DeviceSession, Invoice, Order, Page, PaymentMethod, ProfilePatch, Resource, Session, Subscription, ThrottleAccount, ThrottleAuthError, ThrottleAuthProvider, ThrottleAuthProviderProps, UseAuthResult, createAccount, createThrottleAuth, localStorageAdapter, memoryStorage, useAddresses, useAuth, useAuthContext, useCustomer, useInvoice, useInvoices, useOrder, useOrders, useSavedCards, useSubscriptions } from '../index.cjs';
4
+ export { Address, AddressInput, AuthSnapshot, AuthStatus, AuthStorage, Customer, DeviceSession, Invoice, Order, Page, PaymentMethod, ProfilePatch, Resource, Session, Subscription, SubscriptionShippingAddress, ThrottleAccount, ThrottleAuthError, ThrottleAuthProvider, ThrottleAuthProviderProps, UseAuthResult, createAccount, createThrottleAuth, localStorageAdapter, memoryStorage, useAddresses, useAuth, useAuthContext, useCustomer, useInvoice, useInvoices, useOrder, useOrders, useSavedCards, useSubscriptions } from '../index.cjs';
5
5
 
6
6
  type ThrottleThemeName = 'light' | 'dark' | 'auto';
7
7
  declare const VARIABLE_PROPERTY: {
@@ -44,7 +44,7 @@ type ThrottleVariables = Partial<Record<keyof typeof VARIABLE_PROPERTY, string>>
44
44
  * rendered element without adding its key here ships something a merchant
45
45
  * cannot restyle, which the drift test in Task 15 catches.
46
46
  */
47
- declare const THROTTLE_ELEMENT_KEYS: readonly ["card", "card.header", "card.title", "card.description", "card.body", "card.footer", "card.logo", "field", "field.label", "field.input", "field.hint", "field.error", "field.group", "button", "alert", "spinner", "skeleton", "avatar", "badge", "emptyState", "emptyState.title", "emptyState.description", "modal.overlay", "modal.container", "modal.closeButton", "dropdown.trigger", "dropdown.menu", "dropdown.item", "dropdown.separator", "tabs.list", "tabs.tab", "table", "table.head", "table.row", "table.cell", "signIn.root", "signIn.title", "signIn.logo", "signIn.emailField", "signIn.passwordField", "signIn.submitButton", "signIn.forgotLink", "signIn.switchLink", "signUp.root", "signUp.title", "signUp.logo", "signUp.emailField", "signUp.passwordField", "signUp.submitButton", "signUp.switchLink", "forgotPassword.root", "forgotPassword.title", "forgotPassword.logo", "forgotPassword.emailField", "forgotPassword.submitButton", "forgotPassword.backLink", "resetPassword.root", "resetPassword.title", "resetPassword.logo", "resetPassword.passwordField", "resetPassword.submitButton", "verifyEmail.root", "verifyEmail.title", "verifyEmail.logo", "verifyEmail.resendButton", "authFlow.root", "authModal.overlay", "authModal.container", "signInButton.root", "signUpButton.root", "signOutButton.root", "stepUp.root", "stepUp.title", "stepUp.passwordField", "stepUp.submitButton", "stepUp.cancelButton", "signInPage.root", "signInPage.logo", "signInPage.footer", "signUpPage.root", "signUpPage.logo", "signUpPage.footer", "userButton.root", "userButton.trigger", "userButton.menu", "userButton.identity", "userButton.email", "userButton.badge", "userButton.item", "userButton.manageButton", "userButton.signOutButton", "userButton.signOutAllButton", "accountDashboard.root", "accountDashboard.tabs", "accountDashboard.sidebar", "accountDashboard.panel", "accountModal.overlay", "accountModal.container", "accountModal.header", "accountModal.title", "accountModal.body", "verifyBanner.root", "verifyBanner.message", "verifyBanner.resendButton", "verifyBanner.dismissButton", "profilePanel.root", "profilePanel.form", "profilePanel.submitButton", "addressesPanel.root", "addressesPanel.list", "addressesPanel.item", "addressesPanel.addButton", "addressesPanel.form", "addressesPanel.defaultButton", "addressesPanel.editButton", "addressesPanel.deleteButton", "addressesPanel.table", "addressesPanel.row", "paymentMethodsPanel.root", "paymentMethodsPanel.list", "paymentMethodsPanel.item", "paymentMethodsPanel.defaultButton", "paymentMethodsPanel.deleteButton", "paymentMethodsPanel.addButton", "paymentMethodsPanel.addDialog", "orderDetail.addresses", "orderDetail.shippingAddress", "orderDetail.billingAddress", "orderDetail.timeline", "orderDetail.payButton", "orderDetail.trackButton", "orderDetail.reorderButton", "orderDetail.layout", "orderDetail.main", "orderDetail.rail", "orderDetail.cancelButton", "orderDetail.returnButton", "orderDetail.invoiceButton", "orderDetail.subscriptionButton", "orderDetail.actions", "invoiceDetail.layout", "invoiceDetail.main", "invoiceDetail.rail", "invoiceDetail.lineItems", "invoiceDetail.lineItem", "invoiceDetail.orderLink", "invoiceDetail.subscriptionLink", "invoiceDetail.payButton", "invoiceDetail.actions", "fieldRow", "confirm.header", "confirm.title", "confirm.body", "confirm.confirmButton", "confirm.cancelButton", "paymentMethodsPanel.table", "paymentMethodsPanel.row", "ordersPanel.root", "ordersPanel.table", "ordersPanel.row", "ordersPanel.list", "ordersPanel.item", "ordersPanel.viewButton", "orderDetail.root", "orderDetail.backButton", "orderDetail.lineItems", "orderDetail.lineItem", "orderDetail.totals", "invoicesPanel.root", "invoicesPanel.table", "invoicesPanel.row", "invoicesPanel.list", "invoicesPanel.item", "invoicesPanel.viewButton", "invoiceDetail.root", "invoiceDetail.backButton", "invoiceDetail.downloadButton", "invoiceDetail.totals", "subscriptionsPanel.root", "subscriptionsPanel.list", "subscriptionsPanel.item", "subscriptionsPanel.cancelButton", "subscriptionsPanel.cancelNowButton", "subscriptionsPanel.pauseButton", "subscriptionsPanel.resumeButton", "subscriptionsPanel.table", "subscriptionsPanel.row", "securityPanel.root", "securityPanel.passwordForm", "securityPanel.passwordButton", "securityPanel.sessionList", "securityPanel.sessionItem", "securityPanel.revokeButton", "securityPanel.revokeAllButton", "securityPanel.table", "securityPanel.row"];
47
+ declare const THROTTLE_ELEMENT_KEYS: readonly ["card", "card.header", "card.title", "card.description", "card.body", "card.footer", "card.logo", "field", "field.label", "field.input", "field.hint", "field.error", "field.group", "button", "alert", "spinner", "skeleton", "avatar", "badge", "emptyState", "emptyState.title", "emptyState.description", "modal.overlay", "modal.container", "modal.closeButton", "dropdown.trigger", "dropdown.menu", "dropdown.item", "dropdown.separator", "tabs.list", "tabs.tab", "table", "table.head", "table.row", "table.cell", "signIn.root", "signIn.title", "signIn.logo", "signIn.emailField", "signIn.passwordField", "signIn.submitButton", "signIn.forgotLink", "signIn.switchLink", "signUp.root", "signUp.title", "signUp.logo", "signUp.emailField", "signUp.passwordField", "signUp.submitButton", "signUp.switchLink", "forgotPassword.root", "forgotPassword.title", "forgotPassword.logo", "forgotPassword.emailField", "forgotPassword.submitButton", "forgotPassword.backLink", "resetPassword.root", "resetPassword.title", "resetPassword.logo", "resetPassword.passwordField", "resetPassword.submitButton", "verifyEmail.root", "verifyEmail.title", "verifyEmail.logo", "verifyEmail.resendButton", "authFlow.root", "authModal.overlay", "authModal.container", "signInButton.root", "signUpButton.root", "signOutButton.root", "stepUp.root", "stepUp.title", "stepUp.passwordField", "stepUp.submitButton", "stepUp.cancelButton", "signInPage.root", "signInPage.logo", "signInPage.footer", "signUpPage.root", "signUpPage.logo", "signUpPage.footer", "userButton.root", "userButton.trigger", "userButton.menu", "userButton.identity", "userButton.email", "userButton.badge", "userButton.item", "userButton.manageButton", "userButton.signOutButton", "userButton.signOutAllButton", "accountDashboard.root", "accountDashboard.tabs", "accountDashboard.sidebar", "accountDashboard.panel", "accountModal.overlay", "accountModal.container", "accountModal.header", "accountModal.title", "accountModal.body", "verifyBanner.root", "verifyBanner.message", "verifyBanner.resendButton", "verifyBanner.dismissButton", "profilePanel.root", "profilePanel.form", "profilePanel.submitButton", "addressesPanel.root", "addressesPanel.list", "addressesPanel.item", "addressesPanel.addButton", "addressesPanel.form", "addressesPanel.defaultButton", "addressesPanel.editButton", "addressesPanel.deleteButton", "addressesPanel.table", "addressesPanel.row", "paymentMethodsPanel.root", "paymentMethodsPanel.list", "paymentMethodsPanel.item", "paymentMethodsPanel.defaultButton", "paymentMethodsPanel.deleteButton", "paymentMethodsPanel.addButton", "paymentMethodsPanel.addDialog", "orderDetail.addresses", "orderDetail.shippingAddress", "orderDetail.billingAddress", "orderDetail.timeline", "orderDetail.payButton", "orderDetail.trackButton", "orderDetail.reorderButton", "orderDetail.layout", "orderDetail.main", "orderDetail.rail", "orderDetail.cancelButton", "orderDetail.returnButton", "orderDetail.invoiceButton", "orderDetail.subscriptionButton", "orderDetail.actions", "invoiceDetail.layout", "invoiceDetail.main", "invoiceDetail.rail", "invoiceDetail.lineItems", "invoiceDetail.lineItem", "invoiceDetail.orderLink", "invoiceDetail.subscriptionLink", "invoiceDetail.payButton", "invoiceDetail.actions", "fieldRow", "confirm.header", "confirm.title", "confirm.body", "confirm.confirmButton", "confirm.cancelButton", "paymentMethodsPanel.table", "paymentMethodsPanel.row", "ordersPanel.root", "ordersPanel.table", "ordersPanel.row", "ordersPanel.list", "ordersPanel.item", "ordersPanel.viewButton", "orderDetail.root", "orderDetail.backButton", "orderDetail.lineItems", "orderDetail.lineItem", "orderDetail.totals", "invoicesPanel.root", "invoicesPanel.table", "invoicesPanel.row", "invoicesPanel.list", "invoicesPanel.item", "invoicesPanel.viewButton", "invoiceDetail.root", "invoiceDetail.backButton", "invoiceDetail.downloadButton", "invoiceDetail.totals", "subscriptionsPanel.root", "subscriptionsPanel.list", "subscriptionsPanel.item", "subscriptionsPanel.cancelButton", "subscriptionsPanel.cancelNowButton", "subscriptionsPanel.pauseButton", "subscriptionsPanel.resumeButton", "subscriptionsPanel.changeAddressButton", "subscriptionsPanel.addressForm", "subscriptionsPanel.table", "subscriptionsPanel.row", "securityPanel.root", "securityPanel.passwordForm", "securityPanel.passwordButton", "securityPanel.sessionList", "securityPanel.sessionItem", "securityPanel.revokeButton", "securityPanel.revokeAllButton", "securityPanel.table", "securityPanel.row"];
48
48
  type ThrottleElementKey = (typeof THROTTLE_ELEMENT_KEYS)[number];
49
49
  interface ThrottleSlots {
50
50
  Spinner?: ComponentType<{
@@ -340,6 +340,11 @@ declare const enUS: {
340
340
  cancelNow: string;
341
341
  pauseButton: string;
342
342
  resumeButton: string;
343
+ /** A physical subscription's ship-to, and the control that changes it. */
344
+ shipsTo: string;
345
+ changeAddress: string;
346
+ changeAddressTitle: string;
347
+ changeAddressHint: string;
343
348
  cancelConfirm: string;
344
349
  cancelScheduled: string;
345
350
  columnPlan: string;
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ComponentType, ReactNode } from 'react';
3
3
  import { ThrottleAuthConfig, ThrottleAuth } from '../index.js';
4
- export { Address, AddressInput, AuthSnapshot, AuthStatus, AuthStorage, Customer, DeviceSession, Invoice, Order, Page, PaymentMethod, ProfilePatch, Resource, Session, Subscription, ThrottleAccount, ThrottleAuthError, ThrottleAuthProvider, ThrottleAuthProviderProps, UseAuthResult, createAccount, createThrottleAuth, localStorageAdapter, memoryStorage, useAddresses, useAuth, useAuthContext, useCustomer, useInvoice, useInvoices, useOrder, useOrders, useSavedCards, useSubscriptions } from '../index.js';
4
+ export { Address, AddressInput, AuthSnapshot, AuthStatus, AuthStorage, Customer, DeviceSession, Invoice, Order, Page, PaymentMethod, ProfilePatch, Resource, Session, Subscription, SubscriptionShippingAddress, ThrottleAccount, ThrottleAuthError, ThrottleAuthProvider, ThrottleAuthProviderProps, UseAuthResult, createAccount, createThrottleAuth, localStorageAdapter, memoryStorage, useAddresses, useAuth, useAuthContext, useCustomer, useInvoice, useInvoices, useOrder, useOrders, useSavedCards, useSubscriptions } from '../index.js';
5
5
 
6
6
  type ThrottleThemeName = 'light' | 'dark' | 'auto';
7
7
  declare const VARIABLE_PROPERTY: {
@@ -44,7 +44,7 @@ type ThrottleVariables = Partial<Record<keyof typeof VARIABLE_PROPERTY, string>>
44
44
  * rendered element without adding its key here ships something a merchant
45
45
  * cannot restyle, which the drift test in Task 15 catches.
46
46
  */
47
- declare const THROTTLE_ELEMENT_KEYS: readonly ["card", "card.header", "card.title", "card.description", "card.body", "card.footer", "card.logo", "field", "field.label", "field.input", "field.hint", "field.error", "field.group", "button", "alert", "spinner", "skeleton", "avatar", "badge", "emptyState", "emptyState.title", "emptyState.description", "modal.overlay", "modal.container", "modal.closeButton", "dropdown.trigger", "dropdown.menu", "dropdown.item", "dropdown.separator", "tabs.list", "tabs.tab", "table", "table.head", "table.row", "table.cell", "signIn.root", "signIn.title", "signIn.logo", "signIn.emailField", "signIn.passwordField", "signIn.submitButton", "signIn.forgotLink", "signIn.switchLink", "signUp.root", "signUp.title", "signUp.logo", "signUp.emailField", "signUp.passwordField", "signUp.submitButton", "signUp.switchLink", "forgotPassword.root", "forgotPassword.title", "forgotPassword.logo", "forgotPassword.emailField", "forgotPassword.submitButton", "forgotPassword.backLink", "resetPassword.root", "resetPassword.title", "resetPassword.logo", "resetPassword.passwordField", "resetPassword.submitButton", "verifyEmail.root", "verifyEmail.title", "verifyEmail.logo", "verifyEmail.resendButton", "authFlow.root", "authModal.overlay", "authModal.container", "signInButton.root", "signUpButton.root", "signOutButton.root", "stepUp.root", "stepUp.title", "stepUp.passwordField", "stepUp.submitButton", "stepUp.cancelButton", "signInPage.root", "signInPage.logo", "signInPage.footer", "signUpPage.root", "signUpPage.logo", "signUpPage.footer", "userButton.root", "userButton.trigger", "userButton.menu", "userButton.identity", "userButton.email", "userButton.badge", "userButton.item", "userButton.manageButton", "userButton.signOutButton", "userButton.signOutAllButton", "accountDashboard.root", "accountDashboard.tabs", "accountDashboard.sidebar", "accountDashboard.panel", "accountModal.overlay", "accountModal.container", "accountModal.header", "accountModal.title", "accountModal.body", "verifyBanner.root", "verifyBanner.message", "verifyBanner.resendButton", "verifyBanner.dismissButton", "profilePanel.root", "profilePanel.form", "profilePanel.submitButton", "addressesPanel.root", "addressesPanel.list", "addressesPanel.item", "addressesPanel.addButton", "addressesPanel.form", "addressesPanel.defaultButton", "addressesPanel.editButton", "addressesPanel.deleteButton", "addressesPanel.table", "addressesPanel.row", "paymentMethodsPanel.root", "paymentMethodsPanel.list", "paymentMethodsPanel.item", "paymentMethodsPanel.defaultButton", "paymentMethodsPanel.deleteButton", "paymentMethodsPanel.addButton", "paymentMethodsPanel.addDialog", "orderDetail.addresses", "orderDetail.shippingAddress", "orderDetail.billingAddress", "orderDetail.timeline", "orderDetail.payButton", "orderDetail.trackButton", "orderDetail.reorderButton", "orderDetail.layout", "orderDetail.main", "orderDetail.rail", "orderDetail.cancelButton", "orderDetail.returnButton", "orderDetail.invoiceButton", "orderDetail.subscriptionButton", "orderDetail.actions", "invoiceDetail.layout", "invoiceDetail.main", "invoiceDetail.rail", "invoiceDetail.lineItems", "invoiceDetail.lineItem", "invoiceDetail.orderLink", "invoiceDetail.subscriptionLink", "invoiceDetail.payButton", "invoiceDetail.actions", "fieldRow", "confirm.header", "confirm.title", "confirm.body", "confirm.confirmButton", "confirm.cancelButton", "paymentMethodsPanel.table", "paymentMethodsPanel.row", "ordersPanel.root", "ordersPanel.table", "ordersPanel.row", "ordersPanel.list", "ordersPanel.item", "ordersPanel.viewButton", "orderDetail.root", "orderDetail.backButton", "orderDetail.lineItems", "orderDetail.lineItem", "orderDetail.totals", "invoicesPanel.root", "invoicesPanel.table", "invoicesPanel.row", "invoicesPanel.list", "invoicesPanel.item", "invoicesPanel.viewButton", "invoiceDetail.root", "invoiceDetail.backButton", "invoiceDetail.downloadButton", "invoiceDetail.totals", "subscriptionsPanel.root", "subscriptionsPanel.list", "subscriptionsPanel.item", "subscriptionsPanel.cancelButton", "subscriptionsPanel.cancelNowButton", "subscriptionsPanel.pauseButton", "subscriptionsPanel.resumeButton", "subscriptionsPanel.table", "subscriptionsPanel.row", "securityPanel.root", "securityPanel.passwordForm", "securityPanel.passwordButton", "securityPanel.sessionList", "securityPanel.sessionItem", "securityPanel.revokeButton", "securityPanel.revokeAllButton", "securityPanel.table", "securityPanel.row"];
47
+ declare const THROTTLE_ELEMENT_KEYS: readonly ["card", "card.header", "card.title", "card.description", "card.body", "card.footer", "card.logo", "field", "field.label", "field.input", "field.hint", "field.error", "field.group", "button", "alert", "spinner", "skeleton", "avatar", "badge", "emptyState", "emptyState.title", "emptyState.description", "modal.overlay", "modal.container", "modal.closeButton", "dropdown.trigger", "dropdown.menu", "dropdown.item", "dropdown.separator", "tabs.list", "tabs.tab", "table", "table.head", "table.row", "table.cell", "signIn.root", "signIn.title", "signIn.logo", "signIn.emailField", "signIn.passwordField", "signIn.submitButton", "signIn.forgotLink", "signIn.switchLink", "signUp.root", "signUp.title", "signUp.logo", "signUp.emailField", "signUp.passwordField", "signUp.submitButton", "signUp.switchLink", "forgotPassword.root", "forgotPassword.title", "forgotPassword.logo", "forgotPassword.emailField", "forgotPassword.submitButton", "forgotPassword.backLink", "resetPassword.root", "resetPassword.title", "resetPassword.logo", "resetPassword.passwordField", "resetPassword.submitButton", "verifyEmail.root", "verifyEmail.title", "verifyEmail.logo", "verifyEmail.resendButton", "authFlow.root", "authModal.overlay", "authModal.container", "signInButton.root", "signUpButton.root", "signOutButton.root", "stepUp.root", "stepUp.title", "stepUp.passwordField", "stepUp.submitButton", "stepUp.cancelButton", "signInPage.root", "signInPage.logo", "signInPage.footer", "signUpPage.root", "signUpPage.logo", "signUpPage.footer", "userButton.root", "userButton.trigger", "userButton.menu", "userButton.identity", "userButton.email", "userButton.badge", "userButton.item", "userButton.manageButton", "userButton.signOutButton", "userButton.signOutAllButton", "accountDashboard.root", "accountDashboard.tabs", "accountDashboard.sidebar", "accountDashboard.panel", "accountModal.overlay", "accountModal.container", "accountModal.header", "accountModal.title", "accountModal.body", "verifyBanner.root", "verifyBanner.message", "verifyBanner.resendButton", "verifyBanner.dismissButton", "profilePanel.root", "profilePanel.form", "profilePanel.submitButton", "addressesPanel.root", "addressesPanel.list", "addressesPanel.item", "addressesPanel.addButton", "addressesPanel.form", "addressesPanel.defaultButton", "addressesPanel.editButton", "addressesPanel.deleteButton", "addressesPanel.table", "addressesPanel.row", "paymentMethodsPanel.root", "paymentMethodsPanel.list", "paymentMethodsPanel.item", "paymentMethodsPanel.defaultButton", "paymentMethodsPanel.deleteButton", "paymentMethodsPanel.addButton", "paymentMethodsPanel.addDialog", "orderDetail.addresses", "orderDetail.shippingAddress", "orderDetail.billingAddress", "orderDetail.timeline", "orderDetail.payButton", "orderDetail.trackButton", "orderDetail.reorderButton", "orderDetail.layout", "orderDetail.main", "orderDetail.rail", "orderDetail.cancelButton", "orderDetail.returnButton", "orderDetail.invoiceButton", "orderDetail.subscriptionButton", "orderDetail.actions", "invoiceDetail.layout", "invoiceDetail.main", "invoiceDetail.rail", "invoiceDetail.lineItems", "invoiceDetail.lineItem", "invoiceDetail.orderLink", "invoiceDetail.subscriptionLink", "invoiceDetail.payButton", "invoiceDetail.actions", "fieldRow", "confirm.header", "confirm.title", "confirm.body", "confirm.confirmButton", "confirm.cancelButton", "paymentMethodsPanel.table", "paymentMethodsPanel.row", "ordersPanel.root", "ordersPanel.table", "ordersPanel.row", "ordersPanel.list", "ordersPanel.item", "ordersPanel.viewButton", "orderDetail.root", "orderDetail.backButton", "orderDetail.lineItems", "orderDetail.lineItem", "orderDetail.totals", "invoicesPanel.root", "invoicesPanel.table", "invoicesPanel.row", "invoicesPanel.list", "invoicesPanel.item", "invoicesPanel.viewButton", "invoiceDetail.root", "invoiceDetail.backButton", "invoiceDetail.downloadButton", "invoiceDetail.totals", "subscriptionsPanel.root", "subscriptionsPanel.list", "subscriptionsPanel.item", "subscriptionsPanel.cancelButton", "subscriptionsPanel.cancelNowButton", "subscriptionsPanel.pauseButton", "subscriptionsPanel.resumeButton", "subscriptionsPanel.changeAddressButton", "subscriptionsPanel.addressForm", "subscriptionsPanel.table", "subscriptionsPanel.row", "securityPanel.root", "securityPanel.passwordForm", "securityPanel.passwordButton", "securityPanel.sessionList", "securityPanel.sessionItem", "securityPanel.revokeButton", "securityPanel.revokeAllButton", "securityPanel.table", "securityPanel.row"];
48
48
  type ThrottleElementKey = (typeof THROTTLE_ELEMENT_KEYS)[number];
49
49
  interface ThrottleSlots {
50
50
  Spinner?: ComponentType<{
@@ -340,6 +340,11 @@ declare const enUS: {
340
340
  cancelNow: string;
341
341
  pauseButton: string;
342
342
  resumeButton: string;
343
+ /** A physical subscription's ship-to, and the control that changes it. */
344
+ shipsTo: string;
345
+ changeAddress: string;
346
+ changeAddressTitle: string;
347
+ changeAddressHint: string;
343
348
  cancelConfirm: string;
344
349
  cancelScheduled: string;
345
350
  columnPlan: string;
@@ -8,7 +8,7 @@ import {
8
8
  useOrders,
9
9
  useSavedCards,
10
10
  useSubscriptions
11
- } from "../../chunk-TKSBAC7W.js";
11
+ } from "../../chunk-EFMKBOTL.js";
12
12
  import {
13
13
  messageForError
14
14
  } from "../../chunk-K7RCWADI.js";
@@ -21,10 +21,10 @@ import {
21
21
  memoryStorage,
22
22
  useAuth,
23
23
  useAuthContext
24
- } from "../../chunk-HQP5QTHQ.js";
24
+ } from "../../chunk-YY6YATXT.js";
25
25
 
26
26
  // src/react/components/provider.tsx
27
- import { createContext as createContext6, useCallback as useCallback4, useContext as useContext6, useMemo as useMemo4, useRef as useRef9, useState as useState21 } from "react";
27
+ import { createContext as createContext6, useCallback as useCallback4, useContext as useContext6, useMemo as useMemo4, useRef as useRef9, useState as useState22 } from "react";
28
28
 
29
29
  // src/react/components/appearance.tsx
30
30
  import { createContext, useContext, useMemo } from "react";
@@ -347,6 +347,8 @@ var THROTTLE_ELEMENT_KEYS = [
347
347
  "subscriptionsPanel.cancelNowButton",
348
348
  "subscriptionsPanel.pauseButton",
349
349
  "subscriptionsPanel.resumeButton",
350
+ "subscriptionsPanel.changeAddressButton",
351
+ "subscriptionsPanel.addressForm",
350
352
  "subscriptionsPanel.table",
351
353
  "subscriptionsPanel.row",
352
354
  "securityPanel.root",
@@ -690,6 +692,11 @@ var enUS = {
690
692
  cancelNow: "Cancel immediately",
691
693
  pauseButton: "Pause",
692
694
  resumeButton: "Resume",
695
+ /** A physical subscription's ship-to, and the control that changes it. */
696
+ shipsTo: "Ships to",
697
+ changeAddress: "Change address",
698
+ changeAddressTitle: "Change shipping address",
699
+ changeAddressHint: "Your next box ships here. Orders already placed keep their address.",
693
700
  cancelConfirm: "Cancel this subscription?",
694
701
  cancelScheduled: "Cancels at the end of the period",
695
702
  columnPlan: "Plan",
@@ -2352,7 +2359,7 @@ function AuthModal(props) {
2352
2359
  import { useId as useId6 } from "react";
2353
2360
 
2354
2361
  // src/react/components/account/AccountDashboard.tsx
2355
- import { useEffect as useEffect11, useId as useId5, useState as useState20 } from "react";
2362
+ import { useEffect as useEffect11, useId as useId5, useState as useState21 } from "react";
2356
2363
 
2357
2364
  // src/react/components/account/VerifyEmailBanner.tsx
2358
2365
  import { useState as useState11 } from "react";
@@ -2644,7 +2651,7 @@ function AddressForm(props) {
2644
2651
  return /* @__PURE__ */ jsxs21(
2645
2652
  "form",
2646
2653
  {
2647
- ...a.el("addressesPanel.form", "throttle-stack"),
2654
+ ...a.el(props.elementKey ?? "addressesPanel.form", "throttle-stack"),
2648
2655
  onSubmit: (e) => {
2649
2656
  e.preventDefault();
2650
2657
  props.onSubmit({
@@ -2664,7 +2671,7 @@ function AddressForm(props) {
2664
2671
  },
2665
2672
  children: [
2666
2673
  /* @__PURE__ */ jsxs21(FieldRow, { children: [
2667
- /* @__PURE__ */ jsx31(Field, { label: t.addresses.label, value: form.label, onChange: set("label") }),
2674
+ props.hideLabel ? null : /* @__PURE__ */ jsx31(Field, { label: t.addresses.label, value: form.label, onChange: set("label") }),
2668
2675
  /* @__PURE__ */ jsx31(Field, { label: t.addresses.company, value: form.company, onChange: set("company"), autoComplete: "organization" })
2669
2676
  ] }),
2670
2677
  /* @__PURE__ */ jsxs21(FieldRow, { children: [
@@ -3756,6 +3763,9 @@ function InvoicesPanel(props) {
3756
3763
  ) }) }) });
3757
3764
  }
3758
3765
 
3766
+ // src/react/components/account/SubscriptionsPanel.tsx
3767
+ import { useState as useState19 } from "react";
3768
+
3759
3769
  // ../core-cadence/src/cadence.ts
3760
3770
  var INTERVAL_UNITS = ["hour", "day", "week", "month"];
3761
3771
  var NAMED_INTERVALS = ["weekly", "biweekly", "monthly", "quarterly", "yearly"];
@@ -3808,6 +3818,12 @@ var CAN_PAUSE = /* @__PURE__ */ new Set(["active"]);
3808
3818
  var CAN_RESUME = /* @__PURE__ */ new Set(["paused"]);
3809
3819
  var CAN_CANCEL2 = /* @__PURE__ */ new Set(["active", "trialing", "paused", "past_due", "unpaid"]);
3810
3820
  var isInstallment = (sub) => sub.totalPayments != null;
3821
+ var canChangeAddress = (sub) => sub.deliveryMethod === "shipment" && sub.status !== "cancelled" && sub.status !== "completed";
3822
+ function oneLine(address) {
3823
+ if (!address) return null;
3824
+ const parts = [address.addressLine1, address.addressLine2, address.city, address.stateProvince, address.postalCode, address.countryCode];
3825
+ return parts.filter(Boolean).join(", ") || null;
3826
+ }
3811
3827
  function SubscriptionsPanel(props) {
3812
3828
  const a = useAppearance(props.appearance);
3813
3829
  const scoped = useAppearanceProviderValue(props.appearance);
@@ -3816,6 +3832,7 @@ function SubscriptionsPanel(props) {
3816
3832
  const resource = useSubscriptions();
3817
3833
  const { submitting, error, run } = useAction();
3818
3834
  const confirm = useConfirm();
3835
+ const [editingAddress, setEditingAddress] = useState19(null);
3819
3836
  const variant = props.variant ?? "rows";
3820
3837
  const rowsVariant = variant === "rows";
3821
3838
  const listBase = rowsVariant ? "throttle-rows" : "throttle-stack";
@@ -3844,6 +3861,21 @@ function SubscriptionsPanel(props) {
3844
3861
  if (upcoming.length === 0) return null;
3845
3862
  return /* @__PURE__ */ jsx42("ul", { className: "throttle-muted", "aria-label": t.subscriptions.upcomingPayments, children: upcoming.map((r) => /* @__PURE__ */ jsx42("li", { children: t.subscriptions.upcomingPayment.replace("{amount}", formatMoney(r.net, sub.currency, locale)).replace("{date}", scheduleDueLabel(r, locale)) }, r.dueAt)) });
3846
3863
  };
3864
+ const shipsTo = (sub) => sub.deliveryMethod === "shipment" && oneLine(sub.shippingAddress) ? /* @__PURE__ */ jsxs32("p", { className: "throttle-muted", children: [
3865
+ t.subscriptions.shipsTo,
3866
+ " ",
3867
+ oneLine(sub.shippingAddress)
3868
+ ] }) : null;
3869
+ const addressAction = (sub, variantFor) => canChangeAddress(sub) ? /* @__PURE__ */ jsx42(
3870
+ Button,
3871
+ {
3872
+ variant: variantFor("secondary"),
3873
+ elementKey: "subscriptionsPanel.changeAddressButton",
3874
+ disabled: submitting,
3875
+ onClick: () => setEditingAddress(sub.id),
3876
+ children: t.subscriptions.changeAddress
3877
+ }
3878
+ ) : null;
3847
3879
  const renewsLabel = (sub) => formatDate(
3848
3880
  sub.status === "completed" ? sub.completedAt ?? sub.currentPeriodEnd : sub.status === "cancelled" ? sub.cancelledAt ?? sub.currentPeriodEnd : sub.currentPeriodEnd,
3849
3881
  locale
@@ -3905,7 +3937,32 @@ function SubscriptionsPanel(props) {
3905
3937
  ) : null
3906
3938
  ] });
3907
3939
  return /* @__PURE__ */ jsx42(AppearanceProvider, { value: scoped, children: /* @__PURE__ */ jsx42("div", { ...a.rootProps, children: /* @__PURE__ */ jsxs32("div", { ...a.el("subscriptionsPanel.root", "throttle-panel"), children: [
3908
- error ? /* @__PURE__ */ jsx42(Alert, { tone: "error", children: error }) : null,
3940
+ error && !editingAddress ? /* @__PURE__ */ jsx42(Alert, { tone: "error", children: error }) : null,
3941
+ editingAddress ? (() => {
3942
+ const sub = resource.data.find((row) => row.id === editingAddress);
3943
+ const current = sub?.shippingAddress;
3944
+ return /* @__PURE__ */ jsxs32("div", { className: "throttle-stack", children: [
3945
+ /* @__PURE__ */ jsx42("strong", { children: t.subscriptions.changeAddressTitle }),
3946
+ /* @__PURE__ */ jsx42("p", { className: "throttle-muted", children: t.subscriptions.changeAddressHint }),
3947
+ /* @__PURE__ */ jsx42(
3948
+ AddressForm,
3949
+ {
3950
+ elementKey: "subscriptionsPanel.addressForm",
3951
+ hideLabel: true,
3952
+ initial: current ? { ...current, label: null } : void 0,
3953
+ submitting,
3954
+ error,
3955
+ onCancel: () => setEditingAddress(null),
3956
+ onSubmit: ({ label: _label, isDefault: _isDefault, ...address }) => {
3957
+ void run(async () => {
3958
+ await resource.updateShippingAddress(editingAddress, address);
3959
+ setEditingAddress(null);
3960
+ });
3961
+ }
3962
+ }
3963
+ )
3964
+ ] });
3965
+ })() : null,
3909
3966
  /* @__PURE__ */ jsx42(
3910
3967
  PanelState,
3911
3968
  {
@@ -3927,7 +3984,8 @@ function SubscriptionsPanel(props) {
3927
3984
  sub.planName ?? sub.planReference,
3928
3985
  sub.totalPayments != null ? /* @__PURE__ */ jsx42("div", { className: "throttle-muted", children: t.subscriptions.installmentProgress.replace("{paid}", String(Math.min(sub.paymentsMade ?? 0, sub.totalPayments))).replace("{total}", String(sub.totalPayments)) }) : null,
3929
3986
  nextPaymentLabel(sub) ? /* @__PURE__ */ jsx42("div", { className: "throttle-muted", children: nextPaymentLabel(sub) }) : null,
3930
- upcomingList(sub)
3987
+ upcomingList(sub),
3988
+ shipsTo(sub)
3931
3989
  ] }) },
3932
3990
  { key: "price", label: t.subscriptions.columnPrice, render: (sub) => /* @__PURE__ */ jsx42("span", { className: "throttle-table__money", children: priceLabel(sub) }) },
3933
3991
  { key: "renews", label: t.subscriptions.columnRenews, render: (sub) => renewsLabel(sub) },
@@ -3935,7 +3993,10 @@ function SubscriptionsPanel(props) {
3935
3993
  /* @__PURE__ */ jsx42(StatusBadge, { status: sub.status, labels: t.subscriptions.statusLabels }),
3936
3994
  sub.cancelAtPeriodEnd ? /* @__PURE__ */ jsx42(Badge, { tone: "warning", children: t.subscriptions.cancelScheduled }) : null
3937
3995
  ] }) },
3938
- { key: "actions", label: t.common.actions, render: (sub) => lifecycleActions(sub, (base) => base) }
3996
+ { key: "actions", label: t.common.actions, render: (sub) => /* @__PURE__ */ jsxs32(Fragment8, { children: [
3997
+ lifecycleActions(sub, (base) => base),
3998
+ addressAction(sub, (base) => base)
3999
+ ] }) }
3939
4000
  ]
3940
4001
  }
3941
4002
  ) : /* @__PURE__ */ jsx42("div", { ...a.el("subscriptionsPanel.list", listBase), children: rows.map((sub) => /* @__PURE__ */ jsxs32("div", { ...a.el("subscriptionsPanel.item", itemBase), children: [
@@ -3948,6 +4009,7 @@ function SubscriptionsPanel(props) {
3948
4009
  nextPaymentLabel(sub) ? /* @__PURE__ */ jsx42("div", { className: "throttle-muted", children: nextPaymentLabel(sub) }) : null,
3949
4010
  upcomingList(sub),
3950
4011
  /* @__PURE__ */ jsx42("p", { className: "throttle-muted", children: priceLabel(sub) }),
4012
+ shipsTo(sub),
3951
4013
  sub.status === "completed" ? /* @__PURE__ */ jsxs32("p", { className: "throttle-muted", children: [
3952
4014
  t.subscriptions.statusLabels.completed,
3953
4015
  " ",
@@ -3968,7 +4030,8 @@ function SubscriptionsPanel(props) {
3968
4030
  ] }) : null,
3969
4031
  sub.cancelAtPeriodEnd ? /* @__PURE__ */ jsx42(Badge, { tone: "warning", children: t.subscriptions.cancelScheduled }) : null
3970
4032
  ] }),
3971
- lifecycleActions(sub, actionVariant)
4033
+ lifecycleActions(sub, actionVariant),
4034
+ addressAction(sub, actionVariant)
3972
4035
  ] }, sub.id)) })
3973
4036
  }
3974
4037
  )
@@ -3976,7 +4039,7 @@ function SubscriptionsPanel(props) {
3976
4039
  }
3977
4040
 
3978
4041
  // src/react/components/account/SecurityPanel.tsx
3979
- import { useCallback as useCallback3, useEffect as useEffect10, useRef as useRef8, useState as useState19 } from "react";
4042
+ import { useCallback as useCallback3, useEffect as useEffect10, useRef as useRef8, useState as useState20 } from "react";
3980
4043
 
3981
4044
  // src/react/components/account/device.ts
3982
4045
  var BROWSERS = [
@@ -4019,11 +4082,11 @@ function SecurityPanel(props) {
4019
4082
  const rowsVariant = variant === "rows";
4020
4083
  const itemBase = rowsVariant ? "throttle-rowitem" : "throttle-listitem";
4021
4084
  const revokeVariant = rowsVariant ? "linkDanger" : "danger";
4022
- const [password, setPassword] = useState19("");
4085
+ const [password, setPassword] = useState20("");
4023
4086
  const passwordAction = useAction();
4024
4087
  const sessionAction = useAction();
4025
- const [sessions, setSessions] = useState19(null);
4026
- const [listError, setListError] = useState19(null);
4088
+ const [sessions, setSessions] = useState20(null);
4089
+ const [listError, setListError] = useState20(null);
4027
4090
  const errorMessageRef = useRef8(errorMessage);
4028
4091
  useEffect10(() => {
4029
4092
  errorMessageRef.current = errorMessage;
@@ -4184,8 +4247,8 @@ function AccountDashboard(props) {
4184
4247
  const { status } = useAuth();
4185
4248
  const shown = props.tabs ?? [...ACCOUNT_TABS];
4186
4249
  const controlled = props.tab !== void 0;
4187
- const [internal, setInternal] = useState20(shown[0] ?? "profile");
4188
- const [openOrderId, setOpenOrderId] = useState20(null);
4250
+ const [internal, setInternal] = useState21(shown[0] ?? "profile");
4251
+ const [openOrderId, setOpenOrderId] = useState21(null);
4189
4252
  const idBase = useId5();
4190
4253
  useEffect11(() => {
4191
4254
  if (props.routing !== "hash" || typeof window === "undefined") return;
@@ -4347,13 +4410,13 @@ function ThrottleProvider(props) {
4347
4410
  __captureStepUp
4348
4411
  } = props;
4349
4412
  useInjectStyles(injectStyles);
4350
- const [stepUpOpen, setStepUpOpen] = useState21(false);
4413
+ const [stepUpOpen, setStepUpOpen] = useState22(false);
4351
4414
  const resolveStepUp = useRef9(null);
4352
4415
  const claimRef = useRef9(claimCartOnSignIn);
4353
4416
  claimRef.current = claimCartOnSignIn;
4354
- const [overlay, setOverlay] = useState21(null);
4417
+ const [overlay, setOverlay] = useState22(null);
4355
4418
  const overlayRestoreFocus = useRef9(null);
4356
- const [accountTabs, setAccountTabs] = useState21(void 0);
4419
+ const [accountTabs, setAccountTabs] = useState22(void 0);
4357
4420
  const onOverlaySuccess = useRef9(null);
4358
4421
  const openSignIn = useCallback4((onSuccess) => {
4359
4422
  onOverlaySuccess.current = onSuccess ?? null;
@@ -4442,18 +4505,18 @@ function ThrottleProvider(props) {
4442
4505
  }
4443
4506
 
4444
4507
  // src/react/components/auth/StepUpDialog.tsx
4445
- import { useEffect as useEffect12, useId as useId7, useState as useState22 } from "react";
4508
+ import { useEffect as useEffect12, useId as useId7, useState as useState23 } from "react";
4446
4509
  import { jsx as jsx47, jsxs as jsxs37 } from "react/jsx-runtime";
4447
4510
 
4448
4511
  // src/react/components/auth/SignInButton.tsx
4449
- import { cloneElement, isValidElement, useContext as useContext7, useState as useState23 } from "react";
4512
+ import { cloneElement, isValidElement, useContext as useContext7, useState as useState24 } from "react";
4450
4513
  import { jsx as jsx48, jsxs as jsxs38 } from "react/jsx-runtime";
4451
4514
  function SignInButton(props) {
4452
4515
  const a = useAppearance(props.appearance);
4453
4516
  const scoped = useAppearanceProviderValue(props.appearance);
4454
4517
  const { t } = useCopy(props.localization);
4455
4518
  const ui = useContext7(ThrottleUIContext);
4456
- const [localOpen, setLocalOpen] = useState23(false);
4519
+ const [localOpen, setLocalOpen] = useState24(false);
4457
4520
  const useShared = ui !== null && props.initialView === void 0;
4458
4521
  const label = props.children ?? t.signIn.submitButton;
4459
4522
  if (props.mode === "redirect") {
@@ -4488,14 +4551,14 @@ function SignInButton(props) {
4488
4551
  }
4489
4552
 
4490
4553
  // src/react/components/auth/SignUpButton.tsx
4491
- import { cloneElement as cloneElement2, isValidElement as isValidElement2, useContext as useContext8, useState as useState24 } from "react";
4554
+ import { cloneElement as cloneElement2, isValidElement as isValidElement2, useContext as useContext8, useState as useState25 } from "react";
4492
4555
  import { jsx as jsx49, jsxs as jsxs39 } from "react/jsx-runtime";
4493
4556
  function SignUpButton(props) {
4494
4557
  const a = useAppearance(props.appearance);
4495
4558
  const scoped = useAppearanceProviderValue(props.appearance);
4496
4559
  const { t } = useCopy(props.localization);
4497
4560
  const ui = useContext8(ThrottleUIContext);
4498
- const [localOpen, setLocalOpen] = useState24(false);
4561
+ const [localOpen, setLocalOpen] = useState25(false);
4499
4562
  const useShared = ui !== null && props.initialView === void 0;
4500
4563
  const label = props.children ?? t.signUp.submitButton;
4501
4564
  if (props.mode === "redirect") {
@@ -4613,7 +4676,7 @@ function Protect(props) {
4613
4676
  }
4614
4677
 
4615
4678
  // src/react/components/UserButton.tsx
4616
- import { useContext as useContext9, useId as useId8, useRef as useRef10, useState as useState25 } from "react";
4679
+ import { useContext as useContext9, useId as useId8, useRef as useRef10, useState as useState26 } from "react";
4617
4680
  import { jsx as jsx54, jsxs as jsxs42 } from "react/jsx-runtime";
4618
4681
  function UserButtonRoot(props) {
4619
4682
  const a = useAppearance(props.appearance);
@@ -4621,7 +4684,7 @@ function UserButtonRoot(props) {
4621
4684
  const { t } = useCopy(props.localization);
4622
4685
  const { auth, status, customer, emailVerified } = useAuth();
4623
4686
  const ui = useContext9(ThrottleUIContext);
4624
- const [localOpen, setLocalOpen] = useState25(false);
4687
+ const [localOpen, setLocalOpen] = useState26(false);
4625
4688
  const accountOpen = ui ? false : localOpen;
4626
4689
  const titleId = useId8();
4627
4690
  const rootRef = useRef10(null);