@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
@@ -0,0 +1,55 @@
1
+ package com.youversion.reactnativesdk.views
2
+
3
+ import android.content.Context
4
+ import androidx.compose.foundation.layout.Box
5
+ import androidx.compose.foundation.layout.fillMaxSize
6
+ import androidx.compose.foundation.layout.padding
7
+ import androidx.compose.material3.Text
8
+ import androidx.compose.runtime.Composable
9
+ import androidx.compose.runtime.MutableState
10
+ import androidx.compose.runtime.mutableStateOf
11
+ import androidx.compose.ui.Alignment
12
+ import androidx.compose.ui.Modifier
13
+ import androidx.compose.ui.graphics.Color
14
+ import androidx.compose.ui.unit.dp
15
+ import expo.modules.kotlin.AppContext
16
+ import expo.modules.kotlin.views.ComposeProps
17
+ import expo.modules.kotlin.views.ExpoComposeView
18
+
19
+ data class BibleReaderViewProps(
20
+ // Bible reference
21
+ val versionId: MutableState<Int?> = mutableStateOf(null),
22
+ val bookUSFM: MutableState<String?> = mutableStateOf(null),
23
+ val chapter: MutableState<Int?> = mutableStateOf(null),
24
+ val verse: MutableState<Int?> = mutableStateOf(null),
25
+ val verseStart: MutableState<Int?> = mutableStateOf(null),
26
+ val verseEnd: MutableState<Int?> = mutableStateOf(null),
27
+
28
+ val appName: MutableState<String?> = mutableStateOf(null),
29
+ val signInMessage: MutableState<String?> = mutableStateOf(null),
30
+ val hasReference: MutableState<Boolean?> = mutableStateOf(false),
31
+ ) : ComposeProps
32
+
33
+ class YVPBibleReaderView(context: Context, appContext: AppContext) :
34
+ ExpoComposeView<BibleReaderViewProps>(context, appContext, withHostingView = true) {
35
+
36
+ override val props = BibleReaderViewProps()
37
+
38
+ @Composable
39
+ override fun Content(modifier: Modifier) {
40
+ // TODO: Replace with actual BibleReaderView composable when Kotlin SDK is ready
41
+ Box(
42
+ modifier = modifier
43
+ .fillMaxSize()
44
+ .padding(16.dp),
45
+ contentAlignment = Alignment.Center
46
+ ) {
47
+ Text(
48
+ text = "BibleReaderView placeholder\n" +
49
+ "App: ${props.appName.value}\n" +
50
+ "Reference: ${props.bookUSFM.value} ${props.chapter.value}",
51
+ color = Color.Gray
52
+ )
53
+ }
54
+ }
55
+ }
@@ -0,0 +1,60 @@
1
+ package com.youversion.reactnativesdk.views
2
+
3
+ import android.content.Context
4
+ import androidx.compose.foundation.layout.Box
5
+ import androidx.compose.foundation.layout.fillMaxWidth
6
+ import androidx.compose.foundation.layout.padding
7
+ import androidx.compose.material3.Text
8
+ import androidx.compose.runtime.Composable
9
+ import androidx.compose.runtime.MutableState
10
+ import androidx.compose.runtime.mutableStateOf
11
+ import androidx.compose.ui.Modifier
12
+ import androidx.compose.ui.graphics.Color
13
+ import androidx.compose.ui.unit.dp
14
+ import expo.modules.kotlin.AppContext
15
+ import expo.modules.kotlin.viewevent.EventDispatcher
16
+ import expo.modules.kotlin.views.ComposeProps
17
+ import expo.modules.kotlin.views.ExpoComposeView
18
+
19
+ data class BibleTextViewProps(
20
+ // Styling
21
+ val fontFamily: MutableState<String?> = mutableStateOf(null),
22
+ val fontSize: MutableState<Float?> = mutableStateOf(16f),
23
+ val lineSpacing: MutableState<Float?> = mutableStateOf(null),
24
+ val paragraphSpacing: MutableState<Float?> = mutableStateOf(null),
25
+ val textColor: MutableState<Int?> = mutableStateOf(null),
26
+ val wocColor: MutableState<Int?> = mutableStateOf(null),
27
+ val footnoteMode: MutableState<String?> = mutableStateOf("none"),
28
+ val renderVerseNumbers: MutableState<Boolean?> = mutableStateOf(true),
29
+
30
+ // Bible reference
31
+ val versionId: MutableState<Int?> = mutableStateOf(null),
32
+ val bookUSFM: MutableState<String?> = mutableStateOf(null),
33
+ val chapter: MutableState<Int?> = mutableStateOf(null),
34
+ val verse: MutableState<Int?> = mutableStateOf(null),
35
+ val verseStart: MutableState<Int?> = mutableStateOf(null),
36
+ val verseEnd: MutableState<Int?> = mutableStateOf(null),
37
+ ) : ComposeProps
38
+
39
+ class YVPBibleTextView(context: Context, appContext: AppContext) :
40
+ ExpoComposeView<BibleTextViewProps>(context, appContext, withHostingView = true) {
41
+
42
+ override val props = BibleTextViewProps()
43
+ private val onTap by EventDispatcher()
44
+
45
+ @Composable
46
+ override fun Content(modifier: Modifier) {
47
+ // TODO: Replace with actual BibleText composable when Kotlin SDK is ready
48
+ Box(
49
+ modifier = modifier
50
+ .fillMaxWidth()
51
+ .padding(16.dp)
52
+ ) {
53
+ Text(
54
+ text = "BibleTextView placeholder - versionId: ${props.versionId.value}, " +
55
+ "book: ${props.bookUSFM.value}, chapter: ${props.chapter.value}",
56
+ color = Color.Gray
57
+ )
58
+ }
59
+ }
60
+ }
@@ -0,0 +1,60 @@
1
+ package com.youversion.reactnativesdk.views
2
+
3
+ import android.content.Context
4
+ import androidx.compose.foundation.isSystemInDarkTheme
5
+ import androidx.compose.foundation.layout.Box
6
+ import androidx.compose.foundation.layout.fillMaxWidth
7
+ import androidx.compose.foundation.layout.padding
8
+ import androidx.compose.material3.Text
9
+ import androidx.compose.runtime.Composable
10
+ import androidx.compose.runtime.MutableState
11
+ import androidx.compose.runtime.mutableStateOf
12
+ import androidx.compose.ui.Modifier
13
+ import androidx.compose.ui.graphics.Color
14
+ import androidx.compose.ui.unit.dp
15
+ import androidx.compose.ui.unit.sp
16
+ import expo.modules.kotlin.AppContext
17
+ import expo.modules.kotlin.views.ComposeProps
18
+ import expo.modules.kotlin.views.ExpoComposeView
19
+
20
+ data class BibleWidgetViewProps(
21
+ // Bible reference
22
+ val versionId: MutableState<Int?> = mutableStateOf(null),
23
+ val bookUSFM: MutableState<String?> = mutableStateOf(null),
24
+ val chapter: MutableState<Int?> = mutableStateOf(null),
25
+ val verse: MutableState<Int?> = mutableStateOf(null),
26
+ val verseStart: MutableState<Int?> = mutableStateOf(null),
27
+ val verseEnd: MutableState<Int?> = mutableStateOf(null),
28
+
29
+ val fontSize: MutableState<Float?> = mutableStateOf(23f),
30
+ val colorScheme: MutableState<String?> = mutableStateOf(null),
31
+ ) : ComposeProps
32
+
33
+ class YVPBibleWidgetView(context: Context, appContext: AppContext) :
34
+ ExpoComposeView<BibleWidgetViewProps>(context, appContext, withHostingView = true) {
35
+
36
+ override val props = BibleWidgetViewProps()
37
+
38
+ @Composable
39
+ override fun Content(modifier: Modifier) {
40
+ val isDark = when (props.colorScheme.value) {
41
+ "dark" -> true
42
+ "light" -> false
43
+ else -> isSystemInDarkTheme()
44
+ }
45
+
46
+ // TODO: Replace with actual BibleWidget composable when Kotlin SDK is ready
47
+ Box(
48
+ modifier = modifier
49
+ .fillMaxWidth()
50
+ .padding(16.dp)
51
+ ) {
52
+ Text(
53
+ text = "BibleWidgetView placeholder\n" +
54
+ "${props.bookUSFM.value} ${props.chapter.value}:${props.verse.value ?: "${props.verseStart.value}-${props.verseEnd.value}"}",
55
+ color = if (isDark) Color.White else Color.DarkGray,
56
+ fontSize = (props.fontSize.value ?: 23f).sp
57
+ )
58
+ }
59
+ }
60
+ }
@@ -0,0 +1,75 @@
1
+ package com.youversion.reactnativesdk.views
2
+
3
+ import android.content.Context
4
+ import androidx.compose.foundation.isSystemInDarkTheme
5
+ import androidx.compose.runtime.Composable
6
+ import androidx.compose.runtime.MutableState
7
+ import androidx.compose.runtime.mutableStateOf
8
+ import androidx.compose.ui.Modifier
9
+ import androidx.compose.ui.graphics.Shape
10
+ import com.youversion.platform.ui.views.SignInWithYouVersionButton
11
+ import com.youversion.platform.ui.views.SignInWithYouVersionButtonDefaults
12
+ import com.youversion.platform.ui.views.SignInWithYouVersionButtonMode
13
+ import expo.modules.kotlin.AppContext
14
+ import expo.modules.kotlin.views.AutoSizingComposable
15
+ import expo.modules.kotlin.views.ComposeProps
16
+ import expo.modules.kotlin.views.Direction
17
+ import expo.modules.kotlin.views.ExpoComposeView
18
+ import java.util.EnumSet
19
+
20
+ data class SignInWithYouVersionButtonProps(
21
+ val mode: MutableState<String?> = mutableStateOf("full"),
22
+ val shape: MutableState<String?> = mutableStateOf("capsule"),
23
+ val isStroked: MutableState<Boolean?> = mutableStateOf(true),
24
+ val colorScheme: MutableState<String?> = mutableStateOf(null)
25
+ ) : ComposeProps
26
+
27
+ class YVPSignInWithYouVersionButton(context: Context, appContext: AppContext) :
28
+ ExpoComposeView<SignInWithYouVersionButtonProps>(context, appContext, withHostingView = true) {
29
+ override val props = SignInWithYouVersionButtonProps()
30
+ // private val onTap by EventDispatcher()
31
+
32
+ @Composable
33
+ override fun Content(modifier: Modifier) {
34
+ AutoSizingComposable(shadowNodeProxy, axis = EnumSet.of(Direction.HORIZONTAL, Direction.VERTICAL)) {
35
+ SignInWithYouVersionButton(
36
+ mode = mode(),
37
+ stroked = stroked(),
38
+ shape = shape(),
39
+ dark = isDark(),
40
+ permissions = { HashSet() }
41
+ )
42
+ }
43
+ }
44
+
45
+ fun mode(): SignInWithYouVersionButtonMode {
46
+ return when (props.mode.value) {
47
+ "full" -> SignInWithYouVersionButtonMode.FULL
48
+ "compact" -> SignInWithYouVersionButtonMode.COMPACT
49
+ "iconOnly" -> SignInWithYouVersionButtonMode.ICON_ONLY
50
+ else -> SignInWithYouVersionButtonMode.FULL
51
+ }
52
+ }
53
+
54
+ fun stroked(): Boolean {
55
+ return props.isStroked.value ?: true
56
+ }
57
+
58
+ @Composable
59
+ fun shape(): Shape {
60
+ return when (props.shape.value) {
61
+ "capsule" -> SignInWithYouVersionButtonDefaults.capsuleShape
62
+ "rectangle" -> SignInWithYouVersionButtonDefaults.rectangleShape
63
+ else -> SignInWithYouVersionButtonDefaults.capsuleShape
64
+ }
65
+ }
66
+
67
+ @Composable
68
+ fun isDark(): Boolean {
69
+ return when (props.colorScheme.value) {
70
+ "dark" -> true
71
+ "light" -> false
72
+ else -> isSystemInDarkTheme()
73
+ }
74
+ }
75
+ }
@@ -0,0 +1,49 @@
1
+ package com.youversion.reactnativesdk.views
2
+
3
+ import android.content.Context
4
+ import androidx.compose.foundation.isSystemInDarkTheme
5
+ import androidx.compose.foundation.layout.Box
6
+ import androidx.compose.foundation.layout.fillMaxWidth
7
+ import androidx.compose.foundation.layout.padding
8
+ import androidx.compose.material3.Text
9
+ import androidx.compose.runtime.Composable
10
+ import androidx.compose.runtime.MutableState
11
+ import androidx.compose.runtime.mutableStateOf
12
+ import androidx.compose.ui.Modifier
13
+ import androidx.compose.ui.graphics.Color
14
+ import androidx.compose.ui.unit.dp
15
+ import expo.modules.kotlin.AppContext
16
+ import expo.modules.kotlin.views.ComposeProps
17
+ import expo.modules.kotlin.views.ExpoComposeView
18
+
19
+ data class VotdViewProps(
20
+ val bibleVersionId: MutableState<Int?> = mutableStateOf(111),
21
+ val colorScheme: MutableState<String?> = mutableStateOf(null),
22
+ ) : ComposeProps
23
+
24
+ class YVPVotdView(context: Context, appContext: AppContext) :
25
+ ExpoComposeView<VotdViewProps>(context, appContext, withHostingView = true) {
26
+
27
+ override val props = VotdViewProps()
28
+
29
+ @Composable
30
+ override fun Content(modifier: Modifier) {
31
+ val isDark = when (props.colorScheme.value) {
32
+ "dark" -> true
33
+ "light" -> false
34
+ else -> isSystemInDarkTheme()
35
+ }
36
+
37
+ // TODO: Replace with actual VerseOfTheDay composable when Kotlin SDK is ready
38
+ Box(
39
+ modifier = modifier
40
+ .fillMaxWidth()
41
+ .padding(16.dp)
42
+ ) {
43
+ Text(
44
+ text = "VotdView placeholder - versionId: ${props.bibleVersionId.value}",
45
+ color = if (isDark) Color.White else Color.DarkGray
46
+ )
47
+ }
48
+ }
49
+ }
@@ -1,7 +1,7 @@
1
- import { BibleReference, BibleVersion } from "../types";
1
+ import { BibleReferenceBase, BibleVersion } from "../types";
2
2
  export declare const BibleAPI: {
3
3
  /**
4
- * Retrieves a list of Bible versions available for a specified language code (like "en").
4
+ * Retrieves a list of Bible versions available for a specified language tag (like "eng").
5
5
  *
6
6
  * @param languageTag - An optional language code per BCP 47 for filtering available Bible versions. If `nil`
7
7
  * the function returns versions for all languages.
@@ -18,9 +18,9 @@ export declare const BibleAPI: {
18
18
  /**
19
19
  * Retrieves the content of a single Bible chapter from the server as an HTML string.
20
20
  *
21
- * @param bibleReference - A {@link BibleReference} object specifying the reference to retrieve.
21
+ * @param bibleReference - A {@link BibleReferenceBase} object specifying the reference to retrieve.
22
22
  * @returns The chapter content as an HTML string.
23
23
  */
24
- getChapter(bibleReference: BibleReference): Promise<string>;
24
+ getChapter(bibleReference: BibleReferenceBase): Promise<string>;
25
25
  };
26
26
  //# sourceMappingURL=bible.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bible.d.ts","sourceRoot":"","sources":["../../src/api/bible.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExD,eAAO,MAAM,QAAQ;IACnB;;;;;;OAMG;8BACuB,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,EAAE,CAAC;IAIzE;;;;;OAKG;0BACmB,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAIpD;;;;;OAKG;+BACwB,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CAG5D,CAAC"}
1
+ {"version":3,"file":"bible.d.ts","sourceRoot":"","sources":["../../src/api/bible.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE5D,eAAO,MAAM,QAAQ;IACnB;;;;;;OAMG;8BACuB,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,EAAE,CAAC;IAIzE;;;;;OAKG;0BACmB,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAIpD;;;;;OAKG;+BACwB,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC;CAGhE,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { Module } from "../native";
2
2
  export const BibleAPI = {
3
3
  /**
4
- * Retrieves a list of Bible versions available for a specified language code (like "en").
4
+ * Retrieves a list of Bible versions available for a specified language tag (like "eng").
5
5
  *
6
6
  * @param languageTag - An optional language code per BCP 47 for filtering available Bible versions. If `nil`
7
7
  * the function returns versions for all languages.
@@ -22,7 +22,7 @@ export const BibleAPI = {
22
22
  /**
23
23
  * Retrieves the content of a single Bible chapter from the server as an HTML string.
24
24
  *
25
- * @param bibleReference - A {@link BibleReference} object specifying the reference to retrieve.
25
+ * @param bibleReference - A {@link BibleReferenceBase} object specifying the reference to retrieve.
26
26
  * @returns The chapter content as an HTML string.
27
27
  */
28
28
  getChapter(bibleReference) {
@@ -1 +1 @@
1
- {"version":3,"file":"bible.js","sourceRoot":"","sources":["../../src/api/bible.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAGnC,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB;;;;;;OAMG;IACH,WAAW,CAAC,WAAoB;QAC9B,OAAO,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IACtC,CAAC;IAED;;;;;OAKG;IACH,UAAU,CAAC,SAAiB;QAC1B,OAAO,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACnC,CAAC;IAED;;;;;OAKG;IACH,UAAU,CAAC,cAA8B;QACvC,OAAO,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;IACxC,CAAC;CACF,CAAC","sourcesContent":["import { Module } from \"../native\";\nimport { BibleReference, BibleVersion } from \"../types\";\n\nexport const BibleAPI = {\n /**\n * Retrieves a list of Bible versions available for a specified language code (like \"en\").\n *\n * @param languageTag - An optional language code per BCP 47 for filtering available Bible versions. If `nil`\n * the function returns versions for all languages.\n * @returns An array of {@link BibleVersion} objects.\n */\n getVersions(languageTag?: string): Promise<Omit<BibleVersion, \"books\">[]> {\n return Module.versions(languageTag);\n },\n\n /**\n * Retrieves a single Bible version by its unique identifier.\n *\n * @param versionId - The id of the Bible version\n * @returns A {@link BibleVersion} object\n */\n getVersion(versionId: number): Promise<BibleVersion> {\n return Module.version(versionId);\n },\n\n /**\n * Retrieves the content of a single Bible chapter from the server as an HTML string.\n *\n * @param bibleReference - A {@link BibleReference} object specifying the reference to retrieve.\n * @returns The chapter content as an HTML string.\n */\n getChapter(bibleReference: BibleReference): Promise<string> {\n return Module.chapter(bibleReference);\n },\n};\n"]}
1
+ {"version":3,"file":"bible.js","sourceRoot":"","sources":["../../src/api/bible.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAGnC,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB;;;;;;OAMG;IACH,WAAW,CAAC,WAAoB;QAC9B,OAAO,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IACtC,CAAC;IAED;;;;;OAKG;IACH,UAAU,CAAC,SAAiB;QAC1B,OAAO,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACnC,CAAC;IAED;;;;;OAKG;IACH,UAAU,CAAC,cAAkC;QAC3C,OAAO,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;IACxC,CAAC;CACF,CAAC","sourcesContent":["import { Module } from \"../native\";\nimport { BibleReferenceBase, BibleVersion } from \"../types\";\n\nexport const BibleAPI = {\n /**\n * Retrieves a list of Bible versions available for a specified language tag (like \"eng\").\n *\n * @param languageTag - An optional language code per BCP 47 for filtering available Bible versions. If `nil`\n * the function returns versions for all languages.\n * @returns An array of {@link BibleVersion} objects.\n */\n getVersions(languageTag?: string): Promise<Omit<BibleVersion, \"books\">[]> {\n return Module.versions(languageTag);\n },\n\n /**\n * Retrieves a single Bible version by its unique identifier.\n *\n * @param versionId - The id of the Bible version\n * @returns A {@link BibleVersion} object\n */\n getVersion(versionId: number): Promise<BibleVersion> {\n return Module.version(versionId);\n },\n\n /**\n * Retrieves the content of a single Bible chapter from the server as an HTML string.\n *\n * @param bibleReference - A {@link BibleReferenceBase} object specifying the reference to retrieve.\n * @returns The chapter content as an HTML string.\n */\n getChapter(bibleReference: BibleReferenceBase): Promise<string> {\n return Module.chapter(bibleReference);\n },\n};\n"]}
@@ -2,7 +2,7 @@ export declare const YouVersionAPI: {
2
2
  Users: {
3
3
  signIn: (permissions?: import("..").SignInWithYouVersionPermission[]) => Promise<import("..").SignInWithYouVersionResult>;
4
4
  signOut(): Promise<void>;
5
- userInfo(accessToken?: string): Promise<import("..").YouVersionUserInfo>;
5
+ userInfo(): Promise<import("..").YouVersionUserInfo>;
6
6
  };
7
7
  VOTD: {
8
8
  verseOfTheDay({ dayOfYear }?: {
@@ -12,7 +12,7 @@ export declare const YouVersionAPI: {
12
12
  Bible: {
13
13
  getVersions(languageTag?: string): Promise<Omit<import("..").BibleVersion, "books">[]>;
14
14
  getVersion(versionId: number): Promise<import("..").BibleVersion>;
15
- getChapter(bibleReference: import("..").BibleReference): Promise<string>;
15
+ getChapter(bibleReference: import("..").BibleReferenceBase): Promise<string>;
16
16
  };
17
17
  Languages: {
18
18
  getLanguages(country?: string): Promise<import("..").LanguageOverview[]>;
@@ -12,9 +12,8 @@ export declare const UsersAPI: {
12
12
  /**
13
13
  * Retrieves user information for the authenticated user using the provided access token.
14
14
  *
15
- * @param accessToken - Optionally provide an accessToken, or use the one stored in the SDK after the user signs in
16
15
  * @returns A promise that resolves to the user information as a {@link YouVersionUserInfo} object.
17
16
  */
18
- userInfo(accessToken?: string): Promise<YouVersionUserInfo>;
17
+ userInfo(): Promise<YouVersionUserInfo>;
19
18
  };
20
19
  //# sourceMappingURL=users.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../src/api/users.ts"],"names":[],"mappings":"AACA,OAAO,EACL,8BAA8B,EAC9B,0BAA0B,EAC1B,kBAAkB,EACnB,MAAM,UAAU,CAAC;AAElB,eAAO,MAAM,QAAQ;IACnB;;;;;OAKG;2BAEY,8BAA8B,EAAE,KAC5C,OAAO,CAAC,0BAA0B,CAAC;IAItC,iFAAiF;eACtE,OAAO,CAAC,IAAI,CAAC;IAIxB;;;;;OAKG;2BACoB,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAG5D,CAAC"}
1
+ {"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../src/api/users.ts"],"names":[],"mappings":"AACA,OAAO,EACL,8BAA8B,EAC9B,0BAA0B,EAC1B,kBAAkB,EACnB,MAAM,UAAU,CAAC;AAElB,eAAO,MAAM,QAAQ;IACnB;;;;;OAKG;2BAEY,8BAA8B,EAAE,KAC5C,OAAO,CAAC,0BAA0B,CAAC;IAItC,iFAAiF;eACtE,OAAO,CAAC,IAAI,CAAC;IAIxB;;;;OAIG;gBACS,OAAO,CAAC,kBAAkB,CAAC;CAGxC,CAAC"}
@@ -16,11 +16,10 @@ export const UsersAPI = {
16
16
  /**
17
17
  * Retrieves user information for the authenticated user using the provided access token.
18
18
  *
19
- * @param accessToken - Optionally provide an accessToken, or use the one stored in the SDK after the user signs in
20
19
  * @returns A promise that resolves to the user information as a {@link YouVersionUserInfo} object.
21
20
  */
22
- userInfo(accessToken) {
23
- return Module.userInfo(accessToken);
21
+ userInfo() {
22
+ return Module.userInfo();
24
23
  },
25
24
  };
26
25
  //# sourceMappingURL=users.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"users.js","sourceRoot":"","sources":["../../src/api/users.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAOnC,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB;;;;;OAKG;IACH,MAAM,EAAE,CACN,cAAgD,EAAE,EACb,EAAE;QACvC,OAAO,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IACpC,CAAC;IAED,iFAAiF;IACjF,OAAO;QACL,OAAO,MAAM,CAAC,OAAO,EAAE,CAAC;IAC1B,CAAC;IAED;;;;;OAKG;IACH,QAAQ,CAAC,WAAoB;QAC3B,OAAO,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IACtC,CAAC;CACF,CAAC","sourcesContent":["import { Module } from \"../native\";\nimport {\n SignInWithYouVersionPermission,\n SignInWithYouVersionResult,\n YouVersionUserInfo,\n} from \"../types\";\n\nexport const UsersAPI = {\n /**\n * Presents the YouVersion login flow to the user and returns the login result upon completion.\n *\n * @param permissions - An array of permissions to request during sign-in.\n * @returns A promise that resolves to the login result as a {@link SignInWithYouVersionResult} object.\n */\n signIn: (\n permissions: SignInWithYouVersionPermission[] = [],\n ): Promise<SignInWithYouVersionResult> => {\n return Module.signIn(permissions);\n },\n\n /** Signs out the current user by clearing the access token from local storage */\n signOut(): Promise<void> {\n return Module.signOut();\n },\n\n /**\n * Retrieves user information for the authenticated user using the provided access token.\n *\n * @param accessToken - Optionally provide an accessToken, or use the one stored in the SDK after the user signs in\n * @returns A promise that resolves to the user information as a {@link YouVersionUserInfo} object.\n */\n userInfo(accessToken?: string): Promise<YouVersionUserInfo> {\n return Module.userInfo(accessToken);\n },\n};\n"]}
1
+ {"version":3,"file":"users.js","sourceRoot":"","sources":["../../src/api/users.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAOnC,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB;;;;;OAKG;IACH,MAAM,EAAE,CACN,cAAgD,EAAE,EACb,EAAE;QACvC,OAAO,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IACpC,CAAC;IAED,iFAAiF;IACjF,OAAO;QACL,OAAO,MAAM,CAAC,OAAO,EAAE,CAAC;IAC1B,CAAC;IAED;;;;OAIG;IACH,QAAQ;QACN,OAAO,MAAM,CAAC,QAAQ,EAAE,CAAC;IAC3B,CAAC;CACF,CAAC","sourcesContent":["import { Module } from \"../native\";\nimport {\n SignInWithYouVersionPermission,\n SignInWithYouVersionResult,\n YouVersionUserInfo,\n} from \"../types\";\n\nexport const UsersAPI = {\n /**\n * Presents the YouVersion login flow to the user and returns the login result upon completion.\n *\n * @param permissions - An array of permissions to request during sign-in.\n * @returns A promise that resolves to the login result as a {@link SignInWithYouVersionResult} object.\n */\n signIn: (\n permissions: SignInWithYouVersionPermission[] = [],\n ): Promise<SignInWithYouVersionResult> => {\n return Module.signIn(permissions);\n },\n\n /** Signs out the current user by clearing the access token from local storage */\n signOut(): Promise<void> {\n return Module.signOut();\n },\n\n /**\n * Retrieves user information for the authenticated user using the provided access token.\n *\n * @returns A promise that resolves to the user information as a {@link YouVersionUserInfo} object.\n */\n userInfo(): Promise<YouVersionUserInfo> {\n return Module.userInfo();\n },\n};\n"]}
package/build/native.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  import { NativeModule } from "expo";
2
- import { BibleReference, BibleVersion, HighlightResponse, LanguageOverview, SignInWithYouVersionResult, YouVersionUserInfo, YouVersionVerseOfTheDay } from "./types";
2
+ import { BibleReferenceBase, BibleVersion, HighlightResponse, LanguageOverview, SignInWithYouVersionResult, YouVersionUserInfo, YouVersionVerseOfTheDay } from "./types";
3
3
  declare class RNYouVersionPlatformModule extends NativeModule {
4
4
  configure(appKey: string): void;
5
5
  setApiHost(apiHost: string): void;
6
6
  signIn(permissions: string[]): Promise<SignInWithYouVersionResult>;
7
7
  signOut(): Promise<void>;
8
- userInfo(accessToken?: string): Promise<YouVersionUserInfo>;
8
+ userInfo(): Promise<YouVersionUserInfo>;
9
9
  verseOfTheDay(dayOfYear: number): Promise<YouVersionVerseOfTheDay>;
10
10
  createHighlight(versionId: number, passageId: string, color: string): Promise<boolean>;
11
11
  getHighlights(versionId: number, passageId: string): Promise<HighlightResponse[]>;
@@ -14,7 +14,7 @@ declare class RNYouVersionPlatformModule extends NativeModule {
14
14
  languages(country?: string): Promise<LanguageOverview[]>;
15
15
  versions(languageTag?: string): Promise<BibleVersion[]>;
16
16
  version(versionId: number): Promise<BibleVersion>;
17
- chapter(bibleReference: BibleReference): Promise<string>;
17
+ chapter(bibleReference: BibleReferenceBase): Promise<string>;
18
18
  getAccessToken(): string | null;
19
19
  }
20
20
  export declare const Module: RNYouVersionPlatformModule;
@@ -1 +1 @@
1
- {"version":3,"file":"native.d.ts","sourceRoot":"","sources":["../src/native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAuB,MAAM,MAAM,CAAC;AAEzD,OAAO,EACL,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EAChB,0BAA0B,EAC1B,kBAAkB,EAClB,uBAAuB,EACxB,MAAM,SAAS,CAAC;AAEjB,OAAO,OAAO,0BAA2B,SAAQ,YAAY;IAC3D,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAE/B,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAEjC,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,0BAA0B,CAAC;IAElE,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAExB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAE3D,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAElE,eAAe,CACb,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM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IAAI,CAAC;IAExB,QAAQ,IAAI,OAAO,CAAC,kBAAkB,CAAC;IAEvC,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAElE,eAAe,CACb,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,OAAO,CAAC;IAEnB,aAAa,CACX,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAE/B,eAAe,CACb,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,OAAO,CAAC;IAEnB,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAEvE,SAAS,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAExD,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAEvD,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAEjD,OAAO,CAAC,cAAc,EAAE,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC;IAE5D,cAAc,IAAI,MAAM,GAAG,IAAI;CAChC;AAED,eAAO,MAAM,MAAM,4BAElB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"native.js","sourceRoot":"","sources":["../src/native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,mBAAmB,EAAE,MAAM,MAAM,CAAC;AAuDzD,MAAM,CAAC,MAAM,MAAM,GAAG,mBAAmB,CACvC,sBAAsB,CACvB,CAAC","sourcesContent":["import { NativeModule, requireNativeModule } from \"expo\";\n\nimport {\n BibleReference,\n BibleVersion,\n HighlightResponse,\n LanguageOverview,\n SignInWithYouVersionResult,\n YouVersionUserInfo,\n YouVersionVerseOfTheDay,\n} from \"./types\";\n\ndeclare class RNYouVersionPlatformModule extends NativeModule {\n configure(appKey: string): void;\n\n setApiHost(apiHost: string): void;\n\n signIn(permissions: string[]): Promise<SignInWithYouVersionResult>;\n\n signOut(): Promise<void>;\n\n userInfo(accessToken?: string): Promise<YouVersionUserInfo>;\n\n verseOfTheDay(dayOfYear: number): Promise<YouVersionVerseOfTheDay>;\n\n createHighlight(\n versionId: number,\n passageId: string,\n color: string,\n ): Promise<boolean>;\n\n getHighlights(\n versionId: number,\n passageId: string,\n ): Promise<HighlightResponse[]>;\n\n updateHighlight(\n versionId: number,\n passageId: string,\n color: string,\n ): Promise<boolean>;\n\n deleteHighlight(versionId: number, passageId: string): Promise<boolean>;\n\n languages(country?: string): Promise<LanguageOverview[]>;\n\n versions(languageTag?: string): Promise<BibleVersion[]>;\n\n version(versionId: number): Promise<BibleVersion>;\n\n chapter(bibleReference: BibleReference): Promise<string>;\n\n getAccessToken(): string | null;\n}\n\nexport const Module = requireNativeModule<RNYouVersionPlatformModule>(\n \"RNYouVersionPlatform\",\n);\n"]}
1
+ {"version":3,"file":"native.js","sourceRoot":"","sources":["../src/native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,mBAAmB,EAAE,MAAM,MAAM,CAAC;AAuDzD,MAAM,CAAC,MAAM,MAAM,GAAG,mBAAmB,CACvC,sBAAsB,CACvB,CAAC","sourcesContent":["import { NativeModule, requireNativeModule } from \"expo\";\n\nimport {\n BibleReferenceBase,\n BibleVersion,\n HighlightResponse,\n LanguageOverview,\n SignInWithYouVersionResult,\n YouVersionUserInfo,\n YouVersionVerseOfTheDay,\n} from \"./types\";\n\ndeclare class RNYouVersionPlatformModule extends NativeModule {\n configure(appKey: string): void;\n\n setApiHost(apiHost: string): void;\n\n signIn(permissions: string[]): Promise<SignInWithYouVersionResult>;\n\n signOut(): Promise<void>;\n\n userInfo(): Promise<YouVersionUserInfo>;\n\n verseOfTheDay(dayOfYear: number): Promise<YouVersionVerseOfTheDay>;\n\n createHighlight(\n versionId: number,\n passageId: string,\n color: string,\n ): Promise<boolean>;\n\n getHighlights(\n versionId: number,\n passageId: string,\n ): Promise<HighlightResponse[]>;\n\n updateHighlight(\n versionId: number,\n passageId: string,\n color: string,\n ): Promise<boolean>;\n\n deleteHighlight(versionId: number, passageId: string): Promise<boolean>;\n\n languages(country?: string): Promise<LanguageOverview[]>;\n\n versions(languageTag?: string): Promise<BibleVersion[]>;\n\n version(versionId: number): Promise<BibleVersion>;\n\n chapter(bibleReference: BibleReferenceBase): Promise<string>;\n\n getAccessToken(): string | null;\n}\n\nexport const Module = requireNativeModule<RNYouVersionPlatformModule>(\n \"RNYouVersionPlatform\",\n);\n"]}
package/build/types.d.ts CHANGED
@@ -8,13 +8,14 @@ export type SignInWithYouVersionResult = {
8
8
  name?: string;
9
9
  profilePicture?: string;
10
10
  email?: string;
11
+ idToken?: string;
11
12
  };
12
- export type SignInWithYouVersionPermission = "bibles" | "highlights" | "votd" | "demographics" | "bible_activity";
13
+ export type SignInWithYouVersionPermission = "openid" | "email" | "profile";
13
14
  export interface YouVersionUserInfo {
14
- firstName?: string;
15
- lastName?: string;
16
- userId?: string;
17
- avatarUrl?: string;
15
+ name?: string;
16
+ email?: string;
17
+ id?: string;
18
+ profilePicture?: string;
18
19
  }
19
20
  export interface YouVersionVerseOfTheDay {
20
21
  passageId: string;
@@ -70,8 +71,8 @@ export interface BibleTextOptions {
70
71
  */
71
72
  renderVerseNumbers?: boolean | null | undefined;
72
73
  }
73
- export type BibleTextFootnoteMode = "none" | "inline" | "marker";
74
- interface BibleReferenceBase {
74
+ export type BibleTextFootnoteMode = "none" | "inline" | "marker" | "letters" | "image";
75
+ export interface BibleReferenceBase {
75
76
  /** The ID of the Bible version */
76
77
  versionId: number;
77
78
  /** The book identifier */
@@ -110,11 +111,9 @@ export type BibleReference = BibleReferenceVerseRange | BibleReferenceChapter |
110
111
  export interface OnBibleTextPressEvent {
111
112
  /** A reference to the Bible verse that was pressed */
112
113
  bibleReference: BibleReferenceVerse;
113
- /** The coordinates of the press event */
114
- point: {
115
- x: number;
116
- y: number;
117
- };
114
+ urlScheme: string;
115
+ /** Not implemented yet */
116
+ footnotes: unknown[];
118
117
  }
119
118
  export interface LanguageOverview {
120
119
  /**
@@ -181,7 +180,7 @@ export interface LanguageOverview {
181
180
  *
182
181
  * @example 111
183
182
  */
184
- defaultBibleVersionId?: number;
183
+ defaultBibleId?: number;
185
184
  }
186
185
  export interface HighlightResponse {
187
186
  id?: string;
@@ -225,13 +224,13 @@ export interface BibleVersion {
225
224
  *
226
225
  * @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>"
227
226
  */
228
- copyrightLong?: string;
227
+ promotionalContent?: string;
229
228
  /**
230
229
  * Short version of the copyright text provided by the publisher for the given Bible version.
231
230
  *
232
231
  * @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."
233
232
  */
234
- copyrightShort?: string;
233
+ copyright?: string;
235
234
  /**
236
235
  * BCP47 canonical language tag for this Bible version
237
236
  *
@@ -272,14 +271,16 @@ export interface BibleVersion {
272
271
  * @example "ltr"
273
272
  */
274
273
  textDirection?: string;
274
+ /** uuid */
275
+ organizationId?: string;
275
276
  }
276
277
  export interface BibleBook {
277
278
  /**
278
- * Standard book identifier for the Unified Scripture Format Markup (USFM) used in Scripture text processing
279
+ * Book identifier
279
280
  *
280
281
  * @example "GEN"
281
282
  */
282
- usfm?: string;
283
+ id?: string;
283
284
  /**
284
285
  * Book name abbreviation if provided by the publisher
285
286
  *
@@ -292,17 +293,27 @@ export interface BibleBook {
292
293
  * @example "Genesis"
293
294
  */
294
295
  title?: string;
295
- titleLong?: string;
296
+ /**
297
+ * Full book title if available
298
+ *
299
+ * @example "The Book of Genesis"
300
+ */
301
+ fullTitle?: string;
302
+ /**
303
+ * Indicates if this is Old Testament, New Testament, or Deuterocanonical
304
+ *
305
+ * @example "new_testament"
306
+ */
307
+ canon?: "new_testament" | "old_testament" | "deuterocanon";
296
308
  chapters?: BibleChapter[];
297
309
  }
298
310
  export interface BibleChapter {
299
311
  /**
300
- * Book identifier
312
+ * Chapter identifier based off the USFM reference
301
313
  *
302
- * @example "GEN"
314
+ * @example 1
303
315
  */
304
- bookUSFM?: string;
305
- isCanonical?: boolean;
316
+ id?: string;
306
317
  /**
307
318
  * Canonical representation of the passage
308
319
  *
@@ -316,5 +327,4 @@ export interface BibleChapter {
316
327
  */
317
328
  title?: string;
318
329
  }
319
- export {};
320
330
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,MAAM,0BAA0B,GAAG;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,8BAA8B,EAAE,CAAC;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,8BAA8B,GACtC,QAAQ,GACR,YAAY,GACZ,MAAM,GACN,cAAc,GACd,gBAAgB,CAAC;AAErB,MAAM,WAAW,kBAAkB;IACjC,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