react-native-auto-positioned-popup 1.0.2 → 1.0.4
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RootViewContext.d.ts","sourceRoot":"","sources":["../src/RootViewContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAmE,MAAM,OAAO,CAAC;AAC1G,OAAO,EAAmB,SAAS,
|
|
1
|
+
{"version":3,"file":"RootViewContext.d.ts","sourceRoot":"","sources":["../src/RootViewContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAmE,MAAM,OAAO,CAAC;AAC1G,OAAO,EAAmB,SAAS,EAAW,MAAM,cAAc,CAAC;AAEnE,UAAU,eAAe;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,SAAS,CAAC;IACjB,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,UAAU,mBAAmB;IAC3B,WAAW,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,IAAI,CAAC;IAC7C,sBAAsB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;IAC/D,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,eAAe,CAAC,KAAK,IAAI,CAAC;IACvE,cAAc,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,eAAe,EAAE,KAAK,IAAI,CAAC;IACvF,SAAS,EAAE,eAAe,EAAE,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/C;AAED,UAAU,qBAAqB;IAC7B,QAAQ,EAAE,SAAS,CAAC;CACrB;AAGD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA6I5D,CAAC;AAIF,eAAO,MAAM,WAAW,QAAO,mBAM9B,CAAC"}
|
package/lib/RootViewContext.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { createContext, useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
2
|
-
import { Pressable, View } from 'react-native';
|
|
2
|
+
import { Pressable, View, Keyboard } from 'react-native';
|
|
3
3
|
const RootViewContext = createContext(undefined);
|
|
4
4
|
/**
|
|
5
5
|
* Dynamically add or remove views on the root view.
|
|
@@ -32,9 +32,7 @@ export const RootViewProvider = ({ children }) => {
|
|
|
32
32
|
// Ensure keyboard is dismissed when force removing all root views
|
|
33
33
|
if (force) {
|
|
34
34
|
// Dismiss keyboard first
|
|
35
|
-
|
|
36
|
-
global.dismissKeyboard();
|
|
37
|
-
}
|
|
35
|
+
Keyboard.dismiss();
|
|
38
36
|
// Small delay to ensure keyboard is dismissed before removing views
|
|
39
37
|
setTimeout(() => {
|
|
40
38
|
setRootViews((prev) => []);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-auto-positioned-popup",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "A highly customizable React Native auto-positioned popup component with search functionality and flexible styling options",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -47,13 +47,13 @@
|
|
|
47
47
|
],
|
|
48
48
|
"author": "Stark <stark@example.com>",
|
|
49
49
|
"license": "MIT",
|
|
50
|
-
"homepage": "https://github.com/
|
|
50
|
+
"homepage": "https://github.com/StarksJohn/react-native-auto-positioned-popup#readme",
|
|
51
51
|
"repository": {
|
|
52
52
|
"type": "git",
|
|
53
|
-
"url": "git+https://github.com/
|
|
53
|
+
"url": "git+https://github.com/StarksJohn/react-native-auto-positioned-popup.git"
|
|
54
54
|
},
|
|
55
55
|
"bugs": {
|
|
56
|
-
"url": "https://github.com/
|
|
56
|
+
"url": "https://github.com/StarksJohn/react-native-auto-positioned-popup/issues"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"react": ">=16.8.0",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"engines": {
|
|
76
76
|
"node": ">=14.0.0"
|
|
77
77
|
},
|
|
78
|
-
"react-native": "
|
|
78
|
+
"react-native": "lib/index.js",
|
|
79
79
|
"dependencies": {
|
|
80
80
|
"react-native-advanced-flatlist": "^1.0.4"
|
|
81
81
|
}
|
package/src/RootViewContext.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { ReactNode, createContext, useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
2
|
-
import { Pressable, View, ViewStyle } from 'react-native';
|
|
2
|
+
import { Pressable, View, ViewStyle,Keyboard } from 'react-native';
|
|
3
3
|
|
|
4
4
|
interface DynamicViewBase {
|
|
5
5
|
id: string;
|
|
@@ -59,9 +59,7 @@ export const RootViewProvider: React.FC<RootViewProviderProps> = ({ children })
|
|
|
59
59
|
// Ensure keyboard is dismissed when force removing all root views
|
|
60
60
|
if (force) {
|
|
61
61
|
// Dismiss keyboard first
|
|
62
|
-
|
|
63
|
-
(global as any).dismissKeyboard();
|
|
64
|
-
}
|
|
62
|
+
Keyboard.dismiss();
|
|
65
63
|
|
|
66
64
|
// Small delay to ensure keyboard is dismissed before removing views
|
|
67
65
|
setTimeout(() => {
|
|
@@ -183,4 +181,4 @@ export const useRootView = (): RootViewContextType => {
|
|
|
183
181
|
throw new Error('useRootView must be used within a RootViewProvider');
|
|
184
182
|
}
|
|
185
183
|
return context;
|
|
186
|
-
};
|
|
184
|
+
};
|