@youversion/platform-react-ui 0.8.2 → 0.9.0
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/YouVersionAuthButton.d.ts +4 -10
- package/dist/components/YouVersionAuthButton.d.ts.map +1 -1
- package/dist/components/YouVersionAuthButton.stories.d.ts +1 -1
- package/dist/components/YouVersionAuthButton.stories.d.ts.map +1 -1
- package/dist/index.cjs +118 -169
- package/dist/index.js +118 -168
- package/package.json +3 -3
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type
|
|
2
|
+
import { type AuthenticationScopes } from '@youversion/platform-core';
|
|
3
3
|
interface SignInAuthProps {
|
|
4
4
|
/**
|
|
5
5
|
* Called when the sign-in flow fails.
|
|
6
6
|
* @param error - The error thrown by the sign-in flow.
|
|
7
7
|
*/
|
|
8
8
|
onAuthError?: (error: Error) => void;
|
|
9
|
-
|
|
10
|
-
* Permissions that are requested but not required for sign-in to succeed.
|
|
11
|
-
*/
|
|
12
|
-
permissions?: SignInWithYouVersionPermissionValues[];
|
|
9
|
+
scopes?: AuthenticationScopes[];
|
|
13
10
|
redirectUrl: string;
|
|
14
11
|
}
|
|
15
12
|
export interface YouVersionAuthButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, SignInAuthProps {
|
|
@@ -74,7 +71,6 @@ export interface YouVersionAuthButtonProps extends React.ButtonHTMLAttributes<HT
|
|
|
74
71
|
* <div>
|
|
75
72
|
* {auth.error && <p className="text-red-600">Error: {auth.error.message}</p>}
|
|
76
73
|
* <YouVersionAuthButton
|
|
77
|
-
* permissions={[SignInWithYouVersionPermission.bibles]}
|
|
78
74
|
* onAuthError={(err) => console.error(err)}
|
|
79
75
|
* />
|
|
80
76
|
* </div>
|
|
@@ -87,12 +83,10 @@ export interface YouVersionAuthButtonProps extends React.ButtonHTMLAttributes<HT
|
|
|
87
83
|
* <YouVersionAuthButton size="short" variant="outline" /> // shorter label with outline
|
|
88
84
|
*
|
|
89
85
|
* @example
|
|
90
|
-
* // Example showing
|
|
86
|
+
* // Example showing scope usage from the example app
|
|
91
87
|
* import { SignInWithYouVersionPermission } from '@youversion/platform-react-ui';
|
|
92
88
|
*
|
|
93
|
-
* <YouVersionAuthButton
|
|
94
|
-
* permissions={[SignInWithYouVersionPermission.bibles]}
|
|
95
|
-
* />
|
|
89
|
+
* <YouVersionAuthButton scopes={['profile']}/>
|
|
96
90
|
*
|
|
97
91
|
*/
|
|
98
92
|
export declare const YouVersionAuthButton: React.ForwardRefExoticComponent<YouVersionAuthButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YouVersionAuthButton.d.ts","sourceRoot":"","sources":["../../src/components/YouVersionAuthButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"YouVersionAuthButton.d.ts","sourceRoot":"","sources":["../../src/components/YouVersionAuthButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAMtE,UAAU,eAAe;IACvB;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACrC,MAAM,CAAC,EAAE,oBAAoB,EAAE,CAAC;IAChC,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,yBACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACnD,eAAe;IACjB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC9B;;;;;OAKG;IACH,MAAM,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC;IACnC;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;IACpC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAChC;;;;;;;;;SASK;IACL,IAAI,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;CACtC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,eAAO,MAAM,oBAAoB,qGAiIhC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YouVersionAuthButton.stories.d.ts","sourceRoot":"","sources":["../../src/components/YouVersionAuthButton.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAQ5D,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"YouVersionAuthButton.stories.d.ts","sourceRoot":"","sources":["../../src/components/YouVersionAuthButton.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAQ5D,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8DmC,CAAC;AAE9C,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,YAAY,EAAE,KAI1B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAIxB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAK/B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAIvB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAK9B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAI5B,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,KAKnC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KAKjC,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,KAMxC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAKhC,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,KAMvC,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAIlB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAKzB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAKvB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAM9B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAKtB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAM7B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAK3B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KAMlC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAMhC,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,KAOvC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAM/B,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,KAOtC,CAAC;AAEF,eAAO,MAAM,6BAA6B,EAAE,KAc3C,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -47,7 +47,6 @@ __export(index_exports, {
|
|
|
47
47
|
SessionStorageStrategy: () => SessionStorageStrategy,
|
|
48
48
|
SignInWithYouVersionPermission: () => SignInWithYouVersionPermission,
|
|
49
49
|
SignInWithYouVersionResult: () => SignInWithYouVersionResult,
|
|
50
|
-
URLBuilder: () => URLBuilder,
|
|
51
50
|
VerseOfTheDay: () => VerseOfTheDay,
|
|
52
51
|
YouVersionAPI: () => YouVersionAPI,
|
|
53
52
|
YouVersionAPIUsers: () => YouVersionAPIUsers,
|
|
@@ -12808,7 +12807,7 @@ var BibleClient = class {
|
|
|
12808
12807
|
/**
|
|
12809
12808
|
* Fetches all books for a given Bible version.
|
|
12810
12809
|
* @param versionId The version ID.
|
|
12811
|
-
* @param canon Optional canon filter (
|
|
12810
|
+
* @param canon Optional canon filter ("old_testament", 'new_testament', 'deuterocanon').
|
|
12812
12811
|
* @returns An array of BibleBook objects.
|
|
12813
12812
|
*/
|
|
12814
12813
|
async getBooks(versionId, canon) {
|
|
@@ -13290,7 +13289,7 @@ var YouVersionUserInfo = class {
|
|
|
13290
13289
|
}
|
|
13291
13290
|
};
|
|
13292
13291
|
var SignInWithYouVersionPKCEAuthorizationRequestBuilder = class {
|
|
13293
|
-
static async make(appKey,
|
|
13292
|
+
static async make(appKey, redirectURL, scopes) {
|
|
13294
13293
|
const codeVerifier = this.randomURLSafeString(32);
|
|
13295
13294
|
const codeChallenge = await this.codeChallenge(codeVerifier);
|
|
13296
13295
|
const state = this.randomURLSafeString(24);
|
|
@@ -13301,10 +13300,10 @@ var SignInWithYouVersionPKCEAuthorizationRequestBuilder = class {
|
|
|
13301
13300
|
state,
|
|
13302
13301
|
nonce
|
|
13303
13302
|
};
|
|
13304
|
-
const url2 = this.authorizeURL(appKey,
|
|
13303
|
+
const url2 = this.authorizeURL(appKey, redirectURL, parameters, scopes);
|
|
13305
13304
|
return { url: url2, parameters };
|
|
13306
13305
|
}
|
|
13307
|
-
static authorizeURL(appKey,
|
|
13306
|
+
static authorizeURL(appKey, redirectURL, parameters, scopes) {
|
|
13308
13307
|
const components = new URL(`https://${YouVersionPlatformConfiguration.apiHost}/auth/authorize`);
|
|
13309
13308
|
const redirectUrlString = redirectURL.toString().endsWith("/") ? redirectURL.toString().slice(0, -1) : redirectURL.toString();
|
|
13310
13309
|
const queryParams = new URLSearchParams({
|
|
@@ -13320,7 +13319,7 @@ var SignInWithYouVersionPKCEAuthorizationRequestBuilder = class {
|
|
|
13320
13319
|
if (installId) {
|
|
13321
13320
|
queryParams.set("x-yvp-installation-id", installId);
|
|
13322
13321
|
}
|
|
13323
|
-
const scopeValue = this.scopeValue(
|
|
13322
|
+
const scopeValue = this.scopeValue(scopes || []);
|
|
13324
13323
|
if (scopeValue) {
|
|
13325
13324
|
queryParams.set("scope", scopeValue);
|
|
13326
13325
|
}
|
|
@@ -13360,8 +13359,8 @@ var SignInWithYouVersionPKCEAuthorizationRequestBuilder = class {
|
|
|
13360
13359
|
const base643 = btoa(String.fromCharCode.apply(null, Array.from(data)));
|
|
13361
13360
|
return base643.replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
|
|
13362
13361
|
}
|
|
13363
|
-
static scopeValue(
|
|
13364
|
-
const scopeArray = Array.from(
|
|
13362
|
+
static scopeValue(scopes) {
|
|
13363
|
+
const scopeArray = Array.from(scopes).sort();
|
|
13365
13364
|
let scopeWithOpenID = scopeArray.join(" ");
|
|
13366
13365
|
if (!scopeWithOpenID.split(" ").includes("openid")) {
|
|
13367
13366
|
scopeWithOpenID += (scopeWithOpenID === "" ? "" : " ") + "openid";
|
|
@@ -13382,7 +13381,6 @@ var SignInWithYouVersionResult = class {
|
|
|
13382
13381
|
expiresIn,
|
|
13383
13382
|
refreshToken,
|
|
13384
13383
|
idToken,
|
|
13385
|
-
permissions,
|
|
13386
13384
|
yvpUserId,
|
|
13387
13385
|
name,
|
|
13388
13386
|
profilePicture,
|
|
@@ -13392,7 +13390,6 @@ var SignInWithYouVersionResult = class {
|
|
|
13392
13390
|
__publicField(this, "expiryDate");
|
|
13393
13391
|
__publicField(this, "refreshToken");
|
|
13394
13392
|
__publicField(this, "idToken");
|
|
13395
|
-
__publicField(this, "permissions");
|
|
13396
13393
|
__publicField(this, "yvpUserId");
|
|
13397
13394
|
__publicField(this, "name");
|
|
13398
13395
|
__publicField(this, "profilePicture");
|
|
@@ -13401,7 +13398,6 @@ var SignInWithYouVersionResult = class {
|
|
|
13401
13398
|
this.expiryDate = expiresIn ? new Date(Date.now() + expiresIn * 1e3) : /* @__PURE__ */ new Date();
|
|
13402
13399
|
this.refreshToken = refreshToken;
|
|
13403
13400
|
this.idToken = idToken;
|
|
13404
|
-
this.permissions = permissions;
|
|
13405
13401
|
this.yvpUserId = yvpUserId;
|
|
13406
13402
|
this.name = name;
|
|
13407
13403
|
this.profilePicture = profilePicture;
|
|
@@ -13412,22 +13408,22 @@ var YouVersionAPIUsers = class {
|
|
|
13412
13408
|
/**
|
|
13413
13409
|
* Presents the YouVersion login flow to the user and returns the login result upon completion.
|
|
13414
13410
|
*
|
|
13415
|
-
* This function authenticates the user with YouVersion
|
|
13411
|
+
* This function authenticates the user with YouVersion.
|
|
13416
13412
|
* The function redirects to the YouVersion authorization URL and expects the callback to be handled separately.
|
|
13417
13413
|
*
|
|
13418
|
-
* @param
|
|
13414
|
+
* @param scopes - The scopes given to the authentication call.
|
|
13419
13415
|
* @param redirectURL - The URL to redirect back to after authentication.
|
|
13420
13416
|
* @throws An error if authentication fails or configuration is invalid.
|
|
13421
13417
|
*/
|
|
13422
|
-
static async signIn(
|
|
13418
|
+
static async signIn(redirectURL, scopes) {
|
|
13423
13419
|
const appKey = YouVersionPlatformConfiguration.appKey;
|
|
13424
13420
|
if (!appKey) {
|
|
13425
13421
|
throw new Error("YouVersionPlatformConfiguration.appKey must be set before calling signIn");
|
|
13426
13422
|
}
|
|
13427
13423
|
const authorizationRequest = await SignInWithYouVersionPKCEAuthorizationRequestBuilder.make(
|
|
13428
13424
|
appKey,
|
|
13429
|
-
|
|
13430
|
-
|
|
13425
|
+
new URL(redirectURL),
|
|
13426
|
+
scopes
|
|
13431
13427
|
);
|
|
13432
13428
|
localStorage.setItem(
|
|
13433
13429
|
"youversion-auth-code-verifier",
|
|
@@ -13527,17 +13523,11 @@ var YouVersionAPIUsers = class {
|
|
|
13527
13523
|
*/
|
|
13528
13524
|
static extractSignInResult(tokens) {
|
|
13529
13525
|
const idClaims = this.decodeJWT(tokens.id_token);
|
|
13530
|
-
const permissions = tokens.scope.split(" ").map((p) => p.trim()).filter((p) => p.length > 0).filter(
|
|
13531
|
-
(p) => Object.values(SignInWithYouVersionPermission).includes(
|
|
13532
|
-
p
|
|
13533
|
-
)
|
|
13534
|
-
);
|
|
13535
13526
|
const resultData = {
|
|
13536
13527
|
accessToken: tokens.access_token,
|
|
13537
13528
|
expiresIn: tokens.expires_in,
|
|
13538
13529
|
refreshToken: tokens.refresh_token,
|
|
13539
13530
|
idToken: tokens.id_token,
|
|
13540
|
-
permissions,
|
|
13541
13531
|
yvpUserId: idClaims.sub,
|
|
13542
13532
|
name: idClaims.name,
|
|
13543
13533
|
profilePicture: idClaims.profile_picture,
|
|
@@ -13656,12 +13646,7 @@ var YouVersionAPIUsers = class {
|
|
|
13656
13646
|
accessToken: tokens.access_token,
|
|
13657
13647
|
expiresIn: tokens.expires_in,
|
|
13658
13648
|
refreshToken: tokens.refresh_token,
|
|
13659
|
-
idToken: existingIdToken
|
|
13660
|
-
permissions: tokens.scope.split(" ").map((p) => p.trim()).filter((p) => p.length > 0).filter(
|
|
13661
|
-
(p) => Object.values(SignInWithYouVersionPermission).includes(
|
|
13662
|
-
p
|
|
13663
|
-
)
|
|
13664
|
-
)
|
|
13649
|
+
idToken: existingIdToken
|
|
13665
13650
|
});
|
|
13666
13651
|
YouVersionPlatformConfiguration.saveAuthData(
|
|
13667
13652
|
result.accessToken || null,
|
|
@@ -13728,41 +13713,6 @@ var YouVersionAPI = class {
|
|
|
13728
13713
|
return request;
|
|
13729
13714
|
}
|
|
13730
13715
|
};
|
|
13731
|
-
var URLBuilder = class {
|
|
13732
|
-
static get baseURL() {
|
|
13733
|
-
return new URL(`https://${YouVersionPlatformConfiguration.apiHost}`);
|
|
13734
|
-
}
|
|
13735
|
-
static authURL(appKey, requiredPermissions = /* @__PURE__ */ new Set(), optionalPermissions = /* @__PURE__ */ new Set()) {
|
|
13736
|
-
if (typeof appKey !== "string" || appKey.trim().length === 0) {
|
|
13737
|
-
throw new Error("appKey must be a non-empty string");
|
|
13738
|
-
}
|
|
13739
|
-
try {
|
|
13740
|
-
const url2 = new URL(this.baseURL);
|
|
13741
|
-
url2.pathname = "/auth/login";
|
|
13742
|
-
const searchParams = new URLSearchParams();
|
|
13743
|
-
searchParams.append("APP_KEY", appKey);
|
|
13744
|
-
searchParams.append("language", "en");
|
|
13745
|
-
if (requiredPermissions.size > 0) {
|
|
13746
|
-
const requiredList = Array.from(requiredPermissions).map((p) => p.toString());
|
|
13747
|
-
searchParams.append("required_perms", requiredList.join(","));
|
|
13748
|
-
}
|
|
13749
|
-
if (optionalPermissions.size > 0) {
|
|
13750
|
-
const optionalList = Array.from(optionalPermissions).map((p) => p.toString());
|
|
13751
|
-
searchParams.append("opt_perms", optionalList.join(","));
|
|
13752
|
-
}
|
|
13753
|
-
const installationId = YouVersionPlatformConfiguration.installationId;
|
|
13754
|
-
if (installationId) {
|
|
13755
|
-
searchParams.append("x-yvp-installation-id", installationId);
|
|
13756
|
-
}
|
|
13757
|
-
url2.search = searchParams.toString();
|
|
13758
|
-
return url2;
|
|
13759
|
-
} catch (error46) {
|
|
13760
|
-
throw new Error(
|
|
13761
|
-
`Failed to construct auth URL: ${error46 instanceof Error ? error46.message : "Unknown error"}`
|
|
13762
|
-
);
|
|
13763
|
-
}
|
|
13764
|
-
}
|
|
13765
|
-
};
|
|
13766
13716
|
var BOOK_IDS = [
|
|
13767
13717
|
"GEN",
|
|
13768
13718
|
"EXO",
|
|
@@ -13871,109 +13821,109 @@ var BOOK_IDS = [
|
|
|
13871
13821
|
"LKA"
|
|
13872
13822
|
];
|
|
13873
13823
|
var BOOK_CANON = {
|
|
13874
|
-
GEN: "
|
|
13875
|
-
EXO: "
|
|
13876
|
-
LEV: "
|
|
13877
|
-
NUM: "
|
|
13878
|
-
DEU: "
|
|
13879
|
-
JOS: "
|
|
13880
|
-
JDG: "
|
|
13881
|
-
RUT: "
|
|
13882
|
-
"1SA": "
|
|
13883
|
-
"2SA": "
|
|
13884
|
-
"1KI": "
|
|
13885
|
-
"2KI": "
|
|
13886
|
-
"1CH": "
|
|
13887
|
-
"2CH": "
|
|
13888
|
-
EZR: "
|
|
13889
|
-
NEH: "
|
|
13890
|
-
EST: "
|
|
13891
|
-
JOB: "
|
|
13892
|
-
PSA: "
|
|
13893
|
-
PRO: "
|
|
13894
|
-
ECC: "
|
|
13895
|
-
SNG: "
|
|
13896
|
-
ISA: "
|
|
13897
|
-
JER: "
|
|
13898
|
-
LAM: "
|
|
13899
|
-
EZK: "
|
|
13900
|
-
DAN: "
|
|
13901
|
-
HOS: "
|
|
13902
|
-
JOL: "
|
|
13903
|
-
AMO: "
|
|
13904
|
-
OBA: "
|
|
13905
|
-
JON: "
|
|
13906
|
-
MIC: "
|
|
13907
|
-
NAM: "
|
|
13908
|
-
HAB: "
|
|
13909
|
-
ZEP: "
|
|
13910
|
-
HAG: "
|
|
13911
|
-
ZEC: "
|
|
13912
|
-
MAL: "
|
|
13913
|
-
MAT: "
|
|
13914
|
-
MRK: "
|
|
13915
|
-
LUK: "
|
|
13916
|
-
JHN: "
|
|
13917
|
-
ACT: "
|
|
13918
|
-
ROM: "
|
|
13919
|
-
"1CO": "
|
|
13920
|
-
"2CO": "
|
|
13921
|
-
GAL: "
|
|
13922
|
-
EPH: "
|
|
13923
|
-
PHP: "
|
|
13924
|
-
COL: "
|
|
13925
|
-
"1TH": "
|
|
13926
|
-
"2TH": "
|
|
13927
|
-
"1TI": "
|
|
13928
|
-
"2TI": "
|
|
13929
|
-
TIT: "
|
|
13930
|
-
PHM: "
|
|
13931
|
-
HEB: "
|
|
13932
|
-
JAS: "
|
|
13933
|
-
"1PE": "
|
|
13934
|
-
"2PE": "
|
|
13935
|
-
"1JN": "
|
|
13936
|
-
"2JN": "
|
|
13937
|
-
"3JN": "
|
|
13938
|
-
JUD: "
|
|
13939
|
-
REV: "
|
|
13940
|
-
TOB: "
|
|
13941
|
-
JDT: "
|
|
13942
|
-
ESG: "
|
|
13943
|
-
WIS: "
|
|
13944
|
-
SIR: "
|
|
13945
|
-
BAR: "
|
|
13946
|
-
LJE: "
|
|
13947
|
-
S3Y: "
|
|
13948
|
-
SUS: "
|
|
13949
|
-
BEL: "
|
|
13950
|
-
"1MA": "
|
|
13951
|
-
"2MA": "
|
|
13952
|
-
"3MA": "
|
|
13953
|
-
"4MA": "
|
|
13954
|
-
"1ES": "
|
|
13955
|
-
"2ES": "
|
|
13956
|
-
MAN: "
|
|
13957
|
-
PS2: "
|
|
13958
|
-
ODA: "
|
|
13959
|
-
PSS: "
|
|
13960
|
-
"3ES": "
|
|
13961
|
-
EZA: "
|
|
13962
|
-
"5EZ": "
|
|
13963
|
-
"6EZ": "
|
|
13964
|
-
DAG: "
|
|
13965
|
-
PS3: "
|
|
13966
|
-
"2BA": "
|
|
13967
|
-
LBA: "
|
|
13968
|
-
JUB: "
|
|
13969
|
-
ENO: "
|
|
13970
|
-
"1MQ": "
|
|
13971
|
-
"2MQ": "
|
|
13972
|
-
"3MQ": "
|
|
13973
|
-
REP: "
|
|
13974
|
-
"4BA": "
|
|
13975
|
-
LAO: "
|
|
13976
|
-
LKA: "
|
|
13824
|
+
GEN: "old_testament",
|
|
13825
|
+
EXO: "old_testament",
|
|
13826
|
+
LEV: "old_testament",
|
|
13827
|
+
NUM: "old_testament",
|
|
13828
|
+
DEU: "old_testament",
|
|
13829
|
+
JOS: "old_testament",
|
|
13830
|
+
JDG: "old_testament",
|
|
13831
|
+
RUT: "old_testament",
|
|
13832
|
+
"1SA": "old_testament",
|
|
13833
|
+
"2SA": "old_testament",
|
|
13834
|
+
"1KI": "old_testament",
|
|
13835
|
+
"2KI": "old_testament",
|
|
13836
|
+
"1CH": "old_testament",
|
|
13837
|
+
"2CH": "old_testament",
|
|
13838
|
+
EZR: "old_testament",
|
|
13839
|
+
NEH: "old_testament",
|
|
13840
|
+
EST: "old_testament",
|
|
13841
|
+
JOB: "old_testament",
|
|
13842
|
+
PSA: "old_testament",
|
|
13843
|
+
PRO: "old_testament",
|
|
13844
|
+
ECC: "old_testament",
|
|
13845
|
+
SNG: "old_testament",
|
|
13846
|
+
ISA: "old_testament",
|
|
13847
|
+
JER: "old_testament",
|
|
13848
|
+
LAM: "old_testament",
|
|
13849
|
+
EZK: "old_testament",
|
|
13850
|
+
DAN: "old_testament",
|
|
13851
|
+
HOS: "old_testament",
|
|
13852
|
+
JOL: "old_testament",
|
|
13853
|
+
AMO: "old_testament",
|
|
13854
|
+
OBA: "old_testament",
|
|
13855
|
+
JON: "old_testament",
|
|
13856
|
+
MIC: "old_testament",
|
|
13857
|
+
NAM: "old_testament",
|
|
13858
|
+
HAB: "old_testament",
|
|
13859
|
+
ZEP: "old_testament",
|
|
13860
|
+
HAG: "old_testament",
|
|
13861
|
+
ZEC: "old_testament",
|
|
13862
|
+
MAL: "old_testament",
|
|
13863
|
+
MAT: "new_testament",
|
|
13864
|
+
MRK: "new_testament",
|
|
13865
|
+
LUK: "new_testament",
|
|
13866
|
+
JHN: "new_testament",
|
|
13867
|
+
ACT: "new_testament",
|
|
13868
|
+
ROM: "new_testament",
|
|
13869
|
+
"1CO": "new_testament",
|
|
13870
|
+
"2CO": "new_testament",
|
|
13871
|
+
GAL: "new_testament",
|
|
13872
|
+
EPH: "new_testament",
|
|
13873
|
+
PHP: "new_testament",
|
|
13874
|
+
COL: "new_testament",
|
|
13875
|
+
"1TH": "new_testament",
|
|
13876
|
+
"2TH": "new_testament",
|
|
13877
|
+
"1TI": "new_testament",
|
|
13878
|
+
"2TI": "new_testament",
|
|
13879
|
+
TIT: "new_testament",
|
|
13880
|
+
PHM: "new_testament",
|
|
13881
|
+
HEB: "new_testament",
|
|
13882
|
+
JAS: "new_testament",
|
|
13883
|
+
"1PE": "new_testament",
|
|
13884
|
+
"2PE": "new_testament",
|
|
13885
|
+
"1JN": "new_testament",
|
|
13886
|
+
"2JN": "new_testament",
|
|
13887
|
+
"3JN": "new_testament",
|
|
13888
|
+
JUD: "new_testament",
|
|
13889
|
+
REV: "new_testament",
|
|
13890
|
+
TOB: "deuterocanon",
|
|
13891
|
+
JDT: "deuterocanon",
|
|
13892
|
+
ESG: "deuterocanon",
|
|
13893
|
+
WIS: "deuterocanon",
|
|
13894
|
+
SIR: "deuterocanon",
|
|
13895
|
+
BAR: "deuterocanon",
|
|
13896
|
+
LJE: "deuterocanon",
|
|
13897
|
+
S3Y: "deuterocanon",
|
|
13898
|
+
SUS: "deuterocanon",
|
|
13899
|
+
BEL: "deuterocanon",
|
|
13900
|
+
"1MA": "deuterocanon",
|
|
13901
|
+
"2MA": "deuterocanon",
|
|
13902
|
+
"3MA": "deuterocanon",
|
|
13903
|
+
"4MA": "deuterocanon",
|
|
13904
|
+
"1ES": "deuterocanon",
|
|
13905
|
+
"2ES": "deuterocanon",
|
|
13906
|
+
MAN: "deuterocanon",
|
|
13907
|
+
PS2: "deuterocanon",
|
|
13908
|
+
ODA: "deuterocanon",
|
|
13909
|
+
PSS: "deuterocanon",
|
|
13910
|
+
"3ES": "deuterocanon",
|
|
13911
|
+
EZA: "deuterocanon",
|
|
13912
|
+
"5EZ": "deuterocanon",
|
|
13913
|
+
"6EZ": "deuterocanon",
|
|
13914
|
+
DAG: "deuterocanon",
|
|
13915
|
+
PS3: "deuterocanon",
|
|
13916
|
+
"2BA": "deuterocanon",
|
|
13917
|
+
LBA: "deuterocanon",
|
|
13918
|
+
JUB: "deuterocanon",
|
|
13919
|
+
ENO: "deuterocanon",
|
|
13920
|
+
"1MQ": "deuterocanon",
|
|
13921
|
+
"2MQ": "deuterocanon",
|
|
13922
|
+
"3MQ": "deuterocanon",
|
|
13923
|
+
REP: "deuterocanon",
|
|
13924
|
+
"4BA": "deuterocanon",
|
|
13925
|
+
LAO: "deuterocanon",
|
|
13926
|
+
LKA: "new_testament"
|
|
13977
13927
|
// Luke-Acts combo, treated canonically as New Testament
|
|
13978
13928
|
};
|
|
13979
13929
|
|
|
@@ -15252,7 +15202,7 @@ var YouVersionAuthButton = import_react5.default.forwardRef(
|
|
|
15252
15202
|
onAuthError,
|
|
15253
15203
|
onClick,
|
|
15254
15204
|
mode,
|
|
15255
|
-
|
|
15205
|
+
scopes = [],
|
|
15256
15206
|
radius = "rounded",
|
|
15257
15207
|
redirectUrl,
|
|
15258
15208
|
size = "default",
|
|
@@ -15271,7 +15221,7 @@ var YouVersionAuthButton = import_react5.default.forwardRef(
|
|
|
15271
15221
|
} else {
|
|
15272
15222
|
await signIn({
|
|
15273
15223
|
redirectUrl,
|
|
15274
|
-
|
|
15224
|
+
scopes
|
|
15275
15225
|
});
|
|
15276
15226
|
}
|
|
15277
15227
|
} catch (error46) {
|
|
@@ -15705,7 +15655,6 @@ injectStyles();
|
|
|
15705
15655
|
SessionStorageStrategy,
|
|
15706
15656
|
SignInWithYouVersionPermission,
|
|
15707
15657
|
SignInWithYouVersionResult,
|
|
15708
|
-
URLBuilder,
|
|
15709
15658
|
VerseOfTheDay,
|
|
15710
15659
|
YouVersionAPI,
|
|
15711
15660
|
YouVersionAPIUsers,
|
package/dist/index.js
CHANGED
|
@@ -12762,7 +12762,7 @@ var BibleClient = class {
|
|
|
12762
12762
|
/**
|
|
12763
12763
|
* Fetches all books for a given Bible version.
|
|
12764
12764
|
* @param versionId The version ID.
|
|
12765
|
-
* @param canon Optional canon filter (
|
|
12765
|
+
* @param canon Optional canon filter ("old_testament", 'new_testament', 'deuterocanon').
|
|
12766
12766
|
* @returns An array of BibleBook objects.
|
|
12767
12767
|
*/
|
|
12768
12768
|
async getBooks(versionId, canon) {
|
|
@@ -13244,7 +13244,7 @@ var YouVersionUserInfo = class {
|
|
|
13244
13244
|
}
|
|
13245
13245
|
};
|
|
13246
13246
|
var SignInWithYouVersionPKCEAuthorizationRequestBuilder = class {
|
|
13247
|
-
static async make(appKey,
|
|
13247
|
+
static async make(appKey, redirectURL, scopes) {
|
|
13248
13248
|
const codeVerifier = this.randomURLSafeString(32);
|
|
13249
13249
|
const codeChallenge = await this.codeChallenge(codeVerifier);
|
|
13250
13250
|
const state = this.randomURLSafeString(24);
|
|
@@ -13255,10 +13255,10 @@ var SignInWithYouVersionPKCEAuthorizationRequestBuilder = class {
|
|
|
13255
13255
|
state,
|
|
13256
13256
|
nonce
|
|
13257
13257
|
};
|
|
13258
|
-
const url2 = this.authorizeURL(appKey,
|
|
13258
|
+
const url2 = this.authorizeURL(appKey, redirectURL, parameters, scopes);
|
|
13259
13259
|
return { url: url2, parameters };
|
|
13260
13260
|
}
|
|
13261
|
-
static authorizeURL(appKey,
|
|
13261
|
+
static authorizeURL(appKey, redirectURL, parameters, scopes) {
|
|
13262
13262
|
const components = new URL(`https://${YouVersionPlatformConfiguration.apiHost}/auth/authorize`);
|
|
13263
13263
|
const redirectUrlString = redirectURL.toString().endsWith("/") ? redirectURL.toString().slice(0, -1) : redirectURL.toString();
|
|
13264
13264
|
const queryParams = new URLSearchParams({
|
|
@@ -13274,7 +13274,7 @@ var SignInWithYouVersionPKCEAuthorizationRequestBuilder = class {
|
|
|
13274
13274
|
if (installId) {
|
|
13275
13275
|
queryParams.set("x-yvp-installation-id", installId);
|
|
13276
13276
|
}
|
|
13277
|
-
const scopeValue = this.scopeValue(
|
|
13277
|
+
const scopeValue = this.scopeValue(scopes || []);
|
|
13278
13278
|
if (scopeValue) {
|
|
13279
13279
|
queryParams.set("scope", scopeValue);
|
|
13280
13280
|
}
|
|
@@ -13314,8 +13314,8 @@ var SignInWithYouVersionPKCEAuthorizationRequestBuilder = class {
|
|
|
13314
13314
|
const base643 = btoa(String.fromCharCode.apply(null, Array.from(data)));
|
|
13315
13315
|
return base643.replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
|
|
13316
13316
|
}
|
|
13317
|
-
static scopeValue(
|
|
13318
|
-
const scopeArray = Array.from(
|
|
13317
|
+
static scopeValue(scopes) {
|
|
13318
|
+
const scopeArray = Array.from(scopes).sort();
|
|
13319
13319
|
let scopeWithOpenID = scopeArray.join(" ");
|
|
13320
13320
|
if (!scopeWithOpenID.split(" ").includes("openid")) {
|
|
13321
13321
|
scopeWithOpenID += (scopeWithOpenID === "" ? "" : " ") + "openid";
|
|
@@ -13336,7 +13336,6 @@ var SignInWithYouVersionResult = class {
|
|
|
13336
13336
|
expiresIn,
|
|
13337
13337
|
refreshToken,
|
|
13338
13338
|
idToken,
|
|
13339
|
-
permissions,
|
|
13340
13339
|
yvpUserId,
|
|
13341
13340
|
name,
|
|
13342
13341
|
profilePicture,
|
|
@@ -13346,7 +13345,6 @@ var SignInWithYouVersionResult = class {
|
|
|
13346
13345
|
__publicField(this, "expiryDate");
|
|
13347
13346
|
__publicField(this, "refreshToken");
|
|
13348
13347
|
__publicField(this, "idToken");
|
|
13349
|
-
__publicField(this, "permissions");
|
|
13350
13348
|
__publicField(this, "yvpUserId");
|
|
13351
13349
|
__publicField(this, "name");
|
|
13352
13350
|
__publicField(this, "profilePicture");
|
|
@@ -13355,7 +13353,6 @@ var SignInWithYouVersionResult = class {
|
|
|
13355
13353
|
this.expiryDate = expiresIn ? new Date(Date.now() + expiresIn * 1e3) : /* @__PURE__ */ new Date();
|
|
13356
13354
|
this.refreshToken = refreshToken;
|
|
13357
13355
|
this.idToken = idToken;
|
|
13358
|
-
this.permissions = permissions;
|
|
13359
13356
|
this.yvpUserId = yvpUserId;
|
|
13360
13357
|
this.name = name;
|
|
13361
13358
|
this.profilePicture = profilePicture;
|
|
@@ -13366,22 +13363,22 @@ var YouVersionAPIUsers = class {
|
|
|
13366
13363
|
/**
|
|
13367
13364
|
* Presents the YouVersion login flow to the user and returns the login result upon completion.
|
|
13368
13365
|
*
|
|
13369
|
-
* This function authenticates the user with YouVersion
|
|
13366
|
+
* This function authenticates the user with YouVersion.
|
|
13370
13367
|
* The function redirects to the YouVersion authorization URL and expects the callback to be handled separately.
|
|
13371
13368
|
*
|
|
13372
|
-
* @param
|
|
13369
|
+
* @param scopes - The scopes given to the authentication call.
|
|
13373
13370
|
* @param redirectURL - The URL to redirect back to after authentication.
|
|
13374
13371
|
* @throws An error if authentication fails or configuration is invalid.
|
|
13375
13372
|
*/
|
|
13376
|
-
static async signIn(
|
|
13373
|
+
static async signIn(redirectURL, scopes) {
|
|
13377
13374
|
const appKey = YouVersionPlatformConfiguration.appKey;
|
|
13378
13375
|
if (!appKey) {
|
|
13379
13376
|
throw new Error("YouVersionPlatformConfiguration.appKey must be set before calling signIn");
|
|
13380
13377
|
}
|
|
13381
13378
|
const authorizationRequest = await SignInWithYouVersionPKCEAuthorizationRequestBuilder.make(
|
|
13382
13379
|
appKey,
|
|
13383
|
-
|
|
13384
|
-
|
|
13380
|
+
new URL(redirectURL),
|
|
13381
|
+
scopes
|
|
13385
13382
|
);
|
|
13386
13383
|
localStorage.setItem(
|
|
13387
13384
|
"youversion-auth-code-verifier",
|
|
@@ -13481,17 +13478,11 @@ var YouVersionAPIUsers = class {
|
|
|
13481
13478
|
*/
|
|
13482
13479
|
static extractSignInResult(tokens) {
|
|
13483
13480
|
const idClaims = this.decodeJWT(tokens.id_token);
|
|
13484
|
-
const permissions = tokens.scope.split(" ").map((p) => p.trim()).filter((p) => p.length > 0).filter(
|
|
13485
|
-
(p) => Object.values(SignInWithYouVersionPermission).includes(
|
|
13486
|
-
p
|
|
13487
|
-
)
|
|
13488
|
-
);
|
|
13489
13481
|
const resultData = {
|
|
13490
13482
|
accessToken: tokens.access_token,
|
|
13491
13483
|
expiresIn: tokens.expires_in,
|
|
13492
13484
|
refreshToken: tokens.refresh_token,
|
|
13493
13485
|
idToken: tokens.id_token,
|
|
13494
|
-
permissions,
|
|
13495
13486
|
yvpUserId: idClaims.sub,
|
|
13496
13487
|
name: idClaims.name,
|
|
13497
13488
|
profilePicture: idClaims.profile_picture,
|
|
@@ -13610,12 +13601,7 @@ var YouVersionAPIUsers = class {
|
|
|
13610
13601
|
accessToken: tokens.access_token,
|
|
13611
13602
|
expiresIn: tokens.expires_in,
|
|
13612
13603
|
refreshToken: tokens.refresh_token,
|
|
13613
|
-
idToken: existingIdToken
|
|
13614
|
-
permissions: tokens.scope.split(" ").map((p) => p.trim()).filter((p) => p.length > 0).filter(
|
|
13615
|
-
(p) => Object.values(SignInWithYouVersionPermission).includes(
|
|
13616
|
-
p
|
|
13617
|
-
)
|
|
13618
|
-
)
|
|
13604
|
+
idToken: existingIdToken
|
|
13619
13605
|
});
|
|
13620
13606
|
YouVersionPlatformConfiguration.saveAuthData(
|
|
13621
13607
|
result.accessToken || null,
|
|
@@ -13682,41 +13668,6 @@ var YouVersionAPI = class {
|
|
|
13682
13668
|
return request;
|
|
13683
13669
|
}
|
|
13684
13670
|
};
|
|
13685
|
-
var URLBuilder = class {
|
|
13686
|
-
static get baseURL() {
|
|
13687
|
-
return new URL(`https://${YouVersionPlatformConfiguration.apiHost}`);
|
|
13688
|
-
}
|
|
13689
|
-
static authURL(appKey, requiredPermissions = /* @__PURE__ */ new Set(), optionalPermissions = /* @__PURE__ */ new Set()) {
|
|
13690
|
-
if (typeof appKey !== "string" || appKey.trim().length === 0) {
|
|
13691
|
-
throw new Error("appKey must be a non-empty string");
|
|
13692
|
-
}
|
|
13693
|
-
try {
|
|
13694
|
-
const url2 = new URL(this.baseURL);
|
|
13695
|
-
url2.pathname = "/auth/login";
|
|
13696
|
-
const searchParams = new URLSearchParams();
|
|
13697
|
-
searchParams.append("APP_KEY", appKey);
|
|
13698
|
-
searchParams.append("language", "en");
|
|
13699
|
-
if (requiredPermissions.size > 0) {
|
|
13700
|
-
const requiredList = Array.from(requiredPermissions).map((p) => p.toString());
|
|
13701
|
-
searchParams.append("required_perms", requiredList.join(","));
|
|
13702
|
-
}
|
|
13703
|
-
if (optionalPermissions.size > 0) {
|
|
13704
|
-
const optionalList = Array.from(optionalPermissions).map((p) => p.toString());
|
|
13705
|
-
searchParams.append("opt_perms", optionalList.join(","));
|
|
13706
|
-
}
|
|
13707
|
-
const installationId = YouVersionPlatformConfiguration.installationId;
|
|
13708
|
-
if (installationId) {
|
|
13709
|
-
searchParams.append("x-yvp-installation-id", installationId);
|
|
13710
|
-
}
|
|
13711
|
-
url2.search = searchParams.toString();
|
|
13712
|
-
return url2;
|
|
13713
|
-
} catch (error46) {
|
|
13714
|
-
throw new Error(
|
|
13715
|
-
`Failed to construct auth URL: ${error46 instanceof Error ? error46.message : "Unknown error"}`
|
|
13716
|
-
);
|
|
13717
|
-
}
|
|
13718
|
-
}
|
|
13719
|
-
};
|
|
13720
13671
|
var BOOK_IDS = [
|
|
13721
13672
|
"GEN",
|
|
13722
13673
|
"EXO",
|
|
@@ -13825,109 +13776,109 @@ var BOOK_IDS = [
|
|
|
13825
13776
|
"LKA"
|
|
13826
13777
|
];
|
|
13827
13778
|
var BOOK_CANON = {
|
|
13828
|
-
GEN: "
|
|
13829
|
-
EXO: "
|
|
13830
|
-
LEV: "
|
|
13831
|
-
NUM: "
|
|
13832
|
-
DEU: "
|
|
13833
|
-
JOS: "
|
|
13834
|
-
JDG: "
|
|
13835
|
-
RUT: "
|
|
13836
|
-
"1SA": "
|
|
13837
|
-
"2SA": "
|
|
13838
|
-
"1KI": "
|
|
13839
|
-
"2KI": "
|
|
13840
|
-
"1CH": "
|
|
13841
|
-
"2CH": "
|
|
13842
|
-
EZR: "
|
|
13843
|
-
NEH: "
|
|
13844
|
-
EST: "
|
|
13845
|
-
JOB: "
|
|
13846
|
-
PSA: "
|
|
13847
|
-
PRO: "
|
|
13848
|
-
ECC: "
|
|
13849
|
-
SNG: "
|
|
13850
|
-
ISA: "
|
|
13851
|
-
JER: "
|
|
13852
|
-
LAM: "
|
|
13853
|
-
EZK: "
|
|
13854
|
-
DAN: "
|
|
13855
|
-
HOS: "
|
|
13856
|
-
JOL: "
|
|
13857
|
-
AMO: "
|
|
13858
|
-
OBA: "
|
|
13859
|
-
JON: "
|
|
13860
|
-
MIC: "
|
|
13861
|
-
NAM: "
|
|
13862
|
-
HAB: "
|
|
13863
|
-
ZEP: "
|
|
13864
|
-
HAG: "
|
|
13865
|
-
ZEC: "
|
|
13866
|
-
MAL: "
|
|
13867
|
-
MAT: "
|
|
13868
|
-
MRK: "
|
|
13869
|
-
LUK: "
|
|
13870
|
-
JHN: "
|
|
13871
|
-
ACT: "
|
|
13872
|
-
ROM: "
|
|
13873
|
-
"1CO": "
|
|
13874
|
-
"2CO": "
|
|
13875
|
-
GAL: "
|
|
13876
|
-
EPH: "
|
|
13877
|
-
PHP: "
|
|
13878
|
-
COL: "
|
|
13879
|
-
"1TH": "
|
|
13880
|
-
"2TH": "
|
|
13881
|
-
"1TI": "
|
|
13882
|
-
"2TI": "
|
|
13883
|
-
TIT: "
|
|
13884
|
-
PHM: "
|
|
13885
|
-
HEB: "
|
|
13886
|
-
JAS: "
|
|
13887
|
-
"1PE": "
|
|
13888
|
-
"2PE": "
|
|
13889
|
-
"1JN": "
|
|
13890
|
-
"2JN": "
|
|
13891
|
-
"3JN": "
|
|
13892
|
-
JUD: "
|
|
13893
|
-
REV: "
|
|
13894
|
-
TOB: "
|
|
13895
|
-
JDT: "
|
|
13896
|
-
ESG: "
|
|
13897
|
-
WIS: "
|
|
13898
|
-
SIR: "
|
|
13899
|
-
BAR: "
|
|
13900
|
-
LJE: "
|
|
13901
|
-
S3Y: "
|
|
13902
|
-
SUS: "
|
|
13903
|
-
BEL: "
|
|
13904
|
-
"1MA": "
|
|
13905
|
-
"2MA": "
|
|
13906
|
-
"3MA": "
|
|
13907
|
-
"4MA": "
|
|
13908
|
-
"1ES": "
|
|
13909
|
-
"2ES": "
|
|
13910
|
-
MAN: "
|
|
13911
|
-
PS2: "
|
|
13912
|
-
ODA: "
|
|
13913
|
-
PSS: "
|
|
13914
|
-
"3ES": "
|
|
13915
|
-
EZA: "
|
|
13916
|
-
"5EZ": "
|
|
13917
|
-
"6EZ": "
|
|
13918
|
-
DAG: "
|
|
13919
|
-
PS3: "
|
|
13920
|
-
"2BA": "
|
|
13921
|
-
LBA: "
|
|
13922
|
-
JUB: "
|
|
13923
|
-
ENO: "
|
|
13924
|
-
"1MQ": "
|
|
13925
|
-
"2MQ": "
|
|
13926
|
-
"3MQ": "
|
|
13927
|
-
REP: "
|
|
13928
|
-
"4BA": "
|
|
13929
|
-
LAO: "
|
|
13930
|
-
LKA: "
|
|
13779
|
+
GEN: "old_testament",
|
|
13780
|
+
EXO: "old_testament",
|
|
13781
|
+
LEV: "old_testament",
|
|
13782
|
+
NUM: "old_testament",
|
|
13783
|
+
DEU: "old_testament",
|
|
13784
|
+
JOS: "old_testament",
|
|
13785
|
+
JDG: "old_testament",
|
|
13786
|
+
RUT: "old_testament",
|
|
13787
|
+
"1SA": "old_testament",
|
|
13788
|
+
"2SA": "old_testament",
|
|
13789
|
+
"1KI": "old_testament",
|
|
13790
|
+
"2KI": "old_testament",
|
|
13791
|
+
"1CH": "old_testament",
|
|
13792
|
+
"2CH": "old_testament",
|
|
13793
|
+
EZR: "old_testament",
|
|
13794
|
+
NEH: "old_testament",
|
|
13795
|
+
EST: "old_testament",
|
|
13796
|
+
JOB: "old_testament",
|
|
13797
|
+
PSA: "old_testament",
|
|
13798
|
+
PRO: "old_testament",
|
|
13799
|
+
ECC: "old_testament",
|
|
13800
|
+
SNG: "old_testament",
|
|
13801
|
+
ISA: "old_testament",
|
|
13802
|
+
JER: "old_testament",
|
|
13803
|
+
LAM: "old_testament",
|
|
13804
|
+
EZK: "old_testament",
|
|
13805
|
+
DAN: "old_testament",
|
|
13806
|
+
HOS: "old_testament",
|
|
13807
|
+
JOL: "old_testament",
|
|
13808
|
+
AMO: "old_testament",
|
|
13809
|
+
OBA: "old_testament",
|
|
13810
|
+
JON: "old_testament",
|
|
13811
|
+
MIC: "old_testament",
|
|
13812
|
+
NAM: "old_testament",
|
|
13813
|
+
HAB: "old_testament",
|
|
13814
|
+
ZEP: "old_testament",
|
|
13815
|
+
HAG: "old_testament",
|
|
13816
|
+
ZEC: "old_testament",
|
|
13817
|
+
MAL: "old_testament",
|
|
13818
|
+
MAT: "new_testament",
|
|
13819
|
+
MRK: "new_testament",
|
|
13820
|
+
LUK: "new_testament",
|
|
13821
|
+
JHN: "new_testament",
|
|
13822
|
+
ACT: "new_testament",
|
|
13823
|
+
ROM: "new_testament",
|
|
13824
|
+
"1CO": "new_testament",
|
|
13825
|
+
"2CO": "new_testament",
|
|
13826
|
+
GAL: "new_testament",
|
|
13827
|
+
EPH: "new_testament",
|
|
13828
|
+
PHP: "new_testament",
|
|
13829
|
+
COL: "new_testament",
|
|
13830
|
+
"1TH": "new_testament",
|
|
13831
|
+
"2TH": "new_testament",
|
|
13832
|
+
"1TI": "new_testament",
|
|
13833
|
+
"2TI": "new_testament",
|
|
13834
|
+
TIT: "new_testament",
|
|
13835
|
+
PHM: "new_testament",
|
|
13836
|
+
HEB: "new_testament",
|
|
13837
|
+
JAS: "new_testament",
|
|
13838
|
+
"1PE": "new_testament",
|
|
13839
|
+
"2PE": "new_testament",
|
|
13840
|
+
"1JN": "new_testament",
|
|
13841
|
+
"2JN": "new_testament",
|
|
13842
|
+
"3JN": "new_testament",
|
|
13843
|
+
JUD: "new_testament",
|
|
13844
|
+
REV: "new_testament",
|
|
13845
|
+
TOB: "deuterocanon",
|
|
13846
|
+
JDT: "deuterocanon",
|
|
13847
|
+
ESG: "deuterocanon",
|
|
13848
|
+
WIS: "deuterocanon",
|
|
13849
|
+
SIR: "deuterocanon",
|
|
13850
|
+
BAR: "deuterocanon",
|
|
13851
|
+
LJE: "deuterocanon",
|
|
13852
|
+
S3Y: "deuterocanon",
|
|
13853
|
+
SUS: "deuterocanon",
|
|
13854
|
+
BEL: "deuterocanon",
|
|
13855
|
+
"1MA": "deuterocanon",
|
|
13856
|
+
"2MA": "deuterocanon",
|
|
13857
|
+
"3MA": "deuterocanon",
|
|
13858
|
+
"4MA": "deuterocanon",
|
|
13859
|
+
"1ES": "deuterocanon",
|
|
13860
|
+
"2ES": "deuterocanon",
|
|
13861
|
+
MAN: "deuterocanon",
|
|
13862
|
+
PS2: "deuterocanon",
|
|
13863
|
+
ODA: "deuterocanon",
|
|
13864
|
+
PSS: "deuterocanon",
|
|
13865
|
+
"3ES": "deuterocanon",
|
|
13866
|
+
EZA: "deuterocanon",
|
|
13867
|
+
"5EZ": "deuterocanon",
|
|
13868
|
+
"6EZ": "deuterocanon",
|
|
13869
|
+
DAG: "deuterocanon",
|
|
13870
|
+
PS3: "deuterocanon",
|
|
13871
|
+
"2BA": "deuterocanon",
|
|
13872
|
+
LBA: "deuterocanon",
|
|
13873
|
+
JUB: "deuterocanon",
|
|
13874
|
+
ENO: "deuterocanon",
|
|
13875
|
+
"1MQ": "deuterocanon",
|
|
13876
|
+
"2MQ": "deuterocanon",
|
|
13877
|
+
"3MQ": "deuterocanon",
|
|
13878
|
+
REP: "deuterocanon",
|
|
13879
|
+
"4BA": "deuterocanon",
|
|
13880
|
+
LAO: "deuterocanon",
|
|
13881
|
+
LKA: "new_testament"
|
|
13931
13882
|
// Luke-Acts combo, treated canonically as New Testament
|
|
13932
13883
|
};
|
|
13933
13884
|
|
|
@@ -15211,7 +15162,7 @@ var YouVersionAuthButton = React9.forwardRef(
|
|
|
15211
15162
|
onAuthError,
|
|
15212
15163
|
onClick,
|
|
15213
15164
|
mode,
|
|
15214
|
-
|
|
15165
|
+
scopes = [],
|
|
15215
15166
|
radius = "rounded",
|
|
15216
15167
|
redirectUrl,
|
|
15217
15168
|
size = "default",
|
|
@@ -15230,7 +15181,7 @@ var YouVersionAuthButton = React9.forwardRef(
|
|
|
15230
15181
|
} else {
|
|
15231
15182
|
await signIn({
|
|
15232
15183
|
redirectUrl,
|
|
15233
|
-
|
|
15184
|
+
scopes
|
|
15234
15185
|
});
|
|
15235
15186
|
}
|
|
15236
15187
|
} catch (error46) {
|
|
@@ -15671,7 +15622,6 @@ export {
|
|
|
15671
15622
|
SessionStorageStrategy,
|
|
15672
15623
|
SignInWithYouVersionPermission,
|
|
15673
15624
|
SignInWithYouVersionResult,
|
|
15674
|
-
URLBuilder,
|
|
15675
15625
|
VerseOfTheDay,
|
|
15676
15626
|
YouVersionAPI,
|
|
15677
15627
|
YouVersionAPIUsers,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@youversion/platform-react-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "React SDK for YouVersion Platform",
|
|
5
5
|
"license": "TBD",
|
|
6
6
|
"type": "module",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"lucide-react": "0.546.0",
|
|
40
40
|
"tailwind-merge": "3.3.1",
|
|
41
41
|
"tw-animate-css": "1.4.0",
|
|
42
|
-
"@youversion/platform-core": "0.
|
|
43
|
-
"@youversion/platform-react-hooks": "0.
|
|
42
|
+
"@youversion/platform-core": "0.9.0",
|
|
43
|
+
"@youversion/platform-react-hooks": "0.9.0"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"react": ">=19.1.0 <20.0.0",
|