Skip to content

chore: version packages#295

Merged
cameronapak merged 1 commit into
mainfrom
changeset-release/main
Jul 24, 2026
Merged

chore: version packages#295
cameronapak merged 1 commit into
mainfrom
changeset-release/main

Conversation

@github-actions

@github-actions github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@youversion/platform-react-hooks@2.4.0

Minor Changes

  • 71e4c1a: BibleReader highlights are now real, server-backed YouVersion highlights, with a built-in sign-in and permission flow so a reader's highlights persist to their YouVersion account.

    Important: previous releases accidentally shipped a demo-only, localStorage-based highlights implementation in BibleReader. It stored highlights only in the local browser and never synced to the reader's YouVersion account. That implementation has been removed and replaced by the server-backed highlights described here. These highlights are live in this release and enabled by default.

    • Server-backed highlights in BibleReader: tap verses, pick a color, and highlights persist to the reader's YouVersion account instead of the local browser.
    • Built-in sign-in dialog and just-in-time highlights permission flow: a highlight tap while signed out opens a sign-in dialog; a missing highlights permission triggers the YouVersion data-exchange consent flow, and the pending highlight is applied automatically once consent is granted (surviving the redirect round-trip).
    • New BibleReader props appName and signInPromptMessage for the sign-in dialog (Swift SDK parity): appName names your app in the dialog, and signInPromptMessage shows an optional integrator pitch (hidden when unset).
    • Optimistic UI: color taps apply and remove instantly while writes settle in the background, with automatic revert on network/5xx failures and a re-prompt on auth failures (401/403).
    • Behavior change in useHighlights: createHighlight and deleteHighlight no longer auto-refetch. Direct consumers must now call refetch() themselves after their mutations settle; the BibleReader flow coordinates this for you (batching a set of verse writes into a single refetch).
    • New exports: YouVersionAuthContext from @youversion/platform-react-hooks (the no-throw alternative to useYVAuth for components that must tolerate a missing auth provider), and a re-export of the Highlight type from @youversion/platform-react-ui.
    • The active color swatch now shows a checkmark (24px icons/check) instead of an X, matching the Bible app; tapping it still removes the highlight.
    • Highlight-flow reliability fixes surfaced by staging: the previously invisible primary button in the permission dialog now uses the correct bg-primary / text-primary-foreground pairing (it resolved to white-on-white in light mode); the optimistic overlay is retired only once a refetch actually reflects the write, so highlights no longer flicker out and back under read-after-write lag; removes now send one DELETE per verse (range DELETE is unsupported by the API), while applies still collapse contiguous verses into range USFMs; and highlight fills now fade their background color (~250ms, disabled under prefers-reduced-motion) instead of popping in.
    • Fix: the core ApiClient now treats empty-body 2xx JSON responses as success with no data. Previously a successful highlight delete (a 200 with an empty body) was misread as a failure, briefly flashing the removed highlight back before it disappeared.
    • Fix: duplicate processing of the same OAuth callback (e.g. the double-invoked auth init effect under React StrictMode) can no longer clear a just-granted highlights permission. The code-for-token exchange is now deduped by authorization code, so a repeated callback shares the one exchange instead of firing a second request whose failure would wipe the freshly seeded grant and re-prompt for permission.
    • Fix: a one-shot highlights sign-in no longer re-prompts for permission when the auth server omits the grant echo. On the web flow the server returns no granted_permissions on the callback and no data-exchange scope on the token, so nothing seeded the permission cache and the flow immediately re-prompted after consent. The permissions requested at sign-in are now stashed (bound to the OAuth state) and seeded optimistically on return; the seed is self-correcting because a 401/403 on the first write drops the permission and re-prompts.
    • Fix: concurrent token refreshes (e.g. the double-invoked auth init effect under React StrictMode) now share a single in-flight refresh, so a losing duplicate can no longer spend the single-use refresh token a second time and wipe the session on its failure.
    • Fix: verse labels and footnote icons now inherit the surrounding text color over highlight fills instead of being painted with the fill color, keeping them legible on highlighted verses.
    • Theme-aware highlight rendering: highlight fills render at full opacity in light mode and 30 percent opacity in dark mode, matching the Swift SDK; verse numbers over dark-mode highlights render white. Highlight fills now have subtly rounded corners, with each wrapped line fragment getting its own rounded ends so a multi-line highlight no longer cuts off square at the wrap. The verse-action popover color swatches preview the real fill: in dark mode they show the same dimmed color a highlight will apply. Opening the popover with a mouse or touch no longer flashes a focus ring on the first swatch; keyboard navigation still shows a clearly visible focus ring.

Patch Changes

  • Updated dependencies [71e4c1a]
  • Updated dependencies [71e4c1a]
    • @youversion/platform-core@2.4.0

@youversion/platform-react-ui@2.4.0

Minor Changes

  • ebddf21: BibleReader gains a controlled highlights mode (YPE-3705) for hosts that own highlight data themselves (e.g. React Native / Expo DOM hosts keeping the user token out of the WebView).

    • New BibleReader.Root props: highlights?: Highlight[] (core API shape; presence puts the highlight slice in controlled mode, latched at first mount), onVerseSelect (both modes, fires on every selection change — verses: [] whenever a non-empty selection clears, including after highlight/copy/share actions, popover dismiss, and navigation), and onHighlightApply / onHighlightRemove (controlled mode only; ignored in self-contained mode). Payloads are serializable, bridge-safe objects (BibleReaderVerseSelection, BibleReaderHighlightIntent) with always-per-verse passageIds.
    • In controlled mode the reader is a pure projection: highlights render solely from the prop (filtered by displayed version + chapter, range USFMs like JHN.3.16-18 expanded per verse), color taps emit intents and paint nothing until the host round-trips an updated prop, and neither the highlights API nor any local store is touched. No auth surface can originate from the highlight path.
    • Self-contained behavior (no highlights prop) uses the server-backed useBibleReaderHighlights path (YPE-1034), dark-launched behind HIGHLIGHTS_LIVE.
    • @youversion/platform-react-ui now re-exports the Highlight type from @youversion/platform-core.
  • 71e4c1a: BibleReader highlights are now real, server-backed YouVersion highlights, with a built-in sign-in and permission flow so a reader's highlights persist to their YouVersion account.

    Important: previous releases accidentally shipped a demo-only, localStorage-based highlights implementation in BibleReader. It stored highlights only in the local browser and never synced to the reader's YouVersion account. That implementation has been removed and replaced by the server-backed highlights described here. These highlights are live in this release and enabled by default.

    • Server-backed highlights in BibleReader: tap verses, pick a color, and highlights persist to the reader's YouVersion account instead of the local browser.
    • Built-in sign-in dialog and just-in-time highlights permission flow: a highlight tap while signed out opens a sign-in dialog; a missing highlights permission triggers the YouVersion data-exchange consent flow, and the pending highlight is applied automatically once consent is granted (surviving the redirect round-trip).
    • New BibleReader props appName and signInPromptMessage for the sign-in dialog (Swift SDK parity): appName names your app in the dialog, and signInPromptMessage shows an optional integrator pitch (hidden when unset).
    • Optimistic UI: color taps apply and remove instantly while writes settle in the background, with automatic revert on network/5xx failures and a re-prompt on auth failures (401/403).
    • Behavior change in useHighlights: createHighlight and deleteHighlight no longer auto-refetch. Direct consumers must now call refetch() themselves after their mutations settle; the BibleReader flow coordinates this for you (batching a set of verse writes into a single refetch).
    • New exports: YouVersionAuthContext from @youversion/platform-react-hooks (the no-throw alternative to useYVAuth for components that must tolerate a missing auth provider), and a re-export of the Highlight type from @youversion/platform-react-ui.
    • The active color swatch now shows a checkmark (24px icons/check) instead of an X, matching the Bible app; tapping it still removes the highlight.
    • Highlight-flow reliability fixes surfaced by staging: the previously invisible primary button in the permission dialog now uses the correct bg-primary / text-primary-foreground pairing (it resolved to white-on-white in light mode); the optimistic overlay is retired only once a refetch actually reflects the write, so highlights no longer flicker out and back under read-after-write lag; removes now send one DELETE per verse (range DELETE is unsupported by the API), while applies still collapse contiguous verses into range USFMs; and highlight fills now fade their background color (~250ms, disabled under prefers-reduced-motion) instead of popping in.
    • Fix: the core ApiClient now treats empty-body 2xx JSON responses as success with no data. Previously a successful highlight delete (a 200 with an empty body) was misread as a failure, briefly flashing the removed highlight back before it disappeared.
    • Fix: duplicate processing of the same OAuth callback (e.g. the double-invoked auth init effect under React StrictMode) can no longer clear a just-granted highlights permission. The code-for-token exchange is now deduped by authorization code, so a repeated callback shares the one exchange instead of firing a second request whose failure would wipe the freshly seeded grant and re-prompt for permission.
    • Fix: a one-shot highlights sign-in no longer re-prompts for permission when the auth server omits the grant echo. On the web flow the server returns no granted_permissions on the callback and no data-exchange scope on the token, so nothing seeded the permission cache and the flow immediately re-prompted after consent. The permissions requested at sign-in are now stashed (bound to the OAuth state) and seeded optimistically on return; the seed is self-correcting because a 401/403 on the first write drops the permission and re-prompts.
    • Fix: concurrent token refreshes (e.g. the double-invoked auth init effect under React StrictMode) now share a single in-flight refresh, so a losing duplicate can no longer spend the single-use refresh token a second time and wipe the session on its failure.
    • Fix: verse labels and footnote icons now inherit the surrounding text color over highlight fills instead of being painted with the fill color, keeping them legible on highlighted verses.
    • Theme-aware highlight rendering: highlight fills render at full opacity in light mode and 30 percent opacity in dark mode, matching the Swift SDK; verse numbers over dark-mode highlights render white. Highlight fills now have subtly rounded corners, with each wrapped line fragment getting its own rounded ends so a multi-line highlight no longer cuts off square at the wrap. The verse-action popover color swatches preview the real fill: in dark mode they show the same dimmed color a highlight will apply. Opening the popover with a mouse or touch no longer flashes a focus ring on the first swatch; keyboard navigation still shows a clearly visible focus ring.

Patch Changes

  • 05beced: Localize BibleReader font-size/line-spacing and popover close accessibility labels via i18n.

    • The YouVersion Platform logo component's accessible label is now a required prop with no hardcoded English default; the SDK's built-in usages pass localized labels.
  • Updated dependencies [71e4c1a]

  • Updated dependencies [71e4c1a]

    • @youversion/platform-core@2.4.0
    • @youversion/platform-react-hooks@2.4.0

@youversion/platform-core@2.4.0

Patch Changes

  • 71e4c1a: Fix one-shot sign-in dropping the highlights grant when the auth server echoes it back with PHP/Rails bracket-array notation (granted_permissions[]=highlights).

    parseGrantedPermissions read only the bare granted_permissions key, but URLSearchParams treats granted_permissions[] (and indexed granted_permissions[0]) as distinct keys. The server demonstrably uses this bracket notation for the analogous outbound requested_permissions[] param it builds on the hosted consent redirect, so a return echo in the same shape was silently discarded — leaving the permission cache empty and re-prompting the just-in-time data-exchange consent after a completed sign-in. The parser now accepts granted_permissions, granted_permissions[], and granted_permissions[<index>], keeping it symmetric with the server's encoding. Purely additive: bare granted_permissions and all user/state-scoping and fail-closed protections are unchanged.

  • 71e4c1a: BibleReader highlights are now real, server-backed YouVersion highlights, with a built-in sign-in and permission flow so a reader's highlights persist to their YouVersion account.

    Important: previous releases accidentally shipped a demo-only, localStorage-based highlights implementation in BibleReader. It stored highlights only in the local browser and never synced to the reader's YouVersion account. That implementation has been removed and replaced by the server-backed highlights described here. These highlights are live in this release and enabled by default.

    • Server-backed highlights in BibleReader: tap verses, pick a color, and highlights persist to the reader's YouVersion account instead of the local browser.
    • Built-in sign-in dialog and just-in-time highlights permission flow: a highlight tap while signed out opens a sign-in dialog; a missing highlights permission triggers the YouVersion data-exchange consent flow, and the pending highlight is applied automatically once consent is granted (surviving the redirect round-trip).
    • New BibleReader props appName and signInPromptMessage for the sign-in dialog (Swift SDK parity): appName names your app in the dialog, and signInPromptMessage shows an optional integrator pitch (hidden when unset).
    • Optimistic UI: color taps apply and remove instantly while writes settle in the background, with automatic revert on network/5xx failures and a re-prompt on auth failures (401/403).
    • Behavior change in useHighlights: createHighlight and deleteHighlight no longer auto-refetch. Direct consumers must now call refetch() themselves after their mutations settle; the BibleReader flow coordinates this for you (batching a set of verse writes into a single refetch).
    • New exports: YouVersionAuthContext from @youversion/platform-react-hooks (the no-throw alternative to useYVAuth for components that must tolerate a missing auth provider), and a re-export of the Highlight type from @youversion/platform-react-ui.
    • The active color swatch now shows a checkmark (24px icons/check) instead of an X, matching the Bible app; tapping it still removes the highlight.
    • Highlight-flow reliability fixes surfaced by staging: the previously invisible primary button in the permission dialog now uses the correct bg-primary / text-primary-foreground pairing (it resolved to white-on-white in light mode); the optimistic overlay is retired only once a refetch actually reflects the write, so highlights no longer flicker out and back under read-after-write lag; removes now send one DELETE per verse (range DELETE is unsupported by the API), while applies still collapse contiguous verses into range USFMs; and highlight fills now fade their background color (~250ms, disabled under prefers-reduced-motion) instead of popping in.
    • Fix: the core ApiClient now treats empty-body 2xx JSON responses as success with no data. Previously a successful highlight delete (a 200 with an empty body) was misread as a failure, briefly flashing the removed highlight back before it disappeared.
    • Fix: duplicate processing of the same OAuth callback (e.g. the double-invoked auth init effect under React StrictMode) can no longer clear a just-granted highlights permission. The code-for-token exchange is now deduped by authorization code, so a repeated callback shares the one exchange instead of firing a second request whose failure would wipe the freshly seeded grant and re-prompt for permission.
    • Fix: a one-shot highlights sign-in no longer re-prompts for permission when the auth server omits the grant echo. On the web flow the server returns no granted_permissions on the callback and no data-exchange scope on the token, so nothing seeded the permission cache and the flow immediately re-prompted after consent. The permissions requested at sign-in are now stashed (bound to the OAuth state) and seeded optimistically on return; the seed is self-correcting because a 401/403 on the first write drops the permission and re-prompts.
    • Fix: concurrent token refreshes (e.g. the double-invoked auth init effect under React StrictMode) now share a single in-flight refresh, so a losing duplicate can no longer spend the single-use refresh token a second time and wipe the session on its failure.
    • Fix: verse labels and footnote icons now inherit the surrounding text color over highlight fills instead of being painted with the fill color, keeping them legible on highlighted verses.
    • Theme-aware highlight rendering: highlight fills render at full opacity in light mode and 30 percent opacity in dark mode, matching the Swift SDK; verse numbers over dark-mode highlights render white. Highlight fills now have subtly rounded corners, with each wrapped line fragment getting its own rounded ends so a multi-line highlight no longer cuts off square at the wrap. The verse-action popover color swatches preview the real fill: in dark mode they show the same dimmed color a highlight will apply. Opening the popover with a mouse or touch no longer flashes a focus ring on the first swatch; keyboard navigation still shows a clearly visible focus ring.

Greptile Summary

This is a Changesets release PR bumping all three packages (@youversion/platform-core, @youversion/platform-react-hooks, @youversion/platform-react-ui) from 2.3.0 to 2.4.0. No source code changes are included — only version bumps, CHANGELOG entries, and deletion of the consumed changeset files.

  • @youversion/platform-core → 2.4.0: Two patch-level changes (bracket-notation fix for parseGrantedPermissions and highlights infrastructure). Version reaches 2.4.0 via unified versioning, driven by the minor bumps in sibling packages.
  • @youversion/platform-react-hooks → 2.4.0: One minor change (server-backed BibleReader highlights with sign-in/permission flow, optimistic UI, and several reliability fixes).
  • @youversion/platform-react-ui → 2.4.0: Two minor changes (controlled highlights mode for React Native/Expo DOM hosts; server-backed highlights) plus one patch (i18n/ARIA label localization).

Confidence Score: 5/5

Safe to merge — purely mechanical versioning changes with no source code modifications.

All three packages are consistently bumped to 2.4.0, satisfying the unified versioning requirement. The workspace:* peer dependency references in hooks and ui are unchanged and correct for pnpm publish resolution. CHANGELOG entries accurately reflect the consumed changesets, and the changeset files are correctly deleted. There is nothing in this diff that can introduce a regression.

No files require special attention.

Important Files Changed

Filename Overview
packages/core/package.json Version bumped from 2.3.0 to 2.4.0, consistent with unified versioning rule (driven by minor bumps in sibling packages)
packages/hooks/package.json Version bumped from 2.3.0 to 2.4.0; workspace:* dependency on platform-core unchanged and correct
packages/ui/package.json Version bumped from 2.3.0 to 2.4.0; workspace:* dependencies on platform-core and platform-react-hooks unchanged and correct
packages/core/CHANGELOG.md 2.4.0 CHANGELOG entry added with two patch-level entries; version bump to 2.4.0 is correct under unified versioning despite being patch-only changes
packages/hooks/CHANGELOG.md 2.4.0 CHANGELOG entry added with one minor change (server-backed highlights) and dependency update notes
packages/ui/CHANGELOG.md 2.4.0 CHANGELOG entry added with two minor changes (controlled highlights mode + server-backed highlights) and one patch (i18n/aria labels)

Reviews (9): Last reviewed commit: "chore: version packages" | Re-trigger Greptile

Context used:

  • Rule used - Unified versioning: All packages must maintain exa... (source)

@github-actions
github-actions Bot force-pushed the changeset-release/main branch 3 times, most recently from b166d60 to 9dbb097 Compare July 21, 2026 16:41
@cameronapak cameronapak changed the title chore: version packages [DO NOT DO YET - only after highlights prs] chore: version packages Jul 21, 2026
@github-actions github-actions Bot changed the title [DO NOT DO YET - only after highlights prs] chore: version packages chore: version packages Jul 21, 2026
@github-actions
github-actions Bot force-pushed the changeset-release/main branch 3 times, most recently from 9751cfd to 2ee81db Compare July 22, 2026 13:18
@cameronapak cameronapak changed the title chore: version packages [do not version until highlights is done] chore: version packages Jul 22, 2026
@github-actions github-actions Bot changed the title [do not version until highlights is done] chore: version packages chore: version packages Jul 22, 2026
@github-actions
github-actions Bot force-pushed the changeset-release/main branch from 2ee81db to c5edaf2 Compare July 22, 2026 16:08
@cameronapak cameronapak changed the title chore: version packages [DO NOT MERGE yet - highlights first] chore: version packages Jul 22, 2026
@github-actions github-actions Bot changed the title [DO NOT MERGE yet - highlights first] chore: version packages chore: version packages Jul 24, 2026
@github-actions
github-actions Bot force-pushed the changeset-release/main branch from c5edaf2 to fe846bc Compare July 24, 2026 14:30

@cameronapak cameronapak left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cameronapak
cameronapak merged commit c53ea6c into main Jul 24, 2026
8 checks passed
@cameronapak
cameronapak deleted the changeset-release/main branch July 24, 2026 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant