Skip to content

Releases: youversion/platform-sdk-react

@youversion/platform-react-ui@2.3.0

Choose a tag to compare

@github-actions github-actions released this 16 Jul 19:39
8306601

Minor Changes

  • ab38fb5: Surface a clear error when YouVersionProvider is given a missing or empty appKey instead of rendering a blank page. The UI provider now renders a styled "Missing app key" message, and the hooks provider throws a descriptive error for hooks-only consumers.

  • fc054c6: Add ProfileAvatar component with initials fallback (YPE-3648). Signed-in users without a profile image now see their initials ("Cam Anderson" → "CA", "Cher" → "C") in a bordered circle instead of a broken avatar; loaded photos get a 3px gray ring per design. BibleReader's user menu now uses ProfileAvatar for all authenticated states, and the component is exported for direct use.

  • 683c123: Allow requesting YouVersion data-exchange permissions (e.g. highlights) at sign-in. These are intentionally not OIDC scopes: they ride alongside the standard scope param as repeatable requested_permissions[] query params on the authorize URL and are authorized via a separate per-app ACL rather than the token's scope claim.

    • YouVersionAPIUsers.signIn(redirectURL, scopes?, permissions?) and the underlying PKCE authorization request builder now accept a permissions array typed as SignInWithYouVersionPermissionValues[].
    • useYVAuth().signIn({ permissions }) forwards them from React.
    • <YouVersionAuthButton permissions={['highlights']} /> requests them from the sign-in button.

    Scopes and permissions are separate arguments; existing calls that only pass scopes are unaffected.

  • af37b90: Add a verse action popover to BibleReader. Tapping verses selects them (shown with an underline) and opens a popover anchored to the last-selected verse with five highlight colors, Copy, and Share. Highlights apply a translucent fill, persist to localStorage per Bible version (shaped like the future highlight API), and can be removed individually. Copy/Share output mirrors bible.com formatting: the verse text in curly quotes, gaps in a non-contiguous selection joined with ..., followed by the Book Chapter:verses VERSION reference. Share uses the Web Share API and falls back to copying where it isn't available.

    BibleReader also accepts optional onCopy / onShare props. When provided, they receive the structured selection payload and suppress the default Web Share / clipboard flow, so React Native / Expo hosts can forward it across the native bridge (mirrors VerseOfTheDay's onShare).

    Note: BibleTextViewProps.highlightedVerses changed from Record<number, boolean> to Record<number, string> (verse number → highlight hex). This prop was never wired into shipped usage, so no released consumer is affected; the bump stays minor.

Patch Changes

  • fb7ac35: Tag the X-YVP-Sdk header with a -dev suffix for non-published builds so platform telemetry can separate internal YouVersion dev-time traffic from published partner traffic.

    Published builds report the real version (ReactSDK=2.2.0); builds from source, dev, or tests report ReactSDK=2.2.0-dev. The version is stamped at build time via YVP_PUBLISH_BUILD (set by each package's prepublishOnly), and a publish guard aborts the release if an unstamped -dev build would ship. Published header values are otherwise unchanged, and consumers can still override X-YVP-Sdk via additionalHeaders.

  • Updated dependencies [d6ab2d5]

  • Updated dependencies [ab38fb5]

  • Updated dependencies [683c123]

  • Updated dependencies [fb7ac35]

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

@youversion/platform-react-hooks@2.3.0

Choose a tag to compare

@github-actions github-actions released this 16 Jul 19:39
8306601

Minor Changes

  • d6ab2d5: Fix HighlightsClient to match the live highlights API contract. The client previously sent requests the API rejects on every call (401/400), so highlights could never be fetched, created, or deleted.

    • Auth token is now sent as an Authorization: Bearer <token> header instead of a lat query parameter
    • Query/body fields now use the API's bible_id naming on the wire (the SDK keeps version_id in its public types and maps at the boundary)
    • createHighlight now sends the required { request_id, highlight: { ... } } envelope (request_id is a unique per-request id the API requires)
    • getHighlights now requires version_id and passage_id (verse or chapter USFM), and deleteHighlight requires version_id, matching the API's required parameters; useHighlights options are updated accordingly
    • getHighlights now treats a 204 (no highlights for the passage) as an empty collection instead of throwing
    • createHighlight normalizes color to lowercase before sending, since the API accepts lowercase hex only
    • API responses are validated with Zod and mapped from the wire shape
  • ab38fb5: Surface a clear error when YouVersionProvider is given a missing or empty appKey instead of rendering a blank page. The UI provider now renders a styled "Missing app key" message, and the hooks provider throws a descriptive error for hooks-only consumers.

  • 683c123: Allow requesting YouVersion data-exchange permissions (e.g. highlights) at sign-in. These are intentionally not OIDC scopes: they ride alongside the standard scope param as repeatable requested_permissions[] query params on the authorize URL and are authorized via a separate per-app ACL rather than the token's scope claim.

    • YouVersionAPIUsers.signIn(redirectURL, scopes?, permissions?) and the underlying PKCE authorization request builder now accept a permissions array typed as SignInWithYouVersionPermissionValues[].
    • useYVAuth().signIn({ permissions }) forwards them from React.
    • <YouVersionAuthButton permissions={['highlights']} /> requests them from the sign-in button.

    Scopes and permissions are separate arguments; existing calls that only pass scopes are unaffected.

Patch Changes

  • fb7ac35: Tag the X-YVP-Sdk header with a -dev suffix for non-published builds so platform telemetry can separate internal YouVersion dev-time traffic from published partner traffic.

    Published builds report the real version (ReactSDK=2.2.0); builds from source, dev, or tests report ReactSDK=2.2.0-dev. The version is stamped at build time via YVP_PUBLISH_BUILD (set by each package's prepublishOnly), and a publish guard aborts the release if an unstamped -dev build would ship. Published header values are otherwise unchanged, and consumers can still override X-YVP-Sdk via additionalHeaders.

  • Updated dependencies [d6ab2d5]

  • Updated dependencies [683c123]

  • Updated dependencies [fb7ac35]

    • @youversion/platform-core@2.3.0

@youversion/platform-core@2.3.0

Choose a tag to compare

@github-actions github-actions released this 16 Jul 19:39
8306601

Minor Changes

  • d6ab2d5: Fix HighlightsClient to match the live highlights API contract. The client previously sent requests the API rejects on every call (401/400), so highlights could never be fetched, created, or deleted.

    • Auth token is now sent as an Authorization: Bearer <token> header instead of a lat query parameter
    • Query/body fields now use the API's bible_id naming on the wire (the SDK keeps version_id in its public types and maps at the boundary)
    • createHighlight now sends the required { request_id, highlight: { ... } } envelope (request_id is a unique per-request id the API requires)
    • getHighlights now requires version_id and passage_id (verse or chapter USFM), and deleteHighlight requires version_id, matching the API's required parameters; useHighlights options are updated accordingly
    • getHighlights now treats a 204 (no highlights for the passage) as an empty collection instead of throwing
    • createHighlight normalizes color to lowercase before sending, since the API accepts lowercase hex only
    • API responses are validated with Zod and mapped from the wire shape
  • 683c123: Allow requesting YouVersion data-exchange permissions (e.g. highlights) at sign-in. These are intentionally not OIDC scopes: they ride alongside the standard scope param as repeatable requested_permissions[] query params on the authorize URL and are authorized via a separate per-app ACL rather than the token's scope claim.

    • YouVersionAPIUsers.signIn(redirectURL, scopes?, permissions?) and the underlying PKCE authorization request builder now accept a permissions array typed as SignInWithYouVersionPermissionValues[].
    • useYVAuth().signIn({ permissions }) forwards them from React.
    • <YouVersionAuthButton permissions={['highlights']} /> requests them from the sign-in button.

    Scopes and permissions are separate arguments; existing calls that only pass scopes are unaffected.

Patch Changes

  • fb7ac35: Tag the X-YVP-Sdk header with a -dev suffix for non-published builds so platform telemetry can separate internal YouVersion dev-time traffic from published partner traffic.

    Published builds report the real version (ReactSDK=2.2.0); builds from source, dev, or tests report ReactSDK=2.2.0-dev. The version is stamped at build time via YVP_PUBLISH_BUILD (set by each package's prepublishOnly), and a publish guard aborts the release if an unstamped -dev build would ship. Published header values are otherwise unchanged, and consumers can still override X-YVP-Sdk via additionalHeaders.

@youversion/platform-react-ui@2.2.0

Choose a tag to compare

@github-actions github-actions released this 30 Jun 16:33
f449099

Minor Changes

  • 2ba9e6d: Match Book/Chapter picker typography to the Figma design. BibleChapterPicker now uses the Aktiv Grotesk App brand font (served from the YouVersion CDN): book rows render at 16px regular and bold when expanded, chapter/intro number buttons at 16px bold, and the search input at 16px. Falls back to the default sans font if the webfont fails to load.

  • 0d184fc: Update the Bible Version picker to match the latest Reader SDK Figma design, adding publisher names and refreshing the abbreviation tile.

    • @youversion/platform-core: New OrganizationsClient with getOrganization(organizationId) for fetching an organization by its UUID (GET /v1/organizations/{id}), validated against the existing OrganizationSchema. Design tokens use Inter (--yv-font-sans) and Source Serif 4 (--yv-font-serif); the YouVersion brand fonts (Aktiv Grotesk App / Untitled Serif) are reverted pending licensing — see docs/adr/0001-revert-brand-fonts-pending-licensing.md.
    • @youversion/platform-react-hooks: New useOrganization(organizationId) hook (plus useOrganizationsClient) following the standard useApiData pattern. Fetching is skipped when the id is empty. Also adds useOrganizations(organizationIds), which resolves many organizations at once, deduplicated by id, so a list of versions sharing publishers only fetches each organization once.
    • @youversion/platform-react-ui: BibleVersionPicker now renders the publisher name above the version title for versions that have an organization_id (rows without an associated organization render the title only), and recently used versions persist organization_id so they display the publisher too. Publisher names are resolved once at the list level via useOrganizations instead of per row, avoiding N+1 requests when many versions share a publisher. The VersionAbbreviationIcon tile now renders as a 64px square with a 6px radius, warm-neutral (secondary) fill, themed border, and serif typography (Source Serif 4) using the foreground text color; recent-version and all-version rows share the same tile styling, and long or trailing-digit abbreviations (e.g. NASB1995NASB / 1995) stay readable without overflowing. Brand fonts (Aktiv Grotesk App / Untitled Serif) are reverted to Inter / Source Serif 4 pending licensing; the brand-font implementation is parked on branch feat/youversion-brand-fonts.
  • ed9eb23: Add language search to BibleVersionPicker. The language panel now includes a bottom search input that globally filters available languages, shows a no-results empty state, and clears when the panel or popover closes.

Patch Changes

  • Updated dependencies [0d184fc]
    • @youversion/platform-core@2.2.0
    • @youversion/platform-react-hooks@2.2.0

@youversion/platform-react-hooks@2.2.0

Choose a tag to compare

@github-actions github-actions released this 30 Jun 16:33
f449099

Minor Changes

  • 0d184fc: Update the Bible Version picker to match the latest Reader SDK Figma design, adding publisher names and refreshing the abbreviation tile.
    • @youversion/platform-core: New OrganizationsClient with getOrganization(organizationId) for fetching an organization by its UUID (GET /v1/organizations/{id}), validated against the existing OrganizationSchema. Design tokens use Inter (--yv-font-sans) and Source Serif 4 (--yv-font-serif); the YouVersion brand fonts (Aktiv Grotesk App / Untitled Serif) are reverted pending licensing — see docs/adr/0001-revert-brand-fonts-pending-licensing.md.
    • @youversion/platform-react-hooks: New useOrganization(organizationId) hook (plus useOrganizationsClient) following the standard useApiData pattern. Fetching is skipped when the id is empty. Also adds useOrganizations(organizationIds), which resolves many organizations at once, deduplicated by id, so a list of versions sharing publishers only fetches each organization once.
    • @youversion/platform-react-ui: BibleVersionPicker now renders the publisher name above the version title for versions that have an organization_id (rows without an associated organization render the title only), and recently used versions persist organization_id so they display the publisher too. Publisher names are resolved once at the list level via useOrganizations instead of per row, avoiding N+1 requests when many versions share a publisher. The VersionAbbreviationIcon tile now renders as a 64px square with a 6px radius, warm-neutral (secondary) fill, themed border, and serif typography (Source Serif 4) using the foreground text color; recent-version and all-version rows share the same tile styling, and long or trailing-digit abbreviations (e.g. NASB1995NASB / 1995) stay readable without overflowing. Brand fonts (Aktiv Grotesk App / Untitled Serif) are reverted to Inter / Source Serif 4 pending licensing; the brand-font implementation is parked on branch feat/youversion-brand-fonts.

Patch Changes

  • Updated dependencies [0d184fc]
    • @youversion/platform-core@2.2.0

@youversion/platform-core@2.2.0

Choose a tag to compare

@github-actions github-actions released this 30 Jun 16:33
f449099

Minor Changes

  • 0d184fc: Update the Bible Version picker to match the latest Reader SDK Figma design, adding publisher names and refreshing the abbreviation tile.
    • @youversion/platform-core: New OrganizationsClient with getOrganization(organizationId) for fetching an organization by its UUID (GET /v1/organizations/{id}), validated against the existing OrganizationSchema. Design tokens use Inter (--yv-font-sans) and Source Serif 4 (--yv-font-serif); the YouVersion brand fonts (Aktiv Grotesk App / Untitled Serif) are reverted pending licensing — see docs/adr/0001-revert-brand-fonts-pending-licensing.md.
    • @youversion/platform-react-hooks: New useOrganization(organizationId) hook (plus useOrganizationsClient) following the standard useApiData pattern. Fetching is skipped when the id is empty. Also adds useOrganizations(organizationIds), which resolves many organizations at once, deduplicated by id, so a list of versions sharing publishers only fetches each organization once.
    • @youversion/platform-react-ui: BibleVersionPicker now renders the publisher name above the version title for versions that have an organization_id (rows without an associated organization render the title only), and recently used versions persist organization_id so they display the publisher too. Publisher names are resolved once at the list level via useOrganizations instead of per row, avoiding N+1 requests when many versions share a publisher. The VersionAbbreviationIcon tile now renders as a 64px square with a 6px radius, warm-neutral (secondary) fill, themed border, and serif typography (Source Serif 4) using the foreground text color; recent-version and all-version rows share the same tile styling, and long or trailing-digit abbreviations (e.g. NASB1995NASB / 1995) stay readable without overflowing. Brand fonts (Aktiv Grotesk App / Untitled Serif) are reverted to Inter / Source Serif 4 pending licensing; the brand-font implementation is parked on branch feat/youversion-brand-fonts.

@youversion/platform-react-ui@2.1.0

Choose a tag to compare

@github-actions github-actions released this 10 Jun 13:18
0f5c3c1

Minor Changes

  • 5b40719: Add a cycling line spacing setting to BibleReader

    The Bible theme settings panel now includes a line spacing control that cycles
    through three presets (small 1.45, default 1.7, large 2.0) on each press.
    The selection persists to localStorage when uncontrolled.

    BibleReader.Root gains lineSpacing, defaultLineSpacing, and
    onChangeLineSpacing props for controlled/uncontrolled usage. The existing
    lineHeight prop is deprecated but still honored as the initial line spacing,
    so this change is backward compatible; it will be removed in the next major.

Patch Changes

  • f2c83cf: VerseOfTheDay now shows the Bible reference directly under the "Verse of the Day" label in foreground text instead of below the verse body. BibleCard and VerseOfTheDay no longer display inline verse numbers in passage text.
    • @youversion/platform-core@2.1.0
    • @youversion/platform-react-hooks@2.1.0

@youversion/platform-react-hooks@2.1.0

Choose a tag to compare

@github-actions github-actions released this 10 Jun 13:18
0f5c3c1

Patch Changes

  • @youversion/platform-core@2.1.0

@youversion/platform-core@2.1.0

Choose a tag to compare

@github-actions github-actions released this 10 Jun 13:18
0f5c3c1
@youversion/platform-core@2.1.0

@youversion/platform-react-ui@2.0.1

Choose a tag to compare

@github-actions github-actions released this 08 Jun 16:04
7175656

Patch Changes

  • dd83b33: BibleReader now keeps the previous chapter's text on screen while the next chapter loads, dimming it and floating a spinner over it (after a short delay) instead of pulsing stale text or flashing a blank spinner. Fast/cached chapter switches stay instant, the scroll position resets to the top on chapter change, and the useDelayedLoading helper is shared with BibleCard. No changes to BibleTextView.
    • @youversion/platform-core@2.0.1
    • @youversion/platform-react-hooks@2.0.1