@revenuecat/purchases-capacitor-ui 11.2.15 → 11.2.17

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.
@@ -13,6 +13,6 @@ Pod::Spec.new do |s|
13
13
  s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
14
14
  s.ios.deployment_target = '15.0'
15
15
  s.dependency 'Capacitor'
16
- s.dependency 'PurchasesHybridCommonUI', '17.19.1'
16
+ s.dependency 'PurchasesHybridCommonUI', '17.21.2'
17
17
  s.swift_version = '5.1'
18
18
  end
@@ -51,6 +51,6 @@ repositories {
51
51
  dependencies {
52
52
  implementation project(':capacitor-android')
53
53
  implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
54
- implementation 'com.revenuecat.purchases:purchases-hybrid-common-ui:17.19.1'
54
+ implementation 'com.revenuecat.purchases:purchases-hybrid-common-ui:17.21.2'
55
55
  implementation "org.jetbrains.kotlin:kotlin-stdlib:1.8.20"
56
56
  }
@@ -1 +1 @@
1
- {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AAS/E,MAAM,OAAO,eAAgB,SAAQ,SAAS;IAI5C;QACE,KAAK,EAAE,CAAC;QAJF,yBAAoB,GAAG,KAAK,CAAC;QAC7B,gCAA2B,GAAG,iDAAiD,CAAC;IAIxF,CAAC;IAED,KAAK,CAAC,iBAAiB,CAAC,OAA0C;QAChE,IAAI,CAAC,oBAAoB,GAAG,OAAO,CAAC,oBAAoB,CAAC;QACzD,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC3B,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,OAA+B;QAClD,OAAO,IAAI,CAAC,8BAA8B,CACxC,gBAAgB,EAChB;YACE,MAAM,EAAE,cAAc,CAA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in } from '@capacitor/core';\nimport type { PluginListenerHandle } from '@capacitor/core';\nimport { PAYWALL_RESULT } from '@revenuecat/purchases-typescript-internal-esm';\n\nimport type {\n PaywallResult,\n PresentPaywallIfNeededOptions,\n PresentPaywallOptions,\n RevenueCatUIPlugin,\n} from './definitions';\n\nexport class RevenueCatUIWeb extends WebPlugin implements RevenueCatUIPlugin {\n private shouldMockWebResults = false;\n private webNotSupportedErrorMessage = 'RevenueCatUI is not supported on web platforms.';\n\n constructor() {\n super();\n }\n\n async setMockWebResults(options: { shouldMockWebResults: boolean }): Promise<void> {\n this.shouldMockWebResults = options.shouldMockWebResults;\n return Promise.resolve();\n }\n\n async presentPaywall(options?: PresentPaywallOptions): Promise<PaywallResult> {\n return this.mockReturningFunctionIfEnabled(\n 'presentPaywall',\n {\n result: PAYWALL_RESULT.NOT_PRESENTED,\n },\n options,\n );\n }\n\n async presentPaywallIfNeeded(options: PresentPaywallIfNeededOptions): Promise<PaywallResult> {\n return this.mockReturningFunctionIfEnabled(\n 'presentPaywallIfNeeded',\n {\n result: PAYWALL_RESULT.NOT_PRESENTED,\n },\n options,\n );\n }\n\n async presentCustomerCenter(): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('presentCustomerCenter');\n }\n\n addListener(eventName: string, listener: (...args: any[]) => void): Promise<PluginListenerHandle> {\n if (eventName !== 'paywallDisplayed' && eventName !== 'paywallDismissed') {\n console.warn(`Unsupported event: ${eventName}`);\n }\n return super.addListener(eventName, listener);\n }\n\n removeAllListeners(): Promise<void> {\n return super.removeAllListeners();\n }\n\n private mockNonReturningFunctionIfEnabled(functionName: string): Promise<void> {\n if (!this.shouldMockWebResults) {\n return Promise.reject(this.webNotSupportedErrorMessage);\n }\n console.log(`${functionName} called on web with mocking enabled. No-op`);\n return Promise.resolve();\n }\n\n private mockReturningFunctionIfEnabled<T>(functionName: string, returnValue: T, options?: any): Promise<T> {\n if (!this.shouldMockWebResults) {\n return Promise.reject(this.webNotSupportedErrorMessage);\n }\n console.log(`${functionName} called on web with mocking enabled. Returning mocked value`, options);\n return Promise.resolve(returnValue);\n }\n}\n"]}
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AAS/E,MAAM,OAAO,eAAgB,SAAQ,SAAS;IAI5C;QACE,KAAK,EAAE,CAAC;QAJF,yBAAoB,GAAG,KAAK,CAAC;QAC7B,gCAA2B,GAAG,iDAAiD,CAAC;IAIxF,CAAC;IAED,KAAK,CAAC,iBAAiB,CAAC,OAA0C;QAChE,IAAI,CAAC,oBAAoB,GAAG,OAAO,CAAC,oBAAoB,CAAC;QACzD,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC3B,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,OAA+B;QAClD,OAAO,IAAI,CAAC,8BAA8B,CACxC,gBAAgB,EAChB;YACE,MAAM,EAAE,cAAc,CAAC,aAAa;SACrC,EACD,OAAO,CACR,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,sBAAsB,CAAC,OAAsC;QACjE,OAAO,IAAI,CAAC,8BAA8B,CACxC,wBAAwB,EACxB;YACE,MAAM,EAAE,cAAc,CAAC,aAAa;SACrC,EACD,OAAO,CACR,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,qBAAqB;QACzB,OAAO,IAAI,CAAC,iCAAiC,CAAC,uBAAuB,CAAC,CAAC;IACzE,CAAC;IAED,WAAW,CAAC,SAAiB,EAAE,QAAkC;QAC/D,IAAI,SAAS,KAAK,kBAAkB,IAAI,SAAS,KAAK,kBAAkB,EAAE,CAAC;YACzE,OAAO,CAAC,IAAI,CAAC,sBAAsB,SAAS,EAAE,CAAC,CAAC;QAClD,CAAC;QACD,OAAO,KAAK,CAAC,WAAW,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAChD,CAAC;IAED,kBAAkB;QAChB,OAAO,KAAK,CAAC,kBAAkB,EAAE,CAAC;IACpC,CAAC;IAEO,iCAAiC,CAAC,YAAoB;QAC5D,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE,CAAC;YAC/B,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;QAC1D,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,GAAG,YAAY,4CAA4C,CAAC,CAAC;QACzE,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC3B,CAAC;IAEO,8BAA8B,CAAI,YAAoB,EAAE,WAAc,EAAE,OAAa;QAC3F,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE,CAAC;YAC/B,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;QAC1D,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,GAAG,YAAY,6DAA6D,EAAE,OAAO,CAAC,CAAC;QACnG,OAAO,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IACtC,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\nimport type { PluginListenerHandle } from '@capacitor/core';\nimport { PAYWALL_RESULT } from '@revenuecat/purchases-typescript-internal-esm';\n\nimport type {\n PaywallResult,\n PresentPaywallIfNeededOptions,\n PresentPaywallOptions,\n RevenueCatUIPlugin,\n} from './definitions';\n\nexport class RevenueCatUIWeb extends WebPlugin implements RevenueCatUIPlugin {\n private shouldMockWebResults = false;\n private webNotSupportedErrorMessage = 'RevenueCatUI is not supported on web platforms.';\n\n constructor() {\n super();\n }\n\n async setMockWebResults(options: { shouldMockWebResults: boolean }): Promise<void> {\n this.shouldMockWebResults = options.shouldMockWebResults;\n return Promise.resolve();\n }\n\n async presentPaywall(options?: PresentPaywallOptions): Promise<PaywallResult> {\n return this.mockReturningFunctionIfEnabled(\n 'presentPaywall',\n {\n result: PAYWALL_RESULT.NOT_PRESENTED,\n },\n options,\n );\n }\n\n async presentPaywallIfNeeded(options: PresentPaywallIfNeededOptions): Promise<PaywallResult> {\n return this.mockReturningFunctionIfEnabled(\n 'presentPaywallIfNeeded',\n {\n result: PAYWALL_RESULT.NOT_PRESENTED,\n },\n options,\n );\n }\n\n async presentCustomerCenter(): Promise<void> {\n return this.mockNonReturningFunctionIfEnabled('presentCustomerCenter');\n }\n\n addListener(eventName: string, listener: (...args: any[]) => void): Promise<PluginListenerHandle> {\n if (eventName !== 'paywallDisplayed' && eventName !== 'paywallDismissed') {\n console.warn(`Unsupported event: ${eventName}`);\n }\n return super.addListener(eventName, listener);\n }\n\n removeAllListeners(): Promise<void> {\n return super.removeAllListeners();\n }\n\n private mockNonReturningFunctionIfEnabled(functionName: string): Promise<void> {\n if (!this.shouldMockWebResults) {\n return Promise.reject(this.webNotSupportedErrorMessage);\n }\n console.log(`${functionName} called on web with mocking enabled. No-op`);\n return Promise.resolve();\n }\n\n private mockReturningFunctionIfEnabled<T>(functionName: string, returnValue: T, options?: any): Promise<T> {\n if (!this.shouldMockWebResults) {\n return Promise.reject(this.webNotSupportedErrorMessage);\n }\n console.log(`${functionName} called on web with mocking enabled. Returning mocked value`, options);\n return Promise.resolve(returnValue);\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@revenuecat/purchases-capacitor-ui",
3
- "version": "11.2.15",
3
+ "version": "11.2.17",
4
4
  "description": "UI components for RevenueCat Capacitor SDK",
5
5
  "main": "dist/esm/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -61,7 +61,7 @@
61
61
  "dependencies": {
62
62
  "@capacitor/core": "^7.0.0",
63
63
  "@revenuecat/purchases-capacitor": "^10.2.4",
64
- "@revenuecat/purchases-typescript-internal-esm": "17.19.1"
64
+ "@revenuecat/purchases-typescript-internal-esm": "17.21.2"
65
65
  },
66
66
  "peerDependencies": {
67
67
  "@capacitor/core": "^7.0.0"
@@ -71,11 +71,12 @@
71
71
  "@capacitor/docgen": "^0.3.0",
72
72
  "@ionic/eslint-config": "^0.4.0",
73
73
  "@ionic/prettier-config": "^4.0.0",
74
+ "@types/node": "^24.0.0",
74
75
  "eslint": "^8.57.0",
75
76
  "prettier": "^3.4.2",
76
77
  "prettier-plugin-java": "^2.6.6",
77
78
  "rimraf": "^6.0.1",
78
79
  "rollup": "^4.30.1",
79
- "typescript": "~4.1.5"
80
+ "typescript": "^5.2.2"
80
81
  }
81
82
  }