@youversion/platform-react-native 0.7.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.
Files changed (48) hide show
  1. package/.releaserc.json +1 -0
  2. package/AGENTS.md +86 -0
  3. package/CHANGELOG.md +22 -0
  4. package/android/build.gradle +25 -2
  5. package/android/src/main/java/com/youversion/reactnativesdk/RNBibleReaderViewModule.kt +13 -0
  6. package/android/src/main/java/com/youversion/reactnativesdk/RNBibleTextViewModule.kt +15 -0
  7. package/android/src/main/java/com/youversion/reactnativesdk/RNBibleWidgetViewModule.kt +13 -0
  8. package/android/src/main/java/com/youversion/reactnativesdk/RNSignInWithYouVersionButtonModule.kt +15 -0
  9. package/android/src/main/java/com/youversion/reactnativesdk/RNVotdViewModule.kt +13 -0
  10. package/android/src/main/java/com/youversion/reactnativesdk/RNYouVersionPlatformModule.kt +99 -0
  11. package/android/src/main/java/com/youversion/reactnativesdk/api/YVPBibleApi.kt +32 -0
  12. package/android/src/main/java/com/youversion/reactnativesdk/api/YVPHighlightsApi.kt +44 -0
  13. package/android/src/main/java/com/youversion/reactnativesdk/api/YVPLanguagesApi.kt +11 -0
  14. package/android/src/main/java/com/youversion/reactnativesdk/api/YVPRecords.kt +185 -0
  15. package/android/src/main/java/com/youversion/reactnativesdk/api/YVPVotdApi.kt +12 -0
  16. package/android/src/main/java/com/youversion/reactnativesdk/views/YVPBibleReaderView.kt +55 -0
  17. package/android/src/main/java/com/youversion/reactnativesdk/views/YVPBibleTextView.kt +60 -0
  18. package/android/src/main/java/com/youversion/reactnativesdk/views/YVPBibleWidgetView.kt +60 -0
  19. package/android/src/main/java/com/youversion/reactnativesdk/views/YVPSignInWithYouVersionButton.kt +75 -0
  20. package/android/src/main/java/com/youversion/reactnativesdk/views/YVPVotdView.kt +49 -0
  21. package/build/api/bible.d.ts +4 -4
  22. package/build/api/bible.d.ts.map +1 -1
  23. package/build/api/bible.js +2 -2
  24. package/build/api/bible.js.map +1 -1
  25. package/build/api/index.d.ts +2 -2
  26. package/build/api/users.d.ts +1 -2
  27. package/build/api/users.d.ts.map +1 -1
  28. package/build/api/users.js +2 -3
  29. package/build/api/users.js.map +1 -1
  30. package/build/native.d.ts +3 -3
  31. package/build/native.d.ts.map +1 -1
  32. package/build/native.js.map +1 -1
  33. package/build/types.d.ts +33 -23
  34. package/build/types.d.ts.map +1 -1
  35. package/build/types.js.map +1 -1
  36. package/dist/{youversion-platform-react-native-0.7.2.tgz → youversion-platform-react-native-0.9.0.tgz} +0 -0
  37. package/expo-module.config.json +9 -2
  38. package/ios/APIs/YVPBibleAPI.swift +18 -14
  39. package/ios/APIs/YVPLanguagesAPI.swift +2 -2
  40. package/ios/Views/YVPBibleTextView.swift +5 -6
  41. package/ios/YVPAuthAPI.swift +9 -16
  42. package/ios/YouVersionReactNative.podspec +4 -4
  43. package/mocks/RNYouVersionPlatform.ts +7 -7
  44. package/package.json +2 -3
  45. package/src/api/bible.ts +4 -4
  46. package/src/api/users.ts +2 -3
  47. package/src/native.ts +3 -3
  48. package/src/types.ts +42 -29
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import { ColorValue } from \"react-native\";\n\nexport type SignInWithYouVersionResult = {\n accessToken?: string;\n permissions: SignInWithYouVersionPermission[];\n yvpUserId?: string;\n expiryDate?: string;\n refreshToken?: string;\n name?: string;\n profilePicture?: string;\n email?: string;\n};\n\nexport type SignInWithYouVersionPermission =\n | \"bibles\"\n | \"highlights\"\n | \"votd\"\n | \"demographics\"\n | \"bible_activity\";\n\nexport interface YouVersionUserInfo {\n firstName?: string;\n lastName?: string;\n userId?: string;\n avatarUrl?: string;\n}\n\nexport interface YouVersionVerseOfTheDay {\n passageId: string;\n day: number;\n}\n\nexport interface BibleTextOptions {\n /**\n * Controls the font family of the Bible text\n *\n * @defaultValue \"Times New Roman\"\n */\n fontFamily?: string | null | undefined;\n\n /**\n * Controls the font size of the Bible text\n *\n * @defaultValue 16\n */\n fontSize?: number | null | undefined;\n\n /**\n * Controls the line spacing of the Bible text\n *\n * @defaultValue `fontSize` / 2\n */\n lineSpacing?: number | null | undefined;\n\n /**\n * Controls the spacing between paragraphs in the Bible text\n *\n * @defaultValue `fontSize` / 2\n */\n paragraphSpacing?: number | null | undefined;\n\n /**\n * Controls the text color of the Bible text\n *\n * @defaultValue Theme dependent text color\n */\n textColor?: ColorValue | null | undefined;\n\n /**\n * Controls the color of the words of Christ (WOC) in the Bible text\n *\n * @defaultValue \"#FF3D4D\" in light mode, \"#F04C59\" in dark mode\n */\n wocColor?: ColorValue | null | undefined;\n\n /**\n * Controls how footnotes are displayed in the Bible text\n *\n * @defaultValue \"none\"\n */\n footnoteMode?: BibleTextFootnoteMode | null | undefined;\n\n /**\n * Controls whether verse numbers are rendered in the Bible text\n *\n * @defaultValue true\n */\n renderVerseNumbers?: boolean | null | undefined;\n}\n\nexport type BibleTextFootnoteMode = \"none\" | \"inline\" | \"marker\";\n\ninterface BibleReferenceBase {\n /** The ID of the Bible version */\n versionId: number;\n\n /** The book identifier */\n bookUSFM: string;\n\n /** The chapter number */\n chapter: number;\n}\n\n/**\n * A reference to a range of verses\n */\nexport interface BibleReferenceVerseRange extends BibleReferenceBase {\n type: \"range\";\n verseStart: number;\n verseEnd: number;\n verse?: never;\n}\n\n/**\n * A reference to an entire chapter in the Bible\n */\nexport interface BibleReferenceChapter extends BibleReferenceBase {\n type: \"chapter\";\n verse?: never;\n verseStart?: never;\n verseEnd?: never;\n}\n\n/**\n * A reference to a single verse in the Bible\n */\nexport interface BibleReferenceVerse extends BibleReferenceBase {\n type: \"verse\";\n verse: number;\n verseStart?: never;\n verseEnd?: never;\n}\n\nexport type BibleReference =\n | BibleReferenceVerseRange\n | BibleReferenceChapter\n | BibleReferenceVerse;\n\nexport interface OnBibleTextPressEvent {\n /** A reference to the Bible verse that was pressed */\n bibleReference: BibleReferenceVerse;\n\n /** The coordinates of the press event */\n point: {\n x: number;\n y: number;\n };\n}\n\nexport interface LanguageOverview {\n /**\n * Canonical BCP 47 id limited to language or language+script. Region, variants, and extensions are not allowed.\n *\n * @example \"en\"\n */\n id: string;\n\n /**\n * ISO 639 canonical language subtag\n *\n * @example \"sr\"\n */\n language: string;\n\n /**\n * ISO 15924 script code if present in id\n *\n * @example \"Latn\"\n */\n script?: string;\n\n /**\n * The English name for the script\n *\n * @example \"Latin\"\n */\n scriptName?: string;\n\n /**\n * Deprecated or legacy subtags mapped during canonicalization for this language.\n *\n * @example []\n */\n aliases: string[];\n\n /**\n * Localized display names for the language/script combination\n * @example { \"en\": \"Chechen\" }\n */\n displayNames: Record<string, string>;\n\n /**\n * All scripts known for this language (CLDR/ISO-15924)\n *\n * @example [\"Cyrl\", \"Latn\"]\n */\n scripts: string[];\n\n /**\n * Variants associated with this language (not part of the id)\n *\n * @example [\"1996\",\"fonipa\"]\n */\n variants: string[];\n\n /**\n * Ids of countries where this language is used or supported. Extended details can be retrieved from the countries API with the provided id.\n *\n * @example [\"RS\",\"BA\",\"ME\"]\n */\n countries: string[];\n\n /**\n * Default text direction for this language. ltr is left to right and rtl is right to left.\n *\n * @example \"ltr\"\n */\n textDirection: string;\n\n /**\n * The chosen default Bible version for this language.\n *\n * @example 111\n */\n defaultBibleVersionId?: number;\n}\n\nexport interface HighlightResponse {\n id?: string;\n\n /**\n * Bible version identifier\n *\n * @example 111\n */\n bibleId: number;\n\n /**\n * The passage identifier (verse USFM format)\n *\n * @example \"MAT.1.1\"\n */\n passageId: string;\n\n /**\n * The highlight color in hex format\n *\n * @example \"#44aa44\"\n */\n color: string;\n userId?: string;\n createTime?: string;\n updateTime?: string;\n}\n\nexport interface BibleVersion {\n /**\n * Bible version identifier\n *\n * @example 111\n */\n id: number;\n\n /**\n * Bible version abbreviation\n *\n * @example \"NIV\"\n */\n abbreviation?: string;\n\n /**\n * Longer form of copyright text provided by the publisher for the given Bible version.\n *\n * @example \"<p>Biblica is the worldwide publisher and translation sponsor of the New International Version—one of the most widely read contemporary English versions of the Bible. </p> <p>At Biblica, we believe that with God, all things are possible. Partnering with other ministries and people like you, we are reaching the world with God’s Word, providing Bibles that are easier to understand and faster to receive. When God’s Word is put into someone’s hands, it has the power to change everything. </p> <p>To learn more, visit <a href=\"https://www.biblica.com/privacy-policy/\">biblica.com</a> and <a href=\"http://facebook.com/Biblica\">facebook.com/Biblica</a>.</p> <p> </p>\"\n */\n copyrightLong?: string;\n\n /**\n * Short version of the copyright text provided by the publisher for the given Bible version.\n *\n * @example \"The Holy Bible, New International Version® NIV® Copyright © 1973, 1978, 1984, 2011 by Biblica, Inc.® Used by Permission of Biblica, Inc.® All rights reserved worldwide.\"\n */\n copyrightShort?: string;\n\n /**\n * BCP47 canonical language tag for this Bible version\n *\n * @example \"en\"\n */\n languageTag?: string;\n\n /**\n * Localized Bible version abbreviation\n *\n * @example \"NIV\"\n */\n localizedAbbreviation?: string;\n\n /**\n * Localized title of Bible version\n *\n * @example \"New International Version\"\n */\n localizedTitle?: string;\n\n readerFooter?: string;\n readerFooterUrl?: string;\n\n /**\n * English title of Bible version\n *\n * @example \"New International Version 2011\"\n */\n title?: string;\n\n /**\n * Array of book codes for this Bible version\n *\n * @example [\"GEN\",\"EXO\",\"LEV\"]\n */\n bookCodes?: string[];\n\n /** Array of Bible books for this Bible version */\n books?: BibleBook[];\n\n /**\n * Default text direction for this language. ltr is left to right and rtl is right to left.\n *\n * @example \"ltr\"\n */\n textDirection?: string;\n}\n\nexport interface BibleBook {\n /**\n * Standard book identifier for the Unified Scripture Format Markup (USFM) used in Scripture text processing\n *\n * @example \"GEN\"\n */\n usfm?: string;\n\n /**\n * Book name abbreviation if provided by the publisher\n *\n * @example \"Gen\"\n */\n abbreviation?: string;\n\n /**\n * Book title\n *\n * @example \"Genesis\"\n */\n title?: string;\n titleLong?: string;\n chapters?: BibleChapter[];\n}\n\nexport interface BibleChapter {\n /**\n * Book identifier\n *\n * @example \"GEN\"\n */\n bookUSFM?: string;\n\n isCanonical?: boolean;\n\n /**\n * Canonical representation of the passage\n *\n * @example \"GEN.1\"\n */\n passageId?: string;\n\n /**\n * Human readable chapter title\n *\n * @example \"1\"\n */\n title?: string;\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import { ColorValue } from \"react-native\";\n\nexport type SignInWithYouVersionResult = {\n accessToken?: string;\n permissions: SignInWithYouVersionPermission[];\n yvpUserId?: string;\n expiryDate?: string;\n refreshToken?: string;\n name?: string;\n profilePicture?: string;\n email?: string;\n idToken?: string;\n};\n\nexport type SignInWithYouVersionPermission = \"openid\" | \"email\" | \"profile\";\n\nexport interface YouVersionUserInfo {\n name?: string;\n email?: string;\n id?: string;\n profilePicture?: string;\n}\n\nexport interface YouVersionVerseOfTheDay {\n passageId: string;\n day: number;\n}\n\nexport interface BibleTextOptions {\n /**\n * Controls the font family of the Bible text\n *\n * @defaultValue \"Times New Roman\"\n */\n fontFamily?: string | null | undefined;\n\n /**\n * Controls the font size of the Bible text\n *\n * @defaultValue 16\n */\n fontSize?: number | null | undefined;\n\n /**\n * Controls the line spacing of the Bible text\n *\n * @defaultValue `fontSize` / 2\n */\n lineSpacing?: number | null | undefined;\n\n /**\n * Controls the spacing between paragraphs in the Bible text\n *\n * @defaultValue `fontSize` / 2\n */\n paragraphSpacing?: number | null | undefined;\n\n /**\n * Controls the text color of the Bible text\n *\n * @defaultValue Theme dependent text color\n */\n textColor?: ColorValue | null | undefined;\n\n /**\n * Controls the color of the words of Christ (WOC) in the Bible text\n *\n * @defaultValue \"#FF3D4D\" in light mode, \"#F04C59\" in dark mode\n */\n wocColor?: ColorValue | null | undefined;\n\n /**\n * Controls how footnotes are displayed in the Bible text\n *\n * @defaultValue \"none\"\n */\n footnoteMode?: BibleTextFootnoteMode | null | undefined;\n\n /**\n * Controls whether verse numbers are rendered in the Bible text\n *\n * @defaultValue true\n */\n renderVerseNumbers?: boolean | null | undefined;\n}\n\nexport type BibleTextFootnoteMode =\n | \"none\"\n | \"inline\"\n | \"marker\"\n | \"letters\"\n | \"image\";\n\nexport interface BibleReferenceBase {\n /** The ID of the Bible version */\n versionId: number;\n\n /** The book identifier */\n bookUSFM: string;\n\n /** The chapter number */\n chapter: number;\n}\n\n/**\n * A reference to a range of verses\n */\nexport interface BibleReferenceVerseRange extends BibleReferenceBase {\n type: \"range\";\n verseStart: number;\n verseEnd: number;\n verse?: never;\n}\n\n/**\n * A reference to an entire chapter in the Bible\n */\nexport interface BibleReferenceChapter extends BibleReferenceBase {\n type: \"chapter\";\n verse?: never;\n verseStart?: never;\n verseEnd?: never;\n}\n\n/**\n * A reference to a single verse in the Bible\n */\nexport interface BibleReferenceVerse extends BibleReferenceBase {\n type: \"verse\";\n verse: number;\n verseStart?: never;\n verseEnd?: never;\n}\n\nexport type BibleReference =\n | BibleReferenceVerseRange\n | BibleReferenceChapter\n | BibleReferenceVerse;\n\nexport interface OnBibleTextPressEvent {\n /** A reference to the Bible verse that was pressed */\n bibleReference: BibleReferenceVerse;\n urlScheme: string;\n /** Not implemented yet */\n footnotes: unknown[];\n}\n\nexport interface LanguageOverview {\n /**\n * Canonical BCP 47 id limited to language or language+script. Region, variants, and extensions are not allowed.\n *\n * @example \"en\"\n */\n id: string;\n\n /**\n * ISO 639 canonical language subtag\n *\n * @example \"sr\"\n */\n language: string;\n\n /**\n * ISO 15924 script code if present in id\n *\n * @example \"Latn\"\n */\n script?: string;\n\n /**\n * The English name for the script\n *\n * @example \"Latin\"\n */\n scriptName?: string;\n\n /**\n * Deprecated or legacy subtags mapped during canonicalization for this language.\n *\n * @example []\n */\n aliases: string[];\n\n /**\n * Localized display names for the language/script combination\n * @example { \"en\": \"Chechen\" }\n */\n displayNames: Record<string, string>;\n\n /**\n * All scripts known for this language (CLDR/ISO-15924)\n *\n * @example [\"Cyrl\", \"Latn\"]\n */\n scripts: string[];\n\n /**\n * Variants associated with this language (not part of the id)\n *\n * @example [\"1996\",\"fonipa\"]\n */\n variants: string[];\n\n /**\n * Ids of countries where this language is used or supported. Extended details can be retrieved from the countries API with the provided id.\n *\n * @example [\"RS\",\"BA\",\"ME\"]\n */\n countries: string[];\n\n /**\n * Default text direction for this language. ltr is left to right and rtl is right to left.\n *\n * @example \"ltr\"\n */\n textDirection: string;\n\n /**\n * The chosen default Bible version for this language.\n *\n * @example 111\n */\n defaultBibleId?: number;\n}\n\nexport interface HighlightResponse {\n id?: string;\n\n /**\n * Bible version identifier\n *\n * @example 111\n */\n bibleId: number;\n\n /**\n * The passage identifier (verse USFM format)\n *\n * @example \"MAT.1.1\"\n */\n passageId: string;\n\n /**\n * The highlight color in hex format\n *\n * @example \"#44aa44\"\n */\n color: string;\n userId?: string;\n createTime?: string;\n updateTime?: string;\n}\n\nexport interface BibleVersion {\n /**\n * Bible version identifier\n *\n * @example 111\n */\n id: number;\n\n /**\n * Bible version abbreviation\n *\n * @example \"NIV\"\n */\n abbreviation?: string;\n\n /**\n * Longer form of copyright text provided by the publisher for the given Bible version.\n *\n * @example \"<p>Biblica is the worldwide publisher and translation sponsor of the New International Version—one of the most widely read contemporary English versions of the Bible. </p> <p>At Biblica, we believe that with God, all things are possible. Partnering with other ministries and people like you, we are reaching the world with God’s Word, providing Bibles that are easier to understand and faster to receive. When God’s Word is put into someone’s hands, it has the power to change everything. </p> <p>To learn more, visit <a href=\"https://www.biblica.com/privacy-policy/\">biblica.com</a> and <a href=\"http://facebook.com/Biblica\">facebook.com/Biblica</a>.</p> <p> </p>\"\n */\n promotionalContent?: string;\n\n /**\n * Short version of the copyright text provided by the publisher for the given Bible version.\n *\n * @example \"The Holy Bible, New International Version® NIV® Copyright © 1973, 1978, 1984, 2011 by Biblica, Inc.® Used by Permission of Biblica, Inc.® All rights reserved worldwide.\"\n */\n copyright?: string;\n\n /**\n * BCP47 canonical language tag for this Bible version\n *\n * @example \"en\"\n */\n languageTag?: string;\n\n /**\n * Localized Bible version abbreviation\n *\n * @example \"NIV\"\n */\n localizedAbbreviation?: string;\n\n /**\n * Localized title of Bible version\n *\n * @example \"New International Version\"\n */\n localizedTitle?: string;\n\n readerFooter?: string;\n readerFooterUrl?: string;\n\n /**\n * English title of Bible version\n *\n * @example \"New International Version 2011\"\n */\n title?: string;\n\n /**\n * Array of book codes for this Bible version\n *\n * @example [\"GEN\",\"EXO\",\"LEV\"]\n */\n bookCodes?: string[];\n\n /** Array of Bible books for this Bible version */\n books?: BibleBook[];\n\n /**\n * Default text direction for this language. ltr is left to right and rtl is right to left.\n *\n * @example \"ltr\"\n */\n textDirection?: string;\n\n /** uuid */\n organizationId?: string;\n}\n\nexport interface BibleBook {\n /**\n * Book identifier\n *\n * @example \"GEN\"\n */\n id?: string;\n\n /**\n * Book name abbreviation if provided by the publisher\n *\n * @example \"Gen\"\n */\n abbreviation?: string;\n\n /**\n * Book title\n *\n * @example \"Genesis\"\n */\n title?: string;\n\n /**\n * Full book title if available\n *\n * @example \"The Book of Genesis\"\n */\n fullTitle?: string;\n\n /**\n * Indicates if this is Old Testament, New Testament, or Deuterocanonical\n *\n * @example \"new_testament\"\n */\n canon?: \"new_testament\" | \"old_testament\" | \"deuterocanon\";\n\n chapters?: BibleChapter[];\n}\n\nexport interface BibleChapter {\n /**\n * Chapter identifier based off the USFM reference\n *\n * @example 1\n */\n id?: string;\n\n /**\n * Canonical representation of the passage\n *\n * @example \"GEN.1\"\n */\n passageId?: string;\n\n /**\n * Human readable chapter title\n *\n * @example \"1\"\n */\n title?: string;\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "platforms": ["apple", "android"],
3
- "features": ["swiftui"],
3
+ "coreFeatures": ["swiftui", "compose"],
4
4
  "apple": {
5
5
  "modules": [
6
6
  "RNYouVersionPlatformModule",
@@ -12,6 +12,13 @@
12
12
  ]
13
13
  },
14
14
  "android": {
15
- "modules": ["com.youversion.reactnativesdk.RNYouVersionPlatformModule"]
15
+ "modules": [
16
+ "com.youversion.reactnativesdk.RNYouVersionPlatformModule",
17
+ "com.youversion.reactnativesdk.RNSignInWithYouVersionButtonModule",
18
+ "com.youversion.reactnativesdk.RNBibleTextViewModule",
19
+ "com.youversion.reactnativesdk.RNVotdViewModule",
20
+ "com.youversion.reactnativesdk.RNBibleReaderViewModule",
21
+ "com.youversion.reactnativesdk.RNBibleWidgetViewModule"
22
+ ]
16
23
  }
17
24
  }
@@ -68,10 +68,10 @@ internal struct BibleVersionRecord: Record {
68
68
  var abbreviation: String?
69
69
 
70
70
  @Field
71
- var copyrightLong: String?
71
+ var promotionalContent: String?
72
72
 
73
73
  @Field
74
- var copyrightShort: String?
74
+ var copyright: String?
75
75
 
76
76
  @Field
77
77
  var languageTag: String?
@@ -94,6 +94,9 @@ internal struct BibleVersionRecord: Record {
94
94
  @Field
95
95
  var bookCodes: [String]?
96
96
 
97
+ @Field
98
+ var organizationId: String?
99
+
97
100
  @Field
98
101
  var books: [BibleBookRecord]?
99
102
 
@@ -105,14 +108,15 @@ internal struct BibleVersionRecord: Record {
105
108
  init(bibleVersion: BibleVersion) {
106
109
  self.id = bibleVersion.id
107
110
  self.abbreviation = bibleVersion.abbreviation
108
- self.copyrightLong = bibleVersion.copyrightLong
109
- self.copyrightShort = bibleVersion.copyrightShort
111
+ self.promotionalContent = bibleVersion.promotionalContent
112
+ self.copyright = bibleVersion.copyright
110
113
  self.languageTag = bibleVersion.languageTag
111
114
  self.localizedAbbreviation = bibleVersion.localizedAbbreviation
112
115
  self.localizedTitle = bibleVersion.localizedTitle
113
116
  self.readerFooter = bibleVersion.readerFooter
114
117
  self.readerFooterUrl = bibleVersion.readerFooterUrl
115
118
  self.title = bibleVersion.title
119
+ self.organizationId = bibleVersion.organizationId
116
120
  self.bookCodes = bibleVersion.bookCodes
117
121
 
118
122
  if let bibleVersionBooks = bibleVersion.books {
@@ -125,7 +129,7 @@ internal struct BibleVersionRecord: Record {
125
129
 
126
130
  internal struct BibleBookRecord: Record {
127
131
  @Field
128
- var usfm: String?
132
+ var id: String?
129
133
 
130
134
  @Field
131
135
  var abbreviation: String?
@@ -134,18 +138,22 @@ internal struct BibleBookRecord: Record {
134
138
  var title: String?
135
139
 
136
140
  @Field
137
- var titleLong: String?
141
+ var fullTitle: String?
138
142
 
139
143
  @Field
140
144
  var chapters: [BibleChapterRecord]?
141
145
 
146
+ @Field
147
+ var canon: String?
148
+
142
149
  init() { }
143
150
 
144
151
  init(bibleBook: BibleBook) {
145
- self.usfm = bibleBook.usfm
152
+ self.id = bibleBook.id
146
153
  self.abbreviation = bibleBook.abbreviation
147
154
  self.title = bibleBook.title
148
- self.titleLong = bibleBook.titleLong
155
+ self.fullTitle = bibleBook.fullTitle
156
+ self.canon = bibleBook.canon
149
157
 
150
158
  if let bibleBookChapters = bibleBook.chapters {
151
159
  self.chapters = bibleBookChapters.map(BibleChapterRecord.init)
@@ -155,10 +163,7 @@ internal struct BibleBookRecord: Record {
155
163
 
156
164
  internal struct BibleChapterRecord: Record {
157
165
  @Field
158
- var bookUSFM: String?
159
-
160
- @Field
161
- var isCanonical: Bool?
166
+ var id: String?
162
167
 
163
168
  @Field
164
169
  var passageId: String?
@@ -169,8 +174,7 @@ internal struct BibleChapterRecord: Record {
169
174
  init() { }
170
175
 
171
176
  init(bibleChapter: BibleChapter) {
172
- self.bookUSFM = bibleChapter.bookUSFM
173
- self.isCanonical = bibleChapter.isCanonical
177
+ self.id = bibleChapter.id
174
178
  self.passageId = bibleChapter.passageId
175
179
  self.title = bibleChapter.title
176
180
  }
@@ -52,7 +52,7 @@ internal struct LanguageRecord: Record {
52
52
  var textDirection: String
53
53
 
54
54
  @Field
55
- var defaultBibleVersionId: Int?
55
+ var defaultBibleId: Int?
56
56
 
57
57
  init(_ response: LanguageOverview) {
58
58
  self.id = response.id
@@ -65,6 +65,6 @@ internal struct LanguageRecord: Record {
65
65
  self.variants = response.variants
66
66
  self.countries = response.countries
67
67
  self.textDirection = response.textDirection
68
- self.defaultBibleVersionId = response.defaultBibleVersionId
68
+ self.defaultBibleId = response.defaultBibleId
69
69
  }
70
70
  }
@@ -38,10 +38,10 @@ struct YVPBibleTextView: ExpoSwiftUI.View, ExpoSwiftUI.WithHostingView {
38
38
  BibleTextView(
39
39
  bibleReference(),
40
40
  textOptions: textOptions(),
41
- onVerseTap: { bibleRef, point in
41
+ onVerseTap: { bibleRef, urlScheme, footnotes in
42
42
  props.onTap([
43
43
  "bibleReference": toJsBibleReference(bibleRef),
44
- "point": toJsPoint(point)
44
+ "urlScheme": urlScheme
45
45
  ])
46
46
  }
47
47
  )
@@ -57,10 +57,7 @@ struct YVPBibleTextView: ExpoSwiftUI.View, ExpoSwiftUI.WithHostingView {
57
57
  "type": "verse"
58
58
  ]
59
59
  }
60
-
61
- func toJsPoint(_ point: CGPoint) -> [String: CGFloat] {
62
- ["x": point.x, "y": point.y]
63
- }
60
+
64
61
 
65
62
  func bibleReference() -> BibleReference {
66
63
  if let start = props.verseStart, let end = props.verseEnd {
@@ -108,6 +105,8 @@ struct YVPBibleTextView: ExpoSwiftUI.View, ExpoSwiftUI.WithHostingView {
108
105
  case "none": .none
109
106
  case "inline": .inline
110
107
  case "marker": .marker
108
+ case "letters": .letters
109
+ case "image": .image
111
110
  default: .none
112
111
  }
113
112
  }
@@ -23,7 +23,8 @@ struct YVPAuthAPI {
23
23
  "refreshToken": response.refreshToken,
24
24
  "name": response.name,
25
25
  "profilePicture": response.profilePicture,
26
- "email": response.email
26
+ "email": response.email,
27
+ "idToken": response.idToken,
27
28
  ])
28
29
  } catch {
29
30
  promise.reject(error)
@@ -37,21 +38,13 @@ struct YVPAuthAPI {
37
38
  }
38
39
  }
39
40
 
40
- static func userInfo(accessToken: String?, promise: Promise) {
41
- Task {
42
- do {
43
- let response = try await YouVersionAPI.Users.userInfo(accessToken: accessToken)
44
-
45
- promise.resolve([
46
- "firstName": response.firstName,
47
- "lastName": response.lastName,
48
- "userId": response.userId,
49
- "avatarUrl": response.avatarUrl?.absoluteString
50
- ])
51
- } catch {
52
- promise.reject(error)
53
- }
54
- }
41
+ static func userInfo(promise: Promise) {
42
+ promise.resolve([
43
+ "name": YouVersionAPI.Users.currentUserName,
44
+ "email": YouVersionAPI.Users.currentUserEmail,
45
+ "id": YouVersionAPI.Users.currentUserId,
46
+ "profilePicture": YouVersionAPI.Users.currentUserProfilePicture
47
+ ])
55
48
  }
56
49
  }
57
50
 
@@ -19,10 +19,10 @@ Pod::Spec.new do |s|
19
19
  s.static_framework = true
20
20
 
21
21
  s.dependency 'ExpoModulesCore'
22
- s.dependency 'YouVersionPlatform', '0.1.0'
23
- s.dependency 'YouVersionPlatformCore', '0.1.0'
24
- s.dependency 'YouVersionPlatformUI', '0.1.0'
25
- s.dependency 'YouVersionPlatformReader', '0.1.0'
22
+ s.dependency 'YouVersionPlatform', '1.0.1'
23
+ s.dependency 'YouVersionPlatformCore', '1.0.1'
24
+ s.dependency 'YouVersionPlatformUI', '1.0.1'
25
+ s.dependency 'YouVersionPlatformReader', '1.0.1'
26
26
 
27
27
  # Swift/Objective-C compatibility
28
28
  s.pod_target_xcconfig = {
@@ -30,12 +30,12 @@ export function signOut(): Promise<void> {
30
30
  return Promise.resolve();
31
31
  }
32
32
 
33
- export function userInfo(_accessToken?: string): Promise<YouVersionUserInfo> {
33
+ export function userInfo(): Promise<YouVersionUserInfo> {
34
34
  return Promise.resolve({
35
- avatarUrl: "https://example.com/avatar.png",
36
- firstName: "Mock",
37
- lastName: "User",
38
- yvpUserId: "mock-yvp-user-id",
35
+ profilePicture: "https://example.com/avatar.png",
36
+ name: "Mock User",
37
+ email: "mockuser@example.com",
38
+ id: "mock-yvp-user-id",
39
39
  });
40
40
  }
41
41
 
@@ -55,8 +55,8 @@ export function versions(_languageTag?: string): Promise<BibleVersion[]> {
55
55
  abbreviation: "KJV",
56
56
  languageTag: "en",
57
57
  bookCodes: ["GEN", "EXO", "LEV"],
58
- copyrightLong: "King James Version Copyright",
59
- copyrightShort: "KJV Copyright",
58
+ copyright: "King James Version Copyright",
59
+ promotionalContent: "<div>promotional content</div>",
60
60
  localizedAbbreviation: "KJV",
61
61
  localizedTitle: "King James Version",
62
62
  textDirection: "ltr",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@youversion/platform-react-native",
3
- "version": "0.7.2",
3
+ "version": "0.9.0",
4
4
  "description": "React Native SDK for YouVersion Platform",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -35,7 +35,6 @@
35
35
  "jest": {
36
36
  "preset": "expo-module-scripts"
37
37
  },
38
- "dependencies": {},
39
38
  "devDependencies": {
40
39
  "@commitlint/cli": "^19.6.0",
41
40
  "@commitlint/config-conventional": "^19.6.0",
@@ -48,7 +47,7 @@
48
47
  "expo-module-scripts": "^5.0.7",
49
48
  "husky": "^9.1.7",
50
49
  "react-native": "0.81.4",
51
- "semantic-release": "^24.2.0"
50
+ "semantic-release": "^25.0.2"
52
51
  },
53
52
  "peerDependencies": {
54
53
  "expo": ">=54.0.0",
package/src/api/bible.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { Module } from "../native";
2
- import { BibleReference, BibleVersion } from "../types";
2
+ import { BibleReferenceBase, BibleVersion } from "../types";
3
3
 
4
4
  export const BibleAPI = {
5
5
  /**
6
- * Retrieves a list of Bible versions available for a specified language code (like "en").
6
+ * Retrieves a list of Bible versions available for a specified language tag (like "eng").
7
7
  *
8
8
  * @param languageTag - An optional language code per BCP 47 for filtering available Bible versions. If `nil`
9
9
  * the function returns versions for all languages.
@@ -26,10 +26,10 @@ export const BibleAPI = {
26
26
  /**
27
27
  * Retrieves the content of a single Bible chapter from the server as an HTML string.
28
28
  *
29
- * @param bibleReference - A {@link BibleReference} object specifying the reference to retrieve.
29
+ * @param bibleReference - A {@link BibleReferenceBase} object specifying the reference to retrieve.
30
30
  * @returns The chapter content as an HTML string.
31
31
  */
32
- getChapter(bibleReference: BibleReference): Promise<string> {
32
+ getChapter(bibleReference: BibleReferenceBase): Promise<string> {
33
33
  return Module.chapter(bibleReference);
34
34
  },
35
35
  };
package/src/api/users.ts CHANGED
@@ -26,10 +26,9 @@ export const UsersAPI = {
26
26
  /**
27
27
  * Retrieves user information for the authenticated user using the provided access token.
28
28
  *
29
- * @param accessToken - Optionally provide an accessToken, or use the one stored in the SDK after the user signs in
30
29
  * @returns A promise that resolves to the user information as a {@link YouVersionUserInfo} object.
31
30
  */
32
- userInfo(accessToken?: string): Promise<YouVersionUserInfo> {
33
- return Module.userInfo(accessToken);
31
+ userInfo(): Promise<YouVersionUserInfo> {
32
+ return Module.userInfo();
34
33
  },
35
34
  };
package/src/native.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { NativeModule, requireNativeModule } from "expo";
2
2
 
3
3
  import {
4
- BibleReference,
4
+ BibleReferenceBase,
5
5
  BibleVersion,
6
6
  HighlightResponse,
7
7
  LanguageOverview,
@@ -19,7 +19,7 @@ declare class RNYouVersionPlatformModule extends NativeModule {
19
19
 
20
20
  signOut(): Promise<void>;
21
21
 
22
- userInfo(accessToken?: string): Promise<YouVersionUserInfo>;
22
+ userInfo(): Promise<YouVersionUserInfo>;
23
23
 
24
24
  verseOfTheDay(dayOfYear: number): Promise<YouVersionVerseOfTheDay>;
25
25
 
@@ -48,7 +48,7 @@ declare class RNYouVersionPlatformModule extends NativeModule {
48
48
 
49
49
  version(versionId: number): Promise<BibleVersion>;
50
50
 
51
- chapter(bibleReference: BibleReference): Promise<string>;
51
+ chapter(bibleReference: BibleReferenceBase): Promise<string>;
52
52
 
53
53
  getAccessToken(): string | null;
54
54
  }
package/src/types.ts CHANGED
@@ -9,20 +9,16 @@ export type SignInWithYouVersionResult = {
9
9
  name?: string;
10
10
  profilePicture?: string;
11
11
  email?: string;
12
+ idToken?: string;
12
13
  };
13
14
 
14
- export type SignInWithYouVersionPermission =
15
- | "bibles"
16
- | "highlights"
17
- | "votd"
18
- | "demographics"
19
- | "bible_activity";
15
+ export type SignInWithYouVersionPermission = "openid" | "email" | "profile";
20
16
 
21
17
  export interface YouVersionUserInfo {
22
- firstName?: string;
23
- lastName?: string;
24
- userId?: string;
25
- avatarUrl?: string;
18
+ name?: string;
19
+ email?: string;
20
+ id?: string;
21
+ profilePicture?: string;
26
22
  }
27
23
 
28
24
  export interface YouVersionVerseOfTheDay {
@@ -88,9 +84,14 @@ export interface BibleTextOptions {
88
84
  renderVerseNumbers?: boolean | null | undefined;
89
85
  }
90
86
 
91
- export type BibleTextFootnoteMode = "none" | "inline" | "marker";
87
+ export type BibleTextFootnoteMode =
88
+ | "none"
89
+ | "inline"
90
+ | "marker"
91
+ | "letters"
92
+ | "image";
92
93
 
93
- interface BibleReferenceBase {
94
+ export interface BibleReferenceBase {
94
95
  /** The ID of the Bible version */
95
96
  versionId: number;
96
97
 
@@ -139,12 +140,9 @@ export type BibleReference =
139
140
  export interface OnBibleTextPressEvent {
140
141
  /** A reference to the Bible verse that was pressed */
141
142
  bibleReference: BibleReferenceVerse;
142
-
143
- /** The coordinates of the press event */
144
- point: {
145
- x: number;
146
- y: number;
147
- };
143
+ urlScheme: string;
144
+ /** Not implemented yet */
145
+ footnotes: unknown[];
148
146
  }
149
147
 
150
148
  export interface LanguageOverview {
@@ -222,7 +220,7 @@ export interface LanguageOverview {
222
220
  *
223
221
  * @example 111
224
222
  */
225
- defaultBibleVersionId?: number;
223
+ defaultBibleId?: number;
226
224
  }
227
225
 
228
226
  export interface HighlightResponse {
@@ -273,14 +271,14 @@ export interface BibleVersion {
273
271
  *
274
272
  * @example "<p>Biblica is the worldwide publisher and translation sponsor of the New International Version—one of the most widely read contemporary English versions of the Bible. </p> <p>At Biblica, we believe that with God, all things are possible. Partnering with other ministries and people like you, we are reaching the world with God’s Word, providing Bibles that are easier to understand and faster to receive. When God’s Word is put into someone’s hands, it has the power to change everything. </p> <p>To learn more, visit <a href="https://www.biblica.com/privacy-policy/">biblica.com</a> and <a href="http://facebook.com/Biblica">facebook.com/Biblica</a>.</p> <p> </p>"
275
273
  */
276
- copyrightLong?: string;
274
+ promotionalContent?: string;
277
275
 
278
276
  /**
279
277
  * Short version of the copyright text provided by the publisher for the given Bible version.
280
278
  *
281
279
  * @example "The Holy Bible, New International Version® NIV® Copyright © 1973, 1978, 1984, 2011 by Biblica, Inc.® Used by Permission of Biblica, Inc.® All rights reserved worldwide."
282
280
  */
283
- copyrightShort?: string;
281
+ copyright?: string;
284
282
 
285
283
  /**
286
284
  * BCP47 canonical language tag for this Bible version
@@ -329,15 +327,18 @@ export interface BibleVersion {
329
327
  * @example "ltr"
330
328
  */
331
329
  textDirection?: string;
330
+
331
+ /** uuid */
332
+ organizationId?: string;
332
333
  }
333
334
 
334
335
  export interface BibleBook {
335
336
  /**
336
- * Standard book identifier for the Unified Scripture Format Markup (USFM) used in Scripture text processing
337
+ * Book identifier
337
338
  *
338
339
  * @example "GEN"
339
340
  */
340
- usfm?: string;
341
+ id?: string;
341
342
 
342
343
  /**
343
344
  * Book name abbreviation if provided by the publisher
@@ -352,19 +353,31 @@ export interface BibleBook {
352
353
  * @example "Genesis"
353
354
  */
354
355
  title?: string;
355
- titleLong?: string;
356
+
357
+ /**
358
+ * Full book title if available
359
+ *
360
+ * @example "The Book of Genesis"
361
+ */
362
+ fullTitle?: string;
363
+
364
+ /**
365
+ * Indicates if this is Old Testament, New Testament, or Deuterocanonical
366
+ *
367
+ * @example "new_testament"
368
+ */
369
+ canon?: "new_testament" | "old_testament" | "deuterocanon";
370
+
356
371
  chapters?: BibleChapter[];
357
372
  }
358
373
 
359
374
  export interface BibleChapter {
360
375
  /**
361
- * Book identifier
376
+ * Chapter identifier based off the USFM reference
362
377
  *
363
- * @example "GEN"
378
+ * @example 1
364
379
  */
365
- bookUSFM?: string;
366
-
367
- isCanonical?: boolean;
380
+ id?: string;
368
381
 
369
382
  /**
370
383
  * Canonical representation of the passage