react-native-timer-picker 2.5.0 → 2.6.0

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 (171) hide show
  1. package/README.md +22 -13
  2. package/package.json +143 -126
  3. package/dist/commonjs/components/DurationScroll/DurationScroll.js +0 -405
  4. package/dist/commonjs/components/DurationScroll/DurationScroll.js.map +0 -1
  5. package/dist/commonjs/components/DurationScroll/index.js +0 -27
  6. package/dist/commonjs/components/DurationScroll/index.js.map +0 -1
  7. package/dist/commonjs/components/DurationScroll/types.js +0 -6
  8. package/dist/commonjs/components/DurationScroll/types.js.map +0 -1
  9. package/dist/commonjs/components/Modal/Modal.js +0 -107
  10. package/dist/commonjs/components/Modal/Modal.js.map +0 -1
  11. package/dist/commonjs/components/Modal/index.js +0 -27
  12. package/dist/commonjs/components/Modal/index.js.map +0 -1
  13. package/dist/commonjs/components/Modal/styles.js +0 -25
  14. package/dist/commonjs/components/Modal/styles.js.map +0 -1
  15. package/dist/commonjs/components/Modal/types.js +0 -6
  16. package/dist/commonjs/components/Modal/types.js.map +0 -1
  17. package/dist/commonjs/components/PickerItem/PickerItem.js +0 -47
  18. package/dist/commonjs/components/PickerItem/PickerItem.js.map +0 -1
  19. package/dist/commonjs/components/PickerItem/index.js +0 -14
  20. package/dist/commonjs/components/PickerItem/index.js.map +0 -1
  21. package/dist/commonjs/components/TimerPicker/TimerPicker.js +0 -240
  22. package/dist/commonjs/components/TimerPicker/TimerPicker.js.map +0 -1
  23. package/dist/commonjs/components/TimerPicker/index.js +0 -39
  24. package/dist/commonjs/components/TimerPicker/index.js.map +0 -1
  25. package/dist/commonjs/components/TimerPicker/styles.js +0 -130
  26. package/dist/commonjs/components/TimerPicker/styles.js.map +0 -1
  27. package/dist/commonjs/components/TimerPicker/types.js +0 -6
  28. package/dist/commonjs/components/TimerPicker/types.js.map +0 -1
  29. package/dist/commonjs/components/TimerPickerModal/TimerPickerModal.js +0 -153
  30. package/dist/commonjs/components/TimerPickerModal/TimerPickerModal.js.map +0 -1
  31. package/dist/commonjs/components/TimerPickerModal/index.js +0 -39
  32. package/dist/commonjs/components/TimerPickerModal/index.js.map +0 -1
  33. package/dist/commonjs/components/TimerPickerModal/styles.js +0 -89
  34. package/dist/commonjs/components/TimerPickerModal/styles.js.map +0 -1
  35. package/dist/commonjs/components/TimerPickerModal/types.js +0 -6
  36. package/dist/commonjs/components/TimerPickerModal/types.js.map +0 -1
  37. package/dist/commonjs/index.js +0 -57
  38. package/dist/commonjs/index.js.map +0 -1
  39. package/dist/commonjs/tests/DurationScroll.test.js +0 -163
  40. package/dist/commonjs/tests/DurationScroll.test.js.map +0 -1
  41. package/dist/commonjs/tests/Modal.test.js +0 -99
  42. package/dist/commonjs/tests/Modal.test.js.map +0 -1
  43. package/dist/commonjs/tests/TimerPicker.test.js +0 -169
  44. package/dist/commonjs/tests/TimerPicker.test.js.map +0 -1
  45. package/dist/commonjs/tests/TimerPickerModal.test.js +0 -276
  46. package/dist/commonjs/tests/TimerPickerModal.test.js.map +0 -1
  47. package/dist/commonjs/tests/colorToRgba.test.js +0 -176
  48. package/dist/commonjs/tests/colorToRgba.test.js.map +0 -1
  49. package/dist/commonjs/tests/generateNumbers.test.js +0 -350
  50. package/dist/commonjs/tests/generateNumbers.test.js.map +0 -1
  51. package/dist/commonjs/tests/getAdjustedLimit.test.js +0 -324
  52. package/dist/commonjs/tests/getAdjustedLimit.test.js.map +0 -1
  53. package/dist/commonjs/tests/getDurationAndIndexFromScrollOffset.test.js +0 -424
  54. package/dist/commonjs/tests/getDurationAndIndexFromScrollOffset.test.js.map +0 -1
  55. package/dist/commonjs/tests/getInitialScrollIndex.test.js +0 -396
  56. package/dist/commonjs/tests/getInitialScrollIndex.test.js.map +0 -1
  57. package/dist/commonjs/tests/getSafeInitialValue.test.js +0 -497
  58. package/dist/commonjs/tests/getSafeInitialValue.test.js.map +0 -1
  59. package/dist/commonjs/tests/padNumber.test.js +0 -301
  60. package/dist/commonjs/tests/padNumber.test.js.map +0 -1
  61. package/dist/commonjs/utils/colorToRgba.js +0 -87
  62. package/dist/commonjs/utils/colorToRgba.js.map +0 -1
  63. package/dist/commonjs/utils/generateNumbers.js +0 -124
  64. package/dist/commonjs/utils/generateNumbers.js.map +0 -1
  65. package/dist/commonjs/utils/getAdjustedLimit.js +0 -58
  66. package/dist/commonjs/utils/getAdjustedLimit.js.map +0 -1
  67. package/dist/commonjs/utils/getDurationAndIndexFromScrollOffset.js +0 -62
  68. package/dist/commonjs/utils/getDurationAndIndexFromScrollOffset.js.map +0 -1
  69. package/dist/commonjs/utils/getInitialScrollIndex.js +0 -57
  70. package/dist/commonjs/utils/getInitialScrollIndex.js.map +0 -1
  71. package/dist/commonjs/utils/getSafeInitialValue.js +0 -41
  72. package/dist/commonjs/utils/getSafeInitialValue.js.map +0 -1
  73. package/dist/commonjs/utils/padNumber.js +0 -40
  74. package/dist/commonjs/utils/padNumber.js.map +0 -1
  75. package/dist/module/components/DurationScroll/DurationScroll.js +0 -397
  76. package/dist/module/components/DurationScroll/DurationScroll.js.map +0 -1
  77. package/dist/module/components/DurationScroll/index.js +0 -3
  78. package/dist/module/components/DurationScroll/index.js.map +0 -1
  79. package/dist/module/components/DurationScroll/types.js +0 -2
  80. package/dist/module/components/DurationScroll/types.js.map +0 -1
  81. package/dist/module/components/Modal/Modal.js +0 -99
  82. package/dist/module/components/Modal/Modal.js.map +0 -1
  83. package/dist/module/components/Modal/index.js +0 -3
  84. package/dist/module/components/Modal/index.js.map +0 -1
  85. package/dist/module/components/Modal/styles.js +0 -19
  86. package/dist/module/components/Modal/styles.js.map +0 -1
  87. package/dist/module/components/Modal/types.js +0 -2
  88. package/dist/module/components/Modal/types.js.map +0 -1
  89. package/dist/module/components/PickerItem/PickerItem.js +0 -40
  90. package/dist/module/components/PickerItem/PickerItem.js.map +0 -1
  91. package/dist/module/components/PickerItem/index.js +0 -2
  92. package/dist/module/components/PickerItem/index.js.map +0 -1
  93. package/dist/module/components/TimerPicker/TimerPicker.js +0 -232
  94. package/dist/module/components/TimerPicker/TimerPicker.js.map +0 -1
  95. package/dist/module/components/TimerPicker/index.js +0 -4
  96. package/dist/module/components/TimerPicker/index.js.map +0 -1
  97. package/dist/module/components/TimerPicker/styles.js +0 -123
  98. package/dist/module/components/TimerPicker/styles.js.map +0 -1
  99. package/dist/module/components/TimerPicker/types.js +0 -2
  100. package/dist/module/components/TimerPicker/types.js.map +0 -1
  101. package/dist/module/components/TimerPickerModal/TimerPickerModal.js +0 -145
  102. package/dist/module/components/TimerPickerModal/TimerPickerModal.js.map +0 -1
  103. package/dist/module/components/TimerPickerModal/index.js +0 -4
  104. package/dist/module/components/TimerPickerModal/index.js.map +0 -1
  105. package/dist/module/components/TimerPickerModal/styles.js +0 -82
  106. package/dist/module/components/TimerPickerModal/styles.js.map +0 -1
  107. package/dist/module/components/TimerPickerModal/types.js +0 -2
  108. package/dist/module/components/TimerPickerModal/types.js.map +0 -1
  109. package/dist/module/index.js +0 -3
  110. package/dist/module/index.js.map +0 -1
  111. package/dist/module/tests/DurationScroll.test.js +0 -160
  112. package/dist/module/tests/DurationScroll.test.js.map +0 -1
  113. package/dist/module/tests/Modal.test.js +0 -96
  114. package/dist/module/tests/Modal.test.js.map +0 -1
  115. package/dist/module/tests/TimerPicker.test.js +0 -166
  116. package/dist/module/tests/TimerPicker.test.js.map +0 -1
  117. package/dist/module/tests/TimerPickerModal.test.js +0 -273
  118. package/dist/module/tests/TimerPickerModal.test.js.map +0 -1
  119. package/dist/module/tests/colorToRgba.test.js +0 -174
  120. package/dist/module/tests/colorToRgba.test.js.map +0 -1
  121. package/dist/module/tests/generateNumbers.test.js +0 -348
  122. package/dist/module/tests/generateNumbers.test.js.map +0 -1
  123. package/dist/module/tests/getAdjustedLimit.test.js +0 -322
  124. package/dist/module/tests/getAdjustedLimit.test.js.map +0 -1
  125. package/dist/module/tests/getDurationAndIndexFromScrollOffset.test.js +0 -422
  126. package/dist/module/tests/getDurationAndIndexFromScrollOffset.test.js.map +0 -1
  127. package/dist/module/tests/getInitialScrollIndex.test.js +0 -394
  128. package/dist/module/tests/getInitialScrollIndex.test.js.map +0 -1
  129. package/dist/module/tests/getSafeInitialValue.test.js +0 -495
  130. package/dist/module/tests/getSafeInitialValue.test.js.map +0 -1
  131. package/dist/module/tests/padNumber.test.js +0 -299
  132. package/dist/module/tests/padNumber.test.js.map +0 -1
  133. package/dist/module/utils/colorToRgba.js +0 -80
  134. package/dist/module/utils/colorToRgba.js.map +0 -1
  135. package/dist/module/utils/generateNumbers.js +0 -117
  136. package/dist/module/utils/generateNumbers.js.map +0 -1
  137. package/dist/module/utils/getAdjustedLimit.js +0 -51
  138. package/dist/module/utils/getAdjustedLimit.js.map +0 -1
  139. package/dist/module/utils/getDurationAndIndexFromScrollOffset.js +0 -55
  140. package/dist/module/utils/getDurationAndIndexFromScrollOffset.js.map +0 -1
  141. package/dist/module/utils/getInitialScrollIndex.js +0 -50
  142. package/dist/module/utils/getInitialScrollIndex.js.map +0 -1
  143. package/dist/module/utils/getSafeInitialValue.js +0 -34
  144. package/dist/module/utils/getSafeInitialValue.js.map +0 -1
  145. package/dist/module/utils/padNumber.js +0 -33
  146. package/dist/module/utils/padNumber.js.map +0 -1
  147. package/dist/typescript/components/DurationScroll/DurationScroll.d.ts +0 -4
  148. package/dist/typescript/components/DurationScroll/index.d.ts +0 -2
  149. package/dist/typescript/components/DurationScroll/types.d.ts +0 -67
  150. package/dist/typescript/components/Modal/Modal.d.ts +0 -5
  151. package/dist/typescript/components/Modal/index.d.ts +0 -2
  152. package/dist/typescript/components/Modal/styles.d.ts +0 -17
  153. package/dist/typescript/components/Modal/types.d.ts +0 -15
  154. package/dist/typescript/components/PickerItem/PickerItem.d.ts +0 -15
  155. package/dist/typescript/components/PickerItem/index.d.ts +0 -1
  156. package/dist/typescript/components/TimerPicker/TimerPicker.d.ts +0 -4
  157. package/dist/typescript/components/TimerPicker/index.d.ts +0 -3
  158. package/dist/typescript/components/TimerPicker/styles.d.ts +0 -1578
  159. package/dist/typescript/components/TimerPicker/types.d.ts +0 -90
  160. package/dist/typescript/components/TimerPickerModal/TimerPickerModal.d.ts +0 -4
  161. package/dist/typescript/components/TimerPickerModal/index.d.ts +0 -3
  162. package/dist/typescript/components/TimerPickerModal/styles.d.ts +0 -948
  163. package/dist/typescript/components/TimerPickerModal/types.d.ts +0 -55
  164. package/dist/typescript/index.d.ts +0 -2
  165. package/dist/typescript/utils/colorToRgba.d.ts +0 -38
  166. package/dist/typescript/utils/generateNumbers.d.ts +0 -80
  167. package/dist/typescript/utils/getAdjustedLimit.d.ts +0 -30
  168. package/dist/typescript/utils/getDurationAndIndexFromScrollOffset.d.ts +0 -49
  169. package/dist/typescript/utils/getInitialScrollIndex.d.ts +0 -46
  170. package/dist/typescript/utils/getSafeInitialValue.d.ts +0 -38
  171. package/dist/typescript/utils/padNumber.d.ts +0 -28
package/README.md CHANGED
@@ -13,6 +13,7 @@ Works with Expo and bare React Native apps ✅
13
13
 
14
14
  Includes iOS-style haptic and audio feedback 🍏
15
15
 
16
+ - [React Native Timer Picker ⏰🕰️⏳](#react-native-timer-picker-️)
16
17
  - [Demos 📱](#demos-)
17
18
  - [Installation 🚀](#installation-)
18
19
  - [Peer Dependencies 👶](#peer-dependencies-)
@@ -289,6 +290,9 @@ return (
289
290
  setIsVisible={setShowPicker}
290
291
  styles={{
291
292
  theme: "light",
293
+ pickerColumnWidth: {
294
+ hours: 90,
295
+ },
292
296
  }}
293
297
  use12HourPicker
294
298
  visible={showPicker}
@@ -426,6 +430,8 @@ return (
426
430
  setIsVisible={setShowPicker}
427
431
  styles={{
428
432
  theme: "dark",
433
+ pickerLabelGap: 10,
434
+ text: { fontSize: 18 },
429
435
  }}
430
436
  visible={showPicker}
431
437
  />
@@ -464,14 +470,13 @@ return (
464
470
  pickerItem: {
465
471
  fontSize: 34,
466
472
  },
467
- pickerLabelContainer: {
468
- marginTop: -4,
469
- right: 0,
470
- left: undefined,
471
- },
472
473
  pickerLabel: {
473
474
  fontSize: 32,
474
475
  },
476
+ pickerLabelContainer: {
477
+ marginTop: -4,
478
+ },
479
+ pickerLabelGap: 23,
475
480
  pickerContainer: {
476
481
  paddingHorizontal: 50,
477
482
  },
@@ -502,7 +507,7 @@ return (
502
507
  secondLabel="sec"
503
508
  styles={{
504
509
  theme: "light",
505
- labelOffsetPercentage: 0,
510
+ pickerLabelGap: 8,
506
511
  pickerItem: {
507
512
  fontSize: 34,
508
513
  },
@@ -582,14 +587,18 @@ return (
582
587
 
583
588
  #### Custom Styles 👗
584
589
 
585
- The component should look good straight out of the box, but you can use these styles to make it fit in with your App's theme:
590
+ The component should look good straight out of the box, but you can use these easy styles to make it fit in with your App's theme:
591
+
592
+ | Style Prop | Description | Type |
593
+ | :---------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------: |
594
+ | theme | Theme of the component | "light" \| "dark" |
595
+ | backgroundColor | Main background color | string |
596
+ | text | Base text style | TextStyle |
597
+ | pickerLabelGap | Pixel gap between the label and the picker number column. Can be a single number or a per-column object (e.g. `{ hours: 10, minutes: 8 }`). Default: `6` | `PerColumnValue`\* |
598
+ | pickerColumnWidth | Width of individual picker columns in pixels. Can be a single number or a per-column object. Overrides default flex-based sizing when set | `PerColumnValue`\* |
599
+ | labelOffsetPercentage **(DEPRECATED)** | Percentage offset for horizontal label positioning relative to the picker (use `pickerLabelGap` instead) | number |
586
600
 
587
- | Style Prop | Description | Type |
588
- | :-------------------: | :----------------------------------------------------------------------- | :---------------: |
589
- | theme | Theme of the component | "light" \| "dark" |
590
- | backgroundColor | Main background color | string |
591
- | text | Base text style | TextStyle |
592
- | labelOffsetPercentage | Percentage offset for horizonal label positioning relative to the picker | number |
601
+ **\*`PerColumnValue` type:** `number | { days?: number, hours?: number, minutes?: number, seconds?: number }` — pass a single number for all columns, or an object to set values per column. Omitted columns use the default.
593
602
 
594
603
  For deeper style customization, you can supply the following custom styles to adjust the component in any way. These are applied on top of the default styling so take a look at those [styles](src/components/TimerPicker/styles.ts) if something isn't adjusting in the way you'd expect.
595
604
 
package/package.json CHANGED
@@ -1,130 +1,147 @@
1
1
  {
2
- "name": "react-native-timer-picker",
3
- "description": "A simple, flexible, performant duration picker for React Native apps 🔥\n\nGreat for timers, alarms and duration inputs ⏰🕰️⏳\n\nIncludes iOS-style haptic and audio feedback 🍏",
4
- "author": {
5
- "name": "Tim Roberts",
6
- "url": "https://github.com/troberts-28"
7
- },
8
- "license": "MIT",
9
- "version": "2.5.0",
10
- "main": "dist/commonjs/index.js",
11
- "module": "dist/module/index.js",
12
- "types": "dist/typescript/index.d.ts",
13
- "typings": "dist/typescript/index.d.ts",
14
- "packageManager": "yarn@4.11.0",
15
- "workspaces": {
16
- "packages": [
17
- "examples/*"
18
- ]
19
- },
20
- "scripts": {
21
- "setup": "yarn install",
22
- "start": " yarn workspace example-expo start",
23
- "start-bare:android": "yarn workspace example-bare android && yarn workspace example-bare start",
24
- "start-bare:ios": "yarn workspace example-bare ios && yarn workspace example-bare start",
25
- "test": "jest --forceExit --silent",
26
- "build": "bob build",
27
- "clean": "rm yarn.lock && rm -rf ./node_modules && yarn install",
28
- "lint": "eslint --ext .ts,.tsx .",
29
- "lint:fix": "eslint --ext .ts,.tsx . --fix",
30
- "ts": "tsc --noEmit",
31
- "prepare": "yarn build"
32
- },
33
- "homepage": "https://github.com/troberts-28/react-native-timer-picker",
34
- "bugs": {
35
- "url": "https://github.com/troberts-28/react-native-timer-picker/issues"
36
- },
37
- "repository": {
38
- "name": "GitHub",
39
- "type": "git",
40
- "url": "git+https://github.com/troberts-28/react-native-timer-picker.git"
41
- },
42
- "publishConfig": {
43
- "registry": "https://registry.npmjs.org/"
44
- },
45
- "files": [
46
- "dist",
47
- "package.json",
48
- "README.md",
49
- "LICENSE"
50
- ],
51
- "keywords": [
52
- "react",
53
- "react-native",
54
- "expo",
55
- "duration",
56
- "picker",
57
- "time",
58
- "timer",
59
- "alarm",
60
- "modal",
61
- "durationpicker",
62
- "duration-picker",
63
- "duration-picker-modal",
64
- "react-native-duration-picker",
65
- "react-native-duration-picker-modal",
66
- "timepicker",
67
- "time-picker",
68
- "alarmpicker",
69
- "alarm-picker",
70
- "alarm-picker-modal",
71
- "react-native-alarm-picker",
72
- "timerpicker",
73
- "timer-picker",
74
- "timer-picker-modal",
75
- "react-native-duration-picker-modal",
76
- "expo-duration-picker",
77
- "expo-time-picker",
78
- "expo-timepicker",
79
- "expo-durationpicker",
80
- "expo-duration-picker",
81
- "expo-time-picker",
82
- "expo-timepicker",
83
- "expo-durationpicker"
2
+ "name": "react-native-timer-picker",
3
+ "description": "A simple, flexible, performant duration picker for React Native apps 🔥\n\nGreat for timers, alarms and duration inputs ⏰🕰️⏳\n\nIncludes iOS-style haptic and audio feedback 🍏",
4
+ "author": {
5
+ "name": "Tim Roberts",
6
+ "url": "https://github.com/troberts-28"
7
+ },
8
+ "license": "MIT",
9
+ "version": "2.6.0",
10
+ "main": "dist/commonjs/index.js",
11
+ "module": "dist/module/index.js",
12
+ "types": "dist/typescript/index.d.ts",
13
+ "typings": "dist/typescript/index.d.ts",
14
+ "packageManager": "yarn@4.12.0",
15
+ "workspaces": {
16
+ "packages": [
17
+ "examples/*"
18
+ ]
19
+ },
20
+ "scripts": {
21
+ "setup": "yarn install",
22
+ "start": " yarn workspace example-expo start",
23
+ "start-bare:android": "yarn workspace example-bare android && yarn workspace example-bare start",
24
+ "start-bare:ios": "yarn workspace example-bare ios && yarn workspace example-bare start",
25
+ "test": "jest --forceExit --silent",
26
+ "build": "bob build",
27
+ "ts": "tsc --noEmit && tsc --noEmit -p examples/example-expo && tsc --noEmit -p examples/example-bare",
28
+ "clean": "rm yarn.lock && rm -rf ./node_modules && yarn install",
29
+ "lint": "eslint src/ examples/",
30
+ "lint:fix": "eslint src/ examples/ --fix",
31
+ "format": "prettier --check ./src ./examples",
32
+ "format:fix": "prettier --write ./src ./examples",
33
+ "prepare": "simple-git-hooks"
34
+ },
35
+ "homepage": "https://github.com/troberts-28/react-native-timer-picker",
36
+ "bugs": {
37
+ "url": "https://github.com/troberts-28/react-native-timer-picker/issues"
38
+ },
39
+ "repository": {
40
+ "name": "GitHub",
41
+ "type": "git",
42
+ "url": "git+https://github.com/troberts-28/react-native-timer-picker.git"
43
+ },
44
+ "publishConfig": {
45
+ "registry": "https://registry.npmjs.org/"
46
+ },
47
+ "files": [
48
+ "dist",
49
+ "package.json",
50
+ "README.md",
51
+ "LICENSE"
52
+ ],
53
+ "keywords": [
54
+ "react",
55
+ "react-native",
56
+ "expo",
57
+ "duration",
58
+ "picker",
59
+ "time",
60
+ "timer",
61
+ "alarm",
62
+ "modal",
63
+ "durationpicker",
64
+ "duration-picker",
65
+ "duration-picker-modal",
66
+ "react-native-duration-picker",
67
+ "react-native-duration-picker-modal",
68
+ "timepicker",
69
+ "time-picker",
70
+ "alarmpicker",
71
+ "alarm-picker",
72
+ "alarm-picker-modal",
73
+ "react-native-alarm-picker",
74
+ "timerpicker",
75
+ "timer-picker",
76
+ "timer-picker-modal",
77
+ "react-native-duration-picker-modal",
78
+ "expo-duration-picker",
79
+ "expo-time-picker",
80
+ "expo-timepicker",
81
+ "expo-durationpicker",
82
+ "expo-duration-picker",
83
+ "expo-time-picker",
84
+ "expo-timepicker",
85
+ "expo-durationpicker"
86
+ ],
87
+ "engines": {
88
+ "node": ">=16.0.0"
89
+ },
90
+ "peerDependencies": {
91
+ "react": ">=18.2.0",
92
+ "react-native": ">=0.72.0"
93
+ },
94
+ "devDependencies": {
95
+ "@babel/core": "^7.20.0",
96
+ "@eslint/compat": "^1.4.0",
97
+ "@eslint/js": "^9.38.0",
98
+ "@testing-library/react-native": "^12.0.0",
99
+ "@types/jest": "^29.0.0",
100
+ "@types/react": ">=18.2.0",
101
+ "@types/react-native": "0.72.0",
102
+ "@types/react-test-renderer": ">=18.2.0",
103
+ "babel-jest": "^29.6.2",
104
+ "eslint": "^9.28.0",
105
+ "eslint-config-prettier": "^10.1.8",
106
+ "eslint-plugin-perfectionist": "^4.13.0",
107
+ "eslint-plugin-prettier": "^5.4.1",
108
+ "eslint-plugin-react": "^7.37.5",
109
+ "eslint-plugin-react-hooks": "^5.2.0",
110
+ "jest": "^29.0.0",
111
+ "lint-staged": "^16.2.7",
112
+ "metro-react-native-babel-preset": "^0.71.1",
113
+ "prettier": "2.8.8",
114
+ "react": "18.2.0",
115
+ "react-native": "0.72.0",
116
+ "react-native-builder-bob": "^0.18.3",
117
+ "react-test-renderer": "18.2.0",
118
+ "simple-git-hooks": "^2.13.1",
119
+ "typescript": "~5.8.0",
120
+ "typescript-eslint": "^8.33.0"
121
+ },
122
+ "react-native-builder-bob": {
123
+ "source": "src",
124
+ "output": "dist",
125
+ "targets": [
126
+ "commonjs",
127
+ "module",
128
+ "typescript"
129
+ ]
130
+ },
131
+ "simple-git-hooks": {
132
+ "pre-commit": "npx lint-staged"
133
+ },
134
+ "lint-staged": {
135
+ "*.{ts,tsx,js,jsx}": [
136
+ "eslint --fix",
137
+ "prettier --write"
84
138
  ],
85
- "engines": {
86
- "node": ">=16.0.0"
87
- },
88
- "peerDependencies": {
89
- "react": ">=18.2.0",
90
- "react-native": ">=0.72.0"
91
- },
92
- "devDependencies": {
93
- "@babel/core": "^7.20.0",
94
- "@testing-library/react-native": "^12.0.0",
95
- "@types/jest": "^29.0.0",
96
- "@types/react": ">=18.2.0",
97
- "@types/react-native": "0.72.0",
98
- "@types/react-test-renderer": ">=18.2.0",
99
- "@typescript-eslint/eslint-plugin": "^5.49.0",
100
- "@typescript-eslint/parser": "^5.49.0",
101
- "babel-jest": "^29.6.2",
102
- "eslint": "^8.44.0",
103
- "eslint-plugin-import": "^2.29.0",
104
- "eslint-plugin-react": "^7.33.1",
105
- "eslint-plugin-react-hooks": "^4.6.0",
106
- "eslint-plugin-sort-destructure-keys": "^1.5.0",
107
- "eslint-plugin-typescript-sort-keys": "^2.3.0",
108
- "jest": "^29.0.0",
109
- "metro-react-native-babel-preset": "^0.71.1",
110
- "prettier": "2.8.8",
111
- "react": "18.2.0",
112
- "react-native": "0.72.0",
113
- "react-native-builder-bob": "^0.18.3",
114
- "react-test-renderer": "18.2.0",
115
- "typescript": "^4.7.4"
116
- },
117
- "react-native-builder-bob": {
118
- "source": "src",
119
- "output": "dist",
120
- "targets": [
121
- "commonjs",
122
- "module",
123
- "typescript"
124
- ]
125
- },
126
- "eslintIgnore": [
127
- "node_modules/",
128
- "dist/"
139
+ "*.{json}": [
140
+ "prettier --write"
129
141
  ]
142
+ },
143
+ "eslintIgnore": [
144
+ "node_modules/",
145
+ "dist/"
146
+ ]
130
147
  }