@youversion/platform-react-native 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.releaserc.json +104 -0
- package/CHANGELOG.md +29 -0
- package/CONTRIBUTING.md +319 -0
- package/LICENSE +201 -0
- package/README.md +562 -0
- package/RELEASING.md +85 -0
- package/android/build.gradle +43 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/assets/github-reactNative-sdk-banner.png +0 -0
- package/build/api/bible.d.ts +26 -0
- package/build/api/bible.d.ts.map +1 -0
- package/build/api/bible.js +32 -0
- package/build/api/bible.js.map +1 -0
- package/build/api/highlights.d.ts +109 -0
- package/build/api/highlights.d.ts.map +1 -0
- package/build/api/highlights.js +49 -0
- package/build/api/highlights.js.map +1 -0
- package/build/api/index.d.ts +27 -0
- package/build/api/index.d.ts.map +1 -0
- package/build/api/index.js +13 -0
- package/build/api/index.js.map +1 -0
- package/build/api/languages.d.ts +11 -0
- package/build/api/languages.d.ts.map +1 -0
- package/build/api/languages.js +13 -0
- package/build/api/languages.js.map +1 -0
- package/build/api/users.d.ts +20 -0
- package/build/api/users.d.ts.map +1 -0
- package/build/api/users.js +26 -0
- package/build/api/users.js.map +1 -0
- package/build/api/votd.d.ts +15 -0
- package/build/api/votd.d.ts.map +1 -0
- package/build/api/votd.js +13 -0
- package/build/api/votd.js.map +1 -0
- package/build/components/BibleReaderView.d.ts +22 -0
- package/build/components/BibleReaderView.d.ts.map +1 -0
- package/build/components/BibleReaderView.js +18 -0
- package/build/components/BibleReaderView.js.map +1 -0
- package/build/components/BibleTextView.d.ts +18 -0
- package/build/components/BibleTextView.d.ts.map +1 -0
- package/build/components/BibleTextView.js +25 -0
- package/build/components/BibleTextView.js.map +1 -0
- package/build/components/BibleWidgetView.d.ts +23 -0
- package/build/components/BibleWidgetView.d.ts.map +1 -0
- package/build/components/BibleWidgetView.js +17 -0
- package/build/components/BibleWidgetView.js.map +1 -0
- package/build/components/SignInWithYouVersionButton.d.ts +37 -0
- package/build/components/SignInWithYouVersionButton.d.ts.map +1 -0
- package/build/components/SignInWithYouVersionButton.js +12 -0
- package/build/components/SignInWithYouVersionButton.js.map +1 -0
- package/build/components/VotdView.d.ts +11 -0
- package/build/components/VotdView.d.ts.map +1 -0
- package/build/components/VotdView.js +12 -0
- package/build/components/VotdView.js.map +1 -0
- package/build/components/index.d.ts +6 -0
- package/build/components/index.d.ts.map +1 -0
- package/build/components/index.js +6 -0
- package/build/components/index.js.map +1 -0
- package/build/index.d.ts +5 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +6 -0
- package/build/index.js.map +1 -0
- package/build/native.d.ts +22 -0
- package/build/native.d.ts.map +1 -0
- package/build/native.js +3 -0
- package/build/native.js.map +1 -0
- package/build/platform.d.ts +21 -0
- package/build/platform.d.ts.map +1 -0
- package/build/platform.js +28 -0
- package/build/platform.js.map +1 -0
- package/build/types.d.ts +320 -0
- package/build/types.d.ts.map +1 -0
- package/build/types.js +2 -0
- package/build/types.js.map +1 -0
- package/commitlint.config.js +23 -0
- package/dist/youversion-platform-react-native-0.7.2.tgz +0 -0
- package/eslint.config.js +4 -0
- package/expo-module.config.json +17 -0
- package/ios/APIs/YVPBibleAPI.swift +197 -0
- package/ios/APIs/YVPHighlightsAPI.swift +105 -0
- package/ios/APIs/YVPLanguagesAPI.swift +70 -0
- package/ios/RNBibleReaderViewModule.swift +9 -0
- package/ios/RNBibleTextViewModule.swift +9 -0
- package/ios/RNBibleWidgetViewModule.swift +9 -0
- package/ios/RNSignInWithYouVersionButtonModule.swift +9 -0
- package/ios/RNVotdViewModule.swift +9 -0
- package/ios/RNYouVersionPlatformModule.swift +79 -0
- package/ios/Views/YVPBibleReaderView.swift +57 -0
- package/ios/Views/YVPBibleTextView.swift +114 -0
- package/ios/Views/YVPBibleWidgetView.swift +64 -0
- package/ios/Views/YVPSignInWithYouVersionButton.swift +52 -0
- package/ios/Views/YVPVotdView.swift +35 -0
- package/ios/YVPAuthAPI.swift +77 -0
- package/ios/YVPVotdAPI.swift +20 -0
- package/ios/YVPlatform.swift +17 -0
- package/ios/YouVersionReactNative.podspec +33 -0
- package/mocks/RNYouVersionPlatform.ts +146 -0
- package/package.json +58 -0
- package/scripts/release-local.sh +224 -0
- package/scripts/sync-android-version.js +75 -0
- package/src/api/bible.ts +35 -0
- package/src/api/highlights.ts +145 -0
- package/src/api/index.ts +13 -0
- package/src/api/languages.ts +14 -0
- package/src/api/users.ts +35 -0
- package/src/api/votd.ts +20 -0
- package/src/components/BibleReaderView.tsx +52 -0
- package/src/components/BibleTextView.tsx +63 -0
- package/src/components/BibleWidgetView.tsx +45 -0
- package/src/components/SignInWithYouVersionButton.tsx +70 -0
- package/src/components/VotdView.tsx +36 -0
- package/src/components/index.ts +5 -0
- package/src/index.ts +5 -0
- package/src/native.ts +58 -0
- package/src/platform.ts +30 -0
- package/src/types.ts +382 -0
- package/tsconfig.json +9 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { BibleReference, BibleVersion } from "../types";
|
|
2
|
+
export declare const BibleAPI: {
|
|
3
|
+
/**
|
|
4
|
+
* Retrieves a list of Bible versions available for a specified language code (like "en").
|
|
5
|
+
*
|
|
6
|
+
* @param languageTag - An optional language code per BCP 47 for filtering available Bible versions. If `nil`
|
|
7
|
+
* the function returns versions for all languages.
|
|
8
|
+
* @returns An array of {@link BibleVersion} objects.
|
|
9
|
+
*/
|
|
10
|
+
getVersions(languageTag?: string): Promise<Omit<BibleVersion, "books">[]>;
|
|
11
|
+
/**
|
|
12
|
+
* Retrieves a single Bible version by its unique identifier.
|
|
13
|
+
*
|
|
14
|
+
* @param versionId - The id of the Bible version
|
|
15
|
+
* @returns A {@link BibleVersion} object
|
|
16
|
+
*/
|
|
17
|
+
getVersion(versionId: number): Promise<BibleVersion>;
|
|
18
|
+
/**
|
|
19
|
+
* Retrieves the content of a single Bible chapter from the server as an HTML string.
|
|
20
|
+
*
|
|
21
|
+
* @param bibleReference - A {@link BibleReference} object specifying the reference to retrieve.
|
|
22
|
+
* @returns The chapter content as an HTML string.
|
|
23
|
+
*/
|
|
24
|
+
getChapter(bibleReference: BibleReference): Promise<string>;
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=bible.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Module } from "../native";
|
|
2
|
+
export const BibleAPI = {
|
|
3
|
+
/**
|
|
4
|
+
* Retrieves a list of Bible versions available for a specified language code (like "en").
|
|
5
|
+
*
|
|
6
|
+
* @param languageTag - An optional language code per BCP 47 for filtering available Bible versions. If `nil`
|
|
7
|
+
* the function returns versions for all languages.
|
|
8
|
+
* @returns An array of {@link BibleVersion} objects.
|
|
9
|
+
*/
|
|
10
|
+
getVersions(languageTag) {
|
|
11
|
+
return Module.versions(languageTag);
|
|
12
|
+
},
|
|
13
|
+
/**
|
|
14
|
+
* Retrieves a single Bible version by its unique identifier.
|
|
15
|
+
*
|
|
16
|
+
* @param versionId - The id of the Bible version
|
|
17
|
+
* @returns A {@link BibleVersion} object
|
|
18
|
+
*/
|
|
19
|
+
getVersion(versionId) {
|
|
20
|
+
return Module.version(versionId);
|
|
21
|
+
},
|
|
22
|
+
/**
|
|
23
|
+
* Retrieves the content of a single Bible chapter from the server as an HTML string.
|
|
24
|
+
*
|
|
25
|
+
* @param bibleReference - A {@link BibleReference} object specifying the reference to retrieve.
|
|
26
|
+
* @returns The chapter content as an HTML string.
|
|
27
|
+
*/
|
|
28
|
+
getChapter(bibleReference) {
|
|
29
|
+
return Module.chapter(bibleReference);
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=bible.js.map
|
|
@@ -0,0 +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"]}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { HighlightResponse } from "../types";
|
|
2
|
+
export declare const HighlightsAPI: {
|
|
3
|
+
/**
|
|
4
|
+
* Creates a new Bible highlight for the user in YouVersion.
|
|
5
|
+
*
|
|
6
|
+
* @param params - An object ({@link CreateHighlightParams}) containing the parameters for creating the highlight.
|
|
7
|
+
* @param params.bibleId - The Bible version identifier.
|
|
8
|
+
* @param params.passageId - The passage identifier (e.g., "JHN.5.1").
|
|
9
|
+
* @param params.color - The highlight color in hex format (e.g., "#eeeeff").
|
|
10
|
+
* @returns A boolean indicating success or failure.
|
|
11
|
+
*/
|
|
12
|
+
createHighlight({ bibleId, passageId, color, }: CreateHighlightParams): Promise<boolean>;
|
|
13
|
+
/**
|
|
14
|
+
* Retrieves the user's highlights for a specific Bible chapter from YouVersion.
|
|
15
|
+
* @param params - An object ({@link GetHighlightsParams}) containing the parameters for retrieving highlights.
|
|
16
|
+
* @param params.bibleId - The Bible version identifier.
|
|
17
|
+
* @param params.passageId - The passage identifier (e.g., "JHN.5.1").
|
|
18
|
+
* @returns `HighlightResponse[]` - An array of {@link HighlightResponse} objects
|
|
19
|
+
*/
|
|
20
|
+
getHighlights({ bibleId, passageId, }: GetHighlightsParams): Promise<HighlightResponse[]>;
|
|
21
|
+
/**
|
|
22
|
+
* Updates an existing Bible highlight for the user in YouVersion.
|
|
23
|
+
*
|
|
24
|
+
* @param params - An object ({@link UpdateHighlightParams}) containing the parameters for updating the highlight.
|
|
25
|
+
* @param params.bibleId - The Bible version identifier.
|
|
26
|
+
* @param params.passageId - The passage identifier (e.g., "JHN.5.1").
|
|
27
|
+
* @param params.color - The new highlight color in hex format (e.g., "#eeeeff").
|
|
28
|
+
* @returns A boolean indicating success or failure.
|
|
29
|
+
*/
|
|
30
|
+
updateHighlight({ bibleId, passageId, color, }: UpdateHighlightParams): Promise<boolean>;
|
|
31
|
+
/**
|
|
32
|
+
* Deletes a Bible highlight for the user in YouVersion.
|
|
33
|
+
*
|
|
34
|
+
* @param params - An object ({@link DeleteHighlightParams}) containing the parameters for deleting the highlight.
|
|
35
|
+
* @param params.bibleId - The Bible version identifier.
|
|
36
|
+
* @param params.passageId - The passage identifier (e.g., "JHN.5.1").
|
|
37
|
+
* @returns A boolean indicating success or failure.
|
|
38
|
+
*/
|
|
39
|
+
deleteHighlight({ bibleId, passageId, }: DeleteHighlightParams): Promise<boolean>;
|
|
40
|
+
};
|
|
41
|
+
export interface CreateHighlightParams {
|
|
42
|
+
/**
|
|
43
|
+
* The Bible version identifier
|
|
44
|
+
*
|
|
45
|
+
* @example 111
|
|
46
|
+
*/
|
|
47
|
+
bibleId: number;
|
|
48
|
+
/**
|
|
49
|
+
* The passage identifier (verse USFM format)
|
|
50
|
+
*
|
|
51
|
+
* @example "MAT.1.1"
|
|
52
|
+
*/
|
|
53
|
+
passageId: string;
|
|
54
|
+
/**
|
|
55
|
+
* The highlight color in hex format
|
|
56
|
+
*
|
|
57
|
+
* @example "#44aa44"
|
|
58
|
+
*/
|
|
59
|
+
color: string;
|
|
60
|
+
}
|
|
61
|
+
export interface GetHighlightsParams {
|
|
62
|
+
/**
|
|
63
|
+
* The Bible version identifier
|
|
64
|
+
*
|
|
65
|
+
* @example 111
|
|
66
|
+
*/
|
|
67
|
+
bibleId: number;
|
|
68
|
+
/**
|
|
69
|
+
* The passage identifier (e.g., "JHN.5.1")
|
|
70
|
+
*
|
|
71
|
+
* @example "JHN.5.1"
|
|
72
|
+
*/
|
|
73
|
+
passageId: string;
|
|
74
|
+
}
|
|
75
|
+
export interface UpdateHighlightParams {
|
|
76
|
+
/**
|
|
77
|
+
* The Bible version identifier
|
|
78
|
+
*
|
|
79
|
+
* @example 111
|
|
80
|
+
*/
|
|
81
|
+
bibleId: number;
|
|
82
|
+
/**
|
|
83
|
+
* The passage identifier (verse USFM format)
|
|
84
|
+
*
|
|
85
|
+
* @example "MAT.1.1"
|
|
86
|
+
*/
|
|
87
|
+
passageId: string;
|
|
88
|
+
/**
|
|
89
|
+
* The highlight color in hex format
|
|
90
|
+
*
|
|
91
|
+
* @example "#44aa44"
|
|
92
|
+
*/
|
|
93
|
+
color: string;
|
|
94
|
+
}
|
|
95
|
+
export interface DeleteHighlightParams {
|
|
96
|
+
/**
|
|
97
|
+
* The Bible version identifier
|
|
98
|
+
*
|
|
99
|
+
* @example 111
|
|
100
|
+
*/
|
|
101
|
+
bibleId: number;
|
|
102
|
+
/**
|
|
103
|
+
* The passage identifier (e.g., "JHN.5.1")
|
|
104
|
+
*
|
|
105
|
+
* @example "JHN.5.1"
|
|
106
|
+
*/
|
|
107
|
+
passageId: string;
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=highlights.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"highlights.d.ts","sourceRoot":"","sources":["../../src/api/highlights.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,aAAa;IACxB;;;;;;;;OAQG;oDAKA,qBAAqB,GAAG,OAAO,CAAC,OAAO,CAAC;IAI3C;;;;;;OAMG;2CAIA,mBAAmB,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAIrD;;;;;;;;OAQG;oDAKA,qBAAqB,GAAG,OAAO,CAAC,OAAO,CAAC;IAI3C;;;;;;;OAOG;6CAIA,qBAAqB,GAAG,OAAO,CAAC,OAAO,CAAC;CAG5C,CAAC;AAEF,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Module } from "../native";
|
|
2
|
+
export const HighlightsAPI = {
|
|
3
|
+
/**
|
|
4
|
+
* Creates a new Bible highlight for the user in YouVersion.
|
|
5
|
+
*
|
|
6
|
+
* @param params - An object ({@link CreateHighlightParams}) containing the parameters for creating the highlight.
|
|
7
|
+
* @param params.bibleId - The Bible version identifier.
|
|
8
|
+
* @param params.passageId - The passage identifier (e.g., "JHN.5.1").
|
|
9
|
+
* @param params.color - The highlight color in hex format (e.g., "#eeeeff").
|
|
10
|
+
* @returns A boolean indicating success or failure.
|
|
11
|
+
*/
|
|
12
|
+
createHighlight({ bibleId, passageId, color, }) {
|
|
13
|
+
return Module.createHighlight(bibleId, passageId, color);
|
|
14
|
+
},
|
|
15
|
+
/**
|
|
16
|
+
* Retrieves the user's highlights for a specific Bible chapter from YouVersion.
|
|
17
|
+
* @param params - An object ({@link GetHighlightsParams}) containing the parameters for retrieving highlights.
|
|
18
|
+
* @param params.bibleId - The Bible version identifier.
|
|
19
|
+
* @param params.passageId - The passage identifier (e.g., "JHN.5.1").
|
|
20
|
+
* @returns `HighlightResponse[]` - An array of {@link HighlightResponse} objects
|
|
21
|
+
*/
|
|
22
|
+
getHighlights({ bibleId, passageId, }) {
|
|
23
|
+
return Module.getHighlights(bibleId, passageId);
|
|
24
|
+
},
|
|
25
|
+
/**
|
|
26
|
+
* Updates an existing Bible highlight for the user in YouVersion.
|
|
27
|
+
*
|
|
28
|
+
* @param params - An object ({@link UpdateHighlightParams}) containing the parameters for updating the highlight.
|
|
29
|
+
* @param params.bibleId - The Bible version identifier.
|
|
30
|
+
* @param params.passageId - The passage identifier (e.g., "JHN.5.1").
|
|
31
|
+
* @param params.color - The new highlight color in hex format (e.g., "#eeeeff").
|
|
32
|
+
* @returns A boolean indicating success or failure.
|
|
33
|
+
*/
|
|
34
|
+
updateHighlight({ bibleId, passageId, color, }) {
|
|
35
|
+
return Module.updateHighlight(bibleId, passageId, color);
|
|
36
|
+
},
|
|
37
|
+
/**
|
|
38
|
+
* Deletes a Bible highlight for the user in YouVersion.
|
|
39
|
+
*
|
|
40
|
+
* @param params - An object ({@link DeleteHighlightParams}) containing the parameters for deleting the highlight.
|
|
41
|
+
* @param params.bibleId - The Bible version identifier.
|
|
42
|
+
* @param params.passageId - The passage identifier (e.g., "JHN.5.1").
|
|
43
|
+
* @returns A boolean indicating success or failure.
|
|
44
|
+
*/
|
|
45
|
+
deleteHighlight({ bibleId, passageId, }) {
|
|
46
|
+
return Module.deleteHighlight(bibleId, passageId);
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=highlights.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"highlights.js","sourceRoot":"","sources":["../../src/api/highlights.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAGnC,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B;;;;;;;;OAQG;IACH,eAAe,CAAC,EACd,OAAO,EACP,SAAS,EACT,KAAK,GACiB;QACtB,OAAO,MAAM,CAAC,eAAe,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;IAC3D,CAAC;IAED;;;;;;OAMG;IACH,aAAa,CAAC,EACZ,OAAO,EACP,SAAS,GACW;QACpB,OAAO,MAAM,CAAC,aAAa,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IAClD,CAAC;IAED;;;;;;;;OAQG;IACH,eAAe,CAAC,EACd,OAAO,EACP,SAAS,EACT,KAAK,GACiB;QACtB,OAAO,MAAM,CAAC,eAAe,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;IAC3D,CAAC;IAED;;;;;;;OAOG;IACH,eAAe,CAAC,EACd,OAAO,EACP,SAAS,GACa;QACtB,OAAO,MAAM,CAAC,eAAe,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IACpD,CAAC;CACF,CAAC","sourcesContent":["import { Module } from \"../native\";\nimport { HighlightResponse } from \"../types\";\n\nexport const HighlightsAPI = {\n /**\n * Creates a new Bible highlight for the user in YouVersion.\n *\n * @param params - An object ({@link CreateHighlightParams}) containing the parameters for creating the highlight.\n * @param params.bibleId - The Bible version identifier.\n * @param params.passageId - The passage identifier (e.g., \"JHN.5.1\").\n * @param params.color - The highlight color in hex format (e.g., \"#eeeeff\").\n * @returns A boolean indicating success or failure.\n */\n createHighlight({\n bibleId,\n passageId,\n color,\n }: CreateHighlightParams): Promise<boolean> {\n return Module.createHighlight(bibleId, passageId, color);\n },\n\n /**\n * Retrieves the user's highlights for a specific Bible chapter from YouVersion.\n * @param params - An object ({@link GetHighlightsParams}) containing the parameters for retrieving highlights.\n * @param params.bibleId - The Bible version identifier.\n * @param params.passageId - The passage identifier (e.g., \"JHN.5.1\").\n * @returns `HighlightResponse[]` - An array of {@link HighlightResponse} objects\n */\n getHighlights({\n bibleId,\n passageId,\n }: GetHighlightsParams): Promise<HighlightResponse[]> {\n return Module.getHighlights(bibleId, passageId);\n },\n\n /**\n * Updates an existing Bible highlight for the user in YouVersion.\n *\n * @param params - An object ({@link UpdateHighlightParams}) containing the parameters for updating the highlight.\n * @param params.bibleId - The Bible version identifier.\n * @param params.passageId - The passage identifier (e.g., \"JHN.5.1\").\n * @param params.color - The new highlight color in hex format (e.g., \"#eeeeff\").\n * @returns A boolean indicating success or failure.\n */\n updateHighlight({\n bibleId,\n passageId,\n color,\n }: UpdateHighlightParams): Promise<boolean> {\n return Module.updateHighlight(bibleId, passageId, color);\n },\n\n /**\n * Deletes a Bible highlight for the user in YouVersion.\n *\n * @param params - An object ({@link DeleteHighlightParams}) containing the parameters for deleting the highlight.\n * @param params.bibleId - The Bible version identifier.\n * @param params.passageId - The passage identifier (e.g., \"JHN.5.1\").\n * @returns A boolean indicating success or failure.\n */\n deleteHighlight({\n bibleId,\n passageId,\n }: DeleteHighlightParams): Promise<boolean> {\n return Module.deleteHighlight(bibleId, passageId);\n },\n};\n\nexport interface CreateHighlightParams {\n /**\n * The 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}\n\nexport interface GetHighlightsParams {\n /**\n * The Bible version identifier\n *\n * @example 111\n */\n bibleId: number;\n\n /**\n * The passage identifier (e.g., \"JHN.5.1\")\n *\n * @example \"JHN.5.1\"\n */\n passageId: string;\n}\n\nexport interface UpdateHighlightParams {\n /**\n * The 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}\n\nexport interface DeleteHighlightParams {\n /**\n * The Bible version identifier\n *\n * @example 111\n */\n bibleId: number;\n\n /**\n * The passage identifier (e.g., \"JHN.5.1\")\n *\n * @example \"JHN.5.1\"\n */\n passageId: string;\n}\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export declare const YouVersionAPI: {
|
|
2
|
+
Users: {
|
|
3
|
+
signIn: (permissions?: import("..").SignInWithYouVersionPermission[]) => Promise<import("..").SignInWithYouVersionResult>;
|
|
4
|
+
signOut(): Promise<void>;
|
|
5
|
+
userInfo(accessToken?: string): Promise<import("..").YouVersionUserInfo>;
|
|
6
|
+
};
|
|
7
|
+
VOTD: {
|
|
8
|
+
verseOfTheDay({ dayOfYear }?: {
|
|
9
|
+
dayOfYear: number;
|
|
10
|
+
}): Promise<import("..").YouVersionVerseOfTheDay>;
|
|
11
|
+
};
|
|
12
|
+
Bible: {
|
|
13
|
+
getVersions(languageTag?: string): Promise<Omit<import("..").BibleVersion, "books">[]>;
|
|
14
|
+
getVersion(versionId: number): Promise<import("..").BibleVersion>;
|
|
15
|
+
getChapter(bibleReference: import("..").BibleReference): Promise<string>;
|
|
16
|
+
};
|
|
17
|
+
Languages: {
|
|
18
|
+
getLanguages(country?: string): Promise<import("..").LanguageOverview[]>;
|
|
19
|
+
};
|
|
20
|
+
Highlights: {
|
|
21
|
+
createHighlight({ bibleId, passageId, color, }: import("./highlights").CreateHighlightParams): Promise<boolean>;
|
|
22
|
+
getHighlights({ bibleId, passageId, }: import("./highlights").GetHighlightsParams): Promise<import("..").HighlightResponse[]>;
|
|
23
|
+
updateHighlight({ bibleId, passageId, color, }: import("./highlights").UpdateHighlightParams): Promise<boolean>;
|
|
24
|
+
deleteHighlight({ bibleId, passageId, }: import("./highlights").DeleteHighlightParams): Promise<boolean>;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;CAMzB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BibleAPI } from "./bible";
|
|
2
|
+
import { HighlightsAPI } from "./highlights";
|
|
3
|
+
import { LanguagesAPI } from "./languages";
|
|
4
|
+
import { UsersAPI } from "./users";
|
|
5
|
+
import { VotdAPI } from "./votd";
|
|
6
|
+
export const YouVersionAPI = {
|
|
7
|
+
Users: UsersAPI,
|
|
8
|
+
VOTD: VotdAPI,
|
|
9
|
+
Bible: BibleAPI,
|
|
10
|
+
Languages: LanguagesAPI,
|
|
11
|
+
Highlights: HighlightsAPI,
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,KAAK,EAAE,QAAQ;IACf,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,QAAQ;IACf,SAAS,EAAE,YAAY;IACvB,UAAU,EAAE,aAAa;CAC1B,CAAC","sourcesContent":["import { BibleAPI } from \"./bible\";\nimport { HighlightsAPI } from \"./highlights\";\nimport { LanguagesAPI } from \"./languages\";\nimport { UsersAPI } from \"./users\";\nimport { VotdAPI } from \"./votd\";\n\nexport const YouVersionAPI = {\n Users: UsersAPI,\n VOTD: VotdAPI,\n Bible: BibleAPI,\n Languages: LanguagesAPI,\n Highlights: HighlightsAPI,\n};\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LanguageOverview } from "../types";
|
|
2
|
+
export declare const LanguagesAPI: {
|
|
3
|
+
/**
|
|
4
|
+
* Retrieves a list of languages supported in the Platform.
|
|
5
|
+
*
|
|
6
|
+
* @param country - An optional country code for filtering languages. If provided, only languages used in that country will be returned. For example, "US" for the United States.
|
|
7
|
+
* @returns An array of {@link LanguageOverview} objects.
|
|
8
|
+
*/
|
|
9
|
+
getLanguages(country?: string): Promise<LanguageOverview[]>;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=languages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"languages.d.ts","sourceRoot":"","sources":["../../src/api/languages.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C,eAAO,MAAM,YAAY;IACvB;;;;;OAKG;2BACoB,MAAM,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;CAG5D,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Module } from "../native";
|
|
2
|
+
export const LanguagesAPI = {
|
|
3
|
+
/**
|
|
4
|
+
* Retrieves a list of languages supported in the Platform.
|
|
5
|
+
*
|
|
6
|
+
* @param country - An optional country code for filtering languages. If provided, only languages used in that country will be returned. For example, "US" for the United States.
|
|
7
|
+
* @returns An array of {@link LanguageOverview} objects.
|
|
8
|
+
*/
|
|
9
|
+
getLanguages(country) {
|
|
10
|
+
return Module.languages(country);
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=languages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"languages.js","sourceRoot":"","sources":["../../src/api/languages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAGnC,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B;;;;;OAKG;IACH,YAAY,CAAC,OAAgB;QAC3B,OAAO,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;CACF,CAAC","sourcesContent":["import { Module } from \"../native\";\nimport { LanguageOverview } from \"../types\";\n\nexport const LanguagesAPI = {\n /**\n * Retrieves a list of languages supported in the Platform.\n *\n * @param country - An optional country code for filtering languages. If provided, only languages used in that country will be returned. For example, \"US\" for the United States.\n * @returns An array of {@link LanguageOverview} objects.\n */\n getLanguages(country?: string): Promise<LanguageOverview[]> {\n return Module.languages(country);\n },\n};\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SignInWithYouVersionPermission, SignInWithYouVersionResult, YouVersionUserInfo } from "../types";
|
|
2
|
+
export declare const UsersAPI: {
|
|
3
|
+
/**
|
|
4
|
+
* Presents the YouVersion login flow to the user and returns the login result upon completion.
|
|
5
|
+
*
|
|
6
|
+
* @param permissions - An array of permissions to request during sign-in.
|
|
7
|
+
* @returns A promise that resolves to the login result as a {@link SignInWithYouVersionResult} object.
|
|
8
|
+
*/
|
|
9
|
+
signIn: (permissions?: SignInWithYouVersionPermission[]) => Promise<SignInWithYouVersionResult>;
|
|
10
|
+
/** Signs out the current user by clearing the access token from local storage */
|
|
11
|
+
signOut(): Promise<void>;
|
|
12
|
+
/**
|
|
13
|
+
* Retrieves user information for the authenticated user using the provided access token.
|
|
14
|
+
*
|
|
15
|
+
* @param accessToken - Optionally provide an accessToken, or use the one stored in the SDK after the user signs in
|
|
16
|
+
* @returns A promise that resolves to the user information as a {@link YouVersionUserInfo} object.
|
|
17
|
+
*/
|
|
18
|
+
userInfo(accessToken?: string): Promise<YouVersionUserInfo>;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=users.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Module } from "../native";
|
|
2
|
+
export const UsersAPI = {
|
|
3
|
+
/**
|
|
4
|
+
* Presents the YouVersion login flow to the user and returns the login result upon completion.
|
|
5
|
+
*
|
|
6
|
+
* @param permissions - An array of permissions to request during sign-in.
|
|
7
|
+
* @returns A promise that resolves to the login result as a {@link SignInWithYouVersionResult} object.
|
|
8
|
+
*/
|
|
9
|
+
signIn: (permissions = []) => {
|
|
10
|
+
return Module.signIn(permissions);
|
|
11
|
+
},
|
|
12
|
+
/** Signs out the current user by clearing the access token from local storage */
|
|
13
|
+
signOut() {
|
|
14
|
+
return Module.signOut();
|
|
15
|
+
},
|
|
16
|
+
/**
|
|
17
|
+
* Retrieves user information for the authenticated user using the provided access token.
|
|
18
|
+
*
|
|
19
|
+
* @param accessToken - Optionally provide an accessToken, or use the one stored in the SDK after the user signs in
|
|
20
|
+
* @returns A promise that resolves to the user information as a {@link YouVersionUserInfo} object.
|
|
21
|
+
*/
|
|
22
|
+
userInfo(accessToken) {
|
|
23
|
+
return Module.userInfo(accessToken);
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=users.js.map
|
|
@@ -0,0 +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"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { YouVersionVerseOfTheDay } from "../types";
|
|
2
|
+
type VerseOfTheDayOptions = {
|
|
3
|
+
dayOfYear: number;
|
|
4
|
+
};
|
|
5
|
+
export declare const VotdAPI: {
|
|
6
|
+
/**
|
|
7
|
+
* Retrieves the Verse of the Day from YouVersion for a specified day of the year.
|
|
8
|
+
* A valid `YouVersionPlatformConfiguration.appKey` must be set before calling this function.
|
|
9
|
+
* @param dayOfYear - The day of the year (1-366) to retrieve the verse for
|
|
10
|
+
* @returns A promise that resolves to a {@link YouVersionVerseOfTheDay} object.
|
|
11
|
+
*/
|
|
12
|
+
verseOfTheDay({ dayOfYear }?: VerseOfTheDayOptions): Promise<YouVersionVerseOfTheDay>;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=votd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"votd.d.ts","sourceRoot":"","sources":["../../src/api/votd.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAEnD,KAAK,oBAAoB,GAAG;IAC1B,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,OAAO;IAClB;;;;;OAKG;kCAEkB,oBAAoB,GACtC,OAAO,CAAC,uBAAuB,CAAC;CAGpC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Module } from "../native";
|
|
2
|
+
export const VotdAPI = {
|
|
3
|
+
/**
|
|
4
|
+
* Retrieves the Verse of the Day from YouVersion for a specified day of the year.
|
|
5
|
+
* A valid `YouVersionPlatformConfiguration.appKey` must be set before calling this function.
|
|
6
|
+
* @param dayOfYear - The day of the year (1-366) to retrieve the verse for
|
|
7
|
+
* @returns A promise that resolves to a {@link YouVersionVerseOfTheDay} object.
|
|
8
|
+
*/
|
|
9
|
+
verseOfTheDay({ dayOfYear = 1 } = { dayOfYear: 1 }) {
|
|
10
|
+
return Module.verseOfTheDay(dayOfYear);
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=votd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"votd.js","sourceRoot":"","sources":["../../src/api/votd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAOnC,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB;;;;;OAKG;IACH,aAAa,CACX,EAAE,SAAS,GAAG,CAAC,KAA2B,EAAE,SAAS,EAAE,CAAC,EAAE;QAE1D,OAAO,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IACzC,CAAC;CACF,CAAC","sourcesContent":["import { Module } from \"../native\";\nimport { YouVersionVerseOfTheDay } from \"../types\";\n\ntype VerseOfTheDayOptions = {\n dayOfYear: number;\n};\n\nexport const VotdAPI = {\n /**\n * Retrieves the Verse of the Day from YouVersion for a specified day of the year.\n * A valid `YouVersionPlatformConfiguration.appKey` must be set before calling this function.\n * @param dayOfYear - The day of the year (1-366) to retrieve the verse for\n * @returns A promise that resolves to a {@link YouVersionVerseOfTheDay} object.\n */\n verseOfTheDay(\n { dayOfYear = 1 }: VerseOfTheDayOptions = { dayOfYear: 1 },\n ): Promise<YouVersionVerseOfTheDay> {\n return Module.verseOfTheDay(dayOfYear);\n },\n};\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BibleReference } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* A full-featured Bible reader component.
|
|
4
|
+
* It allows the user to control font customizations, switch Bible versions and access their verse highlights.
|
|
5
|
+
* It is designed after the YouVersion Bible reader experience found in the YouVersion app.
|
|
6
|
+
* @param props - {@link BibleReaderViewProps}
|
|
7
|
+
*/
|
|
8
|
+
export declare function BibleReaderView({ reference, ...props }: BibleReaderViewProps): import("react").JSX.Element;
|
|
9
|
+
export interface BibleReaderViewProps {
|
|
10
|
+
/** A reference to a passage in the Bible the reader should open to. This could be a single verse, a range of verses or the entire chapter */
|
|
11
|
+
reference?: BibleReference | null | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Name of your app.
|
|
14
|
+
* The SDK will use this in various places when prompting the user to sign in to their YouVersion account. This will let the user know which app is requesting their information.
|
|
15
|
+
*/
|
|
16
|
+
appName: string;
|
|
17
|
+
/**
|
|
18
|
+
* A custom message to display to the user from the sign-in sheet, letting them know why they should sign in.
|
|
19
|
+
*/
|
|
20
|
+
signInMessage: string;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=BibleReaderView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BibleReaderView.d.ts","sourceRoot":"","sources":["../../src/components/BibleReaderView.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAK1C;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,+BAS5E;AAQD,MAAM,WAAW,oBAAoB;IACnC,6IAA6I;IAC7I,SAAS,CAAC,EAAE,cAAc,GAAG,IAAI,GAAG,SAAS,CAAC;IAE9C;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;CACvB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { requireNativeView } from "expo";
|
|
2
|
+
import { StyleSheet } from "react-native";
|
|
3
|
+
const NativeView = requireNativeView("BibleReaderView");
|
|
4
|
+
/**
|
|
5
|
+
* A full-featured Bible reader component.
|
|
6
|
+
* It allows the user to control font customizations, switch Bible versions and access their verse highlights.
|
|
7
|
+
* It is designed after the YouVersion Bible reader experience found in the YouVersion app.
|
|
8
|
+
* @param props - {@link BibleReaderViewProps}
|
|
9
|
+
*/
|
|
10
|
+
export function BibleReaderView({ reference, ...props }) {
|
|
11
|
+
return (<NativeView style={styles.view} hasReference={!!reference} {...(reference || {})} {...props}/>);
|
|
12
|
+
}
|
|
13
|
+
const styles = StyleSheet.create({
|
|
14
|
+
view: {
|
|
15
|
+
flex: 1,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
//# sourceMappingURL=BibleReaderView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BibleReaderView.js","sourceRoot":"","sources":["../../src/components/BibleReaderView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AACzC,OAAO,EAAa,UAAU,EAAa,MAAM,cAAc,CAAC;AAIhE,MAAM,UAAU,GACd,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;AAEvC;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAwB;IAC3E,OAAO,CACL,CAAC,UAAU,CACT,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CACnB,YAAY,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAC1B,IAAI,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,CACtB,IAAI,KAAK,CAAC,EACV,CACH,CAAC;AACJ,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE;QACJ,IAAI,EAAE,CAAC;KACR;CACF,CAAC,CAAC","sourcesContent":["import { requireNativeView } from \"expo\";\nimport { StyleProp, StyleSheet, ViewStyle } from \"react-native\";\n\nimport { BibleReference } from \"../types\";\n\nconst NativeView: React.ComponentType<NativeProps> =\n requireNativeView(\"BibleReaderView\");\n\n/**\n * A full-featured Bible reader component.\n * It allows the user to control font customizations, switch Bible versions and access their verse highlights.\n * It is designed after the YouVersion Bible reader experience found in the YouVersion app.\n * @param props - {@link BibleReaderViewProps}\n */\nexport function BibleReaderView({ reference, ...props }: BibleReaderViewProps) {\n return (\n <NativeView\n style={styles.view}\n hasReference={!!reference}\n {...(reference || {})}\n {...props}\n />\n );\n}\n\nconst styles = StyleSheet.create({\n view: {\n flex: 1,\n },\n});\n\nexport interface BibleReaderViewProps {\n /** A reference to a passage in the Bible the reader should open to. This could be a single verse, a range of verses or the entire chapter */\n reference?: BibleReference | null | undefined;\n\n /**\n * Name of your app.\n * The SDK will use this in various places when prompting the user to sign in to their YouVersion account. This will let the user know which app is requesting their information.\n */\n appName: string;\n\n /**\n * A custom message to display to the user from the sign-in sheet, letting them know why they should sign in.\n */\n signInMessage: string;\n}\n\ntype NativeProps = Omit<BibleReaderViewProps, \"reference\"> &\n Partial<BibleReference> & {\n style: StyleProp<ViewStyle>;\n hasReference: boolean;\n };\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { StyleProp, ViewStyle } from "react-native";
|
|
2
|
+
import { BibleReference, BibleTextOptions, OnBibleTextPressEvent } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* A minimal text view for displaying a Bible passage.
|
|
5
|
+
* The component supports font customizations and accepts an `onPress` handler
|
|
6
|
+
* that provides information about which verse was pressed.
|
|
7
|
+
*
|
|
8
|
+
* @param props - {@link BibleTextViewProps}
|
|
9
|
+
*/
|
|
10
|
+
export declare function BibleTextView({ bibleReference, style, onPress, ...props }: BibleTextViewProps): import("react").JSX.Element;
|
|
11
|
+
export interface BibleTextViewProps extends BibleTextOptions {
|
|
12
|
+
/** A reference to a passage in the Bible. This could be a single verse, a range of verses or the entire chapter */
|
|
13
|
+
bibleReference: BibleReference;
|
|
14
|
+
style?: StyleProp<ViewStyle>;
|
|
15
|
+
/** Called when the user presses on the Bible text */
|
|
16
|
+
onPress?: (e: OnBibleTextPressEvent) => void | null | undefined;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=BibleTextView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BibleTextView.d.ts","sourceRoot":"","sources":["../../src/components/BibleTextView.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAoB,SAAS,EAAE,MAAM,cAAc,CAAC;AAEtE,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAKlB;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,EAC5B,cAAc,EACd,KAAK,EACL,OAAO,EACP,GAAG,KAAK,EACT,EAAE,kBAAkB,+BAWpB;AAmBD,MAAM,WAAW,kBAAmB,SAAQ,gBAAgB;IAC1D,mHAAmH;IACnH,cAAc,EAAE,cAAc,CAAC;IAE/B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAE7B,qDAAqD;IACrD,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,qBAAqB,KAAK,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;CACjE"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { requireNativeView } from "expo";
|
|
2
|
+
import { StyleSheet, View } from "react-native";
|
|
3
|
+
const NativeView = requireNativeView("BibleTextView");
|
|
4
|
+
/**
|
|
5
|
+
* A minimal text view for displaying a Bible passage.
|
|
6
|
+
* The component supports font customizations and accepts an `onPress` handler
|
|
7
|
+
* that provides information about which verse was pressed.
|
|
8
|
+
*
|
|
9
|
+
* @param props - {@link BibleTextViewProps}
|
|
10
|
+
*/
|
|
11
|
+
export function BibleTextView({ bibleReference, style, onPress, ...props }) {
|
|
12
|
+
return (<View style={[styles.wrapper, style]}>
|
|
13
|
+
<NativeView {...bibleReference} {...props} onTap={(e) => onPress?.(e.nativeEvent)} style={styles.component}/>
|
|
14
|
+
</View>);
|
|
15
|
+
}
|
|
16
|
+
const styles = StyleSheet.create({
|
|
17
|
+
wrapper: {
|
|
18
|
+
flexDirection: "row",
|
|
19
|
+
alignItems: "stretch",
|
|
20
|
+
},
|
|
21
|
+
component: {
|
|
22
|
+
flexGrow: 1,
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=BibleTextView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BibleTextView.js","sourceRoot":"","sources":["../../src/components/BibleTextView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AACzC,OAAO,EAAa,UAAU,EAAE,IAAI,EAAa,MAAM,cAAc,CAAC;AAQtE,MAAM,UAAU,GACd,iBAAiB,CAAC,eAAe,CAAC,CAAC;AAErC;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,EAC5B,cAAc,EACd,KAAK,EACL,OAAO,EACP,GAAG,KAAK,EACW;IACnB,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CACnC;MAAA,CAAC,UAAU,CACT,IAAI,cAAc,CAAC,CACnB,IAAI,KAAK,CAAC,CACV,KAAK,CAAC,CAAC,CAAC,CAAc,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CACpD,KAAK,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,EAE5B;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,OAAO,EAAE;QACP,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,SAAS;KACtB;IACD,SAAS,EAAE;QACT,QAAQ,EAAE,CAAC;KACZ;CACF,CAAC,CAAC","sourcesContent":["import { requireNativeView } from \"expo\";\nimport { StyleProp, StyleSheet, View, ViewStyle } from \"react-native\";\n\nimport {\n BibleReference,\n BibleTextOptions,\n OnBibleTextPressEvent,\n} from \"../types\";\n\nconst NativeView: React.ComponentType<NativeProps> =\n requireNativeView(\"BibleTextView\");\n\n/**\n * A minimal text view for displaying a Bible passage.\n * The component supports font customizations and accepts an `onPress` handler\n * that provides information about which verse was pressed.\n *\n * @param props - {@link BibleTextViewProps}\n */\nexport function BibleTextView({\n bibleReference,\n style,\n onPress,\n ...props\n}: BibleTextViewProps) {\n return (\n <View style={[styles.wrapper, style]}>\n <NativeView\n {...bibleReference}\n {...props}\n onTap={(e: NativeEvent) => onPress?.(e.nativeEvent)}\n style={styles.component}\n />\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n wrapper: {\n flexDirection: \"row\",\n alignItems: \"stretch\",\n },\n component: {\n flexGrow: 1,\n },\n});\n\ntype NativeProps = Omit<BibleTextViewProps, \"bibleReference\"> &\n BibleReference & {\n onTap?: (e: NativeEvent) => any | null | undefined;\n };\n\ntype NativeEvent = { nativeEvent: OnBibleTextPressEvent };\n\nexport interface BibleTextViewProps extends BibleTextOptions {\n /** A reference to a passage in the Bible. This could be a single verse, a range of verses or the entire chapter */\n bibleReference: BibleReference;\n\n style?: StyleProp<ViewStyle>;\n\n /** Called when the user presses on the Bible text */\n onPress?: (e: OnBibleTextPressEvent) => void | null | undefined;\n}\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { BibleReference } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* An opinionated Bible passage display.
|
|
4
|
+
* It displays the book, chapter and version name above the passage. Below the passage text, it displays copyright information and the YouVersion logo.
|
|
5
|
+
* @param props - {@link BibleWidgetViewProps}
|
|
6
|
+
*/
|
|
7
|
+
export declare function BibleWidgetView({ reference, ...props }: BibleWidgetViewProps): import("react").JSX.Element;
|
|
8
|
+
export interface BibleWidgetViewProps {
|
|
9
|
+
/** A reference to a passage in the Bible. This could be a single verse, a range of verses or the entire chapter */
|
|
10
|
+
reference: BibleReference;
|
|
11
|
+
/** The font size to use for the Bible text
|
|
12
|
+
*
|
|
13
|
+
* @defaultValue 23
|
|
14
|
+
*/
|
|
15
|
+
fontSize?: number | null | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Controls the color scheme of the button
|
|
18
|
+
*
|
|
19
|
+
* * @defaultValue Uses the system color scheme
|
|
20
|
+
*/
|
|
21
|
+
colorScheme?: "light" | "dark" | null | undefined;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=BibleWidgetView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BibleWidgetView.d.ts","sourceRoot":"","sources":["../../src/components/BibleWidgetView.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAK1C;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,+BAE5E;AAQD,MAAM,WAAW,oBAAoB;IACnC,mHAAmH;IACnH,SAAS,EAAE,cAAc,CAAC;IAE1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAErC;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACnD"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { requireNativeView } from "expo";
|
|
2
|
+
import { StyleSheet } from "react-native";
|
|
3
|
+
const NativeView = requireNativeView("BibleWidgetView");
|
|
4
|
+
/**
|
|
5
|
+
* An opinionated Bible passage display.
|
|
6
|
+
* It displays the book, chapter and version name above the passage. Below the passage text, it displays copyright information and the YouVersion logo.
|
|
7
|
+
* @param props - {@link BibleWidgetViewProps}
|
|
8
|
+
*/
|
|
9
|
+
export function BibleWidgetView({ reference, ...props }) {
|
|
10
|
+
return <NativeView {...(reference || {})} style={styles.view} {...props}/>;
|
|
11
|
+
}
|
|
12
|
+
const styles = StyleSheet.create({
|
|
13
|
+
view: {
|
|
14
|
+
alignSelf: "stretch",
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=BibleWidgetView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BibleWidgetView.js","sourceRoot":"","sources":["../../src/components/BibleWidgetView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AACzC,OAAO,EAAa,UAAU,EAAa,MAAM,cAAc,CAAC;AAIhE,MAAM,UAAU,GACd,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;AAEvC;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAwB;IAC3E,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;AAC9E,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE;QACJ,SAAS,EAAE,SAAS;KACrB;CACF,CAAC,CAAC","sourcesContent":["import { requireNativeView } from \"expo\";\nimport { StyleProp, StyleSheet, ViewStyle } from \"react-native\";\n\nimport { BibleReference } from \"../types\";\n\nconst NativeView: React.ComponentType<NativeProps> =\n requireNativeView(\"BibleWidgetView\");\n\n/**\n * An opinionated Bible passage display.\n * It displays the book, chapter and version name above the passage. Below the passage text, it displays copyright information and the YouVersion logo.\n * @param props - {@link BibleWidgetViewProps}\n */\nexport function BibleWidgetView({ reference, ...props }: BibleWidgetViewProps) {\n return <NativeView {...(reference || {})} style={styles.view} {...props} />;\n}\n\nconst styles = StyleSheet.create({\n view: {\n alignSelf: \"stretch\",\n },\n});\n\nexport interface BibleWidgetViewProps {\n /** A reference to a passage in the Bible. This could be a single verse, a range of verses or the entire chapter */\n reference: BibleReference;\n\n /** The font size to use for the Bible text\n *\n * @defaultValue 23\n */\n fontSize?: number | null | undefined;\n\n /**\n * Controls the color scheme of the button\n *\n * * @defaultValue Uses the system color scheme\n */\n colorScheme?: \"light\" | \"dark\" | null | undefined;\n}\n\ntype NativeProps = Omit<BibleWidgetViewProps, \"reference\"> &\n BibleReference & {\n style?: StyleProp<ViewStyle>;\n };\n"]}
|