diff --git a/.changeset/android-picker-viewport-jump.md b/.changeset/android-picker-viewport-jump.md deleted file mode 100644 index e2fc60bb..00000000 --- a/.changeset/android-picker-viewport-jump.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@youversion/platform-react-native-expo-ui': patch ---- - -Fix jarring layout jump when the Bible Version and Chapter picker sheets open on Android. The pre-warmed picker WebView sits in an offscreen inert sheet host where Android reports `visualViewport.height` as 0; the keyboard-viewport listener wrote that as `--yv-visible-height: 0px`, collapsing the picker shell (search bar at the top of an empty sheet) until a late viewport resize snapped everything into place mid-animation. Viewport heights below a plausibility floor are now treated as "hidden WebView" and fall back to the stylesheet default (100vh), so the pre-warmed layout is already correct when the sheet opens. diff --git a/.changeset/auth-avatar-and-cancel.md b/.changeset/auth-avatar-and-cancel.md deleted file mode 100644 index 5fed76fb..00000000 --- a/.changeset/auth-avatar-and-cancel.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@youversion/platform-react-native-expo-core': patch ---- - -Harden the auth flow against two upstream auth-page issues. `deriveUserInfo` now drops placeholder `profile_picture` values (e.g. `https://none/`) and any non-`https` avatar URL (iOS ATS and Android cleartext defaults block `http` image loads anyway) so consumers no longer receive a broken avatar URL. Sign-in now treats an `access_denied` callback (the auth page's Cancel button) as a clean cancel instead of throwing; `state` is still validated before any token exchange on the success path. Cached user info is now validated with a `zod` schema on read instead of being blindly cast, so a corrupt or legacy cache entry can no longer surface wrong-typed fields to consumers. diff --git a/.changeset/bible-card-version-picker-default.md b/.changeset/bible-card-version-picker-default.md deleted file mode 100644 index 3ed692db..00000000 --- a/.changeset/bible-card-version-picker-default.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@youversion/platform-react-native-expo-ui': minor ---- - -`BibleCard` now defaults `showVersionPicker` to `false`, matching the React Web SDK. The version picker trigger no longer renders and the built-in `BibleVersionPickerSheet` no longer mounts unless consumers pass `showVersionPicker` explicitly. diff --git a/.changeset/default-bible-version-id-export.md b/.changeset/default-bible-version-id-export.md deleted file mode 100644 index 0c082ab8..00000000 --- a/.changeset/default-bible-version-id-export.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@youversion/platform-react-native-expo-ui': minor ---- - -Export `DEFAULT_BIBLE_VERSION_ID` (3034, Berean Standard Bible) from the UI entry so consumers can reference the SDK's default Bible version instead of hardcoding the numeric ID. The constant now backs the internal `defaultVersionId` fallbacks for `BibleCard`, `BibleReader`, and the picker sheets. diff --git a/.changeset/export-component-prop-types.md b/.changeset/export-component-prop-types.md deleted file mode 100644 index ddca1245..00000000 --- a/.changeset/export-component-prop-types.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@youversion/platform-react-native-expo-ui': minor ---- - -Re-export component prop types from the UI entry so consumers can import them directly instead of re-deriving via `React.ComponentProps`. Adds `BibleCardProps`, `BibleReaderProps`, `BibleReaderSettingsSheetProps`, `BibleTextViewProps`, `VerseOfTheDayProps`, and `YouVersionAuthButtonProps`. diff --git a/.changeset/pin-deps-supply-chain.md b/.changeset/pin-deps-supply-chain.md deleted file mode 100644 index c67340f7..00000000 --- a/.changeset/pin-deps-supply-chain.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@youversion/platform-react-native-expo-ui': patch ---- - -Pin runtime dependencies to exact versions (`@youversion/platform-react-ui`, `expo-localization`, `i18next`, `react-i18next`, `zustand`) as supply-chain protection, so consumer installs can never silently resolve a newer, potentially compromised release. Peer dependency ranges are unchanged. diff --git a/.changeset/react-doctor-top-fixes.md b/.changeset/react-doctor-top-fixes.md deleted file mode 100644 index fb619ff9..00000000 --- a/.changeset/react-doctor-top-fixes.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@youversion/platform-react-native-expo-core': patch -'@youversion/platform-react-native-expo-ui': patch ---- - -Fix the top issues flagged by React Doctor. Replace relative barrel imports (`../storage`, `../lib`, `../hooks`, `../i18n`) with direct module paths to trim the app bundle and speed startup. Fix a stale-closure risk in the auth bootstrap effect by holding the latest `setAuthState`/`refreshToken`/`clearAuthState` in a ref instead of silencing the exhaustive-deps warning, preserving mount-only behavior. Reset version-picker state during render (previous-prop comparison) instead of in an effect, removing a brief stale-UI frame on sheet reopen in both the DOM picker and the native picker sheet. Drop a dead duplicate `READER_SETTINGS_PERSIST_KEY` export from core storage. diff --git a/.changeset/refactor-useeffect-anti-patterns.md b/.changeset/refactor-useeffect-anti-patterns.md deleted file mode 100644 index 0dfdeed9..00000000 --- a/.changeset/refactor-useeffect-anti-patterns.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@youversion/platform-react-native-expo-ui': patch ---- - -Refactor `useEffect` anti-patterns per React's "You Might Not Need an Effect" guidance. `BibleCard` and `BibleReader` now persist uncontrolled version/location to their MMKV-backed stores from the `useControllableState` `onChange` handler instead of a separate state-mirroring effect. `onChange` fires only when the value actually changes, so defaults are no longer written to storage on mount/hydration and there is a single source of persistence rather than a duplicated effect. `NativeSheet` resets its Android loader during render via previous-`openKey` comparison instead of in the imperative snap effect, eliminating a one-frame flash of the previous sheet content marked ready on repeated opens. No API changes; the only behavioral nuance is that storage stays empty until the user changes something (identical fallback UX). diff --git a/.changeset/sdk-version-header-stamp.md b/.changeset/sdk-version-header-stamp.md deleted file mode 100644 index 808d486e..00000000 --- a/.changeset/sdk-version-header-stamp.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@youversion/platform-react-native-expo-ui': patch ---- - -Split dev and partner traffic in the `x-yvp-sdk` telemetry header. Every published build previously reported `ReactNativeSDK=Dev`, because the documented "release workflow rewrites the value" step never existed — so partner and internal traffic were indistinguishable. Published builds now report `ReactNativeSDK={version}` and source builds report `ReactNativeSDK={version}-dev`, matching the Web SDK's format so one telemetry rule (`endsWith('-dev')`) covers both SDKs. A `prepublishOnly` stamp (`scripts/stamp-sdk-version.cjs`) flips the build-channel flag in the compiled build and aborts the publish if it cannot confirm the channel. See ADR 0012. diff --git a/.changeset/sheet-header-surface-parity.md b/.changeset/sheet-header-surface-parity.md deleted file mode 100644 index b720b808..00000000 --- a/.changeset/sheet-header-surface-parity.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@youversion/platform-react-native-expo-ui': patch ---- - -Match the version/chapter picker sheet header to the WebView surface (white in light mode, dark in dark mode) and keep the muted strip behind the search bar. Also corrects the dark sheet surface token to match the Web SDK background. diff --git a/.changeset/sheet-max-width-wide-screens.md b/.changeset/sheet-max-width-wide-screens.md deleted file mode 100644 index 2eefe023..00000000 --- a/.changeset/sheet-max-width-wide-screens.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@youversion/platform-react-native-expo-ui': patch ---- - -Cap all Native Sheets (version picker, chapter picker, reader settings, footnotes) at a maximum width of 640, horizontally centered, on wide screens like iPad. Below that breakpoint sheets remain full-width. The cap is applied once in `NativeSheet` via a computed horizontal margin on `@gorhom/bottom-sheet`'s `style` prop, so the whole sheet surface (handle, header, content, footer) is capped while the backdrop still covers the full screen. diff --git a/apps/example/CHANGELOG.md b/apps/example/CHANGELOG.md new file mode 100644 index 00000000..d72e8f36 --- /dev/null +++ b/apps/example/CHANGELOG.md @@ -0,0 +1,19 @@ +# example + +## 1.0.1 + +### Patch Changes + +- Updated dependencies [fab2690] +- Updated dependencies [9a5587d] +- Updated dependencies [96c7075] +- Updated dependencies [5373bd7] +- Updated dependencies [cc6115c] +- Updated dependencies [d2a45e3] +- Updated dependencies [6ba0c15] +- Updated dependencies [e073666] +- Updated dependencies [4a53112] +- Updated dependencies [f26add5] +- Updated dependencies [9f7e834] + - @youversion/platform-react-native-expo-ui@0.10.0 + - @youversion/platform-react-native-expo-core@0.10.0 diff --git a/apps/example/package.json b/apps/example/package.json index c7ac38e2..0ba05f7d 100644 --- a/apps/example/package.json +++ b/apps/example/package.json @@ -1,6 +1,6 @@ { "name": "example", - "version": "1.0.0", + "version": "1.0.1", "main": "index.js", "scripts": { "start": "expo start --dev-client", diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 84742141..5a94f648 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,12 @@ # @youversion/platform-react-native-expo-core +## 0.10.0 + +### Patch Changes + +- 9a5587d: Harden the auth flow against two upstream auth-page issues. `deriveUserInfo` now drops placeholder `profile_picture` values (e.g. `https://none/`) and any non-`https` avatar URL (iOS ATS and Android cleartext defaults block `http` image loads anyway) so consumers no longer receive a broken avatar URL. Sign-in now treats an `access_denied` callback (the auth page's Cancel button) as a clean cancel instead of throwing; `state` is still validated before any token exchange on the success path. Cached user info is now validated with a `zod` schema on read instead of being blindly cast, so a corrupt or legacy cache entry can no longer surface wrong-typed fields to consumers. +- 6ba0c15: Fix the top issues flagged by React Doctor. Replace relative barrel imports (`../storage`, `../lib`, `../hooks`, `../i18n`) with direct module paths to trim the app bundle and speed startup. Fix a stale-closure risk in the auth bootstrap effect by holding the latest `setAuthState`/`refreshToken`/`clearAuthState` in a ref instead of silencing the exhaustive-deps warning, preserving mount-only behavior. Reset version-picker state during render (previous-prop comparison) instead of in an effect, removing a brief stale-UI frame on sheet reopen in both the DOM picker and the native picker sheet. Drop a dead duplicate `READER_SETTINGS_PERSIST_KEY` export from core storage. + ## 1.0.0 Initial release. Installation id, optional PKCE authentication, and storage adapters for the YouVersion Platform React Native (Expo) SDK. diff --git a/packages/core/package.json b/packages/core/package.json index 05db035d..844d95d4 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@youversion/platform-react-native-expo-core", - "version": "0.9.0", + "version": "0.10.0", "description": "YouVersion Platform core for React Native (Expo) — installation id, optional PKCE auth, and storage.", "keywords": [ "youversion", diff --git a/packages/ui/CHANGELOG.md b/packages/ui/CHANGELOG.md index 3dc211cd..4945b6d7 100644 --- a/packages/ui/CHANGELOG.md +++ b/packages/ui/CHANGELOG.md @@ -1,5 +1,26 @@ # @youversion/platform-react-native-expo-ui +## 0.10.0 + +### Minor Changes + +- 96c7075: `BibleCard` now defaults `showVersionPicker` to `false`, matching the React Web SDK. The version picker trigger no longer renders and the built-in `BibleVersionPickerSheet` no longer mounts unless consumers pass `showVersionPicker` explicitly. +- 5373bd7: Export `DEFAULT_BIBLE_VERSION_ID` (3034, Berean Standard Bible) from the UI entry so consumers can reference the SDK's default Bible version instead of hardcoding the numeric ID. The constant now backs the internal `defaultVersionId` fallbacks for `BibleCard`, `BibleReader`, and the picker sheets. +- cc6115c: Re-export component prop types from the UI entry so consumers can import them directly instead of re-deriving via `React.ComponentProps`. Adds `BibleCardProps`, `BibleReaderProps`, `BibleReaderSettingsSheetProps`, `BibleTextViewProps`, `VerseOfTheDayProps`, and `YouVersionAuthButtonProps`. + +### Patch Changes + +- fab2690: Fix jarring layout jump when the Bible Version and Chapter picker sheets open on Android. The pre-warmed picker WebView sits in an offscreen inert sheet host where Android reports `visualViewport.height` as 0; the keyboard-viewport listener wrote that as `--yv-visible-height: 0px`, collapsing the picker shell (search bar at the top of an empty sheet) until a late viewport resize snapped everything into place mid-animation. Viewport heights below a plausibility floor are now treated as "hidden WebView" and fall back to the stylesheet default (100vh), so the pre-warmed layout is already correct when the sheet opens. +- d2a45e3: Pin runtime dependencies to exact versions (`@youversion/platform-react-ui`, `expo-localization`, `i18next`, `react-i18next`, `zustand`) as supply-chain protection, so consumer installs can never silently resolve a newer, potentially compromised release. Peer dependency ranges are unchanged. +- 6ba0c15: Fix the top issues flagged by React Doctor. Replace relative barrel imports (`../storage`, `../lib`, `../hooks`, `../i18n`) with direct module paths to trim the app bundle and speed startup. Fix a stale-closure risk in the auth bootstrap effect by holding the latest `setAuthState`/`refreshToken`/`clearAuthState` in a ref instead of silencing the exhaustive-deps warning, preserving mount-only behavior. Reset version-picker state during render (previous-prop comparison) instead of in an effect, removing a brief stale-UI frame on sheet reopen in both the DOM picker and the native picker sheet. Drop a dead duplicate `READER_SETTINGS_PERSIST_KEY` export from core storage. +- e073666: Refactor `useEffect` anti-patterns per React's "You Might Not Need an Effect" guidance. `BibleCard` and `BibleReader` now persist uncontrolled version/location to their MMKV-backed stores from the `useControllableState` `onChange` handler instead of a separate state-mirroring effect. `onChange` fires only when the value actually changes, so defaults are no longer written to storage on mount/hydration and there is a single source of persistence rather than a duplicated effect. `NativeSheet` resets its Android loader during render via previous-`openKey` comparison instead of in the imperative snap effect, eliminating a one-frame flash of the previous sheet content marked ready on repeated opens. No API changes; the only behavioral nuance is that storage stays empty until the user changes something (identical fallback UX). +- 4a53112: Split dev and partner traffic in the `x-yvp-sdk` telemetry header. Every published build previously reported `ReactNativeSDK=Dev`, because the documented "release workflow rewrites the value" step never existed — so partner and internal traffic were indistinguishable. Published builds now report `ReactNativeSDK={version}` and source builds report `ReactNativeSDK={version}-dev`, matching the Web SDK's format so one telemetry rule (`endsWith('-dev')`) covers both SDKs. A `prepublishOnly` stamp (`scripts/stamp-sdk-version.cjs`) flips the build-channel flag in the compiled build and aborts the publish if it cannot confirm the channel. See ADR 0012. +- f26add5: Match the version/chapter picker sheet header to the WebView surface (white in light mode, dark in dark mode) and keep the muted strip behind the search bar. Also corrects the dark sheet surface token to match the Web SDK background. +- 9f7e834: Cap all Native Sheets (version picker, chapter picker, reader settings, footnotes) at a maximum width of 640, horizontally centered, on wide screens like iPad. Below that breakpoint sheets remain full-width. The cap is applied once in `NativeSheet` via a computed horizontal margin on `@gorhom/bottom-sheet`'s `style` prop, so the whole sheet surface (handle, header, content, footer) is capped while the backdrop still covers the full screen. +- Updated dependencies [9a5587d] +- Updated dependencies [6ba0c15] + - @youversion/platform-react-native-expo-core@0.10.0 + ## 1.0.0 Initial release. Drop YouVersion Bible content into an Expo app on iOS and Android, with native bottom sheets, theming, and optional sign-in. Built on the [React Web SDK](https://github.com/youversion/platform-sdk-react) wrapped as [Expo DOM Components](https://docs.expo.dev/guides/dom-components/), with native affordances layered on top. diff --git a/packages/ui/package.json b/packages/ui/package.json index a12964c3..dbbe877c 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -1,6 +1,6 @@ { "name": "@youversion/platform-react-native-expo-ui", - "version": "0.9.0", + "version": "0.10.0", "description": "YouVersion Platform Bible components for React Native (Expo) — reader, verse cards, Verse of the Day, theming, and native sheets.", "keywords": [ "youversion",