@adminide-stack/yantra-mobile 12.0.186-alpha.0 → 12.0.187-alpha.0

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.
@@ -11,11 +11,19 @@ import {Keyboard,NativeModules,TurboModuleRegistry}from'react-native';function i
11
11
  return false;
12
12
  }
13
13
  }
14
+ function keyboardControllerModule() {
15
+ if (!isKeyboardControllerAvailable()) return null;
16
+ try {
17
+ return require("react-native-keyboard-controller");
18
+ } catch (e) {
19
+ return null;
20
+ }
21
+ }
14
22
  function dismissKeyboard() {
23
+ var _a;
15
24
  Keyboard.dismiss();
16
- if (!isKeyboardControllerAvailable()) return;
17
25
  try {
18
- require("react-native-keyboard-controller").KeyboardController.dismiss();
26
+ void ((_a = keyboardControllerModule()) == null ? void 0 : _a.KeyboardController.dismiss());
19
27
  } catch (e) {
20
28
  }
21
- }export{dismissKeyboard,isKeyboardControllerAvailable};//# sourceMappingURL=keyboardController.js.map
29
+ }export{dismissKeyboard,isKeyboardControllerAvailable,keyboardControllerModule};//# sourceMappingURL=keyboardController.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"keyboardController.js","sources":["../../src/utils/keyboardController.ts"],"sourcesContent":["import { Keyboard, NativeModules, TurboModuleRegistry } from 'react-native';\n\n/**\n * `react-native-keyboard-controller` is native. Expo Go does not ship it, and\n * importing the package there throws \"doesn't seem to be linked\".\n */\nexport function isKeyboardControllerAvailable(): boolean {\n try {\n const Constants = require('expo-constants').default as { appOwnership?: string | null };\n if (Constants?.appOwnership === 'expo') return false;\n } catch {\n /* not running under Expo */\n }\n try {\n if (NativeModules.KeyboardController) return true;\n return TurboModuleRegistry.get('KeyboardController') != null;\n } catch {\n return false;\n }\n}\n\n/** Blur the focused field. Safe in Expo Go (skips the native controller). */\nexport function dismissKeyboard(): void {\n Keyboard.dismiss();\n if (!isKeyboardControllerAvailable()) return;\n try {\n require('react-native-keyboard-controller').KeyboardController.dismiss();\n } catch {\n /* unlinked native module */\n }\n}\n"],"names":[],"mappings":"sEAMO,SAAS,6BAAyC,GAAA;AACvD,EAAI,IAAA;AACF,IAAM,MAAA,SAAA,GAAY,OAAQ,CAAA,gBAAgB,CAAE,CAAA,OAAA;AAG5C,IAAI,IAAA,CAAA,SAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,SAAA,CAAW,YAAiB,MAAA,MAAA,EAAe,OAAA,KAAA;AAAA,GACzC,CAAA,OAAA,CAAA,EAAA;AAAA;AAGR,EAAI,IAAA;AACF,IAAI,IAAA,aAAA,CAAc,oBAA2B,OAAA,IAAA;AAC7C,IAAO,OAAA,mBAAA,CAAoB,GAAI,CAAA,oBAAoB,CAAK,IAAA,IAAA;AAAA,GAClD,CAAA,OAAA,CAAA,EAAA;AACN,IAAO,OAAA,KAAA;AAAA;AAEX;AAGO,SAAS,eAAwB,GAAA;AACtC,EAAA,QAAA,CAAS,OAAQ,EAAA;AACjB,EAAI,IAAA,CAAC,+BAAiC,EAAA;AACtC,EAAI,IAAA;AACF,IAAQ,OAAA,CAAA,kCAAkC,CAAE,CAAA,kBAAA,CAAmB,OAAQ,EAAA;AAAA,GACjE,CAAA,OAAA,CAAA,EAAA;AAAA;AAGV"}
1
+ {"version":3,"file":"keyboardController.js","sources":["../../src/utils/keyboardController.ts"],"sourcesContent":["import { Keyboard, NativeModules, TurboModuleRegistry } from 'react-native';\n\nexport type KeyboardControllerModule = typeof import('react-native-keyboard-controller');\n\n/**\n * `react-native-keyboard-controller` is native. Expo Go does not ship it, and\n * importing the package there throws \"doesn't seem to be linked\".\n */\nexport function isKeyboardControllerAvailable(): boolean {\n try {\n // Resolved lazily: this file also loads where Expo is not installed.\n // eslint-disable-next-line global-require, @typescript-eslint/no-var-requires\n const Constants = require('expo-constants').default as { appOwnership?: string | null };\n if (Constants?.appOwnership === 'expo') return false;\n } catch {\n /* not running under Expo */\n }\n try {\n if (NativeModules.KeyboardController) return true;\n return TurboModuleRegistry.get('KeyboardController') != null;\n } catch {\n return false;\n }\n}\n\n/**\n * The keyboard-controller package where its native module is linked, else null.\n * The one place that loads it: a static import throws in Expo Go.\n */\nexport function keyboardControllerModule(): KeyboardControllerModule | null {\n if (!isKeyboardControllerAvailable()) return null;\n try {\n // eslint-disable-next-line global-require, @typescript-eslint/no-var-requires\n return require('react-native-keyboard-controller') as KeyboardControllerModule;\n } catch {\n /* unlinked native module */\n return null;\n }\n}\n\n/** Blur the focused field. Safe in Expo Go (skips the native controller). */\nexport function dismissKeyboard(): void {\n Keyboard.dismiss();\n try {\n void keyboardControllerModule()?.KeyboardController.dismiss();\n } catch {\n /* unlinked native module */\n }\n}\n"],"names":[],"mappings":"sEAOO,SAAS,6BAAyC,GAAA;AACvD,EAAI,IAAA;AAGF,IAAM,MAAA,SAAA,GAAY,OAAQ,CAAA,gBAAgB,CAAE,CAAA,OAAA;AAG5C,IAAI,IAAA,CAAA,SAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,SAAA,CAAW,YAAiB,MAAA,MAAA,EAAe,OAAA,KAAA;AAAA,GACzC,CAAA,OAAA,CAAA,EAAA;AAAA;AAGR,EAAI,IAAA;AACF,IAAI,IAAA,aAAA,CAAc,oBAA2B,OAAA,IAAA;AAC7C,IAAO,OAAA,mBAAA,CAAoB,GAAI,CAAA,oBAAoB,CAAK,IAAA,IAAA;AAAA,GAClD,CAAA,OAAA,CAAA,EAAA;AACN,IAAO,OAAA,KAAA;AAAA;AAEX;AAMO,SAAS,wBAA4D,GAAA;AAC1E,EAAI,IAAA,CAAC,6BAA8B,EAAA,EAAU,OAAA,IAAA;AAC7C,EAAI,IAAA;AAEF,IAAA,OAAO,QAAQ,kCAAkC,CAAA;AAAA,GAC3C,CAAA,OAAA,CAAA,EAAA;AAEN,IAAO,OAAA,IAAA;AAAA;AAEX;AAGO,SAAS,eAAwB,GAAA;AA1CxC,EAAA,IAAA,EAAA;AA2CE,EAAA,QAAA,CAAS,OAAQ,EAAA;AACjB,EAAI,IAAA;AACF,IAAK,MAAA,CAAA,EAAA,GAAA,wBAAA,EAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAA4B,kBAAmB,CAAA,OAAA,EAAA,CAAA;AAAA,GAC9C,CAAA,OAAA,CAAA,EAAA;AAAA;AAGV"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminide-stack/yantra-mobile",
3
- "version": "12.0.186-alpha.0",
3
+ "version": "12.0.187-alpha.0",
4
4
  "description": "Sample core for higher packages to depend on",
5
5
  "license": "ISC",
6
6
  "author": "CDMBase LLC",
@@ -27,7 +27,7 @@
27
27
  "uuid": "^9.0.0"
28
28
  },
29
29
  "devDependencies": {
30
- "common": "12.0.185-alpha.0",
30
+ "common": "12.0.187-alpha.0",
31
31
  "libphonenumber-js": "^1.13.3"
32
32
  },
33
33
  "peerDependencies": {
@@ -68,5 +68,5 @@
68
68
  "typescript": {
69
69
  "definition": "lib/index.d.ts"
70
70
  },
71
- "gitHead": "32a541e5d29b5ccc1d9153b313ca83bd86adc25c"
71
+ "gitHead": "3a0782531f7036cffaf11bc06d8be6f384baca2c"
72
72
  }