@rownd/react-native 0.1.3 → 0.1.6

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 (56) hide show
  1. package/lib/commonjs/components/SignIn.js +5 -5
  2. package/lib/commonjs/components/SignIn.js.map +1 -1
  3. package/lib/commonjs/components/images/CheckmarkFilled.js +40 -0
  4. package/lib/commonjs/components/images/CheckmarkFilled.js.map +1 -0
  5. package/lib/commonjs/components/images/EmailVerifyWaiting.js +100 -0
  6. package/lib/commonjs/components/images/EmailVerifyWaiting.js.map +1 -0
  7. package/lib/commonjs/components/images/PhoneVerifyWaiting.js +91 -0
  8. package/lib/commonjs/components/images/PhoneVerifyWaiting.js.map +1 -0
  9. package/lib/commonjs/hooks/api.js +3 -5
  10. package/lib/commonjs/hooks/api.js.map +1 -1
  11. package/lib/module/components/SignIn.js +3 -3
  12. package/lib/module/components/SignIn.js.map +1 -1
  13. package/lib/module/components/images/CheckmarkFilled.js +27 -0
  14. package/lib/module/components/images/CheckmarkFilled.js.map +1 -0
  15. package/lib/module/components/images/EmailVerifyWaiting.js +87 -0
  16. package/lib/module/components/images/EmailVerifyWaiting.js.map +1 -0
  17. package/lib/module/components/images/PhoneVerifyWaiting.js +78 -0
  18. package/lib/module/components/images/PhoneVerifyWaiting.js.map +1 -0
  19. package/lib/module/hooks/api.js +1 -4
  20. package/lib/module/hooks/api.js.map +1 -1
  21. package/lib/package.json +178 -0
  22. package/lib/typescript/{components → src/components}/AuthenticatedComponent.d.ts +0 -0
  23. package/lib/typescript/{components → src/components}/AutoSigninDialog.d.ts +0 -0
  24. package/lib/typescript/{components → src/components}/DefaultContext.d.ts +0 -0
  25. package/lib/typescript/{components → src/components}/GlobalContext.d.ts +0 -0
  26. package/lib/typescript/{components → src/components}/RowndComponents.d.ts +0 -0
  27. package/lib/typescript/{components → src/components}/RowndProvider.d.ts +0 -0
  28. package/lib/typescript/{components → src/components}/SignIn.d.ts +0 -0
  29. package/lib/typescript/src/components/images/CheckmarkFilled.d.ts +4 -0
  30. package/lib/typescript/src/components/images/EmailVerifyWaiting.d.ts +4 -0
  31. package/lib/typescript/src/components/images/PhoneVerifyWaiting.d.ts +4 -0
  32. package/lib/typescript/{data → src/data}/actions.d.ts +0 -0
  33. package/lib/typescript/{hooks → src/hooks}/api.d.ts +0 -0
  34. package/lib/typescript/{hooks → src/hooks}/debounce.d.ts +0 -0
  35. package/lib/typescript/{hooks → src/hooks}/fingerprint.d.ts +0 -0
  36. package/lib/typescript/{hooks → src/hooks}/index.d.ts +0 -0
  37. package/lib/typescript/{hooks → src/hooks}/interval.d.ts +0 -0
  38. package/lib/typescript/{hooks → src/hooks}/nav.d.ts +0 -0
  39. package/lib/typescript/{hooks → src/hooks}/rownd.d.ts +0 -0
  40. package/lib/typescript/{index.d.ts → src/index.d.ts} +0 -0
  41. package/lib/typescript/{tailwind.config.d.ts → src/tailwind.config.d.ts} +0 -0
  42. package/lib/typescript/{types.d.ts → src/types.d.ts} +0 -0
  43. package/lib/typescript/{utils → src/utils}/config.d.ts +0 -0
  44. package/lib/typescript/{utils → src/utils}/events.d.ts +0 -0
  45. package/lib/typescript/{utils → src/utils}/form.d.ts +0 -0
  46. package/lib/typescript/{utils → src/utils}/queue.d.ts +0 -0
  47. package/lib/typescript/{utils → src/utils}/storage.d.ts +0 -0
  48. package/lib/typescript/{utils → src/utils}/tailwind.d.ts +0 -0
  49. package/lib/typescript/{utils → src/utils}/tokens.d.ts +0 -0
  50. package/lib/typescript/{utils → src/utils}/user-data.d.ts +0 -0
  51. package/package.json +6 -5
  52. package/src/components/SignIn.tsx +3 -3
  53. package/src/components/images/CheckmarkFilled.tsx +30 -0
  54. package/src/components/images/EmailVerifyWaiting.tsx +95 -0
  55. package/src/components/images/PhoneVerifyWaiting.tsx +74 -0
  56. package/src/hooks/api.ts +1 -2
@@ -0,0 +1,178 @@
1
+ {
2
+ "name": "@rownd/react-native",
3
+ "version": "0.1.6",
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
+ "react-native": "src/index",
10
+ "source": "src/index",
11
+ "files": [
12
+ "src",
13
+ "lib",
14
+ "android",
15
+ "ios",
16
+ "cpp",
17
+ "package.json",
18
+ "react-native.podspec",
19
+ "!lib/typescript/example",
20
+ "!android/build",
21
+ "!ios/build",
22
+ "!**/__tests__",
23
+ "!**/__fixtures__",
24
+ "!**/__mocks__"
25
+ ],
26
+ "scripts": {
27
+ "test": "jest",
28
+ "typescript": "tsc --noEmit",
29
+ "lint": "eslint \"**/*.{js,ts,tsx}\"",
30
+ "prepare": "bob build && cp package.json lib/",
31
+ "release": "release-it",
32
+ "example": "yarn --cwd example",
33
+ "pods": "cd example && pod-install --quiet",
34
+ "bootstrap": "yarn example && yarn && yarn pods"
35
+ },
36
+ "keywords": [
37
+ "react-native",
38
+ "ios",
39
+ "android"
40
+ ],
41
+ "repository": "https://github.com/rownd/react-native",
42
+ "author": "Matt Hamann <mhamann@rownd.io> (https://github.com/rownd)",
43
+ "license": "MIT",
44
+ "bugs": {
45
+ "url": "https://github.com/rownd/react-native/issues"
46
+ },
47
+ "homepage": "https://github.com/rownd/react-native#readme",
48
+ "publishConfig": {
49
+ "registry": "https://registry.npmjs.org/",
50
+ "access": "public"
51
+ },
52
+ "devDependencies": {
53
+ "@commitlint/config-conventional": "^11.0.0",
54
+ "@react-native-community/eslint-config": "^2.0.0",
55
+ "@release-it/conventional-changelog": "^2.0.0",
56
+ "@types/date-fns": "^2.6.0",
57
+ "@types/debounce": "^1.2.1",
58
+ "@types/jest": "^26.0.0",
59
+ "@types/lodash-es": "^4.17.6",
60
+ "@types/phone": "^2.4.1",
61
+ "@types/react": "^17.0.2",
62
+ "@types/react-native": "^0.67.8",
63
+ "@types/react-native-base64": "^0.2.0",
64
+ "commitlint": "^11.0.0",
65
+ "eslint": "^7.2.0",
66
+ "eslint-config-prettier": "^7.0.0",
67
+ "eslint-plugin-prettier": "^3.1.3",
68
+ "expo": "^45.0.5",
69
+ "husky": "^6.0.0",
70
+ "jest": "^26.0.1",
71
+ "pod-install": "^0.1.0",
72
+ "prettier": "^2.0.5",
73
+ "react": "^17.0.2",
74
+ "react-native": "^0.68.2",
75
+ "react-native-builder-bob": "^0.18.0",
76
+ "release-it": "^14.2.2",
77
+ "typescript": "^4.1.3"
78
+ },
79
+ "peerDependencies": {
80
+ "react": "*",
81
+ "react-native": "*",
82
+ "react-native-mmkv": "*"
83
+ },
84
+ "jest": {
85
+ "preset": "react-native",
86
+ "modulePathIgnorePatterns": [
87
+ "<rootDir>/example/node_modules",
88
+ "<rootDir>/lib/"
89
+ ]
90
+ },
91
+ "commitlint": {
92
+ "extends": [
93
+ "@commitlint/config-conventional"
94
+ ]
95
+ },
96
+ "release-it": {
97
+ "git": {
98
+ "commitMessage": "chore: release ${version}",
99
+ "tagName": "v${version}"
100
+ },
101
+ "npm": {
102
+ "publish": true
103
+ },
104
+ "github": {
105
+ "release": true
106
+ },
107
+ "plugins": {
108
+ "@release-it/conventional-changelog": {
109
+ "preset": "angular"
110
+ }
111
+ }
112
+ },
113
+ "eslintConfig": {
114
+ "root": true,
115
+ "extends": [
116
+ "@react-native-community",
117
+ "prettier"
118
+ ],
119
+ "rules": {
120
+ "prettier/prettier": [
121
+ "error",
122
+ {
123
+ "quoteProps": "consistent",
124
+ "singleQuote": true,
125
+ "tabWidth": 2,
126
+ "trailingComma": "es5",
127
+ "useTabs": false
128
+ }
129
+ ]
130
+ }
131
+ },
132
+ "eslintIgnore": [
133
+ "node_modules/",
134
+ "lib/"
135
+ ],
136
+ "prettier": {
137
+ "quoteProps": "consistent",
138
+ "singleQuote": true,
139
+ "tabWidth": 2,
140
+ "trailingComma": "es5",
141
+ "useTabs": false
142
+ },
143
+ "react-native-builder-bob": {
144
+ "source": "src",
145
+ "output": "lib",
146
+ "targets": [
147
+ "commonjs",
148
+ "module",
149
+ [
150
+ "typescript",
151
+ {
152
+ "project": "tsconfig.build.json"
153
+ }
154
+ ]
155
+ ]
156
+ },
157
+ "dependencies": {
158
+ "@expo/vector-icons": "^13.0.0",
159
+ "@gorhom/bottom-sheet": "^4.3.1",
160
+ "@react-native-picker/picker": "^2.4.1",
161
+ "date-fns": "^2.28.0",
162
+ "debounce": "^1.2.1",
163
+ "eventemitter3": "^4.0.7",
164
+ "expo-clipboard": "^3.0.1",
165
+ "expo-linking": "^3.1.0",
166
+ "jwt-decode": "^3.1.2",
167
+ "ky": "^0.30.0",
168
+ "lodash-es": "^4.17.21",
169
+ "phone": "^3.1.20",
170
+ "react-native-base64": "^0.2.1",
171
+ "react-native-device-info": "^9.0.2",
172
+ "react-native-sha256": "^1.4.7",
173
+ "react-native-svg": "^12.3.0",
174
+ "tailwind-rn": "^4.2.0",
175
+ "twrnc": "^3.3.2",
176
+ "usehooks-ts": "^2.5.4"
177
+ }
178
+ }
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { SvgProps } from 'react-native-svg';
3
+ declare const SvgComponent: (props: SvgProps) => JSX.Element;
4
+ export default SvgComponent;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { SvgProps } from 'react-native-svg';
3
+ declare const SvgComponent: (props: SvgProps) => JSX.Element;
4
+ export default SvgComponent;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { SvgProps } from 'react-native-svg';
3
+ declare const SvgComponent: (props: SvgProps) => JSX.Element;
4
+ export default SvgComponent;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@rownd/react-native",
3
- "version": "0.1.3",
3
+ "version": "0.1.6",
4
4
  "description": "Rownd bindings for React Native",
5
5
  "private": false,
6
6
  "main": "lib/commonjs/index",
7
7
  "module": "lib/module/index",
8
8
  "types": "lib/typescript/index.d.ts",
9
- "@rownd/react-native": "src/index",
9
+ "react-native": "src/index",
10
10
  "source": "src/index",
11
11
  "files": [
12
12
  "src",
@@ -14,6 +14,7 @@
14
14
  "android",
15
15
  "ios",
16
16
  "cpp",
17
+ "package.json",
17
18
  "react-native.podspec",
18
19
  "!lib/typescript/example",
19
20
  "!android/build",
@@ -26,7 +27,7 @@
26
27
  "test": "jest",
27
28
  "typescript": "tsc --noEmit",
28
29
  "lint": "eslint \"**/*.{js,ts,tsx}\"",
29
- "prepare": "bob build",
30
+ "prepare": "bob build && cp package.json lib/",
30
31
  "release": "release-it",
31
32
  "example": "yarn --cwd example",
32
33
  "pods": "cd example && pod-install --quiet",
@@ -77,7 +78,8 @@
77
78
  },
78
79
  "peerDependencies": {
79
80
  "react": "*",
80
- "react-native": "*"
81
+ "react-native": "*",
82
+ "react-native-mmkv": "*"
81
83
  },
82
84
  "jest": {
83
85
  "preset": "react-native",
@@ -167,7 +169,6 @@
167
169
  "phone": "^3.1.20",
168
170
  "react-native-base64": "^0.2.1",
169
171
  "react-native-device-info": "^9.0.2",
170
- "react-native-mmkv": "^2.4.1",
171
172
  "react-native-sha256": "^1.4.7",
172
173
  "react-native-svg": "^12.3.0",
173
174
  "tailwind-rn": "^4.2.0",
@@ -33,9 +33,9 @@ import { ActionType } from '../data/actions';
33
33
  import { renderField } from '../utils/form';
34
34
 
35
35
  // Image imports
36
- import ImageEmailVerifyWaiting from '../assets/images/email-verify-waiting.svg';
37
- import ImagePhoneVerifyWaiting from '../assets/images/phone-verify-waiting.svg';
38
- import ImageCheckmarkFilled from '../assets/images/checkmark--filled.svg';
36
+ import ImageEmailVerifyWaiting from './images/EmailVerifyWaiting';
37
+ import ImagePhoneVerifyWaiting from './images/PhoneVerifyWaiting';
38
+ import ImageCheckmarkFilled from './images/CheckmarkFilled';
39
39
 
40
40
  enum LoginStep {
41
41
  INIT = 'init',
@@ -0,0 +1,30 @@
1
+ import * as React from 'react';
2
+ import Svg, { SvgProps, Defs, Path, Polygon, Rect } from 'react-native-svg';
3
+ /* SVGR has dropped some elements not supported by react-native-svg: style */
4
+
5
+ const SvgComponent = (props: SvgProps) => (
6
+ <Svg
7
+ id="icon"
8
+ // @ts-ignore
9
+ xmlns="http://www.w3.org/2000/svg"
10
+ width={32}
11
+ height={32}
12
+ viewBox="0 0 32 32"
13
+ {...props}
14
+ >
15
+ <Defs />
16
+ <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" />
17
+ <Polygon
18
+ id="inner-path"
19
+ points="14 21.591 9 16.591 10.591 15 14 18.409 21.41 11 23.005 12.585 14 21.591"
20
+ />
21
+ <Rect
22
+ id="_Transparent_Rectangle_"
23
+ data-name="&lt;Transparent Rectangle&gt;"
24
+ width={32}
25
+ height={32}
26
+ />
27
+ </Svg>
28
+ );
29
+
30
+ export default SvgComponent;
@@ -0,0 +1,95 @@
1
+ import * as React from 'react';
2
+ import Svg, { SvgProps, Defs, Rect, Path, G, Use } from 'react-native-svg';
3
+ /* SVGR has dropped some elements not supported by react-native-svg: title, filter */
4
+
5
+ const SvgComponent = (props: SvgProps) => (
6
+ <Svg
7
+ width="79px"
8
+ height="68px"
9
+ viewBox="0 0 79 68"
10
+ // @ts-ignore
11
+ xmlns="http://www.w3.org/2000/svg"
12
+ xmlnsXlink="http://www.w3.org/1999/xlink"
13
+ {...props}
14
+ >
15
+ <Defs>
16
+ <Rect
17
+ id="path-1"
18
+ x={9.69736842}
19
+ y={6.17105263}
20
+ width={53.7763158}
21
+ height={45.8421053}
22
+ rx={8}
23
+ />
24
+ <Path
25
+ 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"
26
+ id="path-3"
27
+ />
28
+ </Defs>
29
+ <G
30
+ id="V2-post--feedback"
31
+ stroke="none"
32
+ strokeWidth={1}
33
+ fill="none"
34
+ fillRule="evenodd"
35
+ >
36
+ <G
37
+ id="xlg-1312px-16-column-copy-96"
38
+ transform="translate(-616.000000, -265.000000)"
39
+ >
40
+ <G id="Group" transform="translate(618.000000, 265.000000)">
41
+ <Path
42
+ 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"
43
+ id="Path-28"
44
+ fill="#545454"
45
+ />
46
+ <G id="Rectangle">
47
+ <Use
48
+ fill="black"
49
+ fillOpacity={1}
50
+ // @ts-ignore
51
+ filter="url(#filter-2)"
52
+ xlinkHref="#path-1"
53
+ />
54
+ <Use fill="#FFFFFF" fillRule="evenodd" xlinkHref="#path-1" />
55
+ </G>
56
+ <Rect
57
+ id="Rectangle"
58
+ fillOpacity={0.4}
59
+ fill="#D8D8D8"
60
+ x={18.5131579}
61
+ y={19.3947368}
62
+ width={36.1447368}
63
+ height={3.52631579}
64
+ />
65
+ <Rect
66
+ id="Rectangle-Copy"
67
+ fillOpacity={0.4}
68
+ fill="#D8D8D8"
69
+ x={18.5131579}
70
+ y={27.3289474}
71
+ width={36.1447368}
72
+ height={26.4473684}
73
+ />
74
+ <G id="Rectangle">
75
+ <Use
76
+ fill="black"
77
+ fillOpacity={1}
78
+ // @ts-ignore
79
+ filter="url(#filter-4)"
80
+ xlinkHref="#path-3"
81
+ />
82
+ <Use fill="#646464" fillRule="evenodd" xlinkHref="#path-3" />
83
+ </G>
84
+ <Path
85
+ 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"
86
+ id="Path-29"
87
+ fill="#545454"
88
+ />
89
+ </G>
90
+ </G>
91
+ </G>
92
+ </Svg>
93
+ );
94
+
95
+ export default SvgComponent;
@@ -0,0 +1,74 @@
1
+ import * as React from 'react';
2
+ import Svg, { SvgProps, Defs, Rect, G, Use, Circle } from 'react-native-svg';
3
+ /* SVGR has dropped some elements not supported by react-native-svg: title, filter */
4
+
5
+ const SvgComponent = (props: SvgProps) => (
6
+ <Svg
7
+ width="62px"
8
+ height="100px"
9
+ viewBox="0 0 62 100"
10
+ // @ts-ignore
11
+ xmlns="http://www.w3.org/2000/svg"
12
+ xmlnsXlink="http://www.w3.org/1999/xlink"
13
+ {...props}
14
+ >
15
+ <Defs>
16
+ <Rect id="path-1" x={0} y={0} width={58} height={96} rx={8} />
17
+ </Defs>
18
+ <G
19
+ id="SMS-verify-from-web-stay-on-web-(BR)"
20
+ stroke="none"
21
+ strokeWidth={1}
22
+ fill="none"
23
+ fillRule="evenodd"
24
+ >
25
+ <G
26
+ id="xlg-1312px-16-column-copy-51"
27
+ transform="translate(-625.000000, -259.000000)"
28
+ >
29
+ <G id="unverified-phone" transform="translate(627.000000, 261.000000)">
30
+ <G id="Rectangle">
31
+ <Use
32
+ fill="black"
33
+ fillOpacity={1}
34
+ // @ts-ignore
35
+ filter="url(#filter-2)"
36
+ xlinkHref="#path-1"
37
+ />
38
+ <Use fill="#444444" fillRule="evenodd" xlinkHref="#path-1" />
39
+ </G>
40
+ <Circle id="Oval" fill="#000000" cx={29} cy={89} r={5} />
41
+ <Rect
42
+ id="Rectangle"
43
+ fill="#FFFFFF"
44
+ x={5}
45
+ y={11}
46
+ width={48}
47
+ height={71}
48
+ rx={2}
49
+ />
50
+ <Rect
51
+ id="Rectangle"
52
+ fillOpacity={0.4}
53
+ fill="#D8D8D8"
54
+ x={10}
55
+ y={20}
56
+ width={38}
57
+ height={5}
58
+ />
59
+ <Rect
60
+ id="Rectangle-Copy"
61
+ fillOpacity={0.4}
62
+ fill="#D8D8D8"
63
+ x={10}
64
+ y={31}
65
+ width={38}
66
+ height={36}
67
+ />
68
+ </G>
69
+ </G>
70
+ </G>
71
+ </Svg>
72
+ );
73
+
74
+ export default SvgComponent;
package/src/hooks/api.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import ky from 'ky';
2
2
  import jwt_decode, { JwtPayload } from 'jwt-decode';
3
- import path from 'path';
4
3
 
5
4
  import { useGlobalContext, GlobalState } from '../components/GlobalContext';
6
5
  import AutoQueue from '../utils/queue';
@@ -8,7 +7,7 @@ import { useRef, useEffect } from 'react';
8
7
  import { Platform } from 'react-native';
9
8
  import { ActionType } from '../data/actions';
10
9
 
11
- const packageJson = require(path.join(__dirname, '../../package.json'));
10
+ import packageJson from '../../package.json';
12
11
 
13
12
  type RefreshTokenResp = {
14
13
  access_token: string;