@youversion/platform-react-hooks 0.5.0 → 0.5.5
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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +44 -0
- package/README.md +12 -90
- package/package.json +4 -3
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
> @youversion/platform-react-hooks@0.5.
|
|
2
|
+
> @youversion/platform-react-hooks@0.5.5 build /home/runner/work/platform-sdk-react/platform-sdk-react/packages/hooks
|
|
3
3
|
> tsc -p tsconfig.build.json
|
|
4
4
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,49 @@
|
|
|
1
1
|
# @youversion/platform-react-hooks
|
|
2
2
|
|
|
3
|
+
## 0.5.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 752e0d5: fix(ci): remove registry-url for NPM Trusted Publishing
|
|
8
|
+
- 752e0d5: Use npm during the release process to support OIDC.
|
|
9
|
+
- Updated dependencies [752e0d5]
|
|
10
|
+
- Updated dependencies [752e0d5]
|
|
11
|
+
- @youversion/platform-core@0.5.5
|
|
12
|
+
|
|
13
|
+
## 0.5.4
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- 1acb93a: fix(ci): remove registry-url for NPM Trusted Publishing
|
|
18
|
+
- 1acb93a: Use npm during the release process to support OIDC.
|
|
19
|
+
- Updated dependencies [1acb93a]
|
|
20
|
+
- Updated dependencies [1acb93a]
|
|
21
|
+
- @youversion/platform-core@0.5.4
|
|
22
|
+
|
|
23
|
+
## 0.5.3
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- 7fd89a0: fix(ci): remove registry-url for NPM Trusted Publishing
|
|
28
|
+
- Updated dependencies [7fd89a0]
|
|
29
|
+
- @youversion/platform-core@0.5.3
|
|
30
|
+
|
|
31
|
+
## 0.5.2
|
|
32
|
+
|
|
33
|
+
### Patch Changes
|
|
34
|
+
|
|
35
|
+
- 2d11ab6: Publishing workflow now uses NPM Trusted Publishing instead of token publishing.
|
|
36
|
+
- Updated dependencies [2d11ab6]
|
|
37
|
+
- @youversion/platform-core@0.5.2
|
|
38
|
+
|
|
39
|
+
## 0.5.1
|
|
40
|
+
|
|
41
|
+
### Patch Changes
|
|
42
|
+
|
|
43
|
+
- caaf811: fix(ui): add export for BibleWidgetView
|
|
44
|
+
- Updated dependencies [caaf811]
|
|
45
|
+
- @youversion/platform-core@0.5.1
|
|
46
|
+
|
|
3
47
|
## 0.5.0
|
|
4
48
|
|
|
5
49
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -1,32 +1,10 @@
|
|
|
1
|
-

|
|
3
|
-

|
|
1
|
+

|
|
4
2
|
|
|
5
3
|
# @youversion/platform-react-hooks
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
React hooks for accessing YouVersion Platform APIs with automatic loading/error states.
|
|
8
6
|
|
|
9
|
-
##
|
|
10
|
-
|
|
11
|
-
`@youversion/platform-react-hooks` provides React hooks that wrap the [@youversion/platform-core](../core/README.md) SDK, offering a declarative way to access Bible data in your React applications. Features automatic loading and error state management, type-safe hooks with TypeScript support, and memoized data fetching.
|
|
12
|
-
|
|
13
|
-
> **📚 Full Documentation:** [developers.youversion.com/sdks/react](https://developers.youversion.com/sdks/react)
|
|
14
|
-
|
|
15
|
-
## Installation
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
pnpm add @youversion/platform-react-hooks
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
### Peer Dependencies
|
|
22
|
-
|
|
23
|
-
Requires React 19.0.0 or higher:
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
pnpm install react@19.0.0
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## When to Use This Package
|
|
7
|
+
## When to use this package
|
|
30
8
|
|
|
31
9
|
Use `@youversion/platform-react-hooks` when you need:
|
|
32
10
|
- ✅ Building custom React components with Bible features
|
|
@@ -38,30 +16,17 @@ Use `@youversion/platform-react-hooks` when you need:
|
|
|
38
16
|
- ❌ Need direct API access → Use [@youversion/platform-core](../core/README.md) for low-level client
|
|
39
17
|
- ❌ Want ready-made UI → Use [@youversion/platform-react-ui](../ui/README.md) for production components
|
|
40
18
|
|
|
41
|
-
##
|
|
42
|
-
|
|
43
|
-
- **[@youversion/platform-core](../core/README.md)** - Core TypeScript SDK for direct API access
|
|
44
|
-
- **[@youversion/platform-react-ui](../ui/README.md)** - Pre-built React components
|
|
45
|
-
|
|
46
|
-
## Setup
|
|
47
|
-
|
|
48
|
-
All hooks require the `BibleSDKProvider` to be wrapped around your application:
|
|
49
|
-
|
|
50
|
-
```tsx
|
|
51
|
-
import { BibleSDKProvider } from '@youversion/platform-react-hooks';
|
|
19
|
+
## Install
|
|
52
20
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
<BibleSDKProvider appKey="YOUR_APP_KEY">
|
|
56
|
-
{/* All hooks work here */}
|
|
57
|
-
</BibleSDKProvider>
|
|
58
|
-
);
|
|
59
|
-
}
|
|
21
|
+
```bash
|
|
22
|
+
pnpm add @youversion/platform-react-hooks
|
|
60
23
|
```
|
|
61
24
|
|
|
62
|
-
|
|
25
|
+
Get your App Key at [platform.youversion.com](https://platform.youversion.com/)
|
|
26
|
+
|
|
27
|
+
## Usage
|
|
63
28
|
|
|
64
|
-
|
|
29
|
+
Wrap your app with `BibleSDKProvider`:
|
|
65
30
|
|
|
66
31
|
```tsx
|
|
67
32
|
import { BibleSDKProvider, useVersion, usePassage } from '@youversion/platform-react-hooks';
|
|
@@ -90,49 +55,6 @@ function App() {
|
|
|
90
55
|
}
|
|
91
56
|
```
|
|
92
57
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
- Fetch Bible versions, books, chapters, and verses
|
|
96
|
-
- Get formatted passages with HTML or text output
|
|
97
|
-
- Access Verse of the Day content
|
|
98
|
-
- Navigate between chapters and verses
|
|
99
|
-
- Query available languages and metadata
|
|
100
|
-
- Automatic loading/error state management
|
|
101
|
-
|
|
102
|
-
## Troubleshooting
|
|
103
|
-
|
|
104
|
-
### Provider Not Found Error
|
|
105
|
-
|
|
106
|
-
**Error:** `Error: useBibleClient must be used within a BibleSDKProvider`
|
|
107
|
-
|
|
108
|
-
**Solution:** Ensure `BibleSDKProvider` wraps your component tree:
|
|
109
|
-
|
|
110
|
-
```tsx
|
|
111
|
-
// ✅ Correct
|
|
112
|
-
function App() {
|
|
113
|
-
return (
|
|
114
|
-
<BibleSDKProvider appKey="YOUR_APP_KEY">
|
|
115
|
-
<MyComponent />
|
|
116
|
-
</BibleSDKProvider>
|
|
117
|
-
);
|
|
118
|
-
}
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
### Invalid App Key Error
|
|
122
|
-
|
|
123
|
-
**Solution:** Get your App Key from [platform.youversion.com](https://platform.youversion.com/) and verify it's passed correctly.
|
|
124
|
-
|
|
125
|
-
## Development
|
|
126
|
-
|
|
127
|
-
See [CONTRIBUTING.md](../../CONTRIBUTING.md) for development instructions.
|
|
128
|
-
|
|
129
|
-
## License
|
|
130
|
-
|
|
131
|
-
See [LICENSE](../../LICENSE)
|
|
132
|
-
|
|
133
|
-
## Support
|
|
58
|
+
---
|
|
134
59
|
|
|
135
|
-
|
|
136
|
-
- Platform Docs: [platform.youversion.com](https://platform.youversion.com/)
|
|
137
|
-
- Core SDK: [@youversion/platform-core documentation](../core/README.md)
|
|
138
|
-
- Monorepo: [YouVersion Platform SDK](../../README.md)
|
|
60
|
+
**API Reference:** [developers.youversion.com/sdks/react](https://developers.youversion.com/sdks/react)
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@youversion/platform-react-hooks",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
|
-
"access": "public"
|
|
6
|
+
"access": "public",
|
|
7
|
+
"provenance": true
|
|
7
8
|
},
|
|
8
9
|
"repository": {
|
|
9
10
|
"type": "git",
|
|
@@ -21,7 +22,7 @@
|
|
|
21
22
|
}
|
|
22
23
|
},
|
|
23
24
|
"dependencies": {
|
|
24
|
-
"@youversion/platform-core": "0.5.
|
|
25
|
+
"@youversion/platform-core": "0.5.5"
|
|
25
26
|
},
|
|
26
27
|
"peerDependencies": {
|
|
27
28
|
"react": ">=19.1.0 <20.0.0"
|