@youversion/platform-react-ui 1.12.0 → 1.12.1
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.
- package/dist/components/bible-reader.d.ts.map +1 -1
- package/dist/index.cjs +16 -12
- package/dist/index.js +24 -13
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bible-reader.d.ts","sourceRoot":"","sources":["../../src/components/bible-reader.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"bible-reader.d.ts","sourceRoot":"","sources":["../../src/components/bible-reader.tsx"],"names":[],"mappings":"AAEA,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAuCf,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,MAAM,CAAC;IACpB,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,gBAAsB,EACtB,eAAe,EACf,UAAoB,EACpB,QAA4B,EAC5B,UAAU,EACV,gBAAuB,EACvB,UAAU,EACV,QAAQ,GACT,EAAE,SAAS,2CAgFX;AAED,iBAAS,OAAO,4CAoEf;AAED,iBAAS,OAAO,CAAC,EAAE,MAAc,EAAE,EAAE;IAAE,MAAM,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAA;CAAE,2CAqMjE;AAED,eAAO,MAAM,WAAW;;;;CAAgD,CAAC;AACzE,MAAM,MAAM,oBAAoB,GAAG,SAAS,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -15970,22 +15970,26 @@ function Root5({
|
|
|
15970
15970
|
defaultProp: defaultVersionId,
|
|
15971
15971
|
onChange: onVersionChange
|
|
15972
15972
|
});
|
|
15973
|
-
const
|
|
15974
|
-
|
|
15975
|
-
|
|
15976
|
-
|
|
15977
|
-
|
|
15978
|
-
|
|
15979
|
-
|
|
15980
|
-
|
|
15981
|
-
|
|
15982
|
-
|
|
15973
|
+
const validatedFontSize = fontSize > MAX_FONT_SIZE || fontSize < MIN_FONT_SIZE ? DEFAULT_FONT_SIZE : fontSize;
|
|
15974
|
+
const [currentFontSize, setCurrentFontSize] = (0, import_react4.useState)(validatedFontSize);
|
|
15975
|
+
const [currentFontFamily, setCurrentFontFamily] = (0, import_react4.useState)(fontFamily);
|
|
15976
|
+
(0, import_react4.useLayoutEffect)(() => {
|
|
15977
|
+
const savedFontSize = localStorage.getItem("youversion-platform:reader:font-size");
|
|
15978
|
+
if (savedFontSize) {
|
|
15979
|
+
const parsed = parseInt(savedFontSize);
|
|
15980
|
+
if (parsed >= MIN_FONT_SIZE && parsed <= MAX_FONT_SIZE) {
|
|
15981
|
+
setCurrentFontSize(parsed);
|
|
15982
|
+
}
|
|
15983
|
+
}
|
|
15984
|
+
const savedFontFamily = localStorage.getItem("youversion-platform:reader:font-family");
|
|
15985
|
+
if (savedFontFamily) {
|
|
15986
|
+
setCurrentFontFamily(savedFontFamily);
|
|
15987
|
+
}
|
|
15988
|
+
}, []);
|
|
15983
15989
|
(0, import_react4.useEffect)(() => {
|
|
15984
|
-
if (typeof window === "undefined") return;
|
|
15985
15990
|
localStorage.setItem("youversion-platform:reader:font-size", currentFontSize.toString());
|
|
15986
15991
|
}, [currentFontSize]);
|
|
15987
15992
|
(0, import_react4.useEffect)(() => {
|
|
15988
|
-
if (typeof window === "undefined") return;
|
|
15989
15993
|
localStorage.setItem("youversion-platform:reader:font-family", currentFontFamily);
|
|
15990
15994
|
}, [currentFontFamily]);
|
|
15991
15995
|
const providerTheme = (0, import_platform_react_hooks4.useTheme)();
|
package/dist/index.js
CHANGED
|
@@ -14705,7 +14705,14 @@ function Trigger3({ asChild = true, children, ...props }) {
|
|
|
14705
14705
|
var BibleChapterPicker = Object.assign({}, { Root: Root3, Trigger: Trigger3 });
|
|
14706
14706
|
|
|
14707
14707
|
// src/components/bible-reader.tsx
|
|
14708
|
-
import {
|
|
14708
|
+
import {
|
|
14709
|
+
createContext as createContext3,
|
|
14710
|
+
useContext as useContext3,
|
|
14711
|
+
useMemo as useMemo3,
|
|
14712
|
+
useState as useState4,
|
|
14713
|
+
useEffect as useEffect4,
|
|
14714
|
+
useLayoutEffect as useLayoutEffect2
|
|
14715
|
+
} from "react";
|
|
14709
14716
|
import { useControllableState as useControllableState3 } from "@radix-ui/react-use-controllable-state";
|
|
14710
14717
|
import { useBooks as useBooks2, useVersion as useVersion2, useTheme as useTheme4, useYVAuth } from "@youversion/platform-react-hooks";
|
|
14711
14718
|
|
|
@@ -15946,22 +15953,26 @@ function Root5({
|
|
|
15946
15953
|
defaultProp: defaultVersionId,
|
|
15947
15954
|
onChange: onVersionChange
|
|
15948
15955
|
});
|
|
15949
|
-
const
|
|
15950
|
-
|
|
15951
|
-
|
|
15952
|
-
|
|
15953
|
-
|
|
15954
|
-
|
|
15955
|
-
|
|
15956
|
-
|
|
15957
|
-
|
|
15958
|
-
|
|
15956
|
+
const validatedFontSize = fontSize > MAX_FONT_SIZE || fontSize < MIN_FONT_SIZE ? DEFAULT_FONT_SIZE : fontSize;
|
|
15957
|
+
const [currentFontSize, setCurrentFontSize] = useState4(validatedFontSize);
|
|
15958
|
+
const [currentFontFamily, setCurrentFontFamily] = useState4(fontFamily);
|
|
15959
|
+
useLayoutEffect2(() => {
|
|
15960
|
+
const savedFontSize = localStorage.getItem("youversion-platform:reader:font-size");
|
|
15961
|
+
if (savedFontSize) {
|
|
15962
|
+
const parsed = parseInt(savedFontSize);
|
|
15963
|
+
if (parsed >= MIN_FONT_SIZE && parsed <= MAX_FONT_SIZE) {
|
|
15964
|
+
setCurrentFontSize(parsed);
|
|
15965
|
+
}
|
|
15966
|
+
}
|
|
15967
|
+
const savedFontFamily = localStorage.getItem("youversion-platform:reader:font-family");
|
|
15968
|
+
if (savedFontFamily) {
|
|
15969
|
+
setCurrentFontFamily(savedFontFamily);
|
|
15970
|
+
}
|
|
15971
|
+
}, []);
|
|
15959
15972
|
useEffect4(() => {
|
|
15960
|
-
if (typeof window === "undefined") return;
|
|
15961
15973
|
localStorage.setItem("youversion-platform:reader:font-size", currentFontSize.toString());
|
|
15962
15974
|
}, [currentFontSize]);
|
|
15963
15975
|
useEffect4(() => {
|
|
15964
|
-
if (typeof window === "undefined") return;
|
|
15965
15976
|
localStorage.setItem("youversion-platform:reader:font-family", currentFontFamily);
|
|
15966
15977
|
}, [currentFontFamily]);
|
|
15967
15978
|
const providerTheme = useTheme4();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@youversion/platform-react-ui",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.1",
|
|
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.12.
|
|
42
|
-
"@youversion/platform-react-hooks": "1.12.
|
|
41
|
+
"@youversion/platform-core": "1.12.1",
|
|
42
|
+
"@youversion/platform-react-hooks": "1.12.1"
|
|
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/
|
|
80
|
-
"@internal/
|
|
79
|
+
"@internal/tsconfig": "0.0.0",
|
|
80
|
+
"@internal/eslint-config": "0.0.0"
|
|
81
81
|
},
|
|
82
82
|
"publishConfig": {
|
|
83
83
|
"access": "public",
|