@youversion/platform-react-ui 0.8.1 → 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.
@@ -1,15 +1,12 @@
1
1
  import React from 'react';
2
- import { type SignInWithYouVersionPermissionValues } from '@youversion/platform-core';
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 permission enum usage from the example app
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,oCAAoC,EAAE,MAAM,2BAA2B,CAAC;AAMtF,UAAU,eAAe;IACvB;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACrC;;OAEG;IACH,WAAW,CAAC,EAAE,oCAAoC,EAAE,CAAC;IACrD,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,eAAO,MAAM,oBAAoB,qGAmIhC,CAAC"}
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"}
@@ -18,7 +18,7 @@ declare const meta: {
18
18
  disable: true;
19
19
  };
20
20
  };
21
- permissions: {
21
+ scopes: {
22
22
  table: {
23
23
  disable: true;
24
24
  };
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+DmC,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,CAA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AO,CAAC,EAAE,MAAc,EAAE,EAAE;IAAE,MAAM,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAA;CAAE,2CA+CjE;AAED,eAAO,MAAM,WAAW;;;;CAAgD,CAAC;AACzE,MAAM,MAAM,oBAAoB,GAAG,SAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"bible-widget-view.d.ts","sourceRoot":"","sources":["../../src/components/bible-widget-view.tsx"],"names":[],"mappings":"AAIA,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CAC/B,CAAC;AACF,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,SAAS,EACT,UAAoB,GACrB,EAAE,oBAAoB,GAAG,KAAK,CAAC,SAAS,CAuCxC"}
1
+ {"version":3,"file":"bible-widget-view.d.ts","sourceRoot":"","sources":["../../src/components/bible-widget-view.tsx"],"names":[],"mappings":"AAIA,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CAC/B,CAAC;AACF,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,SAAS,EACT,UAAoB,GACrB,EAAE,oBAAoB,GAAG,KAAK,CAAC,SAAS,CAsCxC"}
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 ('ot', 'nt', 'deuterocanon').
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, permissions, redirectURL) {
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, permissions, redirectURL, parameters);
13303
+ const url2 = this.authorizeURL(appKey, redirectURL, parameters, scopes);
13305
13304
  return { url: url2, parameters };
13306
13305
  }
13307
- static authorizeURL(appKey, permissions, redirectURL, parameters) {
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(permissions);
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(permissions) {
13364
- const scopeArray = Array.from(permissions).sort();
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, requesting the specified required and optional permissions.
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 permissions - The set of permissions that must be granted by the user for successful login.
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(permissions, redirectURL) {
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
- permissions,
13430
- new URL(redirectURL)
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: "ot",
13875
- EXO: "ot",
13876
- LEV: "ot",
13877
- NUM: "ot",
13878
- DEU: "ot",
13879
- JOS: "ot",
13880
- JDG: "ot",
13881
- RUT: "ot",
13882
- "1SA": "ot",
13883
- "2SA": "ot",
13884
- "1KI": "ot",
13885
- "2KI": "ot",
13886
- "1CH": "ot",
13887
- "2CH": "ot",
13888
- EZR: "ot",
13889
- NEH: "ot",
13890
- EST: "ot",
13891
- JOB: "ot",
13892
- PSA: "ot",
13893
- PRO: "ot",
13894
- ECC: "ot",
13895
- SNG: "ot",
13896
- ISA: "ot",
13897
- JER: "ot",
13898
- LAM: "ot",
13899
- EZK: "ot",
13900
- DAN: "ot",
13901
- HOS: "ot",
13902
- JOL: "ot",
13903
- AMO: "ot",
13904
- OBA: "ot",
13905
- JON: "ot",
13906
- MIC: "ot",
13907
- NAM: "ot",
13908
- HAB: "ot",
13909
- ZEP: "ot",
13910
- HAG: "ot",
13911
- ZEC: "ot",
13912
- MAL: "ot",
13913
- MAT: "nt",
13914
- MRK: "nt",
13915
- LUK: "nt",
13916
- JHN: "nt",
13917
- ACT: "nt",
13918
- ROM: "nt",
13919
- "1CO": "nt",
13920
- "2CO": "nt",
13921
- GAL: "nt",
13922
- EPH: "nt",
13923
- PHP: "nt",
13924
- COL: "nt",
13925
- "1TH": "nt",
13926
- "2TH": "nt",
13927
- "1TI": "nt",
13928
- "2TI": "nt",
13929
- TIT: "nt",
13930
- PHM: "nt",
13931
- HEB: "nt",
13932
- JAS: "nt",
13933
- "1PE": "nt",
13934
- "2PE": "nt",
13935
- "1JN": "nt",
13936
- "2JN": "nt",
13937
- "3JN": "nt",
13938
- JUD: "nt",
13939
- REV: "nt",
13940
- TOB: "dc",
13941
- JDT: "dc",
13942
- ESG: "dc",
13943
- WIS: "dc",
13944
- SIR: "dc",
13945
- BAR: "dc",
13946
- LJE: "dc",
13947
- S3Y: "dc",
13948
- SUS: "dc",
13949
- BEL: "dc",
13950
- "1MA": "dc",
13951
- "2MA": "dc",
13952
- "3MA": "dc",
13953
- "4MA": "dc",
13954
- "1ES": "dc",
13955
- "2ES": "dc",
13956
- MAN: "dc",
13957
- PS2: "dc",
13958
- ODA: "dc",
13959
- PSS: "dc",
13960
- "3ES": "dc",
13961
- EZA: "dc",
13962
- "5EZ": "dc",
13963
- "6EZ": "dc",
13964
- DAG: "dc",
13965
- PS3: "dc",
13966
- "2BA": "dc",
13967
- LBA: "dc",
13968
- JUB: "dc",
13969
- ENO: "dc",
13970
- "1MQ": "dc",
13971
- "2MQ": "dc",
13972
- "3MQ": "dc",
13973
- REP: "dc",
13974
- "4BA": "dc",
13975
- LAO: "dc",
13976
- LKA: "nt"
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
 
@@ -14362,7 +14312,7 @@ function Root3({
14362
14312
  children: [
14363
14313
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AccordionTrigger, { className: "yv:rounded-none", children: bookItem.title }),
14364
14314
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AccordionContent, { children: bookItem.chapters && bookItem.chapters.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "yv:grid yv:grid-cols-5 yv:gap-2", children: bookItem.chapters.map((chapterRef) => {
14365
- const chapterId = chapterRef.split(".").pop() || "";
14315
+ const chapterId = chapterRef.passage_id.split(".").pop() || "";
14366
14316
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverClose, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
14367
14317
  Button,
14368
14318
  {
@@ -14376,7 +14326,7 @@ function Root3({
14376
14326
  },
14377
14327
  children: !chapterId.toLowerCase().includes("intro") ? chapterId : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react2.Info, {})
14378
14328
  }
14379
- ) }, `${bookItem.id}-${chapterRef}`);
14329
+ ) }, `${bookItem.id}-${chapterRef.passage_id}`);
14380
14330
  }) }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "yv:w-full yv:flex yv:items-center yv:justify-center yv:py-4 yv:text-muted-foreground yv:text-sm", children: "No chapters available" }) })
14381
14331
  ]
14382
14332
  },
@@ -14410,7 +14360,7 @@ function Trigger3({ asChild = true, children, ...props }) {
14410
14360
  const currentBook = books?.data?.find((bookItem) => bookItem.id === book);
14411
14361
  const buttonText = loading ? "Loading..." : `${currentBook?.title || "Select a chapter"}${chapter ? ` ${chapter}` : ""}`;
14412
14362
  const content = typeof children === "function" ? children({ book, chapter, currentBook, loading }) : children || /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Button, { variant: background === "light" ? "outline" : "default", children: buttonText });
14413
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverTrigger, { asChild, ...props, children: content });
14363
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverTrigger, { "data-yv-sdk": true, asChild, ...props, children: content });
14414
14364
  }
14415
14365
  var BibleChapterPicker = Object.assign({}, { Root: Root3, Trigger: Trigger3 });
14416
14366
 
@@ -14659,7 +14609,7 @@ function Trigger4({ asChild = true, children, ...props }) {
14659
14609
  {
14660
14610
  variant: background === "light" ? "outline" : "default",
14661
14611
  className: "yv:cursor-pointer",
14662
- children: version2?.local_abbreviation || "Select"
14612
+ children: version2?.localized_abbreviation || "Select"
14663
14613
  }
14664
14614
  );
14665
14615
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(PopoverTrigger, { asChild, ...props, children: content });
@@ -14766,7 +14716,7 @@ function Content3() {
14766
14716
  {
14767
14717
  variant: "icon",
14768
14718
  className: "yv:rounded-[8px] yv:size-12 yv:border-border",
14769
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "yv:font-serif yv:font-bold", children: version2.local_abbreviation })
14719
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "yv:font-serif yv:font-bold", children: version2.localized_abbreviation })
14770
14720
  }
14771
14721
  ),
14772
14722
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(ItemContent, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(ItemTitle, { className: "yv:line-clamp-2", children: version2.title }) })
@@ -15060,7 +15010,6 @@ function Root5({
15060
15010
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(BibleReaderContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
15061
15011
  "div",
15062
15012
  {
15063
- "data-yv-sdk": true,
15064
15013
  "data-yv-theme": background === "dark" ? "dark" : "light",
15065
15014
  className: "yv:flex yv:flex-col yv:h-full yv:bg-background yv:text-foreground",
15066
15015
  children
@@ -15133,7 +15082,7 @@ function Toolbar({ border = "top" }) {
15133
15082
  onVersionChange: setVersionId,
15134
15083
  background,
15135
15084
  children: [
15136
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(BibleVersionPicker.Trigger, { "aria-label": "Change Bible version", children: ({ version: version2, loading }) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Button, { variant: "secondary", className: "yv:rounded-l-none", disabled: loading, children: loading ? "Loading..." : version2?.local_abbreviation || "Select version" }) }),
15085
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(BibleVersionPicker.Trigger, { "aria-label": "Change Bible version", children: ({ version: version2, loading }) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Button, { variant: "secondary", className: "yv:rounded-l-none", disabled: loading, children: loading ? "Loading..." : version2?.localized_abbreviation || "Select version" }) }),
15137
15086
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(BibleVersionPicker.Content, {})
15138
15087
  ]
15139
15088
  }
@@ -15253,7 +15202,7 @@ var YouVersionAuthButton = import_react5.default.forwardRef(
15253
15202
  onAuthError,
15254
15203
  onClick,
15255
15204
  mode,
15256
- permissions = [],
15205
+ scopes = [],
15257
15206
  radius = "rounded",
15258
15207
  redirectUrl,
15259
15208
  size = "default",
@@ -15272,7 +15221,7 @@ var YouVersionAuthButton = import_react5.default.forwardRef(
15272
15221
  } else {
15273
15222
  await signIn({
15274
15223
  redirectUrl,
15275
- permissions
15224
+ scopes
15276
15225
  });
15277
15226
  }
15278
15227
  } catch (error46) {
@@ -15312,7 +15261,6 @@ var YouVersionAuthButton = import_react5.default.forwardRef(
15312
15261
  variant === "outline" ? "yv:border" : "yv:border-none",
15313
15262
  className
15314
15263
  ),
15315
- "data-yv-sdk": true,
15316
15264
  disabled: buttonLoading ? true : disabled ?? false,
15317
15265
  ref,
15318
15266
  onClick: (e) => void handleClick(e),
@@ -15342,7 +15290,6 @@ var YouVersionAuthButton = import_react5.default.forwardRef(
15342
15290
  variant === "outline" ? "yv:border" : "yv:border-none",
15343
15291
  className
15344
15292
  ),
15345
- "data-yv-sdk": true,
15346
15293
  disabled: buttonLoading ? true : disabled ?? false,
15347
15294
  ref,
15348
15295
  onClick: (e) => void handleClick(e),
@@ -15568,10 +15515,10 @@ function VerseOfTheDay({
15568
15515
  referenceText = "Loading...";
15569
15516
  } else if (errorPassage || errorVerseOfTheDay) {
15570
15517
  referenceText = "Error loading verse";
15571
- } else if (passage?.human_reference && version2?.local_abbreviation) {
15572
- referenceText = `${passage?.human_reference} ${version2?.local_abbreviation}`;
15573
- } else if (passage?.human_reference) {
15574
- referenceText = passage?.human_reference;
15518
+ } else if (passage?.reference && version2?.localized_abbreviation) {
15519
+ referenceText = `${passage?.reference} ${version2?.localized_abbreviation}`;
15520
+ } else if (passage?.reference) {
15521
+ referenceText = passage?.reference;
15575
15522
  } else {
15576
15523
  referenceText = "No verse found";
15577
15524
  }
@@ -15662,14 +15609,13 @@ function BibleWidgetView({
15662
15609
  return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
15663
15610
  "section",
15664
15611
  {
15665
- "data-yv-sdk": true,
15666
15612
  "data-yv-theme": background === "dark" ? "dark" : "light",
15667
15613
  className: "yv:flex yv:flex-col yv:bg-card yv:p-6 yv:max-w-md yv:rounded-2xl",
15668
15614
  children: [
15669
- passage?.human_reference ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("h2", { className: "yv:font-bold yv:tracking-widest yv:text-xs yv:uppercase", children: [
15670
- passage.human_reference,
15615
+ passage?.reference ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("h2", { className: "yv:font-bold yv:tracking-widest yv:text-xs yv:uppercase", children: [
15616
+ passage.reference,
15671
15617
  " ",
15672
- version2?.local_abbreviation
15618
+ version2?.localized_abbreviation
15673
15619
  ] }) : null,
15674
15620
  /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
15675
15621
  BibleTextView,
@@ -15709,7 +15655,6 @@ injectStyles();
15709
15655
  SessionStorageStrategy,
15710
15656
  SignInWithYouVersionPermission,
15711
15657
  SignInWithYouVersionResult,
15712
- URLBuilder,
15713
15658
  VerseOfTheDay,
15714
15659
  YouVersionAPI,
15715
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 ('ot', 'nt', 'deuterocanon').
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, permissions, redirectURL) {
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, permissions, redirectURL, parameters);
13258
+ const url2 = this.authorizeURL(appKey, redirectURL, parameters, scopes);
13259
13259
  return { url: url2, parameters };
13260
13260
  }
13261
- static authorizeURL(appKey, permissions, redirectURL, parameters) {
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(permissions);
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(permissions) {
13318
- const scopeArray = Array.from(permissions).sort();
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, requesting the specified required and optional permissions.
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 permissions - The set of permissions that must be granted by the user for successful login.
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(permissions, redirectURL) {
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
- permissions,
13384
- new URL(redirectURL)
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: "ot",
13829
- EXO: "ot",
13830
- LEV: "ot",
13831
- NUM: "ot",
13832
- DEU: "ot",
13833
- JOS: "ot",
13834
- JDG: "ot",
13835
- RUT: "ot",
13836
- "1SA": "ot",
13837
- "2SA": "ot",
13838
- "1KI": "ot",
13839
- "2KI": "ot",
13840
- "1CH": "ot",
13841
- "2CH": "ot",
13842
- EZR: "ot",
13843
- NEH: "ot",
13844
- EST: "ot",
13845
- JOB: "ot",
13846
- PSA: "ot",
13847
- PRO: "ot",
13848
- ECC: "ot",
13849
- SNG: "ot",
13850
- ISA: "ot",
13851
- JER: "ot",
13852
- LAM: "ot",
13853
- EZK: "ot",
13854
- DAN: "ot",
13855
- HOS: "ot",
13856
- JOL: "ot",
13857
- AMO: "ot",
13858
- OBA: "ot",
13859
- JON: "ot",
13860
- MIC: "ot",
13861
- NAM: "ot",
13862
- HAB: "ot",
13863
- ZEP: "ot",
13864
- HAG: "ot",
13865
- ZEC: "ot",
13866
- MAL: "ot",
13867
- MAT: "nt",
13868
- MRK: "nt",
13869
- LUK: "nt",
13870
- JHN: "nt",
13871
- ACT: "nt",
13872
- ROM: "nt",
13873
- "1CO": "nt",
13874
- "2CO": "nt",
13875
- GAL: "nt",
13876
- EPH: "nt",
13877
- PHP: "nt",
13878
- COL: "nt",
13879
- "1TH": "nt",
13880
- "2TH": "nt",
13881
- "1TI": "nt",
13882
- "2TI": "nt",
13883
- TIT: "nt",
13884
- PHM: "nt",
13885
- HEB: "nt",
13886
- JAS: "nt",
13887
- "1PE": "nt",
13888
- "2PE": "nt",
13889
- "1JN": "nt",
13890
- "2JN": "nt",
13891
- "3JN": "nt",
13892
- JUD: "nt",
13893
- REV: "nt",
13894
- TOB: "dc",
13895
- JDT: "dc",
13896
- ESG: "dc",
13897
- WIS: "dc",
13898
- SIR: "dc",
13899
- BAR: "dc",
13900
- LJE: "dc",
13901
- S3Y: "dc",
13902
- SUS: "dc",
13903
- BEL: "dc",
13904
- "1MA": "dc",
13905
- "2MA": "dc",
13906
- "3MA": "dc",
13907
- "4MA": "dc",
13908
- "1ES": "dc",
13909
- "2ES": "dc",
13910
- MAN: "dc",
13911
- PS2: "dc",
13912
- ODA: "dc",
13913
- PSS: "dc",
13914
- "3ES": "dc",
13915
- EZA: "dc",
13916
- "5EZ": "dc",
13917
- "6EZ": "dc",
13918
- DAG: "dc",
13919
- PS3: "dc",
13920
- "2BA": "dc",
13921
- LBA: "dc",
13922
- JUB: "dc",
13923
- ENO: "dc",
13924
- "1MQ": "dc",
13925
- "2MQ": "dc",
13926
- "3MQ": "dc",
13927
- REP: "dc",
13928
- "4BA": "dc",
13929
- LAO: "dc",
13930
- LKA: "nt"
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
 
@@ -14316,7 +14267,7 @@ function Root3({
14316
14267
  children: [
14317
14268
  /* @__PURE__ */ jsx6(AccordionTrigger, { className: "yv:rounded-none", children: bookItem.title }),
14318
14269
  /* @__PURE__ */ jsx6(AccordionContent, { children: bookItem.chapters && bookItem.chapters.length > 0 ? /* @__PURE__ */ jsx6("div", { className: "yv:grid yv:grid-cols-5 yv:gap-2", children: bookItem.chapters.map((chapterRef) => {
14319
- const chapterId = chapterRef.split(".").pop() || "";
14270
+ const chapterId = chapterRef.passage_id.split(".").pop() || "";
14320
14271
  return /* @__PURE__ */ jsx6(PopoverClose, { asChild: true, children: /* @__PURE__ */ jsx6(
14321
14272
  Button,
14322
14273
  {
@@ -14330,7 +14281,7 @@ function Root3({
14330
14281
  },
14331
14282
  children: !chapterId.toLowerCase().includes("intro") ? chapterId : /* @__PURE__ */ jsx6(Info, {})
14332
14283
  }
14333
- ) }, `${bookItem.id}-${chapterRef}`);
14284
+ ) }, `${bookItem.id}-${chapterRef.passage_id}`);
14334
14285
  }) }) : /* @__PURE__ */ jsx6("div", { className: "yv:w-full yv:flex yv:items-center yv:justify-center yv:py-4 yv:text-muted-foreground yv:text-sm", children: "No chapters available" }) })
14335
14286
  ]
14336
14287
  },
@@ -14364,7 +14315,7 @@ function Trigger3({ asChild = true, children, ...props }) {
14364
14315
  const currentBook = books?.data?.find((bookItem) => bookItem.id === book);
14365
14316
  const buttonText = loading ? "Loading..." : `${currentBook?.title || "Select a chapter"}${chapter ? ` ${chapter}` : ""}`;
14366
14317
  const content = typeof children === "function" ? children({ book, chapter, currentBook, loading }) : children || /* @__PURE__ */ jsx6(Button, { variant: background === "light" ? "outline" : "default", children: buttonText });
14367
- return /* @__PURE__ */ jsx6(PopoverTrigger, { asChild, ...props, children: content });
14318
+ return /* @__PURE__ */ jsx6(PopoverTrigger, { "data-yv-sdk": true, asChild, ...props, children: content });
14368
14319
  }
14369
14320
  var BibleChapterPicker = Object.assign({}, { Root: Root3, Trigger: Trigger3 });
14370
14321
 
@@ -14618,7 +14569,7 @@ function Trigger4({ asChild = true, children, ...props }) {
14618
14569
  {
14619
14570
  variant: background === "light" ? "outline" : "default",
14620
14571
  className: "yv:cursor-pointer",
14621
- children: version2?.local_abbreviation || "Select"
14572
+ children: version2?.localized_abbreviation || "Select"
14622
14573
  }
14623
14574
  );
14624
14575
  return /* @__PURE__ */ jsx9(PopoverTrigger, { asChild, ...props, children: content });
@@ -14725,7 +14676,7 @@ function Content3() {
14725
14676
  {
14726
14677
  variant: "icon",
14727
14678
  className: "yv:rounded-[8px] yv:size-12 yv:border-border",
14728
- children: /* @__PURE__ */ jsx9("span", { className: "yv:font-serif yv:font-bold", children: version2.local_abbreviation })
14679
+ children: /* @__PURE__ */ jsx9("span", { className: "yv:font-serif yv:font-bold", children: version2.localized_abbreviation })
14729
14680
  }
14730
14681
  ),
14731
14682
  /* @__PURE__ */ jsx9(ItemContent, { children: /* @__PURE__ */ jsx9(ItemTitle, { className: "yv:line-clamp-2", children: version2.title }) })
@@ -15019,7 +14970,6 @@ function Root5({
15019
14970
  return /* @__PURE__ */ jsx11(BibleReaderContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx11(
15020
14971
  "div",
15021
14972
  {
15022
- "data-yv-sdk": true,
15023
14973
  "data-yv-theme": background === "dark" ? "dark" : "light",
15024
14974
  className: "yv:flex yv:flex-col yv:h-full yv:bg-background yv:text-foreground",
15025
14975
  children
@@ -15092,7 +15042,7 @@ function Toolbar({ border = "top" }) {
15092
15042
  onVersionChange: setVersionId,
15093
15043
  background,
15094
15044
  children: [
15095
- /* @__PURE__ */ jsx11(BibleVersionPicker.Trigger, { "aria-label": "Change Bible version", children: ({ version: version2, loading }) => /* @__PURE__ */ jsx11(Button, { variant: "secondary", className: "yv:rounded-l-none", disabled: loading, children: loading ? "Loading..." : version2?.local_abbreviation || "Select version" }) }),
15045
+ /* @__PURE__ */ jsx11(BibleVersionPicker.Trigger, { "aria-label": "Change Bible version", children: ({ version: version2, loading }) => /* @__PURE__ */ jsx11(Button, { variant: "secondary", className: "yv:rounded-l-none", disabled: loading, children: loading ? "Loading..." : version2?.localized_abbreviation || "Select version" }) }),
15096
15046
  /* @__PURE__ */ jsx11(BibleVersionPicker.Content, {})
15097
15047
  ]
15098
15048
  }
@@ -15212,7 +15162,7 @@ var YouVersionAuthButton = React9.forwardRef(
15212
15162
  onAuthError,
15213
15163
  onClick,
15214
15164
  mode,
15215
- permissions = [],
15165
+ scopes = [],
15216
15166
  radius = "rounded",
15217
15167
  redirectUrl,
15218
15168
  size = "default",
@@ -15231,7 +15181,7 @@ var YouVersionAuthButton = React9.forwardRef(
15231
15181
  } else {
15232
15182
  await signIn({
15233
15183
  redirectUrl,
15234
- permissions
15184
+ scopes
15235
15185
  });
15236
15186
  }
15237
15187
  } catch (error46) {
@@ -15271,7 +15221,6 @@ var YouVersionAuthButton = React9.forwardRef(
15271
15221
  variant === "outline" ? "yv:border" : "yv:border-none",
15272
15222
  className
15273
15223
  ),
15274
- "data-yv-sdk": true,
15275
15224
  disabled: buttonLoading ? true : disabled ?? false,
15276
15225
  ref,
15277
15226
  onClick: (e) => void handleClick(e),
@@ -15301,7 +15250,6 @@ var YouVersionAuthButton = React9.forwardRef(
15301
15250
  variant === "outline" ? "yv:border" : "yv:border-none",
15302
15251
  className
15303
15252
  ),
15304
- "data-yv-sdk": true,
15305
15253
  disabled: buttonLoading ? true : disabled ?? false,
15306
15254
  ref,
15307
15255
  onClick: (e) => void handleClick(e),
@@ -15532,10 +15480,10 @@ function VerseOfTheDay({
15532
15480
  referenceText = "Loading...";
15533
15481
  } else if (errorPassage || errorVerseOfTheDay) {
15534
15482
  referenceText = "Error loading verse";
15535
- } else if (passage?.human_reference && version2?.local_abbreviation) {
15536
- referenceText = `${passage?.human_reference} ${version2?.local_abbreviation}`;
15537
- } else if (passage?.human_reference) {
15538
- referenceText = passage?.human_reference;
15483
+ } else if (passage?.reference && version2?.localized_abbreviation) {
15484
+ referenceText = `${passage?.reference} ${version2?.localized_abbreviation}`;
15485
+ } else if (passage?.reference) {
15486
+ referenceText = passage?.reference;
15539
15487
  } else {
15540
15488
  referenceText = "No verse found";
15541
15489
  }
@@ -15626,14 +15574,13 @@ function BibleWidgetView({
15626
15574
  return /* @__PURE__ */ jsxs12(
15627
15575
  "section",
15628
15576
  {
15629
- "data-yv-sdk": true,
15630
15577
  "data-yv-theme": background === "dark" ? "dark" : "light",
15631
15578
  className: "yv:flex yv:flex-col yv:bg-card yv:p-6 yv:max-w-md yv:rounded-2xl",
15632
15579
  children: [
15633
- passage?.human_reference ? /* @__PURE__ */ jsxs12("h2", { className: "yv:font-bold yv:tracking-widest yv:text-xs yv:uppercase", children: [
15634
- passage.human_reference,
15580
+ passage?.reference ? /* @__PURE__ */ jsxs12("h2", { className: "yv:font-bold yv:tracking-widest yv:text-xs yv:uppercase", children: [
15581
+ passage.reference,
15635
15582
  " ",
15636
- version2?.local_abbreviation
15583
+ version2?.localized_abbreviation
15637
15584
  ] }) : null,
15638
15585
  /* @__PURE__ */ jsx18(
15639
15586
  BibleTextView,
@@ -15675,7 +15622,6 @@ export {
15675
15622
  SessionStorageStrategy,
15676
15623
  SignInWithYouVersionPermission,
15677
15624
  SignInWithYouVersionResult,
15678
- URLBuilder,
15679
15625
  VerseOfTheDay,
15680
15626
  YouVersionAPI,
15681
15627
  YouVersionAPIUsers,
@@ -0,0 +1,20 @@
1
+ export declare const mockBooks: {
2
+ data: {
3
+ id: string;
4
+ title: string;
5
+ full_title: string;
6
+ abbreviation: string;
7
+ canon: string;
8
+ chapters: {
9
+ id: string;
10
+ passage_id: string;
11
+ title: string;
12
+ verses: {
13
+ id: string;
14
+ passage_id: string;
15
+ title: string;
16
+ }[];
17
+ }[];
18
+ }[];
19
+ };
20
+ //# sourceMappingURL=books.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"books.d.ts","sourceRoot":"","sources":["../../../src/test/mock-data/books.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;CAi/CrB,CAAC"}
@@ -0,0 +1,10 @@
1
+ export declare const mockChapters: {
2
+ data: {
3
+ id: string;
4
+ book_id: string;
5
+ passage_id: string;
6
+ title: string;
7
+ verses: string[];
8
+ }[];
9
+ };
10
+ //# sourceMappingURL=chapters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chapters.d.ts","sourceRoot":"","sources":["../../../src/test/mock-data/chapters.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY;;;;;;;;CAu5DxB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@youversion/platform-react-ui",
3
- "version": "0.8.1",
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-react-hooks": "0.8.1",
43
- "@youversion/platform-core": "0.8.1"
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",