vrtx-react-native 0.1.61 → 0.1.63

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/README.md CHANGED
@@ -11,14 +11,7 @@ npm install vrtx-react-native
11
11
  ## Quick start
12
12
 
13
13
  ```ts
14
- import {
15
- Environment,
16
- Language,
17
- Mode,
18
- onError,
19
- onSuccess,
20
- setup,
21
- } from 'vrtx-react-native';
14
+ import { Environment, Language, Mode, onError, onSuccess, setup } from 'vrtx-react-native';
22
15
 
23
16
  const successSubscription = onSuccess(() => {
24
17
  console.log('Vrtx screen opened');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vrtx-react-native",
3
- "version": "0.1.61",
3
+ "version": "0.1.63",
4
4
  "description": "vrtx react-native",
5
5
  "keywords": [
6
6
  "VrtxAndroid",
package/.oxfmtrc.json DELETED
@@ -1,5 +0,0 @@
1
- {
2
- "$schema": "./node_modules/oxfmt/configuration_schema.json",
3
- "singleQuote": true,
4
- "ignorePatterns": ["build", "ios/Frameworks"]
5
- }
package/.oxlintrc.json DELETED
@@ -1,5 +0,0 @@
1
- {
2
- "$schema": "./node_modules/oxlint/configuration_schema.json",
3
- "plugins": ["eslint", "typescript", "unicorn", "oxc", "react", "import"],
4
- "ignorePatterns": ["build", "ios/Frameworks"]
5
- }
package/AGENTS.md DELETED
@@ -1,44 +0,0 @@
1
- # Local Testing
2
-
3
- Use the `example` app for local validation through the same package flow used by
4
- real consumers. Do not use `npm link` for normal testing.
5
-
6
- ## After SDK changes
7
-
8
- When changing files in `src/`, `android/`, or `ios/`:
9
-
10
- 1. From the repository root, publish a new patch release:
11
-
12
- ```bash
13
- npm run release
14
- ```
15
-
16
- This bumps the package version and publishes
17
- `vrtx-react-native` to the configured registry.
18
-
19
- 2. Update `example/package.json` so
20
- `vrtx-react-native` points to the newly released version.
21
-
22
- 3. Reinstall the example app dependencies:
23
-
24
- ```bash
25
- cd example
26
- npm install
27
- ```
28
-
29
- 4. Test the installed package through normal Expo and React Native autolinking:
30
-
31
- ```bash
32
- npm run android
33
- # or
34
- npm run ios
35
- ```
36
-
37
- ## Testing notes
38
-
39
- - The example app should test the published package version, not a symlinked
40
- local checkout.
41
- - `npm install` in `example/` runs `npx expo prebuild`, so native projects are
42
- regenerated before testing.
43
- - Rebuild the example app after native changes; Metro reloads alone is not
44
- enough for Android or iOS code changes.
package/CLAUDE.md DELETED
@@ -1,44 +0,0 @@
1
- # Local Testing
2
-
3
- Use the `example` app for local validation through the same package flow used by
4
- real consumers. Do not use `npm link` for normal testing.
5
-
6
- ## After SDK changes
7
-
8
- When changing files in `src/`, `android/`, or `ios/`:
9
-
10
- 1. From the repository root, publish a new patch release:
11
-
12
- ```bash
13
- npm run release
14
- ```
15
-
16
- This bumps the package version and publishes
17
- `vrtx-react-native` to the configured registry.
18
-
19
- 2. Update `example/package.json` so
20
- `vrtx-react-native` points to the newly released version.
21
-
22
- 3. Reinstall the example app dependencies:
23
-
24
- ```bash
25
- cd example
26
- npm install
27
- ```
28
-
29
- 4. Test the installed package through normal Expo and React Native autolinking:
30
-
31
- ```bash
32
- npm run android
33
- # or
34
- npm run ios
35
- ```
36
-
37
- ## Testing notes
38
-
39
- - The example app should test the published package version, not a symlinked
40
- local checkout.
41
- - `npm install` in `example/` runs `npx expo prebuild`, so native projects are
42
- regenerated before testing.
43
- - Rebuild the example app after native changes; Metro reloads alone is not
44
- enough for Android or iOS code changes.
package/SECURITY.md DELETED
@@ -1,21 +0,0 @@
1
- # Security Policy
2
-
3
- ## Supported Versions
4
-
5
- Use this section to tell people about which versions of your project are
6
- currently being supported with security updates.
7
-
8
- | Version | Supported |
9
- | ------- | ------------------ |
10
- | 5.1.x | :white_check_mark: |
11
- | 5.0.x | :x: |
12
- | 4.0.x | :white_check_mark: |
13
- | < 4.0 | :x: |
14
-
15
- ## Reporting a Vulnerability
16
-
17
- Use this section to tell people how to report a vulnerability.
18
-
19
- Tell them where to go, how often they can expect to get an update on a
20
- reported vulnerability, what to expect if the vulnerability is accepted or
21
- declined, etc.
@@ -1,48 +0,0 @@
1
- import { NativeModule, requireNativeModule } from 'expo';
2
-
3
- type VrtxAndroidModuleEvents = {
4
- onSuccess: () => void;
5
- onError: (params: { code: string; message: string }) => void;
6
- };
7
-
8
- declare class VrtxAndroidModule extends NativeModule<VrtxAndroidModuleEvents> {
9
- readonly VERSION: string;
10
- readonly LIBRARY_NAME: string;
11
-
12
- /**
13
- * Initialize and launch the Vrtx SDK UI flow
14
- *
15
- * @param clientId Your Vrtx client ID from the dashboard
16
- * @param clientSecret Your Vrtx client secret from the dashboard
17
- * @param environment The environment (SANDBOX or STAGING)
18
- * @param language The language for the UI (ENGLISH or ARABIC)
19
- * @param mode Optional display mode (LIGHT or DARK) - defaults to LIGHT
20
- * @param fontFamily Optional React Native font family name - defaults to the system font
21
- */
22
- setup(
23
- clientId: string,
24
- clientSecret: string,
25
- environment: 'SANDBOX' | 'STAGING',
26
- language: 'ENGLISH' | 'ARABIC',
27
- mode?: 'LIGHT' | 'DARK',
28
- fontFamily?: string,
29
- ): Promise<void>;
30
- }
31
-
32
- // This call loads the native module object from the JSI.
33
- export default requireNativeModule<VrtxAndroidModule>('VrtxAndroid');
34
-
35
- export enum Environment {
36
- Sandbox = 'SANDBOX',
37
- Staging = 'STAGING',
38
- }
39
-
40
- export enum Language {
41
- English = 'ENGLISH',
42
- Arabic = 'ARABIC',
43
- }
44
-
45
- export enum Mode {
46
- LIGHT = 'LIGHT',
47
- DARK = 'DARK',
48
- }
package/src/index.ts DELETED
@@ -1,82 +0,0 @@
1
- // Native module
2
- import VrtxAndroidModule from './VrtxAndroidModule';
3
-
4
- // Re-export enums for the public setup contract.
5
- export { Environment, Language, Mode } from './VrtxAndroidModule';
6
- export { default as VrtxAndroid } from './VrtxAndroidModule';
7
-
8
- // Types
9
- export type VrtxEnvironment = 'SANDBOX' | 'STAGING';
10
- export type VrtxLanguage = 'ENGLISH' | 'ARABIC';
11
- export type VrtxMode = 'LIGHT' | 'DARK';
12
-
13
- export interface VrtxConfig {
14
- clientId: string;
15
- clientSecret: string;
16
- environment: VrtxEnvironment;
17
- language?: VrtxLanguage;
18
- mode?: VrtxMode;
19
- fontFamily?: string;
20
- }
21
-
22
- // Promise-based setup function - resolves when SDK screen opens
23
- export function setup(config: VrtxConfig): Promise<void>;
24
- export function setup(
25
- clientId: string,
26
- clientSecret: string,
27
- environment: VrtxEnvironment,
28
- language?: VrtxLanguage,
29
- mode?: VrtxMode,
30
- fontFamily?: string,
31
- ): Promise<void>;
32
- export async function setup(
33
- configOrClientId: VrtxConfig | string,
34
- clientSecret?: string,
35
- environment?: VrtxEnvironment,
36
- language: VrtxLanguage = 'ENGLISH',
37
- mode?: VrtxMode,
38
- fontFamily?: string,
39
- ): Promise<void> {
40
- const config =
41
- typeof configOrClientId === 'string'
42
- ? {
43
- clientId: configOrClientId,
44
- clientSecret: clientSecret!,
45
- environment: environment!,
46
- language,
47
- mode,
48
- fontFamily,
49
- }
50
- : configOrClientId;
51
-
52
- return await VrtxAndroidModule.setup(
53
- config.clientId,
54
- config.clientSecret,
55
- config.environment,
56
- config.language ?? 'ENGLISH',
57
- config.mode,
58
- config.fontFamily,
59
- );
60
- }
61
-
62
- // Type-safe addListener overloads
63
- export function addListener(eventName: 'onSuccess', callback: () => void): { remove: () => void };
64
- export function addListener(
65
- eventName: 'onError',
66
- callback: (error: { code: string; message: string }) => void,
67
- ): { remove: () => void };
68
- export function addListener(
69
- eventName: string,
70
- callback: (...args: any[]) => void,
71
- ): { remove: () => void } {
72
- return VrtxAndroidModule.addListener(eventName as any, callback);
73
- }
74
-
75
- // Convenience wrappers
76
- export function onSuccess(callback: () => void) {
77
- return addListener('onSuccess', callback);
78
- }
79
-
80
- export function onError(callback: (error: { code: string; message: string }) => void) {
81
- return addListener('onError', callback);
82
- }
package/tsconfig.json DELETED
@@ -1,9 +0,0 @@
1
- // @generated by expo-module-scripts
2
- {
3
- "extends": "expo-module-scripts/tsconfig.base",
4
- "compilerOptions": {
5
- "outDir": "./build"
6
- },
7
- "include": ["./src"],
8
- "exclude": ["**/__mocks__/*", "**/__tests__/*", "**/__rsc_tests__/*"]
9
- }