@doujins/payments-ui 0.1.0 → 0.1.3

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
@@ -354,9 +354,7 @@ interface PaymentMethodOption {
354
354
  type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
355
355
  interface ClientConfig {
356
356
  billingBaseUrl: string;
357
- billingBasePath?: string;
358
357
  accountBaseUrl?: string;
359
- accountBasePath?: string;
360
358
  getAuthToken?: () => string | null | Promise<string | null>;
361
359
  defaultHeaders?: Record<string, string>;
362
360
  fetch?: typeof fetch;
@@ -526,7 +524,7 @@ interface PaymentsDialogContextValue {
526
524
  declare const PaymentsDialogProvider: React$1.FC<React$1.PropsWithChildren>;
527
525
  declare const usePaymentDialogs: () => PaymentsDialogContextValue;
528
526
 
529
- interface PaymentsUIRootProps {
527
+ interface BillingThemeProviderProps {
530
528
  children: React$1.ReactNode;
531
529
  className?: string;
532
530
  /**
@@ -536,22 +534,22 @@ interface PaymentsUIRootProps {
536
534
  dark?: boolean;
537
535
  }
538
536
  /**
539
- * Root wrapper component that provides scoped CSS variables for payments-ui.
540
- * Use this to wrap any payments-ui components to ensure styles don't conflict
537
+ * Scopes the Payments UI theme variables so host app styles are left intact.
538
+ * Use this to wrap any Payments UI components to ensure styles don't conflict
541
539
  * with the consuming application.
542
540
  *
543
541
  * @example
544
542
  * ```tsx
545
- * <PaymentsUIRoot>
543
+ * <BillingThemeProvider>
546
544
  * <SubscriptionCheckoutModal ... />
547
- * </PaymentsUIRoot>
545
+ * </BillingThemeProvider>
548
546
  * ```
549
547
  */
550
- declare const PaymentsUIRoot: React$1.FC<PaymentsUIRootProps>;
548
+ declare const BillingThemeProvider: React$1.FC<BillingThemeProviderProps>;
551
549
  /**
552
550
  prevent conflicts with client app styles
553
551
  */
554
- declare const PaymentsUIPortalRoot: React$1.FC<PaymentsUIRootProps>;
552
+ declare const BillingThemePortal: React$1.FC<BillingThemeProviderProps>;
555
553
 
556
554
  interface CardDetailsFormProps {
557
555
  visible: boolean;
@@ -832,4 +830,4 @@ declare const useSubscriptionActions: () => {
832
830
  subscribeWithCCBill: ({ priceId, email, firstName, lastName, zipCode, country, processor, }: SubscribeWithCCBillParams) => Promise<CheckoutResponse>;
833
831
  };
834
832
 
835
- export { type AuthTokenProvider, type BillingAccessGrant, type BillingDetails, BillingHistory, type BillingHistoryProps, type BillingHistoryTranslations, type BillingStatus, type CCBillSubscribePayload, CancelMembershipDialog, type CancelMembershipDialogProps, type CancelMembershipDialogTranslations, CardDetailsForm, type CardDetailsFormProps, type CheckoutRequestPayload, type CheckoutResponse, type CheckoutStatus, type Client, ClientApiError, type ClientConfig, type CreatePaymentMethodPayload, type GeneratePaymentRequest, type GeneratePaymentResponse, type HttpMethod, type NmiSubscribePayload, type NotificationHandler, type NotificationPayload, type NotificationStatus, type PaginatedPaymentMethods, type PaginatedPayments, type PaginatedResponse, type Payment, type PaymentCallbacks, type PaymentConfig, PaymentContext, type PaymentContextValue, type PaymentEndpoints, type PaymentError, PaymentExperience, type PaymentExperienceProps, type PaymentFeatureFlags, type PaymentFetcher, type PaymentMethod, type PaymentMethodOption, PaymentMethodsSection, type PaymentMethodsSectionProps, type PaymentMethodsSectionTranslations, type PaymentPlatform, PaymentProvider, type PaymentProviderProps, type PaymentSolanaConfig, type PaymentState, type PaymentStatusPayload, type PaymentStatusResponse, type PaymentStep, type PaymentSuccessPayload, type PaymentUserDetails, PaymentsDialogProvider, PaymentsUIPortalRoot, PaymentsUIRoot, type PaymentsUIRootProps, type RequestOptions, type SolanaFlowConfig, type SolanaPayQRCodeIntent, type SolanaPayStatusResponse, type SolanaPayTransaction, type SolanaPaymentMethod, SolanaPaymentSelector, type SolanaPaymentSelectorProps, SolanaPaymentView, type SolanaPaymentViewProps, type SolanaWallet, StoredPaymentMethods, type StoredPaymentMethodsProps, type SubmitPaymentRequest, type SubmitPaymentResponse, type SubscribeWithCCBillParams, type SubscribeWithCardParams, type SubscribeWithSavedMethodParams, SubscriptionCheckoutModal, type SubscriptionCheckoutModalProps, type SubscriptionCheckoutPayload, SubscriptionSuccessDialog, type SupportedTokensResponse, type TokenBalance, type TokenInfo, type TransactionStatus, type VerifyWalletResponse, type WalletChallengeResponse, type WalletConnectionState, WalletDialog, type WalletDialogProps, type WalletListResponse, WalletModal, type WalletModalProps, createClient, usePaymentContext, usePaymentDialogs, usePaymentMethods, usePaymentNotifications, usePaymentStatus, useSolanaQrPayment, useSubscriptionActions, useSupportedTokens, useTokenBalance };
833
+ export { type AuthTokenProvider, type BillingAccessGrant, type BillingDetails, BillingHistory, type BillingHistoryProps, type BillingHistoryTranslations, type BillingStatus, BillingThemePortal, BillingThemeProvider, type BillingThemeProviderProps, type CCBillSubscribePayload, CancelMembershipDialog, type CancelMembershipDialogProps, type CancelMembershipDialogTranslations, CardDetailsForm, type CardDetailsFormProps, type CheckoutRequestPayload, type CheckoutResponse, type CheckoutStatus, type Client, ClientApiError, type ClientConfig, type CreatePaymentMethodPayload, type GeneratePaymentRequest, type GeneratePaymentResponse, type HttpMethod, type NmiSubscribePayload, type NotificationHandler, type NotificationPayload, type NotificationStatus, type PaginatedPaymentMethods, type PaginatedPayments, type PaginatedResponse, type Payment, type PaymentCallbacks, type PaymentConfig, PaymentContext, type PaymentContextValue, type PaymentEndpoints, type PaymentError, PaymentExperience, type PaymentExperienceProps, type PaymentFeatureFlags, type PaymentFetcher, type PaymentMethod, type PaymentMethodOption, PaymentMethodsSection, type PaymentMethodsSectionProps, type PaymentMethodsSectionTranslations, type PaymentPlatform, PaymentProvider, type PaymentProviderProps, type PaymentSolanaConfig, type PaymentState, type PaymentStatusPayload, type PaymentStatusResponse, type PaymentStep, type PaymentSuccessPayload, type PaymentUserDetails, PaymentsDialogProvider, type RequestOptions, type SolanaFlowConfig, type SolanaPayQRCodeIntent, type SolanaPayStatusResponse, type SolanaPayTransaction, type SolanaPaymentMethod, SolanaPaymentSelector, type SolanaPaymentSelectorProps, SolanaPaymentView, type SolanaPaymentViewProps, type SolanaWallet, StoredPaymentMethods, type StoredPaymentMethodsProps, type SubmitPaymentRequest, type SubmitPaymentResponse, type SubscribeWithCCBillParams, type SubscribeWithCardParams, type SubscribeWithSavedMethodParams, SubscriptionCheckoutModal, type SubscriptionCheckoutModalProps, type SubscriptionCheckoutPayload, SubscriptionSuccessDialog, type SupportedTokensResponse, type TokenBalance, type TokenInfo, type TransactionStatus, type VerifyWalletResponse, type WalletChallengeResponse, type WalletConnectionState, WalletDialog, type WalletDialogProps, type WalletListResponse, WalletModal, type WalletModalProps, createClient, usePaymentContext, usePaymentDialogs, usePaymentMethods, usePaymentNotifications, usePaymentStatus, useSolanaQrPayment, useSubscriptionActions, useSupportedTokens, useTokenBalance };
package/dist/index.d.ts CHANGED
@@ -354,9 +354,7 @@ interface PaymentMethodOption {
354
354
  type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
355
355
  interface ClientConfig {
356
356
  billingBaseUrl: string;
357
- billingBasePath?: string;
358
357
  accountBaseUrl?: string;
359
- accountBasePath?: string;
360
358
  getAuthToken?: () => string | null | Promise<string | null>;
361
359
  defaultHeaders?: Record<string, string>;
362
360
  fetch?: typeof fetch;
@@ -526,7 +524,7 @@ interface PaymentsDialogContextValue {
526
524
  declare const PaymentsDialogProvider: React$1.FC<React$1.PropsWithChildren>;
527
525
  declare const usePaymentDialogs: () => PaymentsDialogContextValue;
528
526
 
529
- interface PaymentsUIRootProps {
527
+ interface BillingThemeProviderProps {
530
528
  children: React$1.ReactNode;
531
529
  className?: string;
532
530
  /**
@@ -536,22 +534,22 @@ interface PaymentsUIRootProps {
536
534
  dark?: boolean;
537
535
  }
538
536
  /**
539
- * Root wrapper component that provides scoped CSS variables for payments-ui.
540
- * Use this to wrap any payments-ui components to ensure styles don't conflict
537
+ * Scopes the Payments UI theme variables so host app styles are left intact.
538
+ * Use this to wrap any Payments UI components to ensure styles don't conflict
541
539
  * with the consuming application.
542
540
  *
543
541
  * @example
544
542
  * ```tsx
545
- * <PaymentsUIRoot>
543
+ * <BillingThemeProvider>
546
544
  * <SubscriptionCheckoutModal ... />
547
- * </PaymentsUIRoot>
545
+ * </BillingThemeProvider>
548
546
  * ```
549
547
  */
550
- declare const PaymentsUIRoot: React$1.FC<PaymentsUIRootProps>;
548
+ declare const BillingThemeProvider: React$1.FC<BillingThemeProviderProps>;
551
549
  /**
552
550
  prevent conflicts with client app styles
553
551
  */
554
- declare const PaymentsUIPortalRoot: React$1.FC<PaymentsUIRootProps>;
552
+ declare const BillingThemePortal: React$1.FC<BillingThemeProviderProps>;
555
553
 
556
554
  interface CardDetailsFormProps {
557
555
  visible: boolean;
@@ -832,4 +830,4 @@ declare const useSubscriptionActions: () => {
832
830
  subscribeWithCCBill: ({ priceId, email, firstName, lastName, zipCode, country, processor, }: SubscribeWithCCBillParams) => Promise<CheckoutResponse>;
833
831
  };
834
832
 
835
- export { type AuthTokenProvider, type BillingAccessGrant, type BillingDetails, BillingHistory, type BillingHistoryProps, type BillingHistoryTranslations, type BillingStatus, type CCBillSubscribePayload, CancelMembershipDialog, type CancelMembershipDialogProps, type CancelMembershipDialogTranslations, CardDetailsForm, type CardDetailsFormProps, type CheckoutRequestPayload, type CheckoutResponse, type CheckoutStatus, type Client, ClientApiError, type ClientConfig, type CreatePaymentMethodPayload, type GeneratePaymentRequest, type GeneratePaymentResponse, type HttpMethod, type NmiSubscribePayload, type NotificationHandler, type NotificationPayload, type NotificationStatus, type PaginatedPaymentMethods, type PaginatedPayments, type PaginatedResponse, type Payment, type PaymentCallbacks, type PaymentConfig, PaymentContext, type PaymentContextValue, type PaymentEndpoints, type PaymentError, PaymentExperience, type PaymentExperienceProps, type PaymentFeatureFlags, type PaymentFetcher, type PaymentMethod, type PaymentMethodOption, PaymentMethodsSection, type PaymentMethodsSectionProps, type PaymentMethodsSectionTranslations, type PaymentPlatform, PaymentProvider, type PaymentProviderProps, type PaymentSolanaConfig, type PaymentState, type PaymentStatusPayload, type PaymentStatusResponse, type PaymentStep, type PaymentSuccessPayload, type PaymentUserDetails, PaymentsDialogProvider, PaymentsUIPortalRoot, PaymentsUIRoot, type PaymentsUIRootProps, type RequestOptions, type SolanaFlowConfig, type SolanaPayQRCodeIntent, type SolanaPayStatusResponse, type SolanaPayTransaction, type SolanaPaymentMethod, SolanaPaymentSelector, type SolanaPaymentSelectorProps, SolanaPaymentView, type SolanaPaymentViewProps, type SolanaWallet, StoredPaymentMethods, type StoredPaymentMethodsProps, type SubmitPaymentRequest, type SubmitPaymentResponse, type SubscribeWithCCBillParams, type SubscribeWithCardParams, type SubscribeWithSavedMethodParams, SubscriptionCheckoutModal, type SubscriptionCheckoutModalProps, type SubscriptionCheckoutPayload, SubscriptionSuccessDialog, type SupportedTokensResponse, type TokenBalance, type TokenInfo, type TransactionStatus, type VerifyWalletResponse, type WalletChallengeResponse, type WalletConnectionState, WalletDialog, type WalletDialogProps, type WalletListResponse, WalletModal, type WalletModalProps, createClient, usePaymentContext, usePaymentDialogs, usePaymentMethods, usePaymentNotifications, usePaymentStatus, useSolanaQrPayment, useSubscriptionActions, useSupportedTokens, useTokenBalance };
833
+ export { type AuthTokenProvider, type BillingAccessGrant, type BillingDetails, BillingHistory, type BillingHistoryProps, type BillingHistoryTranslations, type BillingStatus, BillingThemePortal, BillingThemeProvider, type BillingThemeProviderProps, type CCBillSubscribePayload, CancelMembershipDialog, type CancelMembershipDialogProps, type CancelMembershipDialogTranslations, CardDetailsForm, type CardDetailsFormProps, type CheckoutRequestPayload, type CheckoutResponse, type CheckoutStatus, type Client, ClientApiError, type ClientConfig, type CreatePaymentMethodPayload, type GeneratePaymentRequest, type GeneratePaymentResponse, type HttpMethod, type NmiSubscribePayload, type NotificationHandler, type NotificationPayload, type NotificationStatus, type PaginatedPaymentMethods, type PaginatedPayments, type PaginatedResponse, type Payment, type PaymentCallbacks, type PaymentConfig, PaymentContext, type PaymentContextValue, type PaymentEndpoints, type PaymentError, PaymentExperience, type PaymentExperienceProps, type PaymentFeatureFlags, type PaymentFetcher, type PaymentMethod, type PaymentMethodOption, PaymentMethodsSection, type PaymentMethodsSectionProps, type PaymentMethodsSectionTranslations, type PaymentPlatform, PaymentProvider, type PaymentProviderProps, type PaymentSolanaConfig, type PaymentState, type PaymentStatusPayload, type PaymentStatusResponse, type PaymentStep, type PaymentSuccessPayload, type PaymentUserDetails, PaymentsDialogProvider, type RequestOptions, type SolanaFlowConfig, type SolanaPayQRCodeIntent, type SolanaPayStatusResponse, type SolanaPayTransaction, type SolanaPaymentMethod, SolanaPaymentSelector, type SolanaPaymentSelectorProps, SolanaPaymentView, type SolanaPaymentViewProps, type SolanaWallet, StoredPaymentMethods, type StoredPaymentMethodsProps, type SubmitPaymentRequest, type SubmitPaymentResponse, type SubscribeWithCCBillParams, type SubscribeWithCardParams, type SubscribeWithSavedMethodParams, SubscriptionCheckoutModal, type SubscriptionCheckoutModalProps, type SubscriptionCheckoutPayload, SubscriptionSuccessDialog, type SupportedTokensResponse, type TokenBalance, type TokenInfo, type TransactionStatus, type VerifyWalletResponse, type WalletChallengeResponse, type WalletConnectionState, WalletDialog, type WalletDialogProps, type WalletListResponse, WalletModal, type WalletModalProps, createClient, usePaymentContext, usePaymentDialogs, usePaymentMethods, usePaymentNotifications, usePaymentStatus, useSolanaQrPayment, useSubscriptionActions, useSupportedTokens, useTokenBalance };