parousya-shared 1.0.1 → 1.0.3

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.
@@ -15,4 +15,8 @@ export declare const Button: ({ children, mode, style, disabled, loading, contai
15
15
  containerProps?: IViewProps;
16
16
  textProps?: Omit<TextProps, "children">;
17
17
  iconSize?: number;
18
+ testID?: string;
19
+ accessibilityLabel?: string;
20
+ labelStyle?: any;
21
+ [key: string]: any;
18
22
  }) => React.JSX.Element;
@@ -23,30 +23,59 @@ const Text = ({ children, txOptions, style, allowFontScaling = false, color, siz
23
23
  width && textStyle.push({ width: themes_1.Platform.SizeScale(width) });
24
24
  underline && textStyle.push({ textDecorationLine: 'underline' });
25
25
  /* font weight */
26
- if (regular) {
27
- textStyle.push({
28
- fontFamily: themes_1.Platform.fontNames.regular,
29
- });
30
- }
31
- else if (bold) {
32
- textStyle.push({
33
- fontFamily: themes_1.Platform.fontNames.bold,
34
- });
35
- }
36
- else if (medium) {
37
- textStyle.push({
38
- fontFamily: themes_1.Platform.fontNames.medium,
39
- });
40
- }
41
- else if (semibold) {
42
- textStyle.push({
43
- fontFamily: themes_1.Platform.fontNames.medium,
44
- });
26
+ if (themes_1.Platform.isIOS) {
27
+ if (regular) {
28
+ textStyle.push({
29
+ fontWeight: '400',
30
+ });
31
+ }
32
+ else if (bold) {
33
+ textStyle.push({
34
+ fontWeight: '700',
35
+ });
36
+ }
37
+ else if (medium) {
38
+ textStyle.push({
39
+ fontWeight: '500',
40
+ });
41
+ }
42
+ else if (semibold) {
43
+ textStyle.push({
44
+ fontWeight: '600',
45
+ });
46
+ }
47
+ else {
48
+ textStyle.push({
49
+ fontWeight: '500',
50
+ });
51
+ }
45
52
  }
46
53
  else {
47
- textStyle.push({
48
- fontFamily: themes_1.Platform.fontNames.medium,
49
- });
54
+ if (regular) {
55
+ textStyle.push({
56
+ fontFamily: themes_1.Platform.fontNames.regular,
57
+ });
58
+ }
59
+ else if (bold) {
60
+ textStyle.push({
61
+ fontFamily: themes_1.Platform.fontNames.bold,
62
+ });
63
+ }
64
+ else if (medium) {
65
+ textStyle.push({
66
+ fontFamily: themes_1.Platform.fontNames.medium,
67
+ });
68
+ }
69
+ else if (semibold) {
70
+ textStyle.push({
71
+ fontFamily: themes_1.Platform.fontNames.medium,
72
+ });
73
+ }
74
+ else {
75
+ textStyle.push({
76
+ fontFamily: themes_1.Platform.fontNames.medium,
77
+ });
78
+ }
50
79
  }
51
80
  if (lineHeight) {
52
81
  textStyle.push({ lineHeight: themes_1.Platform.SizeScale(lineHeight) });
@@ -11,7 +11,7 @@ const themes_1 = require("../../themes");
11
11
  const ThemeProvider = ({ children, themeConfig: config }) => {
12
12
  const isLightTheme = true;
13
13
  const themeConfig = isLightTheme ? themes_1.DefaultTheme : themes_1.DarkTheme;
14
- return (react_1.default.createElement(react_native_paper_1.Provider, { theme: (config || themeConfig) },
14
+ return (react_1.default.createElement(react_native_paper_1.PaperProvider, { theme: (config || themeConfig) },
15
15
  react_1.default.createElement(react_native_1.StatusBar, { barStyle: "dark-content", translucent: true, backgroundColor: "transparent" }),
16
16
  children));
17
17
  };
@@ -1,4 +1,4 @@
1
- import { FlexAlignType, StyleProp, ViewProps, ViewStyle } from 'react-native/types';
1
+ import { FlexAlignType, StyleProp, ViewProps, ViewStyle } from 'react-native';
2
2
  import { Colors } from '../../themes';
3
3
  export interface IViewProps extends ViewProps {
4
4
  children?: React.ReactNode;
@@ -20,15 +20,15 @@ const fontConfig = {
20
20
  },
21
21
  ios: {
22
22
  regular: {
23
- fontFamily: platform_1.Platform.fontNames.regular,
24
- fontWeight: '500',
23
+ fontFamily: 'System',
24
+ fontWeight: '400',
25
25
  },
26
26
  medium: {
27
- fontFamily: platform_1.Platform.fontNames.medium,
28
- fontWeight: '600',
27
+ fontFamily: 'System',
28
+ fontWeight: '500',
29
29
  },
30
30
  bold: {
31
- fontFamily: platform_1.Platform.fontNames.bold,
31
+ fontFamily: 'System',
32
32
  fontWeight: '700',
33
33
  },
34
34
  },
@@ -63,10 +63,10 @@ class PBase {
63
63
  this.headerHeight = this.SizeScale(50);
64
64
  this.version = react_native_1.Platform.Version;
65
65
  this.fontNames = {
66
- bold: 'SFProDisplay-Bold',
67
- medium: 'SFProDisplay-Medium',
68
- regular: 'SFProDisplay-Regular',
69
- light: 'SFProDisplay-Light',
66
+ bold: react_native_1.Platform.OS === 'ios' ? 'System' : 'SFProDisplay-Bold',
67
+ medium: react_native_1.Platform.OS === 'ios' ? 'System' : 'SFProDisplay-Medium',
68
+ regular: react_native_1.Platform.OS === 'ios' ? 'System' : 'SFProDisplay-Regular',
69
+ light: react_native_1.Platform.OS === 'ios' ? 'System' : 'SFProDisplay-Light',
70
70
  };
71
71
  this.textBase = {
72
72
  fontSize: this.SizeScale(),
@@ -7,10 +7,9 @@ const dark_theme_1 = require("./dark-theme");
7
7
  const default_theme_1 = require("./default-theme");
8
8
  const faith_dark_theme_1 = require("./faith-dark-theme");
9
9
  const faith_default_theme_1 = require("./faith-default-theme");
10
- // import Config from 'react-native-config';
10
+ const common_1 = require("../utils/common");
11
11
  const useAppTheme = () => {
12
- // const SYSTEM_THEME = Config.SYSTEM_THEME || 'DEFAULT'
13
- const SYSTEM_THEME = 'FAITH';
12
+ const SYSTEM_THEME = common_1.ENV.EXPO_PUBLIC_SYSTEM_THEME || 'DEFAULT';
14
13
  const isLightTheme = (0, react_native_1.useColorScheme)() === 'light';
15
14
  const THEMES = {
16
15
  'FAITH': isLightTheme ? faith_default_theme_1.FaithDefaultTheme : faith_dark_theme_1.FaithDarkTheme,
@@ -0,0 +1,10 @@
1
+ export declare const ACTIVE_OPACITY_DEFAULT = 0.8;
2
+ export declare const ENV: {
3
+ EXPO_PUBLIC_ENV: any;
4
+ EXPO_PUBLIC_APP_BUNDLE_ID: any;
5
+ EXPO_PUBLIC_APP_NAME: any;
6
+ EXPO_PUBLIC_APP_VERSION_CODE: any;
7
+ EXPO_PUBLIC_SYSTEM_THEME: any;
8
+ EXPO_PUBLIC_APP_VERSION_NAME: any;
9
+ EXPO_PUBLIC_BASE_URL: any;
10
+ };
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.ENV = exports.ACTIVE_OPACITY_DEFAULT = void 0;
8
+ const expo_constants_1 = __importDefault(require("expo-constants"));
9
+ exports.ACTIVE_OPACITY_DEFAULT = 0.8;
10
+ exports.ENV = {
11
+ EXPO_PUBLIC_ENV: (_c = (_b = (_a = expo_constants_1.default.expoConfig) === null || _a === void 0 ? void 0 : _a.extra) === null || _b === void 0 ? void 0 : _b.env) === null || _c === void 0 ? void 0 : _c.EXPO_PUBLIC_ENV,
12
+ EXPO_PUBLIC_APP_BUNDLE_ID: (_f = (_e = (_d = expo_constants_1.default.expoConfig) === null || _d === void 0 ? void 0 : _d.extra) === null || _e === void 0 ? void 0 : _e.env) === null || _f === void 0 ? void 0 : _f.EXPO_PUBLIC_APP_BUNDLE_ID,
13
+ EXPO_PUBLIC_APP_NAME: (_j = (_h = (_g = expo_constants_1.default.expoConfig) === null || _g === void 0 ? void 0 : _g.extra) === null || _h === void 0 ? void 0 : _h.env) === null || _j === void 0 ? void 0 : _j.EXPO_PUBLIC_APP_NAME,
14
+ EXPO_PUBLIC_APP_VERSION_CODE: (_m = (_l = (_k = expo_constants_1.default.expoConfig) === null || _k === void 0 ? void 0 : _k.extra) === null || _l === void 0 ? void 0 : _l.env) === null || _m === void 0 ? void 0 : _m.EXPO_PUBLIC_APP_VERSION_CODE,
15
+ EXPO_PUBLIC_SYSTEM_THEME: (_q = (_p = (_o = expo_constants_1.default.expoConfig) === null || _o === void 0 ? void 0 : _o.extra) === null || _p === void 0 ? void 0 : _p.env) === null || _q === void 0 ? void 0 : _q.EXPO_PUBLIC_SYSTEM_THEME,
16
+ EXPO_PUBLIC_APP_VERSION_NAME: (_t = (_s = (_r = expo_constants_1.default.expoConfig) === null || _r === void 0 ? void 0 : _r.extra) === null || _s === void 0 ? void 0 : _s.env) === null || _t === void 0 ? void 0 : _t.EXPO_PUBLIC_APP_VERSION_NAME,
17
+ EXPO_PUBLIC_BASE_URL: (_w = (_v = (_u = expo_constants_1.default.expoConfig) === null || _u === void 0 ? void 0 : _u.extra) === null || _v === void 0 ? void 0 : _v.env) === null || _w === void 0 ? void 0 : _w.EXPO_PUBLIC_BASE_URL,
18
+ };
@@ -0,0 +1,24 @@
1
+ export declare enum AUDIO_EVENTS {
2
+ AUDIO_REMOTE_NEXT = "AUDIO_REMOTE_NEXT",
3
+ AUDIO_REMOTE_ENDED = "AUDIO_REMOTE_ENDED",
4
+ AUDIO_REMOTE_PLAY = "AUDIO_REMOTE_PLAY",
5
+ AUDIO_REMOTE_PAUSED = "AUDIO_REMOTE_PAUSED",
6
+ AUDIO_REMOTE_PREVIOUS = "AUDIO_REMOTE_PREVIOUS"
7
+ }
8
+ export declare enum DEVICE_EVENTS {
9
+ SOUND_PLAYER_PAUSED = "SOUND_PLAYER_PAUSED",
10
+ SOUND_PLAYER_RESET = "SOUND_PLAYER_RESET",
11
+ PLAY_BEEP_SOUND = "PLAY_BEEP_SOUND",
12
+ DEVICE_RETRY_RECORDER = "DEVICE_RETRY_RECORDER",
13
+ CHANGE_AUDIO_ACCENT = "CHANGE_AUDIO_ACCENT",
14
+ AUDIO_RECORDING = "AUDIO_RECORDING",
15
+ NAVIGATE_TO_SCREEN = "NAVIGATE_TO_SCREEN",
16
+ NEW_AUDIO_PLAYING = "NEW_AUDIO_PLAYING"
17
+ }
18
+ export declare enum EXPO_AUDIO_EVENTS {
19
+ AUDIO_FINISHED = "AUDIO_FINISHED",
20
+ AUDIO_PLAYING = "AUDIO_PLAYING"
21
+ }
22
+ export declare enum SOCKET_EVENTS {
23
+ LISTEN = "LISTEN"
24
+ }
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SOCKET_EVENTS = exports.EXPO_AUDIO_EVENTS = exports.DEVICE_EVENTS = exports.AUDIO_EVENTS = void 0;
4
+ var AUDIO_EVENTS;
5
+ (function (AUDIO_EVENTS) {
6
+ AUDIO_EVENTS["AUDIO_REMOTE_NEXT"] = "AUDIO_REMOTE_NEXT";
7
+ AUDIO_EVENTS["AUDIO_REMOTE_ENDED"] = "AUDIO_REMOTE_ENDED";
8
+ AUDIO_EVENTS["AUDIO_REMOTE_PLAY"] = "AUDIO_REMOTE_PLAY";
9
+ AUDIO_EVENTS["AUDIO_REMOTE_PAUSED"] = "AUDIO_REMOTE_PAUSED";
10
+ AUDIO_EVENTS["AUDIO_REMOTE_PREVIOUS"] = "AUDIO_REMOTE_PREVIOUS";
11
+ })(AUDIO_EVENTS || (exports.AUDIO_EVENTS = AUDIO_EVENTS = {}));
12
+ var DEVICE_EVENTS;
13
+ (function (DEVICE_EVENTS) {
14
+ DEVICE_EVENTS["SOUND_PLAYER_PAUSED"] = "SOUND_PLAYER_PAUSED";
15
+ DEVICE_EVENTS["SOUND_PLAYER_RESET"] = "SOUND_PLAYER_RESET";
16
+ DEVICE_EVENTS["PLAY_BEEP_SOUND"] = "PLAY_BEEP_SOUND";
17
+ DEVICE_EVENTS["DEVICE_RETRY_RECORDER"] = "DEVICE_RETRY_RECORDER";
18
+ DEVICE_EVENTS["CHANGE_AUDIO_ACCENT"] = "CHANGE_AUDIO_ACCENT";
19
+ DEVICE_EVENTS["AUDIO_RECORDING"] = "AUDIO_RECORDING";
20
+ DEVICE_EVENTS["NAVIGATE_TO_SCREEN"] = "NAVIGATE_TO_SCREEN";
21
+ DEVICE_EVENTS["NEW_AUDIO_PLAYING"] = "NEW_AUDIO_PLAYING";
22
+ })(DEVICE_EVENTS || (exports.DEVICE_EVENTS = DEVICE_EVENTS = {}));
23
+ var EXPO_AUDIO_EVENTS;
24
+ (function (EXPO_AUDIO_EVENTS) {
25
+ EXPO_AUDIO_EVENTS["AUDIO_FINISHED"] = "AUDIO_FINISHED";
26
+ EXPO_AUDIO_EVENTS["AUDIO_PLAYING"] = "AUDIO_PLAYING";
27
+ })(EXPO_AUDIO_EVENTS || (exports.EXPO_AUDIO_EVENTS = EXPO_AUDIO_EVENTS = {}));
28
+ var SOCKET_EVENTS;
29
+ (function (SOCKET_EVENTS) {
30
+ SOCKET_EVENTS["LISTEN"] = "LISTEN";
31
+ })(SOCKET_EVENTS || (exports.SOCKET_EVENTS = SOCKET_EVENTS = {}));
@@ -0,0 +1,2 @@
1
+ export * from './constants';
2
+ export * from './events';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./constants"), exports);
18
+ __exportStar(require("./events"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "parousya-shared",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "build": "rimraf dist && tsc",
@@ -8,9 +8,11 @@
8
8
  "prepare": "npm run build"
9
9
  },
10
10
  "devDependencies": {
11
+ "@expo/vector-icons": "^15.1.1",
11
12
  "@types/react": "^19.2.18",
12
13
  "@types/react-native": "^0.72.8",
13
14
  "date-fns": "^3.6.0",
15
+ "expo-constants": "^57.0.10",
14
16
  "react": "19.0.0",
15
17
  "react-hook-form": "^7.54.2",
16
18
  "react-native": "0.78.1",
@@ -18,10 +20,12 @@
18
20
  "react-native-modal": "^13.0.1",
19
21
  "react-native-paper": "^5.12.3",
20
22
  "react-native-safe-area-context": "^5.3.0",
23
+ "react-native-version-info": "^1.1.1",
21
24
  "rimraf": "^3.0.2",
22
25
  "typescript": "^5.0.4"
23
26
  },
24
27
  "peerDependencies": {
28
+ "@expo/vector-icons": "*",
25
29
  "date-fns": "*",
26
30
  "react": "*",
27
31
  "react-hook-form": "*",
@@ -29,7 +33,8 @@
29
33
  "react-native-avoid-softinput": "*",
30
34
  "react-native-modal": "*",
31
35
  "react-native-paper": "*",
32
- "react-native-safe-area-context": "*"
36
+ "react-native-safe-area-context": "*",
37
+ "react-native-version-info": "*"
33
38
  },
34
39
  "keywords": [],
35
40
  "author": "Than Jack",