@revenuecat/purchases-capacitor-ui
Version:
UI components for RevenueCat Capacitor SDK
41 lines • 1.82 kB
JavaScript
import { PAYWALL_RESULT } from '@revenuecat/purchases-typescript-internal-esm';
/**
* Possible outcomes from a custom {@link PurchaseLogic} operation.
*/
export var PURCHASE_LOGIC_RESULT;
(function (PURCHASE_LOGIC_RESULT) {
/** The purchase or restore completed successfully. */
PURCHASE_LOGIC_RESULT["SUCCESS"] = "SUCCESS";
/** The user cancelled the purchase or restore. */
PURCHASE_LOGIC_RESULT["CANCELLATION"] = "CANCELLATION";
/** The purchase or restore failed with an error. */
PURCHASE_LOGIC_RESULT["ERROR"] = "ERROR";
})(PURCHASE_LOGIC_RESULT || (PURCHASE_LOGIC_RESULT = {}));
/** @see {@link IOSPaywallPresentationStyle} */
export const IOS_PAYWALL_PRESENTATION_STYLE = {
/** Presents the paywall in full-screen mode. */
FULL_SCREEN: 'FULL_SCREEN',
/** Presents the paywall as a sheet. This is the default on iOS. */
SHEET: 'SHEET',
};
/** @see {@link AndroidPaywallPresentationStyle} */
export const ANDROID_PAYWALL_PRESENTATION_STYLE = {
/** Presents the paywall in full-screen mode. This is the default on Android. */
FULL_SCREEN: 'FULL_SCREEN',
};
/** Convenience presets for {@link PaywallPresentationConfiguration}. */
export const PaywallPresentationConfiguration = {
/** Full-screen presentation on all platforms. */
FULL_SCREEN: {
ios: IOS_PAYWALL_PRESENTATION_STYLE.FULL_SCREEN,
android: ANDROID_PAYWALL_PRESENTATION_STYLE.FULL_SCREEN,
},
/** Default presentation: sheet on iOS, full-screen on Android. */
DEFAULT: {
ios: IOS_PAYWALL_PRESENTATION_STYLE.SHEET,
android: ANDROID_PAYWALL_PRESENTATION_STYLE.FULL_SCREEN,
},
};
// Using the enum from purchases-typescript-internal-esm instead of defining our own
export { PAYWALL_RESULT as PaywallResultEnum };
//# sourceMappingURL=definitions.js.map