@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.
Files changed (116) hide show
  1. package/.releaserc.json +104 -0
  2. package/CHANGELOG.md +29 -0
  3. package/CONTRIBUTING.md +319 -0
  4. package/LICENSE +201 -0
  5. package/README.md +562 -0
  6. package/RELEASING.md +85 -0
  7. package/android/build.gradle +43 -0
  8. package/android/src/main/AndroidManifest.xml +2 -0
  9. package/assets/github-reactNative-sdk-banner.png +0 -0
  10. package/build/api/bible.d.ts +26 -0
  11. package/build/api/bible.d.ts.map +1 -0
  12. package/build/api/bible.js +32 -0
  13. package/build/api/bible.js.map +1 -0
  14. package/build/api/highlights.d.ts +109 -0
  15. package/build/api/highlights.d.ts.map +1 -0
  16. package/build/api/highlights.js +49 -0
  17. package/build/api/highlights.js.map +1 -0
  18. package/build/api/index.d.ts +27 -0
  19. package/build/api/index.d.ts.map +1 -0
  20. package/build/api/index.js +13 -0
  21. package/build/api/index.js.map +1 -0
  22. package/build/api/languages.d.ts +11 -0
  23. package/build/api/languages.d.ts.map +1 -0
  24. package/build/api/languages.js +13 -0
  25. package/build/api/languages.js.map +1 -0
  26. package/build/api/users.d.ts +20 -0
  27. package/build/api/users.d.ts.map +1 -0
  28. package/build/api/users.js +26 -0
  29. package/build/api/users.js.map +1 -0
  30. package/build/api/votd.d.ts +15 -0
  31. package/build/api/votd.d.ts.map +1 -0
  32. package/build/api/votd.js +13 -0
  33. package/build/api/votd.js.map +1 -0
  34. package/build/components/BibleReaderView.d.ts +22 -0
  35. package/build/components/BibleReaderView.d.ts.map +1 -0
  36. package/build/components/BibleReaderView.js +18 -0
  37. package/build/components/BibleReaderView.js.map +1 -0
  38. package/build/components/BibleTextView.d.ts +18 -0
  39. package/build/components/BibleTextView.d.ts.map +1 -0
  40. package/build/components/BibleTextView.js +25 -0
  41. package/build/components/BibleTextView.js.map +1 -0
  42. package/build/components/BibleWidgetView.d.ts +23 -0
  43. package/build/components/BibleWidgetView.d.ts.map +1 -0
  44. package/build/components/BibleWidgetView.js +17 -0
  45. package/build/components/BibleWidgetView.js.map +1 -0
  46. package/build/components/SignInWithYouVersionButton.d.ts +37 -0
  47. package/build/components/SignInWithYouVersionButton.d.ts.map +1 -0
  48. package/build/components/SignInWithYouVersionButton.js +12 -0
  49. package/build/components/SignInWithYouVersionButton.js.map +1 -0
  50. package/build/components/VotdView.d.ts +11 -0
  51. package/build/components/VotdView.d.ts.map +1 -0
  52. package/build/components/VotdView.js +12 -0
  53. package/build/components/VotdView.js.map +1 -0
  54. package/build/components/index.d.ts +6 -0
  55. package/build/components/index.d.ts.map +1 -0
  56. package/build/components/index.js +6 -0
  57. package/build/components/index.js.map +1 -0
  58. package/build/index.d.ts +5 -0
  59. package/build/index.d.ts.map +1 -0
  60. package/build/index.js +6 -0
  61. package/build/index.js.map +1 -0
  62. package/build/native.d.ts +22 -0
  63. package/build/native.d.ts.map +1 -0
  64. package/build/native.js +3 -0
  65. package/build/native.js.map +1 -0
  66. package/build/platform.d.ts +21 -0
  67. package/build/platform.d.ts.map +1 -0
  68. package/build/platform.js +28 -0
  69. package/build/platform.js.map +1 -0
  70. package/build/types.d.ts +320 -0
  71. package/build/types.d.ts.map +1 -0
  72. package/build/types.js +2 -0
  73. package/build/types.js.map +1 -0
  74. package/commitlint.config.js +23 -0
  75. package/dist/youversion-platform-react-native-0.7.2.tgz +0 -0
  76. package/eslint.config.js +4 -0
  77. package/expo-module.config.json +17 -0
  78. package/ios/APIs/YVPBibleAPI.swift +197 -0
  79. package/ios/APIs/YVPHighlightsAPI.swift +105 -0
  80. package/ios/APIs/YVPLanguagesAPI.swift +70 -0
  81. package/ios/RNBibleReaderViewModule.swift +9 -0
  82. package/ios/RNBibleTextViewModule.swift +9 -0
  83. package/ios/RNBibleWidgetViewModule.swift +9 -0
  84. package/ios/RNSignInWithYouVersionButtonModule.swift +9 -0
  85. package/ios/RNVotdViewModule.swift +9 -0
  86. package/ios/RNYouVersionPlatformModule.swift +79 -0
  87. package/ios/Views/YVPBibleReaderView.swift +57 -0
  88. package/ios/Views/YVPBibleTextView.swift +114 -0
  89. package/ios/Views/YVPBibleWidgetView.swift +64 -0
  90. package/ios/Views/YVPSignInWithYouVersionButton.swift +52 -0
  91. package/ios/Views/YVPVotdView.swift +35 -0
  92. package/ios/YVPAuthAPI.swift +77 -0
  93. package/ios/YVPVotdAPI.swift +20 -0
  94. package/ios/YVPlatform.swift +17 -0
  95. package/ios/YouVersionReactNative.podspec +33 -0
  96. package/mocks/RNYouVersionPlatform.ts +146 -0
  97. package/package.json +58 -0
  98. package/scripts/release-local.sh +224 -0
  99. package/scripts/sync-android-version.js +75 -0
  100. package/src/api/bible.ts +35 -0
  101. package/src/api/highlights.ts +145 -0
  102. package/src/api/index.ts +13 -0
  103. package/src/api/languages.ts +14 -0
  104. package/src/api/users.ts +35 -0
  105. package/src/api/votd.ts +20 -0
  106. package/src/components/BibleReaderView.tsx +52 -0
  107. package/src/components/BibleTextView.tsx +63 -0
  108. package/src/components/BibleWidgetView.tsx +45 -0
  109. package/src/components/SignInWithYouVersionButton.tsx +70 -0
  110. package/src/components/VotdView.tsx +36 -0
  111. package/src/components/index.ts +5 -0
  112. package/src/index.ts +5 -0
  113. package/src/native.ts +58 -0
  114. package/src/platform.ts +30 -0
  115. package/src/types.ts +382 -0
  116. package/tsconfig.json +9 -0
@@ -0,0 +1,37 @@
1
+ import { StyleProp, ViewStyle } from "react-native";
2
+ export interface SignInWithYouVersionButtonProps {
3
+ /** Controls the width and text of the button
4
+ *
5
+ * @defaultValue "full"
6
+ */
7
+ mode?: SignInWithYouVersionButtonMode;
8
+ /** Controls the border radius of the button
9
+ *
10
+ * @defaultValue "capsule"
11
+ */
12
+ shape?: SignInWithYouVersionButtonShape;
13
+ /** Controls if the button is outlined
14
+ *
15
+ * @defaultValue true
16
+ */
17
+ isStroked?: boolean;
18
+ /**
19
+ * Controls the color scheme of the button
20
+ *
21
+ * @defaultValue Uses the system color scheme
22
+ */
23
+ colorScheme?: "light" | "dark";
24
+ /** Called when the user taps the button. You should call the signIn function in response */
25
+ onPress?: () => void;
26
+ style?: StyleProp<ViewStyle>;
27
+ }
28
+ export type SignInWithYouVersionButtonMode = "full" | "compact" | "iconOnly";
29
+ export type SignInWithYouVersionButtonShape = "capsule" | "rectangle";
30
+ /**
31
+ * A branded button for signing in with YouVersion.
32
+ * This button is a lightweight wrapper around the native YouVersion sign-in button. It contains
33
+ * localized sign-in text and the YouVersion logo.
34
+ * @param props - {@link SignInWithYouVersionButtonProps}
35
+ */
36
+ export declare function SignInWithYouVersionButton({ onPress, mode, shape, isStroked, colorScheme, ...props }: SignInWithYouVersionButtonProps): import("react").JSX.Element;
37
+ //# sourceMappingURL=SignInWithYouVersionButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SignInWithYouVersionButton.d.ts","sourceRoot":"","sources":["../../src/components/SignInWithYouVersionButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAUpD,MAAM,WAAW,+BAA+B;IAC9C;;;OAGG;IACH,IAAI,CAAC,EAAE,8BAA8B,CAAC;IAEtC;;;OAGG;IACH,KAAK,CAAC,EAAE,+BAA+B,CAAC;IAExC;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAE/B,4FAA4F;IAC5F,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,MAAM,MAAM,8BAA8B,GAAG,MAAM,GAAG,SAAS,GAAG,UAAU,CAAC;AAC7E,MAAM,MAAM,+BAA+B,GAAG,SAAS,GAAG,WAAW,CAAC;AAEtE;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,EACzC,OAAO,EACP,IAAa,EACb,KAAiB,EACjB,SAAgB,EAChB,WAAW,EACX,GAAG,KAAK,EACT,EAAE,+BAA+B,+BAWjC"}
@@ -0,0 +1,12 @@
1
+ import { requireNativeView } from "expo";
2
+ const NativeView = requireNativeView("SignInWithYouVersionButton");
3
+ /**
4
+ * A branded button for signing in with YouVersion.
5
+ * This button is a lightweight wrapper around the native YouVersion sign-in button. It contains
6
+ * localized sign-in text and the YouVersion logo.
7
+ * @param props - {@link SignInWithYouVersionButtonProps}
8
+ */
9
+ export function SignInWithYouVersionButton({ onPress, mode = "full", shape = "capsule", isStroked = true, colorScheme, ...props }) {
10
+ return (<NativeView {...props} mode={mode} shape={shape} isStroked={isStroked} colorScheme={colorScheme} onTap={onPress}/>);
11
+ }
12
+ //# sourceMappingURL=SignInWithYouVersionButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SignInWithYouVersionButton.js","sourceRoot":"","sources":["../../src/components/SignInWithYouVersionButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAGzC,MAAM,UAAU,GAAqC,iBAAiB,CACpE,4BAA4B,CAC7B,CAAC;AAwCF;;;;;GAKG;AACH,MAAM,UAAU,0BAA0B,CAAC,EACzC,OAAO,EACP,IAAI,GAAG,MAAM,EACb,KAAK,GAAG,SAAS,EACjB,SAAS,GAAG,IAAI,EAChB,WAAW,EACX,GAAG,KAAK,EACwB;IAChC,OAAO,CACL,CAAC,UAAU,CACT,IAAI,KAAK,CAAC,CACV,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,KAAK,CAAC,CAAC,OAAO,CAAC,EACf,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { requireNativeView } from \"expo\";\nimport { StyleProp, ViewStyle } from \"react-native\";\n\nconst NativeView: React.ComponentType<NativeProps> = requireNativeView(\n \"SignInWithYouVersionButton\",\n);\n\ntype NativeProps = Omit<SignInWithYouVersionButtonProps, \"onPress\"> & {\n onTap?: () => void;\n};\n\nexport interface SignInWithYouVersionButtonProps {\n /** Controls the width and text of the button\n *\n * @defaultValue \"full\"\n */\n mode?: SignInWithYouVersionButtonMode;\n\n /** Controls the border radius of the button\n *\n * @defaultValue \"capsule\"\n */\n shape?: SignInWithYouVersionButtonShape;\n\n /** Controls if the button is outlined\n *\n * @defaultValue true\n */\n isStroked?: boolean;\n\n /**\n * Controls the color scheme of the button\n *\n * @defaultValue Uses the system color scheme\n */\n colorScheme?: \"light\" | \"dark\";\n\n /** Called when the user taps the button. You should call the signIn function in response */\n onPress?: () => void;\n style?: StyleProp<ViewStyle>;\n}\n\nexport type SignInWithYouVersionButtonMode = \"full\" | \"compact\" | \"iconOnly\";\nexport type SignInWithYouVersionButtonShape = \"capsule\" | \"rectangle\";\n\n/**\n * A branded button for signing in with YouVersion.\n * This button is a lightweight wrapper around the native YouVersion sign-in button. It contains\n * localized sign-in text and the YouVersion logo.\n * @param props - {@link SignInWithYouVersionButtonProps}\n */\nexport function SignInWithYouVersionButton({\n onPress,\n mode = \"full\",\n shape = \"capsule\",\n isStroked = true,\n colorScheme,\n ...props\n}: SignInWithYouVersionButtonProps) {\n return (\n <NativeView\n {...props}\n mode={mode}\n shape={shape}\n isStroked={isStroked}\n colorScheme={colorScheme}\n onTap={onPress}\n />\n );\n}\n"]}
@@ -0,0 +1,11 @@
1
+ export declare function VotdView({ bibleVersionId, ...props }: VotdViewProps): import("react").JSX.Element;
2
+ export interface VotdViewProps {
3
+ bibleVersionId?: number | null | undefined;
4
+ /**
5
+ * Controls the color scheme of the text. "dark" would mean to use light text on a dark background, and "light" would mean to use dark text on a light background.
6
+ *
7
+ * * @defaultValue Uses the system color scheme
8
+ */
9
+ colorScheme?: "light" | "dark" | null | undefined;
10
+ }
11
+ //# sourceMappingURL=VotdView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VotdView.d.ts","sourceRoot":"","sources":["../../src/components/VotdView.tsx"],"names":[],"mappings":"AAMA,wBAAgB,QAAQ,CAAC,EAAE,cAAoB,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,+BAQzE;AAQD,MAAM,WAAW,aAAa;IAC5B,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAE3C;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACnD"}
@@ -0,0 +1,12 @@
1
+ import { requireNativeView } from "expo";
2
+ import { StyleSheet } from "react-native";
3
+ const NativeView = requireNativeView("VotdView");
4
+ export function VotdView({ bibleVersionId = 111, ...props }) {
5
+ return (<NativeView style={styles.view} bibleVersionId={bibleVersionId} {...props}/>);
6
+ }
7
+ const styles = StyleSheet.create({
8
+ view: {
9
+ alignSelf: "stretch",
10
+ },
11
+ });
12
+ //# sourceMappingURL=VotdView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VotdView.js","sourceRoot":"","sources":["../../src/components/VotdView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AACzC,OAAO,EAAa,UAAU,EAAa,MAAM,cAAc,CAAC;AAEhE,MAAM,UAAU,GACd,iBAAiB,CAAC,UAAU,CAAC,CAAC;AAEhC,MAAM,UAAU,QAAQ,CAAC,EAAE,cAAc,GAAG,GAAG,EAAE,GAAG,KAAK,EAAiB;IACxE,OAAO,CACL,CAAC,UAAU,CACT,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CACnB,cAAc,CAAC,CAAC,cAAc,CAAC,CAC/B,IAAI,KAAK,CAAC,EACV,CACH,CAAC;AACJ,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\nconst NativeView: React.ComponentType<NativeProps> =\n requireNativeView(\"VotdView\");\n\nexport function VotdView({ bibleVersionId = 111, ...props }: VotdViewProps) {\n return (\n <NativeView\n style={styles.view}\n bibleVersionId={bibleVersionId}\n {...props}\n />\n );\n}\n\nconst styles = StyleSheet.create({\n view: {\n alignSelf: \"stretch\",\n },\n});\n\nexport interface VotdViewProps {\n bibleVersionId?: number | null | undefined;\n\n /**\n * Controls the color scheme of the text. \"dark\" would mean to use light text on a dark background, and \"light\" would mean to use dark text on a light background.\n *\n * * @defaultValue Uses the system color scheme\n */\n colorScheme?: \"light\" | \"dark\" | null | undefined;\n}\n\ninterface NativeProps extends VotdViewProps {\n style: StyleProp<ViewStyle>;\n}\n"]}
@@ -0,0 +1,6 @@
1
+ export * from "./SignInWithYouVersionButton";
2
+ export * from "./BibleTextView";
3
+ export * from "./VotdView";
4
+ export * from "./BibleReaderView";
5
+ export * from "./BibleWidgetView";
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,6 @@
1
+ export * from "./SignInWithYouVersionButton";
2
+ export * from "./BibleTextView";
3
+ export * from "./VotdView";
4
+ export * from "./BibleReaderView";
5
+ export * from "./BibleWidgetView";
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC","sourcesContent":["export * from \"./SignInWithYouVersionButton\";\nexport * from \"./BibleTextView\";\nexport * from \"./VotdView\";\nexport * from \"./BibleReaderView\";\nexport * from \"./BibleWidgetView\";\n"]}
@@ -0,0 +1,5 @@
1
+ export * from "./platform";
2
+ export * from "./api";
3
+ export * from "./types";
4
+ export * from "./components";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,YAAY,CAAC;AAC3B,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC"}
package/build/index.js ADDED
@@ -0,0 +1,6 @@
1
+ // Exports components and types from here
2
+ export * from "./platform";
3
+ export * from "./api";
4
+ export * from "./types";
5
+ export * from "./components";
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,cAAc,YAAY,CAAC;AAC3B,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC","sourcesContent":["// Exports components and types from here\nexport * from \"./platform\";\nexport * from \"./api\";\nexport * from \"./types\";\nexport * from \"./components\";\n"]}
@@ -0,0 +1,22 @@
1
+ import { NativeModule } from "expo";
2
+ import { BibleReference, BibleVersion, HighlightResponse, LanguageOverview, SignInWithYouVersionResult, YouVersionUserInfo, YouVersionVerseOfTheDay } from "./types";
3
+ declare class RNYouVersionPlatformModule extends NativeModule {
4
+ configure(appKey: string): void;
5
+ setApiHost(apiHost: string): void;
6
+ signIn(permissions: string[]): Promise<SignInWithYouVersionResult>;
7
+ signOut(): Promise<void>;
8
+ userInfo(accessToken?: string): Promise<YouVersionUserInfo>;
9
+ verseOfTheDay(dayOfYear: number): Promise<YouVersionVerseOfTheDay>;
10
+ createHighlight(versionId: number, passageId: string, color: string): Promise<boolean>;
11
+ getHighlights(versionId: number, passageId: string): Promise<HighlightResponse[]>;
12
+ updateHighlight(versionId: number, passageId: string, color: string): Promise<boolean>;
13
+ deleteHighlight(versionId: number, passageId: string): Promise<boolean>;
14
+ languages(country?: string): Promise<LanguageOverview[]>;
15
+ versions(languageTag?: string): Promise<BibleVersion[]>;
16
+ version(versionId: number): Promise<BibleVersion>;
17
+ chapter(bibleReference: BibleReference): Promise<string>;
18
+ getAccessToken(): string | null;
19
+ }
20
+ export declare const Module: RNYouVersionPlatformModule;
21
+ export {};
22
+ //# sourceMappingURL=native.d.ts.map
@@ -0,0 +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,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,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;IAExD,cAAc,IAAI,MAAM,GAAG,IAAI;CAChC;AAED,eAAO,MAAM,MAAM,4BAElB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { requireNativeModule } from "expo";
2
+ export const Module = requireNativeModule("RNYouVersionPlatform");
3
+ //# sourceMappingURL=native.js.map
@@ -0,0 +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"]}
@@ -0,0 +1,21 @@
1
+ export declare const YouVersionPlatform: {
2
+ /**
3
+ * Function to configure YouVersionPlatform.
4
+ * Run this once during your app's initialization.
5
+ *
6
+ * @param appKey - The application key provided for your app.
7
+ *
8
+ * @example
9
+ * // During app initialization:
10
+ * YouVersionPlatform.configure('YOUR_APP_KEY');
11
+ */
12
+ configure(appKey: string): void;
13
+ setApiHost(apiHost: string): void;
14
+ /**
15
+ * Retrieves the currently cached access token for the authenticated user.
16
+ *
17
+ * @returns The access token as a string, or null if not available.
18
+ */
19
+ getAccessToken(): string | null;
20
+ };
21
+ //# sourceMappingURL=platform.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB;IAC7B;;;;;;;;;OASG;sBACe,MAAM;wBAIJ,MAAM;IAI1B;;;;OAIG;sBACe,MAAM,GAAG,IAAI;CAGhC,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { Module } from "./native";
2
+ export const YouVersionPlatform = {
3
+ /**
4
+ * Function to configure YouVersionPlatform.
5
+ * Run this once during your app's initialization.
6
+ *
7
+ * @param appKey - The application key provided for your app.
8
+ *
9
+ * @example
10
+ * // During app initialization:
11
+ * YouVersionPlatform.configure('YOUR_APP_KEY');
12
+ */
13
+ configure(appKey) {
14
+ return Module.configure(appKey);
15
+ },
16
+ setApiHost(apiHost) {
17
+ return Module.setApiHost(apiHost);
18
+ },
19
+ /**
20
+ * Retrieves the currently cached access token for the authenticated user.
21
+ *
22
+ * @returns The access token as a string, or null if not available.
23
+ */
24
+ getAccessToken() {
25
+ return Module.getAccessToken();
26
+ },
27
+ };
28
+ //# sourceMappingURL=platform.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform.js","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC;;;;;;;;;OASG;IACH,SAAS,CAAC,MAAc;QACtB,OAAO,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC;IAED,UAAU,CAAC,OAAe;QACxB,OAAO,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC;IAED;;;;OAIG;IACH,cAAc;QACZ,OAAO,MAAM,CAAC,cAAc,EAAE,CAAC;IACjC,CAAC;CACF,CAAC","sourcesContent":["import { Module } from \"./native\";\n\nexport const YouVersionPlatform = {\n /**\n * Function to configure YouVersionPlatform.\n * Run this once during your app's initialization.\n *\n * @param appKey - The application key provided for your app.\n *\n * @example\n * // During app initialization:\n * YouVersionPlatform.configure('YOUR_APP_KEY');\n */\n configure(appKey: string) {\n return Module.configure(appKey);\n },\n\n setApiHost(apiHost: string) {\n return Module.setApiHost(apiHost);\n },\n\n /**\n * Retrieves the currently cached access token for the authenticated user.\n *\n * @returns The access token as a string, or null if not available.\n */\n getAccessToken(): string | null {\n return Module.getAccessToken();\n },\n};\n"]}
@@ -0,0 +1,320 @@
1
+ import { ColorValue } from "react-native";
2
+ export type SignInWithYouVersionResult = {
3
+ accessToken?: string;
4
+ permissions: SignInWithYouVersionPermission[];
5
+ yvpUserId?: string;
6
+ expiryDate?: string;
7
+ refreshToken?: string;
8
+ name?: string;
9
+ profilePicture?: string;
10
+ email?: string;
11
+ };
12
+ export type SignInWithYouVersionPermission = "bibles" | "highlights" | "votd" | "demographics" | "bible_activity";
13
+ export interface YouVersionUserInfo {
14
+ firstName?: string;
15
+ lastName?: string;
16
+ userId?: string;
17
+ avatarUrl?: string;
18
+ }
19
+ export interface YouVersionVerseOfTheDay {
20
+ passageId: string;
21
+ day: number;
22
+ }
23
+ export interface BibleTextOptions {
24
+ /**
25
+ * Controls the font family of the Bible text
26
+ *
27
+ * @defaultValue "Times New Roman"
28
+ */
29
+ fontFamily?: string | null | undefined;
30
+ /**
31
+ * Controls the font size of the Bible text
32
+ *
33
+ * @defaultValue 16
34
+ */
35
+ fontSize?: number | null | undefined;
36
+ /**
37
+ * Controls the line spacing of the Bible text
38
+ *
39
+ * @defaultValue `fontSize` / 2
40
+ */
41
+ lineSpacing?: number | null | undefined;
42
+ /**
43
+ * Controls the spacing between paragraphs in the Bible text
44
+ *
45
+ * @defaultValue `fontSize` / 2
46
+ */
47
+ paragraphSpacing?: number | null | undefined;
48
+ /**
49
+ * Controls the text color of the Bible text
50
+ *
51
+ * @defaultValue Theme dependent text color
52
+ */
53
+ textColor?: ColorValue | null | undefined;
54
+ /**
55
+ * Controls the color of the words of Christ (WOC) in the Bible text
56
+ *
57
+ * @defaultValue "#FF3D4D" in light mode, "#F04C59" in dark mode
58
+ */
59
+ wocColor?: ColorValue | null | undefined;
60
+ /**
61
+ * Controls how footnotes are displayed in the Bible text
62
+ *
63
+ * @defaultValue "none"
64
+ */
65
+ footnoteMode?: BibleTextFootnoteMode | null | undefined;
66
+ /**
67
+ * Controls whether verse numbers are rendered in the Bible text
68
+ *
69
+ * @defaultValue true
70
+ */
71
+ renderVerseNumbers?: boolean | null | undefined;
72
+ }
73
+ export type BibleTextFootnoteMode = "none" | "inline" | "marker";
74
+ interface BibleReferenceBase {
75
+ /** The ID of the Bible version */
76
+ versionId: number;
77
+ /** The book identifier */
78
+ bookUSFM: string;
79
+ /** The chapter number */
80
+ chapter: number;
81
+ }
82
+ /**
83
+ * A reference to a range of verses
84
+ */
85
+ export interface BibleReferenceVerseRange extends BibleReferenceBase {
86
+ type: "range";
87
+ verseStart: number;
88
+ verseEnd: number;
89
+ verse?: never;
90
+ }
91
+ /**
92
+ * A reference to an entire chapter in the Bible
93
+ */
94
+ export interface BibleReferenceChapter extends BibleReferenceBase {
95
+ type: "chapter";
96
+ verse?: never;
97
+ verseStart?: never;
98
+ verseEnd?: never;
99
+ }
100
+ /**
101
+ * A reference to a single verse in the Bible
102
+ */
103
+ export interface BibleReferenceVerse extends BibleReferenceBase {
104
+ type: "verse";
105
+ verse: number;
106
+ verseStart?: never;
107
+ verseEnd?: never;
108
+ }
109
+ export type BibleReference = BibleReferenceVerseRange | BibleReferenceChapter | BibleReferenceVerse;
110
+ export interface OnBibleTextPressEvent {
111
+ /** A reference to the Bible verse that was pressed */
112
+ bibleReference: BibleReferenceVerse;
113
+ /** The coordinates of the press event */
114
+ point: {
115
+ x: number;
116
+ y: number;
117
+ };
118
+ }
119
+ export interface LanguageOverview {
120
+ /**
121
+ * Canonical BCP 47 id limited to language or language+script. Region, variants, and extensions are not allowed.
122
+ *
123
+ * @example "en"
124
+ */
125
+ id: string;
126
+ /**
127
+ * ISO 639 canonical language subtag
128
+ *
129
+ * @example "sr"
130
+ */
131
+ language: string;
132
+ /**
133
+ * ISO 15924 script code if present in id
134
+ *
135
+ * @example "Latn"
136
+ */
137
+ script?: string;
138
+ /**
139
+ * The English name for the script
140
+ *
141
+ * @example "Latin"
142
+ */
143
+ scriptName?: string;
144
+ /**
145
+ * Deprecated or legacy subtags mapped during canonicalization for this language.
146
+ *
147
+ * @example []
148
+ */
149
+ aliases: string[];
150
+ /**
151
+ * Localized display names for the language/script combination
152
+ * @example { "en": "Chechen" }
153
+ */
154
+ displayNames: Record<string, string>;
155
+ /**
156
+ * All scripts known for this language (CLDR/ISO-15924)
157
+ *
158
+ * @example ["Cyrl", "Latn"]
159
+ */
160
+ scripts: string[];
161
+ /**
162
+ * Variants associated with this language (not part of the id)
163
+ *
164
+ * @example ["1996","fonipa"]
165
+ */
166
+ variants: string[];
167
+ /**
168
+ * Ids of countries where this language is used or supported. Extended details can be retrieved from the countries API with the provided id.
169
+ *
170
+ * @example ["RS","BA","ME"]
171
+ */
172
+ countries: string[];
173
+ /**
174
+ * Default text direction for this language. ltr is left to right and rtl is right to left.
175
+ *
176
+ * @example "ltr"
177
+ */
178
+ textDirection: string;
179
+ /**
180
+ * The chosen default Bible version for this language.
181
+ *
182
+ * @example 111
183
+ */
184
+ defaultBibleVersionId?: number;
185
+ }
186
+ export interface HighlightResponse {
187
+ id?: string;
188
+ /**
189
+ * Bible version identifier
190
+ *
191
+ * @example 111
192
+ */
193
+ bibleId: number;
194
+ /**
195
+ * The passage identifier (verse USFM format)
196
+ *
197
+ * @example "MAT.1.1"
198
+ */
199
+ passageId: string;
200
+ /**
201
+ * The highlight color in hex format
202
+ *
203
+ * @example "#44aa44"
204
+ */
205
+ color: string;
206
+ userId?: string;
207
+ createTime?: string;
208
+ updateTime?: string;
209
+ }
210
+ export interface BibleVersion {
211
+ /**
212
+ * Bible version identifier
213
+ *
214
+ * @example 111
215
+ */
216
+ id: number;
217
+ /**
218
+ * Bible version abbreviation
219
+ *
220
+ * @example "NIV"
221
+ */
222
+ abbreviation?: string;
223
+ /**
224
+ * Longer form of copyright text provided by the publisher for the given Bible version.
225
+ *
226
+ * @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
+ */
228
+ copyrightLong?: string;
229
+ /**
230
+ * Short version of the copyright text provided by the publisher for the given Bible version.
231
+ *
232
+ * @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
+ */
234
+ copyrightShort?: string;
235
+ /**
236
+ * BCP47 canonical language tag for this Bible version
237
+ *
238
+ * @example "en"
239
+ */
240
+ languageTag?: string;
241
+ /**
242
+ * Localized Bible version abbreviation
243
+ *
244
+ * @example "NIV"
245
+ */
246
+ localizedAbbreviation?: string;
247
+ /**
248
+ * Localized title of Bible version
249
+ *
250
+ * @example "New International Version"
251
+ */
252
+ localizedTitle?: string;
253
+ readerFooter?: string;
254
+ readerFooterUrl?: string;
255
+ /**
256
+ * English title of Bible version
257
+ *
258
+ * @example "New International Version 2011"
259
+ */
260
+ title?: string;
261
+ /**
262
+ * Array of book codes for this Bible version
263
+ *
264
+ * @example ["GEN","EXO","LEV"]
265
+ */
266
+ bookCodes?: string[];
267
+ /** Array of Bible books for this Bible version */
268
+ books?: BibleBook[];
269
+ /**
270
+ * Default text direction for this language. ltr is left to right and rtl is right to left.
271
+ *
272
+ * @example "ltr"
273
+ */
274
+ textDirection?: string;
275
+ }
276
+ export interface BibleBook {
277
+ /**
278
+ * Standard book identifier for the Unified Scripture Format Markup (USFM) used in Scripture text processing
279
+ *
280
+ * @example "GEN"
281
+ */
282
+ usfm?: string;
283
+ /**
284
+ * Book name abbreviation if provided by the publisher
285
+ *
286
+ * @example "Gen"
287
+ */
288
+ abbreviation?: string;
289
+ /**
290
+ * Book title
291
+ *
292
+ * @example "Genesis"
293
+ */
294
+ title?: string;
295
+ titleLong?: string;
296
+ chapters?: BibleChapter[];
297
+ }
298
+ export interface BibleChapter {
299
+ /**
300
+ * Book identifier
301
+ *
302
+ * @example "GEN"
303
+ */
304
+ bookUSFM?: string;
305
+ isCanonical?: boolean;
306
+ /**
307
+ * Canonical representation of the passage
308
+ *
309
+ * @example "GEN.1"
310
+ */
311
+ passageId?: string;
312
+ /**
313
+ * Human readable chapter title
314
+ *
315
+ * @example "1"
316
+ */
317
+ title?: string;
318
+ }
319
+ export {};
320
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +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,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,uBAAuB;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAEvC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAErC;;;;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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"]}
@@ -0,0 +1,23 @@
1
+ module.exports = {
2
+ extends: ["@commitlint/config-conventional"],
3
+ rules: {
4
+ "body-max-line-length": [2, "always", 300],
5
+ "type-enum": [
6
+ 2,
7
+ "always",
8
+ [
9
+ "feat", // New feature - triggers minor version increment
10
+ "fix", // Bug fix - triggers patch version increment
11
+ "docs", // Documentation only - no version increment
12
+ "style", // Code style changes (formatting, etc.) - no version increment
13
+ "refactor", // Code refactoring - no version increment
14
+ "perf", // Performance improvements - no version increment
15
+ "test", // Adding/updating tests - no version increment
16
+ "build", // Build system changes - no version increment
17
+ "ci", // CI/CD changes - no version increment
18
+ "chore", // Maintenance tasks - no version increment
19
+ "revert", // Revert previous commit - no version increment
20
+ ],
21
+ ],
22
+ },
23
+ };
@@ -0,0 +1,4 @@
1
+ // @generated by expo-module-scripts
2
+ const { defineConfig } = require('eslint/config');
3
+ const baseConfig = require('expo-module-scripts/eslint.config.base');
4
+ module.exports = defineConfig([baseConfig]);