@teamvortexsoftware/vortex-react-native 0.0.9 → 0.0.11

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.
@@ -18,12 +18,10 @@ const react_native_1 = require("react-native");
18
18
  const api_1 = __importDefault(require("../shared/api"));
19
19
  const themeUtils_1 = require("../utils/themeUtils");
20
20
  const useThemeStyles_1 = require("./useThemeStyles");
21
- const expo_standard_web_crypto_1 = require("expo-standard-web-crypto");
22
- const uuid_1 = require("uuid");
21
+ const react_native_uuid_1 = __importDefault(require("react-native-uuid"));
23
22
  const formUtils_1 = require("../utils/formUtils");
24
- (0, expo_standard_web_crypto_1.polyfillWebCrypto)();
25
23
  function useVortexInvite({ widgetId, environmentId, vortexApiHost, isLoading = false, jwt, onSuccess, onError, }) {
26
- const vortexClient = (0, react_1.useMemo)(() => new api_1.default(vortexApiHost, (0, uuid_1.v4)()), [vortexApiHost]);
24
+ const vortexClient = (0, react_1.useMemo)(() => new api_1.default(vortexApiHost, react_native_uuid_1.default.v4()), [vortexApiHost]);
27
25
  const [widgetConfiguration, setWidgetConfiguration] = (0, react_1.useState)();
28
26
  const [error, setError] = (0, react_1.useState)(null);
29
27
  const [fetching, setFetching] = (0, react_1.useState)(isLoading);
@@ -23,7 +23,7 @@ export declare function useVortexInvite({ widgetId, environmentId, vortexApiHost
23
23
  themeColors: import("../utils/themeUtils").ThemeColors;
24
24
  themeStyles: Record<string, Record<string, string | number>>;
25
25
  has: import("../utils/themeUtils").FeatureFlags;
26
- options: import("@teamvortexsoftware/vortex-core").WidgetConfigurationConfigurationProps;
26
+ options: {};
27
27
  inviteLoading: boolean;
28
28
  showSuccessMessage: boolean;
29
29
  handleInviteClick: (contentTokens?: Attributes) => Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"useVortexInvite.d.ts","sourceRoot":"","sources":["../../../src/hooks/useVortexInvite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,i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E,kBAAkB,KAAK,IAAI,CAAC;IACjD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;CAC1D;AAED,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,aAAa,EACb,aAAa,EACb,SAAiB,EACjB,GAAG,EACH,SAAS,EACT,OAAO,GACR,EAAE,sBAAsB;;;iBAIuB,MAAM;;;;;;;;;;;;;wCAqIH,UAAU,KAAG,OAAO,CAAC,IAAI,CAAC;;;;;;;;;;;EAqJ5E"}
package/package.json CHANGED
@@ -2,28 +2,20 @@
2
2
  "name": "@teamvortexsoftware/vortex-react-native",
3
3
  "description": "",
4
4
  "author": "@teamvortexsoftware",
5
- "version": "0.0.9",
5
+ "version": "0.0.11",
6
6
  "files": [
7
- "dist",
8
- "plugin",
9
- "plugin.js"
7
+ "dist"
10
8
  ],
11
- "main": "./plugin/withVortexReactNative.js",
9
+ "main": "./dist/index.js",
12
10
  "exports": {
13
- ".": "./plugin.js",
11
+ ".": "./dist/index.js",
14
12
  "./runtime": "./dist/index.js"
15
13
  },
16
- "expo": {
17
- "plugins": [
18
- "@teamvortexsoftware/vortex-react-native"
19
- ]
20
- },
21
14
  "types": "dist/types/index.d.ts",
22
15
  "react-native": "dist/index.js",
23
16
  "devDependencies": {
24
17
  "@eslint/js": "^9.24.0",
25
- "@expo/config-plugins": "^10.0.2",
26
- "@types/react": "18.2.14",
18
+ "@types/react": "^19.0.10",
27
19
  "@types/react-native-vector-icons": "^6.4.18",
28
20
  "eslint": "^9.24.0",
29
21
  "eslint-plugin-react-native": "^4.1.0",
@@ -33,18 +25,15 @@
33
25
  "@teamvortexsoftware/eslint-config": "0.0.0"
34
26
  },
35
27
  "dependencies": {
36
- "expo-standard-web-crypto": "^2.1.4",
37
- "react": "18.3.1",
38
- "react-native": "0.76.9",
28
+ "react-native-qrcode-svg": "^6.3.15",
29
+ "react-native-svg": "^15.12.0",
30
+ "react-native-uuid": "^2.0.3",
39
31
  "react-native-vector-icons": "^10.2.0",
40
- "uuid": "11.0.5",
41
32
  "@teamvortexsoftware/vortex-core": "0.0.1"
42
33
  },
43
34
  "peerDependencies": {
44
- "react": "*",
45
- "react-native": "*",
46
- "react-native-qrcode-svg": "*",
47
- "react-native-svg": "*"
35
+ "react": ">=19.0.0",
36
+ "react-native": ">=0.79.0"
48
37
  },
49
38
  "scripts": {
50
39
  "build": "tsc",
@@ -1,74 +0,0 @@
1
- const { withInfoPlist, withProjectBuildGradle, IOSConfig, withDangerousMod } = require('@expo/config-plugins');
2
- const fs = require('fs');
3
- const path = require('path');
4
-
5
- const customFonts = [
6
- "FontAwesome6_Brands.ttf",
7
- "FontAwesome6_Regular.ttf",
8
- "FontAwesome6_Solid.ttf",
9
- ];
10
-
11
- // iOS integration
12
- const withIosFonts = (config) => {
13
- return withInfoPlist(config, (modConfig) => {
14
- console.log('[withVortexReactNative] Adding custom fonts to iOS Info.plist');
15
-
16
- const existingFonts = Array.isArray(modConfig.modResults.UIAppFonts)
17
- ? modConfig.modResults.UIAppFonts
18
- : [];
19
-
20
- modConfig.modResults.UIAppFonts = Array.from(new Set([...existingFonts, ...customFonts]));
21
-
22
- return modConfig;
23
- });
24
- };
25
-
26
- // Android integration
27
- const withAndroidFonts = (config) => {
28
- // Copy fonts to Android assets directory
29
- return withDangerousMod(config, [
30
- 'android',
31
- async (config) => {
32
- console.log('[withVortexReactNative] Setting up fonts for Android');
33
-
34
- const projectRoot = config.modRequest.projectRoot;
35
- const fontsDirectory = path.resolve(projectRoot, 'node_modules/react-native-vector-icons/Fonts');
36
- const assetsDirectory = path.resolve(projectRoot, 'android/app/src/main/assets/fonts');
37
-
38
- // Ensure the assets directory exists
39
- if (!fs.existsSync(assetsDirectory)) {
40
- fs.mkdirSync(assetsDirectory, { recursive: true });
41
- }
42
-
43
- // Copy each font file to the assets directory
44
- for (const font of customFonts) {
45
- const sourcePath = path.resolve(fontsDirectory, font);
46
- const destPath = path.resolve(assetsDirectory, font);
47
-
48
- if (fs.existsSync(sourcePath)) {
49
- fs.copyFileSync(sourcePath, destPath);
50
- console.log(`[withVortexReactNative] Copied ${font} to Android assets`);
51
- } else {
52
- console.warn(`[withVortexReactNative] Font file not found: ${sourcePath}`);
53
- }
54
- }
55
-
56
- return config;
57
- },
58
- ]);
59
- };
60
-
61
- // Main plugin function
62
- const withVortexReactNative = (config) => {
63
- console.log('[withVortexReactNative] plugin running');
64
-
65
- // Apply iOS configuration
66
- config = withIosFonts(config);
67
-
68
- // Apply Android configuration
69
- config = withAndroidFonts(config);
70
-
71
- return config;
72
- };
73
-
74
- module.exports = withVortexReactNative;
package/plugin.js DELETED
@@ -1,2 +0,0 @@
1
- // plugin.js
2
- module.exports = require('./plugin/withVortexReactNative');