@youversion/platform-react-hooks 0.5.1 → 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.
@@ -1,4 +1,4 @@
1
1
 
2
- > @youversion/platform-react-hooks@0.5.1 build /home/runner/work/platform-sdk-react/platform-sdk-react/packages/hooks
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,41 @@
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
+
3
39
  ## 0.5.1
4
40
 
5
41
  ### Patch Changes
package/README.md CHANGED
@@ -1,32 +1,10 @@
1
- ![License](https://img.shields.io/badge/license-Apache%20License%202.0-blue)
2
- ![React >= 19.0.0](https://img.shields.io/badge/React-%3E%3D%2019.0.0-61dafb?logo=react&logoColor=white)
3
- ![TypeScript](https://img.shields.io/badge/TypeScript-3178C6?logo=typescript&logoColor=white)
1
+ ![License](https://img.shields.io/badge/license-Apache%202.0-blue)
4
2
 
5
3
  # @youversion/platform-react-hooks
6
4
 
7
- A comprehensive collection of React hooks for accessing the YouVersion Platform APIs. Build Bible-based applications with type-safe hooks that handle loading states, error handling, and data fetching automatically.
5
+ React hooks for accessing YouVersion Platform APIs with automatic loading/error states.
8
6
 
9
- ## Overview
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
- ## Related Packages
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
- function App() {
54
- return (
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
- > **⚠️ Missing Provider Error:** If you use a hook without wrapping it in `BibleSDKProvider`, you'll get: `Error: useBibleClient must be used within a BibleSDKProvider`.
25
+ Get your App Key at [platform.youversion.com](https://platform.youversion.com/)
26
+
27
+ ## Usage
63
28
 
64
- ## Quick Start
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
- ## Features
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
- - GitHub Issues: [Create an issue](https://github.com/youversion/platform-sdk-react/issues)
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.1",
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.1"
25
+ "@youversion/platform-core": "0.5.5"
25
26
  },
26
27
  "peerDependencies": {
27
28
  "react": ">=19.1.0 <20.0.0"