@forthtilliath/react-native-kit 0.16.0 → 0.17.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.
- package/README.md +3 -3
- package/package.json +22 -3
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ Or, from within this monorepo, as a workspace dependency:
|
|
|
18
18
|
}
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
`react` and `react-native` are peer dependencies — install them in the consuming app if not already present. `@expo/vector-icons`, `expo-image-picker
|
|
21
|
+
`react` and `react-native` are the only required peer dependencies — install them in the consuming app if not already present. Every other peer dependency is **optional**, needed only if you import the components that use them: `@expo/vector-icons` (`Thumbnail`, `PickerModal`, `SwipeableRow`, the settings screens…), `expo-image-picker` (`PhotoPicker`), `expo-speech-recognition` (`VoiceSearchButton`/`PickerModal`), `react-native-gesture-handler` (`DragHandle`, `SwipeableRow`), `react-native-reanimated` (`SwipeableRow`) and `@forthtilliath/expo-release-updates-ui` (`UpdateSettingsScreen`). Package managers no longer install them for you, so a native module (and the Android permissions it declares, e.g. `CAMERA` for `expo-image-picker`) only ends up in your APK if you add it yourself.
|
|
22
22
|
|
|
23
23
|
## Usage
|
|
24
24
|
|
|
@@ -30,7 +30,7 @@ import { PhotoPicker } from "@forthtilliath/react-native-kit/components/picker/P
|
|
|
30
30
|
|
|
31
31
|
This is the recommended way to import: Metro (React Native's bundler) doesn't reliably tree-shake, so pulling from a single deep-import path keeps peer dependencies you don't use (`expo-image-picker`, `expo-speech-recognition`, `react-native-gesture-handler`...) out of your bundle entirely, rather than merely unused.
|
|
32
32
|
|
|
33
|
-
A root barrel is also available for convenience:
|
|
33
|
+
A root barrel is also available for convenience — but since it imports every module, Metro will fail to resolve any optional peer dependency you haven't installed. Use it only if you have them all:
|
|
34
34
|
|
|
35
35
|
```ts
|
|
36
36
|
import { PhotoPicker, useSubmitGuard } from "@forthtilliath/react-native-kit";
|
|
@@ -501,7 +501,7 @@ import { ThemeSettingsScreen } from "@forthtilliath/react-native-kit/components/
|
|
|
501
501
|
|
|
502
502
|
#### `<UpdateSettingsScreen currentVersion checkForUpdate compareVersions downloadAndInstallApk />`
|
|
503
503
|
|
|
504
|
-
The full "check for update" screen: installed version, a manual check button, the available-update box (changelog + install button) or an up-to-date/error message, download progress, and — if `fetchReleaseHistory` is passed — a list of past releases. Checks automatically once on mount. Renders release notes via `@forthtilliath/expo-release-updates-ui`'s `ChangelogNotes`, and pairs naturally with that package's `useUpdateCheck`/`UpdateAvailableBanner` (same `checkForUpdate`/`compareVersions` you already pass those), but takes plain functions so it isn't tied to that package's exact shape.
|
|
504
|
+
The full "check for update" screen: installed version, a manual check button, the available-update box (changelog + install button) or an up-to-date/error message, download progress, and — if `fetchReleaseHistory` is passed — a list of past releases. Checks automatically once on mount. Renders release notes via `@forthtilliath/expo-release-updates-ui`'s `ChangelogNotes`, and pairs naturally with that package's `useUpdateCheck`/`UpdateAvailableBanner` (same `checkForUpdate`/`compareVersions` you already pass those), but takes plain functions so it isn't tied to that package's exact shape. `@forthtilliath/expo-release-updates-ui` is an optional peer dependency: install it to use this screen.
|
|
505
505
|
|
|
506
506
|
```tsx
|
|
507
507
|
import { UpdateSettingsScreen } from "@forthtilliath/react-native-kit/components/settings/UpdateSettingsScreen";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forthtilliath/react-native-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
"./*": "./dist/*.js"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@forthtilliath/expo-release-updates-ui": "^0.4.0",
|
|
26
25
|
"@forthtilliath/ts-kit": "^0.12.0"
|
|
27
26
|
},
|
|
28
27
|
"peerDependencies": {
|
|
29
28
|
"@expo/vector-icons": ">=15.0.0",
|
|
29
|
+
"@forthtilliath/expo-release-updates-ui": ">=0.4.1",
|
|
30
30
|
"expo-calendar": ">=54.0.0",
|
|
31
31
|
"expo-file-system": ">=54.0.0",
|
|
32
32
|
"expo-haptics": ">=54.0.0",
|
|
@@ -41,6 +41,12 @@
|
|
|
41
41
|
"react-native-view-shot": ">=4.0.0"
|
|
42
42
|
},
|
|
43
43
|
"peerDependenciesMeta": {
|
|
44
|
+
"@expo/vector-icons": {
|
|
45
|
+
"optional": true
|
|
46
|
+
},
|
|
47
|
+
"@forthtilliath/expo-release-updates-ui": {
|
|
48
|
+
"optional": true
|
|
49
|
+
},
|
|
44
50
|
"expo-calendar": {
|
|
45
51
|
"optional": true
|
|
46
52
|
},
|
|
@@ -53,9 +59,21 @@
|
|
|
53
59
|
"expo-image-manipulator": {
|
|
54
60
|
"optional": true
|
|
55
61
|
},
|
|
62
|
+
"expo-image-picker": {
|
|
63
|
+
"optional": true
|
|
64
|
+
},
|
|
56
65
|
"expo-sharing": {
|
|
57
66
|
"optional": true
|
|
58
67
|
},
|
|
68
|
+
"expo-speech-recognition": {
|
|
69
|
+
"optional": true
|
|
70
|
+
},
|
|
71
|
+
"react-native-gesture-handler": {
|
|
72
|
+
"optional": true
|
|
73
|
+
},
|
|
74
|
+
"react-native-reanimated": {
|
|
75
|
+
"optional": true
|
|
76
|
+
},
|
|
59
77
|
"react-native-view-shot": {
|
|
60
78
|
"optional": true
|
|
61
79
|
}
|
|
@@ -85,7 +103,8 @@
|
|
|
85
103
|
"typescript": "^5.9.3",
|
|
86
104
|
"vitest": "^5.0.2",
|
|
87
105
|
"@forthtilliath/eslint-config": "0.9.0",
|
|
88
|
-
"@forthtilliath/typescript-config": "0.1.1"
|
|
106
|
+
"@forthtilliath/typescript-config": "0.1.1",
|
|
107
|
+
"@forthtilliath/expo-release-updates-ui": "^0.4.1"
|
|
89
108
|
},
|
|
90
109
|
"size-limit": [
|
|
91
110
|
{
|