@react-native-menu/menu 1.2.4 → 2.0.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.
- package/android/src/main/java/com/reactnativemenu/MenuView.kt +5 -6
- package/android/src/main/java/com/reactnativemenu/MenuViewManagerBase.kt +3 -3
- package/ios/NewArch/MenuView.mm +5 -0
- package/ios/RCTMenu.xcodeproj/project.pbxproj +0 -0
- package/package.json +15 -14
- package/react-native-menu.podspec +1 -25
- package/android/.settings/org.eclipse.buildship.core.prefs +0 -13
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +0 -6
|
@@ -24,6 +24,11 @@ class MenuView(private val mContext: ReactContext) : ReactViewGroup(mContext) {
|
|
|
24
24
|
private var mIsOnLongPress = false
|
|
25
25
|
private var mGestureDetector: GestureDetector
|
|
26
26
|
private var mHitSlopRect: Rect? = null
|
|
27
|
+
set(value) {
|
|
28
|
+
super.hitSlopRect = value
|
|
29
|
+
mHitSlopRect = value
|
|
30
|
+
updateTouchDelegate()
|
|
31
|
+
}
|
|
27
32
|
|
|
28
33
|
init {
|
|
29
34
|
mGestureDetector = GestureDetector(mContext, object : GestureDetector.SimpleOnGestureListener() {
|
|
@@ -47,12 +52,6 @@ class MenuView(private val mContext: ReactContext) : ReactViewGroup(mContext) {
|
|
|
47
52
|
prepareMenu()
|
|
48
53
|
}
|
|
49
54
|
|
|
50
|
-
override fun setHitSlopRect(rect: Rect?) {
|
|
51
|
-
super.setHitSlopRect(rect)
|
|
52
|
-
mHitSlopRect = rect
|
|
53
|
-
updateTouchDelegate()
|
|
54
|
-
}
|
|
55
|
-
|
|
56
55
|
override fun onInterceptTouchEvent(ev: MotionEvent): Boolean {
|
|
57
56
|
return true
|
|
58
57
|
}
|
|
@@ -123,9 +123,9 @@ abstract class MenuViewManagerBase : ReactClippingViewManager<MenuView>() {
|
|
|
123
123
|
fun setHitSlop(view: ReactViewGroup, @Nullable hitSlop: ReadableMap?) {
|
|
124
124
|
if (hitSlop == null) {
|
|
125
125
|
// We should keep using setters as `Val cannot be reassigned`
|
|
126
|
-
view.
|
|
126
|
+
view.hitSlopRect = null
|
|
127
127
|
} else {
|
|
128
|
-
view.
|
|
128
|
+
view.hitSlopRect = (
|
|
129
129
|
Rect(
|
|
130
130
|
if (hitSlop.hasKey("left"))
|
|
131
131
|
PixelUtil.toPixelFromDIP(hitSlop.getDouble("left")).toInt()
|
|
@@ -206,7 +206,7 @@ abstract class MenuViewManagerBase : ReactClippingViewManager<MenuView>() {
|
|
|
206
206
|
|
|
207
207
|
@ReactProp(name = ViewProps.OVERFLOW)
|
|
208
208
|
fun setOverflow(view: ReactViewGroup, overflow: String?) {
|
|
209
|
-
view.
|
|
209
|
+
view.overflow = overflow
|
|
210
210
|
}
|
|
211
211
|
|
|
212
212
|
@ReactProp(name = "backfaceVisibility")
|
package/ios/NewArch/MenuView.mm
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native-menu/menu",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "UIMenu component for react-native",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
],
|
|
22
22
|
"scripts": {
|
|
23
23
|
"android": "react-native run-android",
|
|
24
|
-
"bootstrap": "yarn && yarn
|
|
24
|
+
"bootstrap": "yarn && yarn generateRntaManifest",
|
|
25
25
|
"format": "biome format --write .",
|
|
26
26
|
"ios": "react-native run-ios",
|
|
27
27
|
"lint": "biome lint --write .",
|
|
@@ -30,7 +30,8 @@
|
|
|
30
30
|
"release": "release-it",
|
|
31
31
|
"start": "react-native start",
|
|
32
32
|
"test": "jest",
|
|
33
|
-
"typescript": "tsc --noEmit"
|
|
33
|
+
"typescript": "tsc --noEmit",
|
|
34
|
+
"generateRntaManifest": "node node_modules/react-native-test-app/android/android-manifest.js example/app.json example/android/app/build/generated/rnta/src/main/AndroidManifest.xml"
|
|
34
35
|
},
|
|
35
36
|
"keywords": [
|
|
36
37
|
"react-native",
|
|
@@ -46,20 +47,21 @@
|
|
|
46
47
|
"homepage": "https://github.com/react-native-menu/menu#readme",
|
|
47
48
|
"devDependencies": {
|
|
48
49
|
"@biomejs/biome": "1.9.4",
|
|
49
|
-
"@callstack/react-native-visionos": "^0.
|
|
50
|
-
"@react-native/
|
|
51
|
-
"@react-native/
|
|
50
|
+
"@callstack/react-native-visionos": "^0.79.6",
|
|
51
|
+
"@react-native-community/cli": "^20.0.2",
|
|
52
|
+
"@react-native/babel-preset": "^0.81.1",
|
|
53
|
+
"@react-native/metro-config": "0.81.1",
|
|
52
54
|
"@release-it/conventional-changelog": "^10.0.0",
|
|
53
|
-
"@rnx-kit/metro-config": "^2.
|
|
55
|
+
"@rnx-kit/metro-config": "^2.1.1",
|
|
54
56
|
"@types/jest": "^29.1.2",
|
|
55
|
-
"@types/react": "^
|
|
57
|
+
"@types/react": "^19.1.12",
|
|
56
58
|
"@types/react-native": "0.73.0",
|
|
57
59
|
"jest": "^29.2.1",
|
|
58
|
-
"pod-install": "
|
|
59
|
-
"react": "
|
|
60
|
-
"react-native": "^0.
|
|
60
|
+
"pod-install": "1.0.1",
|
|
61
|
+
"react": "19.1.0",
|
|
62
|
+
"react-native": "^0.81.1",
|
|
61
63
|
"react-native-builder-bob": "^0.38.0",
|
|
62
|
-
"react-native-test-app": "^4.
|
|
64
|
+
"react-native-test-app": "^4.4.9",
|
|
63
65
|
"release-it": "^18.1.1",
|
|
64
66
|
"typescript": "5.8.3"
|
|
65
67
|
},
|
|
@@ -104,8 +106,7 @@
|
|
|
104
106
|
"access": "public"
|
|
105
107
|
},
|
|
106
108
|
"volta": {
|
|
107
|
-
"node": "
|
|
108
|
-
"yarn": "1.22.21"
|
|
109
|
+
"node": "22.11.0"
|
|
109
110
|
},
|
|
110
111
|
"codegenConfig": {
|
|
111
112
|
"name": "RNMenuViewSpec",
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
require "json"
|
|
2
2
|
|
|
3
3
|
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
4
|
-
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
|
5
4
|
|
|
6
5
|
Pod::Spec.new do |s|
|
|
7
6
|
s.name = "react-native-menu"
|
|
@@ -16,28 +15,5 @@ Pod::Spec.new do |s|
|
|
|
16
15
|
|
|
17
16
|
s.source_files = "ios/**/*.{h,m,mm,swift}"
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
|
|
21
|
-
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
|
|
22
|
-
if respond_to?(:install_modules_dependencies, true)
|
|
23
|
-
install_modules_dependencies(s)
|
|
24
|
-
else
|
|
25
|
-
s.dependency "React-Core"
|
|
26
|
-
# Don't install the dependencies when we run `pod install` in the old architecture.
|
|
27
|
-
s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
|
|
28
|
-
s.pod_target_xcconfig = {
|
|
29
|
-
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
|
|
30
|
-
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
|
|
31
|
-
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
|
|
32
|
-
}
|
|
33
|
-
s.dependency "React-RCTFabric"
|
|
34
|
-
s.dependency "React-Codegen"
|
|
35
|
-
s.dependency "RCT-Folly"
|
|
36
|
-
s.dependency "RCTRequired"
|
|
37
|
-
s.dependency "RCTTypeSafety"
|
|
38
|
-
s.dependency "ReactCommon/turbomodule/core"
|
|
39
|
-
end
|
|
40
|
-
else # old arch
|
|
41
|
-
s.dependency "React"
|
|
42
|
-
end
|
|
18
|
+
install_modules_dependencies(s)
|
|
43
19
|
end
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
arguments=
|
|
2
|
-
auto.sync=false
|
|
3
|
-
build.scans.enabled=false
|
|
4
|
-
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
|
|
5
|
-
connection.project.dir=
|
|
6
|
-
eclipse.preferences.version=1
|
|
7
|
-
gradle.user.home=
|
|
8
|
-
java.home=/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home
|
|
9
|
-
jvm.arguments=
|
|
10
|
-
offline.mode=false
|
|
11
|
-
override.workspace.settings=true
|
|
12
|
-
show.console.view=true
|
|
13
|
-
show.executions.view=true
|
|
Binary file
|