@rownd/react-native 0.1.1

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.
Files changed (175) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +213 -0
  3. package/android/build.gradle +59 -0
  4. package/android/src/main/AndroidManifest.xml +4 -0
  5. package/android/src/main/java/com/reactnative/ReactNativePackage.java +22 -0
  6. package/android/src/main/java/com/reactnative/ReactNativeViewManager.java +31 -0
  7. package/ios/ReactNative.xcodeproj/project.pbxproj +282 -0
  8. package/ios/ReactNative.xcodeproj/project.xcworkspace/contents.xcworkspacedata +4 -0
  9. package/ios/ReactNativeViewManager.m +34 -0
  10. package/lib/commonjs/assets/images/checkmark--filled.svg +12 -0
  11. package/lib/commonjs/assets/images/email-verify-waiting.svg +36 -0
  12. package/lib/commonjs/assets/images/phone-verify-waiting.svg +26 -0
  13. package/lib/commonjs/components/AuthenticatedComponent.js +35 -0
  14. package/lib/commonjs/components/AuthenticatedComponent.js.map +1 -0
  15. package/lib/commonjs/components/AutoSigninDialog.js +119 -0
  16. package/lib/commonjs/components/AutoSigninDialog.js.map +1 -0
  17. package/lib/commonjs/components/DefaultContext.js +269 -0
  18. package/lib/commonjs/components/DefaultContext.js.map +1 -0
  19. package/lib/commonjs/components/GlobalContext.js +340 -0
  20. package/lib/commonjs/components/GlobalContext.js.map +1 -0
  21. package/lib/commonjs/components/RowndComponents.js +29 -0
  22. package/lib/commonjs/components/RowndComponents.js.map +1 -0
  23. package/lib/commonjs/components/RowndProvider.js +55 -0
  24. package/lib/commonjs/components/RowndProvider.js.map +1 -0
  25. package/lib/commonjs/components/SignIn.js +622 -0
  26. package/lib/commonjs/components/SignIn.js.map +1 -0
  27. package/lib/commonjs/data/actions.js +26 -0
  28. package/lib/commonjs/data/actions.js.map +1 -0
  29. package/lib/commonjs/hooks/api.js +157 -0
  30. package/lib/commonjs/hooks/api.js.map +1 -0
  31. package/lib/commonjs/hooks/debounce.js +38 -0
  32. package/lib/commonjs/hooks/debounce.js.map +1 -0
  33. package/lib/commonjs/hooks/fingerprint.js +176 -0
  34. package/lib/commonjs/hooks/fingerprint.js.map +1 -0
  35. package/lib/commonjs/hooks/index.js +48 -0
  36. package/lib/commonjs/hooks/index.js.map +1 -0
  37. package/lib/commonjs/hooks/interval.js +31 -0
  38. package/lib/commonjs/hooks/interval.js.map +1 -0
  39. package/lib/commonjs/hooks/nav.js +39 -0
  40. package/lib/commonjs/hooks/nav.js.map +1 -0
  41. package/lib/commonjs/hooks/rownd.js +163 -0
  42. package/lib/commonjs/hooks/rownd.js.map +1 -0
  43. package/lib/commonjs/index.js +32 -0
  44. package/lib/commonjs/index.js.map +1 -0
  45. package/lib/commonjs/index.tsx.bak +26 -0
  46. package/lib/commonjs/types.js +2 -0
  47. package/lib/commonjs/types.js.map +1 -0
  48. package/lib/commonjs/utils/config.js +28 -0
  49. package/lib/commonjs/utils/config.js.map +1 -0
  50. package/lib/commonjs/utils/events.js +57 -0
  51. package/lib/commonjs/utils/events.js.map +1 -0
  52. package/lib/commonjs/utils/form.js +46 -0
  53. package/lib/commonjs/utils/form.js.map +1 -0
  54. package/lib/commonjs/utils/queue.js +117 -0
  55. package/lib/commonjs/utils/queue.js.map +1 -0
  56. package/lib/commonjs/utils/storage.js +15 -0
  57. package/lib/commonjs/utils/storage.js.map +1 -0
  58. package/lib/commonjs/utils/tailwind.js +17 -0
  59. package/lib/commonjs/utils/tailwind.js.map +1 -0
  60. package/lib/commonjs/utils/tokens.js +35 -0
  61. package/lib/commonjs/utils/tokens.js.map +1 -0
  62. package/lib/commonjs/utils/user-data.js +21 -0
  63. package/lib/commonjs/utils/user-data.js.map +1 -0
  64. package/lib/module/assets/images/checkmark--filled.svg +12 -0
  65. package/lib/module/assets/images/email-verify-waiting.svg +36 -0
  66. package/lib/module/assets/images/phone-verify-waiting.svg +26 -0
  67. package/lib/module/components/AuthenticatedComponent.js +24 -0
  68. package/lib/module/components/AuthenticatedComponent.js.map +1 -0
  69. package/lib/module/components/AutoSigninDialog.js +100 -0
  70. package/lib/module/components/AutoSigninDialog.js.map +1 -0
  71. package/lib/module/components/DefaultContext.js +244 -0
  72. package/lib/module/components/DefaultContext.js.map +1 -0
  73. package/lib/module/components/GlobalContext.js +318 -0
  74. package/lib/module/components/GlobalContext.js.map +1 -0
  75. package/lib/module/components/RowndComponents.js +14 -0
  76. package/lib/module/components/RowndComponents.js.map +1 -0
  77. package/lib/module/components/RowndProvider.js +39 -0
  78. package/lib/module/components/RowndProvider.js.map +1 -0
  79. package/lib/module/components/SignIn.js +593 -0
  80. package/lib/module/components/SignIn.js.map +1 -0
  81. package/lib/module/data/actions.js +19 -0
  82. package/lib/module/data/actions.js.map +1 -0
  83. package/lib/module/hooks/api.js +138 -0
  84. package/lib/module/hooks/api.js.map +1 -0
  85. package/lib/module/hooks/debounce.js +29 -0
  86. package/lib/module/hooks/debounce.js.map +1 -0
  87. package/lib/module/hooks/fingerprint.js +157 -0
  88. package/lib/module/hooks/fingerprint.js.map +1 -0
  89. package/lib/module/hooks/index.js +7 -0
  90. package/lib/module/hooks/index.js.map +1 -0
  91. package/lib/module/hooks/interval.js +23 -0
  92. package/lib/module/hooks/interval.js.map +1 -0
  93. package/lib/module/hooks/nav.js +30 -0
  94. package/lib/module/hooks/nav.js.map +1 -0
  95. package/lib/module/hooks/rownd.js +148 -0
  96. package/lib/module/hooks/rownd.js.map +1 -0
  97. package/lib/module/index.js +6 -0
  98. package/lib/module/index.js.map +1 -0
  99. package/lib/module/index.tsx.bak +26 -0
  100. package/lib/module/types.js +2 -0
  101. package/lib/module/types.js.map +1 -0
  102. package/lib/module/utils/config.js +17 -0
  103. package/lib/module/utils/config.js.map +1 -0
  104. package/lib/module/utils/events.js +45 -0
  105. package/lib/module/utils/events.js.map +1 -0
  106. package/lib/module/utils/form.js +34 -0
  107. package/lib/module/utils/form.js.map +1 -0
  108. package/lib/module/utils/queue.js +109 -0
  109. package/lib/module/utils/queue.js.map +1 -0
  110. package/lib/module/utils/storage.js +6 -0
  111. package/lib/module/utils/storage.js.map +1 -0
  112. package/lib/module/utils/tailwind.js +5 -0
  113. package/lib/module/utils/tailwind.js.map +1 -0
  114. package/lib/module/utils/tokens.js +24 -0
  115. package/lib/module/utils/tokens.js.map +1 -0
  116. package/lib/module/utils/user-data.js +14 -0
  117. package/lib/module/utils/user-data.js.map +1 -0
  118. package/lib/typescript/example2/App.d.ts +11 -0
  119. package/lib/typescript/src/components/AuthenticatedComponent.d.ts +7 -0
  120. package/lib/typescript/src/components/AutoSigninDialog.d.ts +1 -0
  121. package/lib/typescript/src/components/DefaultContext.d.ts +12 -0
  122. package/lib/typescript/src/components/GlobalContext.d.ts +111 -0
  123. package/lib/typescript/src/components/RowndComponents.d.ts +1 -0
  124. package/lib/typescript/src/components/RowndProvider.d.ts +8 -0
  125. package/lib/typescript/src/components/SignIn.d.ts +1 -0
  126. package/lib/typescript/src/data/actions.d.ts +20 -0
  127. package/lib/typescript/src/hooks/api.d.ts +12 -0
  128. package/lib/typescript/src/hooks/debounce.d.ts +5 -0
  129. package/lib/typescript/src/hooks/fingerprint.d.ts +12 -0
  130. package/lib/typescript/src/hooks/index.d.ts +6 -0
  131. package/lib/typescript/src/hooks/interval.d.ts +2 -0
  132. package/lib/typescript/src/hooks/nav.d.ts +6 -0
  133. package/lib/typescript/src/hooks/rownd.d.ts +37 -0
  134. package/lib/typescript/src/index.d.ts +4 -0
  135. package/lib/typescript/src/types.d.ts +26 -0
  136. package/lib/typescript/src/utils/config.d.ts +18 -0
  137. package/lib/typescript/src/utils/events.d.ts +22 -0
  138. package/lib/typescript/src/utils/form.d.ts +17 -0
  139. package/lib/typescript/src/utils/queue.d.ts +21 -0
  140. package/lib/typescript/src/utils/storage.d.ts +3 -0
  141. package/lib/typescript/src/utils/tailwind.d.ts +2 -0
  142. package/lib/typescript/src/utils/tokens.d.ts +4 -0
  143. package/lib/typescript/src/utils/user-data.d.ts +3 -0
  144. package/lib/typescript/tailwind.config.d.ts +10 -0
  145. package/package.json +177 -0
  146. package/react-native.podspec +19 -0
  147. package/src/assets/images/checkmark--filled.svg +12 -0
  148. package/src/assets/images/email-verify-waiting.svg +36 -0
  149. package/src/assets/images/phone-verify-waiting.svg +26 -0
  150. package/src/components/AuthenticatedComponent.tsx +30 -0
  151. package/src/components/AutoSigninDialog.tsx +125 -0
  152. package/src/components/DefaultContext.tsx +278 -0
  153. package/src/components/GlobalContext.tsx +485 -0
  154. package/src/components/RowndComponents.tsx +21 -0
  155. package/src/components/RowndProvider.tsx +56 -0
  156. package/src/components/SignIn.tsx +770 -0
  157. package/src/data/actions.ts +21 -0
  158. package/src/hooks/api.ts +163 -0
  159. package/src/hooks/debounce.ts +36 -0
  160. package/src/hooks/fingerprint.ts +217 -0
  161. package/src/hooks/index.ts +7 -0
  162. package/src/hooks/interval.ts +25 -0
  163. package/src/hooks/nav.tsx +29 -0
  164. package/src/hooks/rownd.ts +184 -0
  165. package/src/index.tsx +6 -0
  166. package/src/index.tsx.bak +26 -0
  167. package/src/types.ts +27 -0
  168. package/src/utils/config.ts +36 -0
  169. package/src/utils/events.ts +54 -0
  170. package/src/utils/form.tsx +64 -0
  171. package/src/utils/queue.ts +75 -0
  172. package/src/utils/storage.ts +7 -0
  173. package/src/utils/tailwind.ts +6 -0
  174. package/src/utils/tokens.ts +26 -0
  175. package/src/utils/user-data.ts +15 -0
@@ -0,0 +1,111 @@
1
+ import React, { FunctionComponent } from 'react';
2
+ import type { IConfig } from '../utils/config';
3
+ import { type TAction } from '../data/actions';
4
+ declare type Dispatch = (action: TAction) => void;
5
+ export declare type GlobalState = {
6
+ is_initializing: boolean;
7
+ is_container_visible: boolean;
8
+ use_modal: boolean;
9
+ nav: {
10
+ current_route: string;
11
+ route_trigger: string;
12
+ event_id: string;
13
+ section: string;
14
+ options?: any;
15
+ };
16
+ user: {
17
+ data: {
18
+ id?: string;
19
+ email: string | null;
20
+ [key: string]: any;
21
+ };
22
+ needs_refresh?: boolean;
23
+ redacted: string[];
24
+ };
25
+ auth: {
26
+ access_token: string | null;
27
+ refresh_token: string | null;
28
+ app_id: string | null;
29
+ init_data?: Record<string, any>;
30
+ is_verified_user?: boolean;
31
+ };
32
+ app: {
33
+ id?: string;
34
+ icon?: string;
35
+ icon_content_type?: string;
36
+ config: AppConfig | null;
37
+ schema: AppSchema | null;
38
+ user_verification_field?: string;
39
+ user_verification_fields?: string[];
40
+ };
41
+ local_acls: Record<string, {
42
+ shared: boolean;
43
+ }> | null;
44
+ is_saving_user_data: boolean;
45
+ config?: IConfig;
46
+ };
47
+ declare type AppSchema = Record<string, SchemaField>;
48
+ export interface SchemaField {
49
+ display_name: string;
50
+ type: string;
51
+ data_category: string;
52
+ required: boolean;
53
+ owned_by: string;
54
+ user_visible: boolean;
55
+ revoke_after: string;
56
+ required_retention: string;
57
+ collection_justification: string;
58
+ opt_out_warning: string;
59
+ }
60
+ interface AppConfig {
61
+ customizations: {
62
+ primary_color: string;
63
+ };
64
+ default_user_id_format?: string;
65
+ hub: {
66
+ auth: {
67
+ allow_unverified_users?: boolean;
68
+ additional_fields: [
69
+ {
70
+ name: string;
71
+ type: string;
72
+ label: string;
73
+ placeholder?: string;
74
+ options: [
75
+ {
76
+ value: string;
77
+ label: string;
78
+ }
79
+ ];
80
+ }
81
+ ];
82
+ email: {
83
+ from_address: string;
84
+ image: string;
85
+ };
86
+ show_app_icon: boolean;
87
+ };
88
+ customizations: HubCustomizations;
89
+ };
90
+ }
91
+ export interface HubCustomizations {
92
+ rounded_corners: boolean;
93
+ primary_color: string;
94
+ placement: 'bottom-left' | 'hidden';
95
+ offset_x: number;
96
+ offset_y: number;
97
+ property_overrides: Record<string, string>;
98
+ }
99
+ declare type ContextProps = {
100
+ config: IConfig;
101
+ };
102
+ export declare const GlobalContext: React.Context<{
103
+ state: GlobalState;
104
+ dispatch: Dispatch;
105
+ } | undefined>;
106
+ declare const GlobalContextProvider: FunctionComponent<ContextProps>;
107
+ declare function useGlobalContext(): {
108
+ state: GlobalState;
109
+ dispatch: Dispatch;
110
+ };
111
+ export { GlobalContextProvider, useGlobalContext };
@@ -0,0 +1 @@
1
+ export declare function RowndComponents(): JSX.Element;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface IRowndProviderProps {
3
+ appKey: string;
4
+ apiUrl?: string;
5
+ children: React.ReactNode;
6
+ }
7
+ export declare function RowndProvider({ appKey, apiUrl, children, }: IRowndProviderProps): JSX.Element;
8
+ export {};
@@ -0,0 +1 @@
1
+ export declare function SignIn(): JSX.Element;
@@ -0,0 +1,20 @@
1
+ export declare enum ActionType {
2
+ SET_CONTAINER_VISIBLE = "SET_CONTAINER_VISIBLE",
3
+ CHANGE_ROUTE = "CHANGE_ROUTE",
4
+ LOGIN_SUCCESS = "LOGIN_SUCCESS",
5
+ LOAD_USER = "LOAD_USER",
6
+ REFRESH_TOKEN = "REFRESH_TOKEN",
7
+ SIGN_OUT = "SIGN_OUT",
8
+ UPDATE_LOCAL_ACLS = "UPDATE_LOCAL_ACLS",
9
+ SET_USER_DATA_FIELD = "SET_USER_DATA_FIELD",
10
+ SET_USER_DATA = "SET_USER_DATA",
11
+ SET_REFRESH_USER_DATA = "SET_REFRESH_USER_DATA",
12
+ LOAD_STATE = "LOAD_STATE",
13
+ SET_SECTION = "SET_SECTION",
14
+ SET_IS_SAVING_USER_DATA = "SET_IS_SAVING_USER_DATA",
15
+ SET_APP_CONFIG = "SET_APP_CONFIG"
16
+ }
17
+ export declare type TAction = {
18
+ type: ActionType;
19
+ payload?: any;
20
+ };
@@ -0,0 +1,12 @@
1
+ import { GlobalState } from '../components/GlobalContext';
2
+ declare type RefreshTokenResp = {
3
+ access_token: string;
4
+ refresh_token: string;
5
+ };
6
+ export declare const DEFAULT_USER_AGENT: string;
7
+ export default function useApi(): {
8
+ client: import("ky/distribution/types/ky").KyInstance;
9
+ newAccessTokenFromRefreshToken: (stateCopy?: GlobalState) => Promise<RefreshTokenResp>;
10
+ isNewAccessTokenNeeded: (request?: Request) => boolean;
11
+ };
12
+ export {};
@@ -0,0 +1,5 @@
1
+ export default function useDebounce(cb: any, delay: any): ((...args: any) => void) & {
2
+ clear(): void;
3
+ } & {
4
+ flush(): void;
5
+ };
@@ -0,0 +1,12 @@
1
+ interface IChallenge {
2
+ key: string;
3
+ value: string;
4
+ }
5
+ export default function (): {
6
+ getFingerprint: () => Promise<{
7
+ visitorId: string;
8
+ }>;
9
+ getChallengeIfPresent: (appId: string | undefined, challengeLookupValues: string[]) => Promise<IChallenge | null>;
10
+ clearFingerprint: (challenge: string) => void;
11
+ };
12
+ export {};
@@ -0,0 +1,6 @@
1
+ import useApi from './api';
2
+ import useDebounce from './debounce';
3
+ import useInterval from './interval';
4
+ import useNav from './nav';
5
+ import useDeviceFingerprint from './fingerprint';
6
+ export { useApi, useDebounce, useInterval, useNav, useDeviceFingerprint };
@@ -0,0 +1,2 @@
1
+ declare function useInterval(callback: () => void, delay: number | null): void;
2
+ export default useInterval;
@@ -0,0 +1,6 @@
1
+ interface INavOpts {
2
+ route?: string;
3
+ hide?: boolean;
4
+ }
5
+ export default function useNav(): ({ route, hide }: INavOpts) => void;
6
+ export {};
@@ -0,0 +1,37 @@
1
+ export declare type TRowndContext = {
2
+ requestSignIn: (opts?: RequestSignInOpts) => void;
3
+ signOut: () => void;
4
+ getAccessToken: (opts?: GetAccessTokenOpts) => Promise<string | null>;
5
+ is_authenticated: boolean;
6
+ is_initializing: boolean;
7
+ access_token: string | null;
8
+ auth: AuthContext;
9
+ user: UserContext;
10
+ };
11
+ declare type AuthContext = {
12
+ access_token: string | null;
13
+ app_id: string | null;
14
+ is_verified_user?: boolean;
15
+ };
16
+ declare type UserContext = {
17
+ data: {
18
+ id?: string;
19
+ email?: string | null;
20
+ phone?: string | null;
21
+ [key: string]: any;
22
+ };
23
+ redacted_fields: string[];
24
+ set: (data: Record<string, any>) => Promise<Record<string, any>>;
25
+ setValue: (key: string, value: any) => Promise<Record<string, any>>;
26
+ };
27
+ declare type RequestSignInOpts = {
28
+ identifier?: string;
29
+ auto_sign_in?: boolean;
30
+ init_data?: Record<string, any>;
31
+ post_login_redirect?: string;
32
+ };
33
+ declare type GetAccessTokenOpts = {
34
+ waitForToken?: boolean;
35
+ };
36
+ export declare function useRownd(): TRowndContext;
37
+ export {};
@@ -0,0 +1,4 @@
1
+ import { RowndProvider } from './components/RowndProvider';
2
+ import { useRownd } from './hooks/rownd';
3
+ import AuthenticatedComponent from './components/AuthenticatedComponent';
4
+ export { RowndProvider, useRownd, AuthenticatedComponent };
@@ -0,0 +1,26 @@
1
+ export declare type TRowndContext = {
2
+ requestSignIn: Function;
3
+ signOut: Function;
4
+ getAccessToken: Function;
5
+ is_authenticated: boolean;
6
+ is_initializing: boolean;
7
+ access_token: string | null;
8
+ auth: AuthContext;
9
+ user: UserContext;
10
+ };
11
+ declare type AuthContext = {
12
+ access_token: string | null;
13
+ app_id?: string;
14
+ is_authenticated: boolean;
15
+ is_verified_user?: boolean;
16
+ };
17
+ declare type UserContext = {
18
+ data: {
19
+ id?: string;
20
+ email?: string | null;
21
+ phone?: string | null;
22
+ [key: string]: any;
23
+ };
24
+ redacted_fields: string[];
25
+ };
26
+ export {};
@@ -0,0 +1,18 @@
1
+ export interface IConfig {
2
+ baseUrl: string;
3
+ apiUrl: string;
4
+ pdcBaseUrl: string;
5
+ appKey: string;
6
+ postLoginUrl: null | string;
7
+ postRegistrationUrl: null | string;
8
+ locationHash: null | string;
9
+ postAuthenticationApi: null | PostAuthApiSpec;
10
+ }
11
+ export declare type PostAuthApiSpec = {
12
+ method: 'post' | 'put';
13
+ url: string;
14
+ extra_headers: {
15
+ [key: string]: string;
16
+ };
17
+ };
18
+ export declare function createConfig(opts: Partial<IConfig>): IConfig;
@@ -0,0 +1,22 @@
1
+ import EventEmitter from 'eventemitter3';
2
+ export declare enum EventType {
3
+ AUTH = "auth",
4
+ SIGN_OUT = "sign_out",
5
+ USER_DATA = "user_data",
6
+ USER_DATA_SAVED = "user_data_saved"
7
+ }
8
+ export declare type TAuthEvent = {
9
+ access_token: string;
10
+ user_id: string;
11
+ app_id: string;
12
+ };
13
+ declare type EventListenerOptions = {
14
+ once?: boolean;
15
+ };
16
+ export declare const events: {
17
+ addEventListener: (type: string, callback: (...args: any[]) => void | null, options?: boolean | EventListenerOptions | undefined) => void;
18
+ removeEventListener: <T extends string | symbol>(event: T, fn?: ((...args: any[]) => void) | undefined, context?: any, once?: boolean | undefined) => EventEmitter<string | symbol, any>;
19
+ dispatchEvent: (event: CustomEvent) => boolean;
20
+ dispatch(type: EventType, data: any): boolean;
21
+ };
22
+ export {};
@@ -0,0 +1,17 @@
1
+ declare type FormFieldProps = {
2
+ id?: string;
3
+ name: string;
4
+ value?: string;
5
+ type?: string;
6
+ label?: string;
7
+ placeholder?: string;
8
+ options?: [
9
+ {
10
+ value: string;
11
+ label: string;
12
+ }
13
+ ] | null;
14
+ onChange?: (value: string) => void;
15
+ };
16
+ export declare function renderField({ id, label, name, type, value, placeholder, options, onChange, }: FormFieldProps): JSX.Element;
17
+ export {};
@@ -0,0 +1,21 @@
1
+ declare type QueueItem = {
2
+ action: () => Promise<any>;
3
+ resolve: (value?: any) => void;
4
+ reject: (reason?: any) => void;
5
+ count: number;
6
+ };
7
+ declare class Queue {
8
+ #private;
9
+ constructor();
10
+ enqueue(item: QueueItem | (() => Promise<any>)): void;
11
+ dequeue(): any;
12
+ get size(): number;
13
+ }
14
+ declare class AutoQueue<T> extends Queue {
15
+ #private;
16
+ _cache: Record<string, unknown>;
17
+ constructor();
18
+ enqueue(action: () => Promise<any>): Promise<T>;
19
+ dequeue(): Promise<boolean>;
20
+ }
21
+ export default AutoQueue;
@@ -0,0 +1,3 @@
1
+ import { MMKV } from 'react-native-mmkv';
2
+ declare const storage: MMKV;
3
+ export default storage;
@@ -0,0 +1,2 @@
1
+ declare const tw: import("twrnc").TailwindFn;
2
+ export default tw;
@@ -0,0 +1,4 @@
1
+ declare type TokenInput = Record<string, any> | string;
2
+ export declare function getAppId(token: TokenInput): any;
3
+ export declare function getUserId(token: TokenInput): any;
4
+ export {};
@@ -0,0 +1,3 @@
1
+ export declare function redactUserDataWithAcls(userData: Record<string, any> | undefined | null, acls: Record<string, {
2
+ shared: boolean;
3
+ }> | undefined | null): Record<string, any>;
@@ -0,0 +1,10 @@
1
+ declare const _default: {
2
+ content: string[];
3
+ theme: {
4
+ extend: {};
5
+ };
6
+ plugins: never[];
7
+ variants: string[];
8
+ corePlugins: any;
9
+ };
10
+ export default _default;
package/package.json ADDED
@@ -0,0 +1,177 @@
1
+ {
2
+ "name": "@rownd/react-native",
3
+ "version": "0.1.1",
4
+ "description": "Rownd bindings for React Native",
5
+ "private": false,
6
+ "main": "lib/commonjs/index",
7
+ "module": "lib/module/index",
8
+ "types": "lib/typescript/index.d.ts",
9
+ "@rownd/react-native": "src/index",
10
+ "source": "src/index",
11
+ "files": [
12
+ "src",
13
+ "lib",
14
+ "android",
15
+ "ios",
16
+ "cpp",
17
+ "react-native.podspec",
18
+ "!lib/typescript/example",
19
+ "!android/build",
20
+ "!ios/build",
21
+ "!**/__tests__",
22
+ "!**/__fixtures__",
23
+ "!**/__mocks__"
24
+ ],
25
+ "scripts": {
26
+ "test": "jest",
27
+ "typescript": "tsc --noEmit",
28
+ "lint": "eslint \"**/*.{js,ts,tsx}\"",
29
+ "prepare": "bob build",
30
+ "release": "release-it",
31
+ "example": "yarn --cwd example",
32
+ "pods": "cd example && pod-install --quiet",
33
+ "bootstrap": "yarn example && yarn && yarn pods"
34
+ },
35
+ "keywords": [
36
+ "react-native",
37
+ "ios",
38
+ "android"
39
+ ],
40
+ "repository": "https://github.com/rownd/react-native",
41
+ "author": "Matt Hamann <mhamann@rownd.io> (https://github.com/rownd)",
42
+ "license": "MIT",
43
+ "bugs": {
44
+ "url": "https://github.com/rownd/react-native/issues"
45
+ },
46
+ "homepage": "https://github.com/rownd/react-native#readme",
47
+ "publishConfig": {
48
+ "registry": "https://registry.npmjs.org/",
49
+ "access": "public"
50
+ },
51
+ "devDependencies": {
52
+ "@commitlint/config-conventional": "^11.0.0",
53
+ "@react-native-community/eslint-config": "^2.0.0",
54
+ "@release-it/conventional-changelog": "^2.0.0",
55
+ "@types/date-fns": "^2.6.0",
56
+ "@types/debounce": "^1.2.1",
57
+ "@types/jest": "^26.0.0",
58
+ "@types/lodash-es": "^4.17.6",
59
+ "@types/phone": "^2.4.1",
60
+ "@types/react": "^17.0.2",
61
+ "@types/react-native": "^0.67.8",
62
+ "@types/react-native-base64": "^0.2.0",
63
+ "commitlint": "^11.0.0",
64
+ "eslint": "^7.2.0",
65
+ "eslint-config-prettier": "^7.0.0",
66
+ "eslint-plugin-prettier": "^3.1.3",
67
+ "expo": "^45.0.5",
68
+ "husky": "^6.0.0",
69
+ "jest": "^26.0.1",
70
+ "pod-install": "^0.1.0",
71
+ "prettier": "^2.0.5",
72
+ "react": "^17.0.2",
73
+ "react-native": "^0.68.2",
74
+ "react-native-builder-bob": "^0.18.0",
75
+ "release-it": "^14.2.2",
76
+ "typescript": "^4.1.3"
77
+ },
78
+ "peerDependencies": {
79
+ "react": "*",
80
+ "react-native": "*"
81
+ },
82
+ "jest": {
83
+ "preset": "react-native",
84
+ "modulePathIgnorePatterns": [
85
+ "<rootDir>/example/node_modules",
86
+ "<rootDir>/lib/"
87
+ ]
88
+ },
89
+ "commitlint": {
90
+ "extends": [
91
+ "@commitlint/config-conventional"
92
+ ]
93
+ },
94
+ "release-it": {
95
+ "git": {
96
+ "commitMessage": "chore: release ${version}",
97
+ "tagName": "v${version}"
98
+ },
99
+ "npm": {
100
+ "publish": true
101
+ },
102
+ "github": {
103
+ "release": true
104
+ },
105
+ "plugins": {
106
+ "@release-it/conventional-changelog": {
107
+ "preset": "angular"
108
+ }
109
+ }
110
+ },
111
+ "eslintConfig": {
112
+ "root": true,
113
+ "extends": [
114
+ "@react-native-community",
115
+ "prettier"
116
+ ],
117
+ "rules": {
118
+ "prettier/prettier": [
119
+ "error",
120
+ {
121
+ "quoteProps": "consistent",
122
+ "singleQuote": true,
123
+ "tabWidth": 2,
124
+ "trailingComma": "es5",
125
+ "useTabs": false
126
+ }
127
+ ]
128
+ }
129
+ },
130
+ "eslintIgnore": [
131
+ "node_modules/",
132
+ "lib/"
133
+ ],
134
+ "prettier": {
135
+ "quoteProps": "consistent",
136
+ "singleQuote": true,
137
+ "tabWidth": 2,
138
+ "trailingComma": "es5",
139
+ "useTabs": false
140
+ },
141
+ "react-native-builder-bob": {
142
+ "source": "src",
143
+ "output": "lib",
144
+ "targets": [
145
+ "commonjs",
146
+ "module",
147
+ [
148
+ "typescript",
149
+ {
150
+ "project": "tsconfig.build.json"
151
+ }
152
+ ]
153
+ ]
154
+ },
155
+ "dependencies": {
156
+ "@expo/vector-icons": "^13.0.0",
157
+ "@gorhom/bottom-sheet": "^4.3.1",
158
+ "@react-native-picker/picker": "^2.4.1",
159
+ "date-fns": "^2.28.0",
160
+ "debounce": "^1.2.1",
161
+ "eventemitter3": "^4.0.7",
162
+ "expo-clipboard": "^3.0.1",
163
+ "expo-linking": "^3.1.0",
164
+ "jwt-decode": "^3.1.2",
165
+ "ky": "^0.30.0",
166
+ "lodash-es": "^4.17.21",
167
+ "phone": "^3.1.20",
168
+ "react-native-base64": "^0.2.1",
169
+ "react-native-device-info": "^9.0.2",
170
+ "react-native-mmkv": "^2.4.1",
171
+ "react-native-sha256": "^1.4.7",
172
+ "react-native-svg": "^12.3.0",
173
+ "tailwind-rn": "^4.2.0",
174
+ "twrnc": "^3.3.2",
175
+ "usehooks-ts": "^2.5.4"
176
+ }
177
+ }
@@ -0,0 +1,19 @@
1
+ require "json"
2
+
3
+ package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4
+
5
+ Pod::Spec.new do |s|
6
+ s.name = "react-native"
7
+ s.version = package["version"]
8
+ s.summary = package["description"]
9
+ s.homepage = package["homepage"]
10
+ s.license = package["license"]
11
+ s.authors = package["author"]
12
+
13
+ s.platforms = { :ios => "10.0" }
14
+ s.source = { :git => "https://github.com/rownd/react-native.git", :tag => "#{s.version}" }
15
+
16
+ s.source_files = "ios/**/*.{h,m,mm}"
17
+
18
+ s.dependency "React-Core"
19
+ end
@@ -0,0 +1,12 @@
1
+ <svg id="icon" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
2
+ <defs>
3
+ <style>
4
+ .cls-1 {
5
+ fill: none;
6
+ }
7
+ </style>
8
+ </defs>
9
+ <path d="M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2ZM14,21.5908l-5-5L10.5906,15,14,18.4092,21.41,11l1.5957,1.5859Z"/>
10
+ <polygon id="inner-path" class="cls-1" points="14 21.591 9 16.591 10.591 15 14 18.409 21.41 11 23.005 12.585 14 21.591"/>
11
+ <rect id="_Transparent_Rectangle_" data-name="&lt;Transparent Rectangle&gt;" class="cls-1" width="32" height="32"/>
12
+ </svg>
@@ -0,0 +1,36 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="79px" height="68px" viewBox="0 0 79 68" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <title>Group</title>
4
+ <defs>
5
+ <rect id="path-1" x="9.69736842" y="6.17105263" width="53.7763158" height="45.8421053" rx="8"></rect>
6
+ <filter x="-27.0%" y="-20.7%" width="153.9%" height="163.3%" filterUnits="objectBoundingBox" id="filter-2">
7
+ <feOffset dx="0" dy="5" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
8
+ <feGaussianBlur stdDeviation="4" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
9
+ <feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
10
+ </filter>
11
+ <path d="M1.49198314,22.8826009 L27.3602885,37.5009111 C33.5004408,40.9707422 41.014234,40.9500831 47.1352131,37.4465401 L72.5558685,22.8961951 C73.0351888,22.6218404 73.6461631,22.7879979 73.9205178,23.2673182 C74.007089,23.4185653 74.0526316,23.5898106 74.0526316,23.7640813 L74.0526316,63 C74.0526316,65.209139 72.2617706,67 70.0526316,67 L4,67 C1.790861,67 2.705415e-16,65.209139 0,63 L0,23.7532056 C8.43762138e-16,23.2009209 0.44771525,22.7532056 1,22.7532056 C1.17240673,22.7532056 1.34188502,22.7977797 1.49198314,22.8826009 Z" id="path-3"></path>
12
+ <filter x="-4.7%" y="-8.4%" width="109.5%" height="114.0%" filterUnits="objectBoundingBox" id="filter-4">
13
+ <feOffset dx="0" dy="-1" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
14
+ <feGaussianBlur stdDeviation="1" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
15
+ <feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
16
+ </filter>
17
+ </defs>
18
+ <g id="V2-post--feedback" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
19
+ <g id="xlg-1312px-16-column-copy-96" transform="translate(-616.000000, -265.000000)">
20
+ <g id="Group" transform="translate(618.000000, 265.000000)">
21
+ <path d="M1.1333848,21.7417845 L33.0948714,2.49908682 C35.6464021,0.96291506 38.8400625,0.97130271 41.383489,2.52085558 L72.9358668,21.743773 C73.4075139,22.0311185 73.5569199,22.6464036 73.2695744,23.1180507 C73.2235298,23.1936281 73.1676563,23.2627588 73.1034181,23.3236315 L37.2457723,57.3026316 L37.2457723,57.3026316 L0.965647178,23.3284209 C0.562522036,22.9509179 0.54175124,22.3180937 0.919254307,21.9149685 C0.982302388,21.8476412 1.0543624,21.7893607 1.1333848,21.7417845 Z" id="Path-28" fill="#545454"></path>
22
+ <g id="Rectangle">
23
+ <use fill="black" fill-opacity="1" filter="url(#filter-2)" xlink:href="#path-1"></use>
24
+ <use fill="#FFFFFF" fill-rule="evenodd" xlink:href="#path-1"></use>
25
+ </g>
26
+ <rect id="Rectangle" fill-opacity="0.4" fill="#D8D8D8" x="18.5131579" y="19.3947368" width="36.1447368" height="3.52631579"></rect>
27
+ <rect id="Rectangle-Copy" fill-opacity="0.4" fill="#D8D8D8" x="18.5131579" y="27.3289474" width="36.1447368" height="26.4473684"></rect>
28
+ <g id="Rectangle">
29
+ <use fill="black" fill-opacity="1" filter="url(#filter-4)" xlink:href="#path-3"></use>
30
+ <use fill="#646464" fill-rule="evenodd" xlink:href="#path-3"></use>
31
+ </g>
32
+ <path d="M23.2845382,51.744338 L1.76315789,67 L1.76315789,67 L71.4078947,67 L49.8865144,51.744338 C41.9186006,46.0961966 31.252452,46.0961966 23.2845382,51.744338 Z" id="Path-29" fill="#545454"></path>
33
+ </g>
34
+ </g>
35
+ </g>
36
+ </svg>