@youversion/platform-react-ui 1.15.1 → 1.15.2

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 +1 @@
1
- {"version":3,"file":"bible-reader.d.ts","sourceRoot":"","sources":["../../src/components/bible-reader.tsx"],"names":[],"mappings":"AAUA,OAAO,EAEL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AAWf,OAAO,EAAiC,KAAK,UAAU,EAAE,MAAM,wBAAwB,CAAC;AA4BxF,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC9B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAMF,iBAAS,IAAI,CAAC,EACZ,IAAI,EAAE,cAAc,EACpB,WAAmB,EACnB,YAAY,EACZ,OAAO,EAAE,iBAAiB,EAC1B,cAAoB,EACpB,eAAe,EACf,SAAS,EAAE,mBAAmB,EAC9B,gBAAqD,EACrD,eAAe,EACf,UAA8B,EAC9B,QAA4B,EAC5B,UAAU,EACV,gBAAuB,EACvB,UAAU,EACV,QAAQ,GACT,EAAE,SAAS,2CAgFX;AAED,iBAAS,OAAO,4CAoEf;AA2CD,iBAAS,OAAO,CAAC,EAAE,MAAc,EAAE,EAAE;IAAE,MAAM,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAA;CAAE,2CAmKjE;AAED,eAAO,MAAM,WAAW;;;;CAAgD,CAAC;AACzE,MAAM,MAAM,oBAAoB,GAAG,SAAS,CAAC"}
1
+ {"version":3,"file":"bible-reader.d.ts","sourceRoot":"","sources":["../../src/components/bible-reader.tsx"],"names":[],"mappings":"AAUA,OAAO,EAEL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AAWf,OAAO,EAAiC,KAAK,UAAU,EAAE,MAAM,wBAAwB,CAAC;AA4BxF,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC9B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAMF,iBAAS,IAAI,CAAC,EACZ,IAAI,EAAE,cAAc,EACpB,WAAmB,EACnB,YAAY,EACZ,OAAO,EAAE,iBAAiB,EAC1B,cAAoB,EACpB,eAAe,EACf,SAAS,EAAE,mBAAmB,EAC9B,gBAAqD,EACrD,eAAe,EACf,UAA8B,EAC9B,QAA4B,EAC5B,UAAU,EACV,gBAAuB,EACvB,UAAU,EACV,QAAQ,GACT,EAAE,SAAS,2CAgFX;AAED,iBAAS,OAAO,4CAoEf;AA2CD,iBAAS,OAAO,CAAC,EAAE,MAAc,EAAE,EAAE;IAAE,MAAM,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAA;CAAE,2CAwKjE;AAED,eAAO,MAAM,WAAW;;;;CAAgD,CAAC;AACzE,MAAM,MAAM,oBAAoB,GAAG,SAAS,CAAC"}
package/dist/index.cjs CHANGED
@@ -16330,136 +16330,145 @@ function Toolbar({ border = "top" }) {
16330
16330
  border === "top" && "yv:border-t",
16331
16331
  border === "bottom" && "yv:border-b"
16332
16332
  ),
16333
- children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "yv:grid yv:w-full yv:grid-cols-[auto_1fr_auto] yv:items-center yv:max-w-lg yv:gap-4", children: [
16334
- !!yvContext?.authEnabled && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(UserMenu, {}),
16335
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "yv:grid yv:grid-cols-2 yv:gap-0.5", children: [
16336
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
16337
- BibleChapterPicker.Root,
16338
- {
16339
- book,
16340
- chapter,
16341
- onBookChange: setBook,
16342
- onChapterChange: setChapter,
16343
- versionId,
16344
- background,
16345
- children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(BibleChapterPicker.Trigger, { "aria-label": "Change Bible book and chapter", children: ({ chapter: chapter2, currentBook, loading }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
16346
- Button,
16347
- {
16348
- variant: "secondary",
16349
- className: "yv:rounded-r-none yv:font-bold yv:text-foreground",
16350
- disabled: loading,
16351
- children: loading ? "Loading..." : `${currentBook?.title || "Select"} ${chapter2 || ""}`
16352
- }
16353
- ) })
16354
- }
16333
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
16334
+ "div",
16335
+ {
16336
+ className: cn(
16337
+ "yv:grid yv:w-full yv:items-center yv:max-w-lg yv:gap-4",
16338
+ yvContext?.authEnabled ? "yv:grid-cols-[auto_1fr_auto]" : "yv:grid-cols-[1fr_auto]"
16355
16339
  ),
16356
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
16357
- BibleVersionPicker.Root,
16358
- {
16359
- versionId,
16360
- onVersionChange: setVersionId,
16361
- background,
16362
- children: [
16363
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(BibleVersionPicker.Trigger, { "aria-label": "Change Bible version", children: ({ version: version2, loading }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
16364
- Button,
16365
- {
16366
- variant: "secondary",
16367
- className: "yv:rounded-l-none yv:font-bold yv:text-foreground",
16368
- disabled: loading,
16369
- children: loading ? "Loading..." : version2?.localized_abbreviation || "Select version"
16370
- }
16371
- ) }),
16372
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(BibleVersionPicker.Content, {})
16373
- ]
16374
- }
16375
- )
16376
- ] }),
16377
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Popover, { children: [
16378
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(PopoverTrigger, { asChild: true, "aria-label": "Settings", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Button, { size: "icon", variant: "secondary", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(GearIcon, { className: "yv:text-foreground" }) }) }),
16379
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(PopoverContent, { sideOffset: 16, heading: "Reader Settings", theme: background, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "yv:flex yv:flex-col yv:gap-4 yv:p-4", children: [
16380
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "yv:grid yv:grid-cols-2", children: [
16340
+ children: [
16341
+ !!yvContext?.authEnabled && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(UserMenu, {}),
16342
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "yv:grid yv:grid-cols-2 yv:gap-0.5", children: [
16381
16343
  /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
16382
- Button,
16344
+ BibleChapterPicker.Root,
16383
16345
  {
16384
- className: "yv:text-xs yv:text-black yv:dark:text-muted-foreground yv:rounded-l-[8px] yv:rounded-r-none yv:border yv:border-white yv:dark:border-border yv:h-auto yv:py-2",
16385
- onClick: () => setCurrentFontSize((prev) => {
16386
- if (prev > MIN_FONT_SIZE) return prev - 2;
16387
- return prev;
16388
- }),
16389
- size: "lg",
16390
- variant: "secondary",
16391
- "data-testid": "decrease-font-size",
16392
- children: "A"
16346
+ book,
16347
+ chapter,
16348
+ onBookChange: setBook,
16349
+ onChapterChange: setChapter,
16350
+ versionId,
16351
+ background,
16352
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(BibleChapterPicker.Trigger, { "aria-label": "Change Bible book and chapter", children: ({ chapter: chapter2, currentBook, loading }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
16353
+ Button,
16354
+ {
16355
+ variant: "secondary",
16356
+ className: "yv:rounded-r-none yv:font-bold yv:text-foreground",
16357
+ disabled: loading,
16358
+ children: loading ? "Loading..." : `${currentBook?.title || "Select"} ${chapter2 || ""}`
16359
+ }
16360
+ ) })
16393
16361
  }
16394
16362
  ),
16395
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
16396
- Button,
16363
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
16364
+ BibleVersionPicker.Root,
16397
16365
  {
16398
- className: "yv:text-3xl yv:text-black yv:dark:text-muted-foreground yv:rounded-r-[8px] yv:rounded-l-none yv:border yv:border-white yv:dark:border-border yv:h-auto yv:py-2",
16399
- onClick: () => setCurrentFontSize((prev) => {
16400
- if (prev < MAX_FONT_SIZE) return prev + 2;
16401
- return prev;
16402
- }),
16403
- size: "lg",
16404
- variant: "secondary",
16405
- "data-testid": "increase-font-size",
16406
- children: "A"
16366
+ versionId,
16367
+ onVersionChange: setVersionId,
16368
+ background,
16369
+ children: [
16370
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(BibleVersionPicker.Trigger, { "aria-label": "Change Bible version", children: ({ version: version2, loading }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
16371
+ Button,
16372
+ {
16373
+ variant: "secondary",
16374
+ className: "yv:rounded-l-none yv:font-bold yv:text-foreground",
16375
+ disabled: loading,
16376
+ children: loading ? "Loading..." : version2?.localized_abbreviation || "Select version"
16377
+ }
16378
+ ) }),
16379
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(BibleVersionPicker.Content, {})
16380
+ ]
16407
16381
  }
16408
16382
  )
16409
16383
  ] }),
16410
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "yv:grid yv:grid-cols-2", children: [
16411
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
16412
- Button,
16413
- {
16414
- className: cn(
16415
- "yv:group yv:dark:bg-muted yv:rounded-r-none yv:dark:border-border yv:rounded-l-[8px] yv:h-auto",
16416
- currentFontFamily === INTER_FONT ? "yv:bg-black yv:dark:bg-inherit yv:text-white yv:hover:text-white yv:hover:bg-black/80" : ""
16384
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Popover, { children: [
16385
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(PopoverTrigger, { asChild: true, "aria-label": "Settings", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Button, { size: "icon", variant: "secondary", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(GearIcon, { className: "yv:text-foreground" }) }) }),
16386
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(PopoverContent, { sideOffset: 16, heading: "Reader Settings", theme: background, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "yv:flex yv:flex-col yv:gap-4 yv:p-4", children: [
16387
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "yv:grid yv:grid-cols-2", children: [
16388
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
16389
+ Button,
16390
+ {
16391
+ className: "yv:text-xs yv:text-black yv:dark:text-muted-foreground yv:rounded-l-[8px] yv:rounded-r-none yv:border yv:border-white yv:dark:border-border yv:h-auto yv:py-2",
16392
+ onClick: () => setCurrentFontSize((prev) => {
16393
+ if (prev > MIN_FONT_SIZE) return prev - 2;
16394
+ return prev;
16395
+ }),
16396
+ size: "lg",
16397
+ variant: "secondary",
16398
+ "data-testid": "decrease-font-size",
16399
+ children: "A"
16400
+ }
16417
16401
  ),
16418
- onClick: () => setCurrentFontFamily(INTER_FONT),
16419
- variant: "outline",
16420
- children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "yv:flex yv:flex-col yv:w-full yv:items-start", children: [
16421
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
16422
- "span",
16423
- {
16424
- className: cn(
16425
- "yv:text-xs yv:text-muted-foreground",
16426
- currentFontFamily === INTER_FONT ? "yv:text-muted yv:dark:text-muted-foreground yv:group-hover:text-muted" : ""
16402
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
16403
+ Button,
16404
+ {
16405
+ className: "yv:text-3xl yv:text-black yv:dark:text-muted-foreground yv:rounded-r-[8px] yv:rounded-l-none yv:border yv:border-white yv:dark:border-border yv:h-auto yv:py-2",
16406
+ onClick: () => setCurrentFontSize((prev) => {
16407
+ if (prev < MAX_FONT_SIZE) return prev + 2;
16408
+ return prev;
16409
+ }),
16410
+ size: "lg",
16411
+ variant: "secondary",
16412
+ "data-testid": "increase-font-size",
16413
+ children: "A"
16414
+ }
16415
+ )
16416
+ ] }),
16417
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "yv:grid yv:grid-cols-2", children: [
16418
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
16419
+ Button,
16420
+ {
16421
+ className: cn(
16422
+ "yv:group yv:dark:bg-muted yv:rounded-r-none yv:dark:border-border yv:rounded-l-[8px] yv:h-auto",
16423
+ currentFontFamily === INTER_FONT ? "yv:bg-black yv:dark:bg-inherit yv:text-white yv:hover:text-white yv:hover:bg-black/80" : ""
16424
+ ),
16425
+ onClick: () => setCurrentFontFamily(INTER_FONT),
16426
+ variant: "outline",
16427
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "yv:flex yv:flex-col yv:w-full yv:items-start", children: [
16428
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
16429
+ "span",
16430
+ {
16431
+ className: cn(
16432
+ "yv:text-xs yv:text-muted-foreground",
16433
+ currentFontFamily === INTER_FONT ? "yv:text-muted yv:dark:text-muted-foreground yv:group-hover:text-muted" : ""
16434
+ ),
16435
+ children: "Font"
16436
+ }
16427
16437
  ),
16428
- children: "Font"
16429
- }
16430
- ),
16431
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "yv:text-xl", children: "Inter" })
16432
- ] })
16433
- }
16434
- ),
16435
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
16436
- Button,
16437
- {
16438
- className: cn(
16439
- "yv:group yv:dark:bg-muted yv:rounded-l-none yv:rounded-r-[8px] yv:h-auto",
16440
- currentFontFamily === SOURCE_SERIF_FONT ? "yv:bg-black yv:dark:bg-inherit yv:text-white yv:hover:text-white yv:hover:bg-black/80" : ""
16438
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "yv:text-xl", children: "Inter" })
16439
+ ] })
16440
+ }
16441
16441
  ),
16442
- onClick: () => setCurrentFontFamily(SOURCE_SERIF_FONT),
16443
- variant: "outline",
16444
- children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "yv:flex yv:flex-col yv:w-full yv:items-start", children: [
16445
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
16446
- "span",
16447
- {
16448
- className: cn(
16449
- "yv:text-xs yv:text-muted-foreground",
16450
- currentFontFamily === SOURCE_SERIF_FONT ? "yv:text-muted yv:dark:text-muted-foreground yv:group-hover:text-muted" : ""
16442
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
16443
+ Button,
16444
+ {
16445
+ className: cn(
16446
+ "yv:group yv:dark:bg-muted yv:rounded-l-none yv:rounded-r-[8px] yv:h-auto",
16447
+ currentFontFamily === SOURCE_SERIF_FONT ? "yv:bg-black yv:dark:bg-inherit yv:text-white yv:hover:text-white yv:hover:bg-black/80" : ""
16448
+ ),
16449
+ onClick: () => setCurrentFontFamily(SOURCE_SERIF_FONT),
16450
+ variant: "outline",
16451
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "yv:flex yv:flex-col yv:w-full yv:items-start", children: [
16452
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
16453
+ "span",
16454
+ {
16455
+ className: cn(
16456
+ "yv:text-xs yv:text-muted-foreground",
16457
+ currentFontFamily === SOURCE_SERIF_FONT ? "yv:text-muted yv:dark:text-muted-foreground yv:group-hover:text-muted" : ""
16458
+ ),
16459
+ children: "Font"
16460
+ }
16451
16461
  ),
16452
- children: "Font"
16453
- }
16454
- ),
16455
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "yv:text-xl yv:font-serif", children: "Source Serif" })
16456
- ] })
16457
- }
16458
- )
16462
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "yv:text-xl yv:font-serif", children: "Source Serif" })
16463
+ ] })
16464
+ }
16465
+ )
16466
+ ] })
16467
+ ] }) })
16459
16468
  ] })
16460
- ] }) })
16461
- ] })
16462
- ] })
16469
+ ]
16470
+ }
16471
+ )
16463
16472
  }
16464
16473
  );
16465
16474
  }
package/dist/index.js CHANGED
@@ -16318,136 +16318,145 @@ function Toolbar({ border = "top" }) {
16318
16318
  border === "top" && "yv:border-t",
16319
16319
  border === "bottom" && "yv:border-b"
16320
16320
  ),
16321
- children: /* @__PURE__ */ jsxs7("div", { className: "yv:grid yv:w-full yv:grid-cols-[auto_1fr_auto] yv:items-center yv:max-w-lg yv:gap-4", children: [
16322
- !!yvContext?.authEnabled && /* @__PURE__ */ jsx22(UserMenu, {}),
16323
- /* @__PURE__ */ jsxs7("div", { className: "yv:grid yv:grid-cols-2 yv:gap-0.5", children: [
16324
- /* @__PURE__ */ jsx22(
16325
- BibleChapterPicker.Root,
16326
- {
16327
- book,
16328
- chapter,
16329
- onBookChange: setBook,
16330
- onChapterChange: setChapter,
16331
- versionId,
16332
- background,
16333
- children: /* @__PURE__ */ jsx22(BibleChapterPicker.Trigger, { "aria-label": "Change Bible book and chapter", children: ({ chapter: chapter2, currentBook, loading }) => /* @__PURE__ */ jsx22(
16334
- Button,
16335
- {
16336
- variant: "secondary",
16337
- className: "yv:rounded-r-none yv:font-bold yv:text-foreground",
16338
- disabled: loading,
16339
- children: loading ? "Loading..." : `${currentBook?.title || "Select"} ${chapter2 || ""}`
16340
- }
16341
- ) })
16342
- }
16321
+ children: /* @__PURE__ */ jsxs7(
16322
+ "div",
16323
+ {
16324
+ className: cn(
16325
+ "yv:grid yv:w-full yv:items-center yv:max-w-lg yv:gap-4",
16326
+ yvContext?.authEnabled ? "yv:grid-cols-[auto_1fr_auto]" : "yv:grid-cols-[1fr_auto]"
16343
16327
  ),
16344
- /* @__PURE__ */ jsxs7(
16345
- BibleVersionPicker.Root,
16346
- {
16347
- versionId,
16348
- onVersionChange: setVersionId,
16349
- background,
16350
- children: [
16351
- /* @__PURE__ */ jsx22(BibleVersionPicker.Trigger, { "aria-label": "Change Bible version", children: ({ version: version2, loading }) => /* @__PURE__ */ jsx22(
16352
- Button,
16353
- {
16354
- variant: "secondary",
16355
- className: "yv:rounded-l-none yv:font-bold yv:text-foreground",
16356
- disabled: loading,
16357
- children: loading ? "Loading..." : version2?.localized_abbreviation || "Select version"
16358
- }
16359
- ) }),
16360
- /* @__PURE__ */ jsx22(BibleVersionPicker.Content, {})
16361
- ]
16362
- }
16363
- )
16364
- ] }),
16365
- /* @__PURE__ */ jsxs7(Popover, { children: [
16366
- /* @__PURE__ */ jsx22(PopoverTrigger, { asChild: true, "aria-label": "Settings", children: /* @__PURE__ */ jsx22(Button, { size: "icon", variant: "secondary", children: /* @__PURE__ */ jsx22(GearIcon, { className: "yv:text-foreground" }) }) }),
16367
- /* @__PURE__ */ jsx22(PopoverContent, { sideOffset: 16, heading: "Reader Settings", theme: background, children: /* @__PURE__ */ jsxs7("div", { className: "yv:flex yv:flex-col yv:gap-4 yv:p-4", children: [
16368
- /* @__PURE__ */ jsxs7("div", { className: "yv:grid yv:grid-cols-2", children: [
16328
+ children: [
16329
+ !!yvContext?.authEnabled && /* @__PURE__ */ jsx22(UserMenu, {}),
16330
+ /* @__PURE__ */ jsxs7("div", { className: "yv:grid yv:grid-cols-2 yv:gap-0.5", children: [
16369
16331
  /* @__PURE__ */ jsx22(
16370
- Button,
16332
+ BibleChapterPicker.Root,
16371
16333
  {
16372
- className: "yv:text-xs yv:text-black yv:dark:text-muted-foreground yv:rounded-l-[8px] yv:rounded-r-none yv:border yv:border-white yv:dark:border-border yv:h-auto yv:py-2",
16373
- onClick: () => setCurrentFontSize((prev) => {
16374
- if (prev > MIN_FONT_SIZE) return prev - 2;
16375
- return prev;
16376
- }),
16377
- size: "lg",
16378
- variant: "secondary",
16379
- "data-testid": "decrease-font-size",
16380
- children: "A"
16334
+ book,
16335
+ chapter,
16336
+ onBookChange: setBook,
16337
+ onChapterChange: setChapter,
16338
+ versionId,
16339
+ background,
16340
+ children: /* @__PURE__ */ jsx22(BibleChapterPicker.Trigger, { "aria-label": "Change Bible book and chapter", children: ({ chapter: chapter2, currentBook, loading }) => /* @__PURE__ */ jsx22(
16341
+ Button,
16342
+ {
16343
+ variant: "secondary",
16344
+ className: "yv:rounded-r-none yv:font-bold yv:text-foreground",
16345
+ disabled: loading,
16346
+ children: loading ? "Loading..." : `${currentBook?.title || "Select"} ${chapter2 || ""}`
16347
+ }
16348
+ ) })
16381
16349
  }
16382
16350
  ),
16383
- /* @__PURE__ */ jsx22(
16384
- Button,
16351
+ /* @__PURE__ */ jsxs7(
16352
+ BibleVersionPicker.Root,
16385
16353
  {
16386
- className: "yv:text-3xl yv:text-black yv:dark:text-muted-foreground yv:rounded-r-[8px] yv:rounded-l-none yv:border yv:border-white yv:dark:border-border yv:h-auto yv:py-2",
16387
- onClick: () => setCurrentFontSize((prev) => {
16388
- if (prev < MAX_FONT_SIZE) return prev + 2;
16389
- return prev;
16390
- }),
16391
- size: "lg",
16392
- variant: "secondary",
16393
- "data-testid": "increase-font-size",
16394
- children: "A"
16354
+ versionId,
16355
+ onVersionChange: setVersionId,
16356
+ background,
16357
+ children: [
16358
+ /* @__PURE__ */ jsx22(BibleVersionPicker.Trigger, { "aria-label": "Change Bible version", children: ({ version: version2, loading }) => /* @__PURE__ */ jsx22(
16359
+ Button,
16360
+ {
16361
+ variant: "secondary",
16362
+ className: "yv:rounded-l-none yv:font-bold yv:text-foreground",
16363
+ disabled: loading,
16364
+ children: loading ? "Loading..." : version2?.localized_abbreviation || "Select version"
16365
+ }
16366
+ ) }),
16367
+ /* @__PURE__ */ jsx22(BibleVersionPicker.Content, {})
16368
+ ]
16395
16369
  }
16396
16370
  )
16397
16371
  ] }),
16398
- /* @__PURE__ */ jsxs7("div", { className: "yv:grid yv:grid-cols-2", children: [
16399
- /* @__PURE__ */ jsx22(
16400
- Button,
16401
- {
16402
- className: cn(
16403
- "yv:group yv:dark:bg-muted yv:rounded-r-none yv:dark:border-border yv:rounded-l-[8px] yv:h-auto",
16404
- currentFontFamily === INTER_FONT ? "yv:bg-black yv:dark:bg-inherit yv:text-white yv:hover:text-white yv:hover:bg-black/80" : ""
16372
+ /* @__PURE__ */ jsxs7(Popover, { children: [
16373
+ /* @__PURE__ */ jsx22(PopoverTrigger, { asChild: true, "aria-label": "Settings", children: /* @__PURE__ */ jsx22(Button, { size: "icon", variant: "secondary", children: /* @__PURE__ */ jsx22(GearIcon, { className: "yv:text-foreground" }) }) }),
16374
+ /* @__PURE__ */ jsx22(PopoverContent, { sideOffset: 16, heading: "Reader Settings", theme: background, children: /* @__PURE__ */ jsxs7("div", { className: "yv:flex yv:flex-col yv:gap-4 yv:p-4", children: [
16375
+ /* @__PURE__ */ jsxs7("div", { className: "yv:grid yv:grid-cols-2", children: [
16376
+ /* @__PURE__ */ jsx22(
16377
+ Button,
16378
+ {
16379
+ className: "yv:text-xs yv:text-black yv:dark:text-muted-foreground yv:rounded-l-[8px] yv:rounded-r-none yv:border yv:border-white yv:dark:border-border yv:h-auto yv:py-2",
16380
+ onClick: () => setCurrentFontSize((prev) => {
16381
+ if (prev > MIN_FONT_SIZE) return prev - 2;
16382
+ return prev;
16383
+ }),
16384
+ size: "lg",
16385
+ variant: "secondary",
16386
+ "data-testid": "decrease-font-size",
16387
+ children: "A"
16388
+ }
16405
16389
  ),
16406
- onClick: () => setCurrentFontFamily(INTER_FONT),
16407
- variant: "outline",
16408
- children: /* @__PURE__ */ jsxs7("div", { className: "yv:flex yv:flex-col yv:w-full yv:items-start", children: [
16409
- /* @__PURE__ */ jsx22(
16410
- "span",
16411
- {
16412
- className: cn(
16413
- "yv:text-xs yv:text-muted-foreground",
16414
- currentFontFamily === INTER_FONT ? "yv:text-muted yv:dark:text-muted-foreground yv:group-hover:text-muted" : ""
16390
+ /* @__PURE__ */ jsx22(
16391
+ Button,
16392
+ {
16393
+ className: "yv:text-3xl yv:text-black yv:dark:text-muted-foreground yv:rounded-r-[8px] yv:rounded-l-none yv:border yv:border-white yv:dark:border-border yv:h-auto yv:py-2",
16394
+ onClick: () => setCurrentFontSize((prev) => {
16395
+ if (prev < MAX_FONT_SIZE) return prev + 2;
16396
+ return prev;
16397
+ }),
16398
+ size: "lg",
16399
+ variant: "secondary",
16400
+ "data-testid": "increase-font-size",
16401
+ children: "A"
16402
+ }
16403
+ )
16404
+ ] }),
16405
+ /* @__PURE__ */ jsxs7("div", { className: "yv:grid yv:grid-cols-2", children: [
16406
+ /* @__PURE__ */ jsx22(
16407
+ Button,
16408
+ {
16409
+ className: cn(
16410
+ "yv:group yv:dark:bg-muted yv:rounded-r-none yv:dark:border-border yv:rounded-l-[8px] yv:h-auto",
16411
+ currentFontFamily === INTER_FONT ? "yv:bg-black yv:dark:bg-inherit yv:text-white yv:hover:text-white yv:hover:bg-black/80" : ""
16412
+ ),
16413
+ onClick: () => setCurrentFontFamily(INTER_FONT),
16414
+ variant: "outline",
16415
+ children: /* @__PURE__ */ jsxs7("div", { className: "yv:flex yv:flex-col yv:w-full yv:items-start", children: [
16416
+ /* @__PURE__ */ jsx22(
16417
+ "span",
16418
+ {
16419
+ className: cn(
16420
+ "yv:text-xs yv:text-muted-foreground",
16421
+ currentFontFamily === INTER_FONT ? "yv:text-muted yv:dark:text-muted-foreground yv:group-hover:text-muted" : ""
16422
+ ),
16423
+ children: "Font"
16424
+ }
16415
16425
  ),
16416
- children: "Font"
16417
- }
16418
- ),
16419
- /* @__PURE__ */ jsx22("span", { className: "yv:text-xl", children: "Inter" })
16420
- ] })
16421
- }
16422
- ),
16423
- /* @__PURE__ */ jsx22(
16424
- Button,
16425
- {
16426
- className: cn(
16427
- "yv:group yv:dark:bg-muted yv:rounded-l-none yv:rounded-r-[8px] yv:h-auto",
16428
- currentFontFamily === SOURCE_SERIF_FONT ? "yv:bg-black yv:dark:bg-inherit yv:text-white yv:hover:text-white yv:hover:bg-black/80" : ""
16426
+ /* @__PURE__ */ jsx22("span", { className: "yv:text-xl", children: "Inter" })
16427
+ ] })
16428
+ }
16429
16429
  ),
16430
- onClick: () => setCurrentFontFamily(SOURCE_SERIF_FONT),
16431
- variant: "outline",
16432
- children: /* @__PURE__ */ jsxs7("div", { className: "yv:flex yv:flex-col yv:w-full yv:items-start", children: [
16433
- /* @__PURE__ */ jsx22(
16434
- "span",
16435
- {
16436
- className: cn(
16437
- "yv:text-xs yv:text-muted-foreground",
16438
- currentFontFamily === SOURCE_SERIF_FONT ? "yv:text-muted yv:dark:text-muted-foreground yv:group-hover:text-muted" : ""
16430
+ /* @__PURE__ */ jsx22(
16431
+ Button,
16432
+ {
16433
+ className: cn(
16434
+ "yv:group yv:dark:bg-muted yv:rounded-l-none yv:rounded-r-[8px] yv:h-auto",
16435
+ currentFontFamily === SOURCE_SERIF_FONT ? "yv:bg-black yv:dark:bg-inherit yv:text-white yv:hover:text-white yv:hover:bg-black/80" : ""
16436
+ ),
16437
+ onClick: () => setCurrentFontFamily(SOURCE_SERIF_FONT),
16438
+ variant: "outline",
16439
+ children: /* @__PURE__ */ jsxs7("div", { className: "yv:flex yv:flex-col yv:w-full yv:items-start", children: [
16440
+ /* @__PURE__ */ jsx22(
16441
+ "span",
16442
+ {
16443
+ className: cn(
16444
+ "yv:text-xs yv:text-muted-foreground",
16445
+ currentFontFamily === SOURCE_SERIF_FONT ? "yv:text-muted yv:dark:text-muted-foreground yv:group-hover:text-muted" : ""
16446
+ ),
16447
+ children: "Font"
16448
+ }
16439
16449
  ),
16440
- children: "Font"
16441
- }
16442
- ),
16443
- /* @__PURE__ */ jsx22("span", { className: "yv:text-xl yv:font-serif", children: "Source Serif" })
16444
- ] })
16445
- }
16446
- )
16450
+ /* @__PURE__ */ jsx22("span", { className: "yv:text-xl yv:font-serif", children: "Source Serif" })
16451
+ ] })
16452
+ }
16453
+ )
16454
+ ] })
16455
+ ] }) })
16447
16456
  ] })
16448
- ] }) })
16449
- ] })
16450
- ] })
16457
+ ]
16458
+ }
16459
+ )
16451
16460
  }
16452
16461
  );
16453
16462
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@youversion/platform-react-ui",
3
- "version": "1.15.1",
3
+ "version": "1.15.2",
4
4
  "description": "React SDK for YouVersion Platform",
5
5
  "license": "TBD",
6
6
  "type": "module",
@@ -38,8 +38,8 @@
38
38
  "isomorphic-dompurify": "2.23.0",
39
39
  "tailwind-merge": "3.3.1",
40
40
  "tw-animate-css": "1.4.0",
41
- "@youversion/platform-core": "1.15.1",
42
- "@youversion/platform-react-hooks": "1.15.1"
41
+ "@youversion/platform-core": "1.15.2",
42
+ "@youversion/platform-react-hooks": "1.15.2"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "react": ">=19.1.0 <20.0.0",
@@ -76,8 +76,8 @@
76
76
  "vite": "7.1.11",
77
77
  "vitest": "4.0.4",
78
78
  "vitest-browser-react": "2.0.2",
79
- "@internal/tsconfig": "0.0.0",
80
- "@internal/eslint-config": "0.0.0"
79
+ "@internal/eslint-config": "0.0.0",
80
+ "@internal/tsconfig": "0.0.0"
81
81
  },
82
82
  "publishConfig": {
83
83
  "access": "public",