parousya-shared 1.0.1 → 1.0.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/dist/themes/use-theme.js +2 -3
- package/dist/utils/common/constants.d.ts +10 -0
- package/dist/utils/common/constants.js +18 -0
- package/dist/utils/common/events.d.ts +24 -0
- package/dist/utils/common/events.js +31 -0
- package/dist/utils/common/index.d.ts +2 -0
- package/dist/utils/common/index.js +18 -0
- package/package.json +7 -2
package/dist/themes/use-theme.js
CHANGED
|
@@ -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
|
-
|
|
10
|
+
const common_1 = require("../utils/common");
|
|
11
11
|
const useAppTheme = () => {
|
|
12
|
-
|
|
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,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.
|
|
3
|
+
"version": "1.0.2",
|
|
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",
|