hybrid-navigation 3.1.3 → 3.1.5
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/build.gradle +1 -1
- package/android/src/main/java/com/reactnative/hybridnavigation/HBDRootView.java +151 -141
- package/android/src/main/java/com/reactnative/hybridnavigation/ReactTabBarFragment.java +1 -0
- package/ios/GlobalStyle.mm +19 -23
- package/ios/Navigator/HBDScreenNavigator.mm +22 -12
- package/ios/View/UIImage+WithBadge.mm +14 -36
- package/ios/ViewController/HBDNavigationController.mm +35 -69
- package/ios/ViewController/HBDReactViewController.mm +13 -5
- package/ios/ViewController/HBDTabBarController.mm +1 -4
- package/ios/ViewController/HBDViewController+Garden.mm +22 -8
- package/ios/ViewController/HBDViewController.h +2 -0
- package/ios/ViewController/HBDViewController.mm +4 -13
- package/package.json +1 -1
package/android/build.gradle
CHANGED
|
@@ -12,6 +12,7 @@ import android.widget.FrameLayout;
|
|
|
12
12
|
import androidx.annotation.NonNull;
|
|
13
13
|
import androidx.annotation.Nullable;
|
|
14
14
|
|
|
15
|
+
import com.facebook.react.bridge.ReactContext;
|
|
15
16
|
import com.facebook.react.bridge.UIManager;
|
|
16
17
|
import com.facebook.react.interfaces.fabric.ReactSurface;
|
|
17
18
|
import com.facebook.react.runtime.ReactSurfaceView;
|
|
@@ -22,169 +23,178 @@ import com.facebook.react.uimanager.common.UIManagerType;
|
|
|
22
23
|
import java.lang.reflect.InvocationTargetException;
|
|
23
24
|
import java.lang.reflect.Method;
|
|
24
25
|
|
|
26
|
+
@SuppressLint("ClickableViewAccessibility")
|
|
25
27
|
public class HBDRootView extends FrameLayout {
|
|
26
28
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
@Nullable
|
|
30
|
+
private ReactSurface surface;
|
|
29
31
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
@Nullable
|
|
33
|
+
private ReactSurfaceView reactSurfaceView;
|
|
32
34
|
|
|
33
|
-
|
|
35
|
+
private boolean passThroughTouches;
|
|
34
36
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
+
@Nullable
|
|
38
|
+
private Bundle appProperties;
|
|
37
39
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
public HBDRootView(@NonNull Context context, @Nullable AttributeSet attrs) {
|
|
43
|
-
super(context, attrs);
|
|
44
|
-
}
|
|
40
|
+
public HBDRootView(@NonNull Context context) {
|
|
41
|
+
super(context);
|
|
42
|
+
}
|
|
45
43
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
public HBDRootView(@NonNull Context context, @Nullable AttributeSet attrs) {
|
|
45
|
+
super(context, attrs);
|
|
46
|
+
}
|
|
49
47
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
public HBDRootView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
|
49
|
+
super(context, attrs, defStyleAttr);
|
|
50
|
+
}
|
|
53
51
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
52
|
+
public void setPassThroughTouches(boolean passThroughTouches) {
|
|
53
|
+
this.passThroughTouches = passThroughTouches;
|
|
54
|
+
}
|
|
58
55
|
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
public void setSurface(@NonNull ReactSurface reactSurface) {
|
|
57
|
+
if (surface == reactSurface) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
61
60
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
throw new IllegalStateException("[Navigation] ReactSurface.getView() 不能为空。");
|
|
65
|
-
}
|
|
61
|
+
clearSurface();
|
|
62
|
+
surface = reactSurface;
|
|
66
63
|
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
View view = reactSurface.getView();
|
|
65
|
+
if (view == null) {
|
|
66
|
+
throw new IllegalStateException("[Navigation] ReactSurface.getView() 不能为空。");
|
|
67
|
+
}
|
|
69
68
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
69
|
+
addView(view, new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
|
|
70
|
+
reactSurfaceView = findReactSurfaceView(this);
|
|
71
|
+
|
|
72
|
+
// Prevent double-dispatch of ACTION_DOWN to JSTouchDispatcher.
|
|
73
|
+
// ReactRootView dispatches touch events to JS in both onInterceptTouchEvent and onTouchEvent.
|
|
74
|
+
// When no Fabric child view handles the DOWN (e.g. during initial render), onTouchEvent is
|
|
75
|
+
// also called, causing JSTouchDispatcher to receive a duplicate DOWN before UP/CANCEL.
|
|
76
|
+
// Returning true from the listener for ACTION_DOWN prevents onTouchEvent from firing,
|
|
77
|
+
// while still allowing MOVE/UP/CANCEL to reach onTouchEvent normally.
|
|
78
|
+
if (reactSurfaceView != null) {
|
|
79
|
+
reactSurfaceView.setOnTouchListener((v, event) -> {
|
|
80
|
+
int action = event.getAction() & MotionEvent.ACTION_MASK;
|
|
81
|
+
return action == MotionEvent.ACTION_DOWN;
|
|
82
|
+
});
|
|
83
|
+
}
|
|
73
84
|
|
|
74
|
-
|
|
75
|
-
|
|
85
|
+
if (appProperties != null) {
|
|
86
|
+
applyAppProperties(appProperties);
|
|
87
|
+
}
|
|
76
88
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
89
|
+
reactSurface.start();
|
|
90
|
+
}
|
|
80
91
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
surface = null;
|
|
86
|
-
reactSurfaceView = null;
|
|
87
|
-
removeAllViews();
|
|
88
|
-
}
|
|
92
|
+
public void clearSurface() {
|
|
93
|
+
clearSurface(true);
|
|
94
|
+
}
|
|
89
95
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
96
|
+
public void clearSurface(boolean stopSurface) {
|
|
97
|
+
if (surface != null && stopSurface) {
|
|
98
|
+
surface.stop();
|
|
99
|
+
}
|
|
100
|
+
if (reactSurfaceView != null) {
|
|
101
|
+
reactSurfaceView.setOnTouchListener(null);
|
|
102
|
+
}
|
|
103
|
+
surface = null;
|
|
104
|
+
reactSurfaceView = null;
|
|
105
|
+
removeAllViews();
|
|
106
|
+
}
|
|
94
107
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
100
|
-
return super.dispatchTouchEvent(ev);
|
|
101
|
-
}
|
|
108
|
+
public void setAppProperties(@Nullable Bundle appProperties) {
|
|
109
|
+
this.appProperties = appProperties == null ? null : new Bundle(appProperties);
|
|
110
|
+
applyAppProperties(this.appProperties);
|
|
111
|
+
}
|
|
102
112
|
|
|
103
|
-
@SuppressLint("ClickableViewAccessibility")
|
|
104
113
|
@Override
|
|
105
|
-
public boolean
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
surfaceView.onChildStartedNativeGesture(surfaceView, event);
|
|
114
|
+
public boolean dispatchTouchEvent(MotionEvent ev) {
|
|
115
|
+
if (shouldPassTouches(ev)) {
|
|
116
|
+
return false;
|
|
109
117
|
}
|
|
110
|
-
return
|
|
118
|
+
return super.dispatchTouchEvent(ev);
|
|
111
119
|
}
|
|
112
120
|
|
|
113
121
|
private boolean shouldPassTouches(@NonNull MotionEvent ev) {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
122
|
+
if (!passThroughTouches) {
|
|
123
|
+
return false;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
int action = ev.getAction() & MotionEvent.ACTION_MASK;
|
|
127
|
+
if (action != MotionEvent.ACTION_DOWN) {
|
|
128
|
+
return false;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
ReactSurfaceView surfaceView = getReactSurfaceView();
|
|
132
|
+
if (surfaceView == null) {
|
|
133
|
+
return false;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
ViewGroup rootViewGroup = surfaceView.getRootViewGroup();
|
|
137
|
+
|
|
138
|
+
int tag = TouchTargetHelper.findTargetTagForTouch(ev.getX(), ev.getY(), rootViewGroup);
|
|
139
|
+
ReactContext reactContext = surfaceView.getCurrentReactContext();
|
|
140
|
+
if (reactContext == null) {
|
|
141
|
+
return false;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
UIManager uiManager = UIManagerHelper.getUIManager(reactContext, UIManagerType.FABRIC);
|
|
145
|
+
if (uiManager == null) {
|
|
146
|
+
return false;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
View view = uiManager.resolveView(tag);
|
|
150
|
+
if (view == null) {
|
|
151
|
+
return false;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
if (view == surfaceView || view == surfaceView.getChildAt(0)) {
|
|
155
|
+
return view.getWidth() == surfaceView.getWidth() && view.getHeight() == surfaceView.getHeight();
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
return false;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
@Nullable
|
|
162
|
+
private ReactSurfaceView getReactSurfaceView() {
|
|
163
|
+
if (reactSurfaceView == null) {
|
|
164
|
+
reactSurfaceView = findReactSurfaceView(this);
|
|
165
|
+
}
|
|
166
|
+
return reactSurfaceView;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
@Nullable
|
|
170
|
+
private ReactSurfaceView findReactSurfaceView(@NonNull ViewGroup parent) {
|
|
171
|
+
for (int i = 0; i < parent.getChildCount(); i++) {
|
|
172
|
+
View child = parent.getChildAt(i);
|
|
173
|
+
if (child instanceof ReactSurfaceView surfaceView) {
|
|
174
|
+
return surfaceView;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
if (child instanceof ViewGroup childGroup) {
|
|
178
|
+
ReactSurfaceView result = findReactSurfaceView(childGroup);
|
|
179
|
+
if (result != null) {
|
|
180
|
+
return result;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
return null;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
private void applyAppProperties(@Nullable Bundle appProperties) {
|
|
189
|
+
if (appProperties == null || surface == null) {
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
try {
|
|
194
|
+
Method updateInitProps = surface.getClass().getMethod("updateInitProps", Bundle.class);
|
|
195
|
+
updateInitProps.invoke(surface, new Bundle(appProperties));
|
|
196
|
+
} catch (NoSuchMethodException | IllegalAccessException |
|
|
197
|
+
InvocationTargetException ignored) {
|
|
198
|
+
}
|
|
199
|
+
}
|
|
190
200
|
}
|
|
@@ -133,6 +133,7 @@ public class ReactTabBarFragment extends TabBarFragment {
|
|
|
133
133
|
sendSwitchTabEvent(index);
|
|
134
134
|
// restore tab bar selected index
|
|
135
135
|
setTabBarSelectedIndex(getSelectedIndex());
|
|
136
|
+
completion.run();
|
|
136
137
|
} else {
|
|
137
138
|
super.setSelectedIndex(index, completion);
|
|
138
139
|
intercepted = true;
|
package/ios/GlobalStyle.mm
CHANGED
|
@@ -260,34 +260,30 @@ static GlobalStyle *globalStyle;
|
|
|
260
260
|
}
|
|
261
261
|
|
|
262
262
|
- (void)inflateTabBar:(UITabBar *)tabBar {
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
tabBar.standardAppearance = tabBarAppearance;
|
|
282
|
-
}
|
|
263
|
+
UITabBarItemAppearance *tabBarItem = [UITabBarItemAppearance new];
|
|
264
|
+
tabBarItem.normal.titleTextAttributes = @{
|
|
265
|
+
NSForegroundColorAttributeName: self.tabBarItemNormalColor,
|
|
266
|
+
};
|
|
267
|
+
tabBarItem.normal.iconColor = self.tabBarItemNormalColor;
|
|
268
|
+
tabBarItem.selected.titleTextAttributes = @{
|
|
269
|
+
NSForegroundColorAttributeName: self.tabBarItemSelectedColor,
|
|
270
|
+
};
|
|
271
|
+
tabBarItem.selected.iconColor = self.tabBarItemSelectedColor;
|
|
272
|
+
|
|
273
|
+
UITabBarAppearance *tabBarAppearance = [UITabBarAppearance new];
|
|
274
|
+
[tabBarAppearance configureWithDefaultBackground];
|
|
275
|
+
|
|
276
|
+
tabBarAppearance.shadowImage = self.tabBarShadowImage;
|
|
277
|
+
tabBarAppearance.stackedLayoutAppearance = tabBarItem;
|
|
278
|
+
|
|
279
|
+
tabBar.scrollEdgeAppearance = tabBarAppearance;
|
|
280
|
+
tabBar.standardAppearance = tabBarAppearance;
|
|
283
281
|
|
|
284
282
|
if (self.tabBarBackgroundColor) {
|
|
285
283
|
if (@available(iOS 26.0, *)) {
|
|
286
284
|
//
|
|
287
|
-
} else if (@available(iOS 15.0, *)) {
|
|
288
|
-
tabBar.standardAppearance.backgroundImage = [HBDUtils imageWithColor:self.tabBarBackgroundColor];
|
|
289
285
|
} else {
|
|
290
|
-
|
|
286
|
+
tabBar.standardAppearance.backgroundImage = [HBDUtils imageWithColor:self.tabBarBackgroundColor];
|
|
291
287
|
}
|
|
292
288
|
}
|
|
293
289
|
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
#import "HBDReactBridgeManager.h"
|
|
4
4
|
#import "HBDNavigationController.h"
|
|
5
|
+
#import "HBDViewController.h"
|
|
5
6
|
#import "UIViewController+HBD.h"
|
|
6
7
|
|
|
7
8
|
#import <React/RCTLog.h>
|
|
@@ -21,7 +22,7 @@
|
|
|
21
22
|
if (!model) {
|
|
22
23
|
return nil;
|
|
23
24
|
}
|
|
24
|
-
|
|
25
|
+
|
|
25
26
|
NSString *moduleName = model[@"moduleName"];
|
|
26
27
|
NSDictionary *props = model[@"props"];
|
|
27
28
|
NSDictionary *options = model[@"options"];
|
|
@@ -54,27 +55,27 @@
|
|
|
54
55
|
[self handlePresentWithViewController:vc extras:extras callback:callback];
|
|
55
56
|
return;
|
|
56
57
|
}
|
|
57
|
-
|
|
58
|
+
|
|
58
59
|
if ([action isEqualToString:@"dismiss"]) {
|
|
59
60
|
[self handleDismissWithViewController:vc callback:callback];
|
|
60
61
|
return;
|
|
61
62
|
}
|
|
62
|
-
|
|
63
|
+
|
|
63
64
|
if ([action isEqualToString:@"showModal"]) {
|
|
64
65
|
[self handleShowModalWithViewController:vc extras:extras callback:callback];
|
|
65
66
|
return;
|
|
66
67
|
}
|
|
67
|
-
|
|
68
|
+
|
|
68
69
|
if ([action isEqualToString:@"hideModal"]) {
|
|
69
70
|
[self handleDismissWithViewController:vc callback:callback];
|
|
70
71
|
return;
|
|
71
72
|
}
|
|
72
|
-
|
|
73
|
+
|
|
73
74
|
if ([action isEqualToString:@"presentLayout"]) {
|
|
74
75
|
[self handlePresentLayoutWithViewController:vc extras:extras callback:callback];
|
|
75
76
|
return;
|
|
76
77
|
}
|
|
77
|
-
|
|
78
|
+
|
|
78
79
|
if ([action isEqualToString:@"showModalLayout"]) {
|
|
79
80
|
[self handleShowModalLayoutWithViewController:vc extras:extras callback:callback];
|
|
80
81
|
return;
|
|
@@ -86,7 +87,7 @@
|
|
|
86
87
|
callback(@[NSNull.null, @NO]);
|
|
87
88
|
return;
|
|
88
89
|
}
|
|
89
|
-
|
|
90
|
+
|
|
90
91
|
UIViewController *vc = [self viewControllerWithExtras:extras];
|
|
91
92
|
NSInteger requestCode = [extras[@"requestCode"] integerValue];
|
|
92
93
|
HBDNavigationController *nav = [[HBDNavigationController alloc] initWithRootViewController:vc];
|
|
@@ -106,8 +107,17 @@
|
|
|
106
107
|
HBDViewController *hbdvc = (HBDViewController *)vc;
|
|
107
108
|
animated = hbdvc.animatedTransition;
|
|
108
109
|
}
|
|
109
|
-
|
|
110
|
+
|
|
111
|
+
BOOL isOverFullScreen = vc.modalPresentationStyle == UIModalPresentationOverFullScreen;
|
|
112
|
+
UIViewController *presenting = vc.presentingViewController;
|
|
113
|
+
|
|
110
114
|
[vc dismissViewControllerAnimated:animated completion:^{
|
|
115
|
+
if (isOverFullScreen && presenting != nil) {
|
|
116
|
+
HBDViewController *hbdvc = [[HBDReactBridgeManager get] primaryViewControllerWithViewController:presenting];
|
|
117
|
+
if (hbdvc != nil) {
|
|
118
|
+
[hbdvc adjustScreenOrientation];
|
|
119
|
+
}
|
|
120
|
+
}
|
|
111
121
|
callback(@[NSNull.null, @YES]);
|
|
112
122
|
}];
|
|
113
123
|
}
|
|
@@ -117,19 +127,19 @@
|
|
|
117
127
|
callback(@[NSNull.null, @NO]);
|
|
118
128
|
return;
|
|
119
129
|
}
|
|
120
|
-
|
|
130
|
+
|
|
121
131
|
UIViewController *vc = [self viewControllerWithExtras:extras];
|
|
122
132
|
NSInteger requestCode = [extras[@"requestCode"] integerValue];
|
|
123
133
|
vc.modalPresentationStyle = UIModalPresentationOverFullScreen;
|
|
124
134
|
vc.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
|
|
125
135
|
[vc setRequestCode:requestCode];
|
|
126
|
-
|
|
136
|
+
|
|
127
137
|
BOOL animated = YES;
|
|
128
138
|
if ([vc isKindOfClass:[HBDViewController class]]) {
|
|
129
139
|
HBDViewController *hbdvc = (HBDViewController *)vc;
|
|
130
140
|
animated = hbdvc.animatedTransition;
|
|
131
141
|
}
|
|
132
|
-
|
|
142
|
+
|
|
133
143
|
[presenting presentViewController:vc animated:animated completion:^{
|
|
134
144
|
callback(@[NSNull.null, @YES]);
|
|
135
145
|
}];
|
|
@@ -173,7 +183,7 @@
|
|
|
173
183
|
}
|
|
174
184
|
|
|
175
185
|
- (void)invalidate {
|
|
176
|
-
//
|
|
186
|
+
//
|
|
177
187
|
}
|
|
178
188
|
|
|
179
189
|
@end
|
|
@@ -4,53 +4,31 @@
|
|
|
4
4
|
|
|
5
5
|
- (UIImage *)withIconColor:(UIColor *)iconColor badgeColor:(UIColor *)badgeColor {
|
|
6
6
|
CGSize imageSize = self.size;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
UIImage *iconTintedImage = [self imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
|
|
11
|
-
[iconColor set];
|
|
12
|
-
[iconTintedImage drawAtPoint:CGPointZero];
|
|
13
|
-
}];
|
|
14
|
-
return [resultImage imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
static CGFloat const HBDTabBarBadgeHorizontalPadding = 8.0;
|
|
18
|
-
static CGFloat const HBDTabBarBadgeVerticalPadding = 2.0;
|
|
19
|
-
static CGFloat const HBDTabBarBadgeOffsetX = 0.0;
|
|
20
|
-
static CGFloat const HBDTabBarBadgeOffsetY = 0.0;
|
|
21
|
-
CGSize canvasSize = CGSizeMake(
|
|
22
|
-
imageSize.width + HBDTabBarBadgeHorizontalPadding * 2,
|
|
23
|
-
imageSize.height + HBDTabBarBadgeVerticalPadding * 2
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
UIGraphicsImageRenderer *render = [[UIGraphicsImageRenderer alloc] initWithSize:canvasSize];
|
|
27
|
-
|
|
7
|
+
|
|
8
|
+
UIGraphicsImageRenderer *render = [[UIGraphicsImageRenderer alloc] initWithSize:imageSize];
|
|
9
|
+
|
|
28
10
|
UIImage *resultImage = [render imageWithActions:^(UIGraphicsImageRendererContext * _Nonnull rendererContext) {
|
|
29
11
|
// 创建 tint 后的图标图片
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
(canvasSize.height - imageSize.height) / 2.0
|
|
34
|
-
);
|
|
35
|
-
CGRect iconFrame = CGRectMake(iconOrigin.x, iconOrigin.y, imageSize.width, imageSize.height);
|
|
36
|
-
|
|
12
|
+
if (iconColor) {
|
|
13
|
+
UIImage *iconTintedImage = [self imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
|
|
14
|
+
|
|
37
15
|
// 设置图标颜色并绘制
|
|
38
16
|
[iconColor set];
|
|
39
|
-
[iconTintedImage drawAtPoint:
|
|
40
|
-
|
|
17
|
+
[iconTintedImage drawAtPoint:CGPointZero];
|
|
18
|
+
} else {
|
|
19
|
+
[self drawAtPoint:CGPointZero];
|
|
20
|
+
}
|
|
21
|
+
|
|
41
22
|
// 创建徽章
|
|
42
23
|
CGSize badgeSize = CGSizeMake(8, 8);
|
|
43
|
-
CGPoint badgeOrigin = CGPointMake(
|
|
44
|
-
CGRectGetMaxX(iconFrame) + HBDTabBarBadgeOffsetX,
|
|
45
|
-
HBDTabBarBadgeOffsetY
|
|
46
|
-
);
|
|
24
|
+
CGPoint badgeOrigin = CGPointMake(imageSize.width - badgeSize.width, 0);
|
|
47
25
|
CGRect badgeRect = CGRectMake(badgeOrigin.x, badgeOrigin.y, badgeSize.width, badgeSize.height);
|
|
48
|
-
|
|
26
|
+
|
|
49
27
|
UIBezierPath *badgePath = [UIBezierPath bezierPathWithOvalInRect:badgeRect];
|
|
50
28
|
[badgeColor setFill];
|
|
51
29
|
[badgePath fill];
|
|
52
30
|
}];
|
|
53
|
-
|
|
31
|
+
|
|
54
32
|
return [resultImage imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
|
|
55
33
|
}
|
|
56
34
|
|
|
@@ -331,10 +331,8 @@
|
|
|
331
331
|
UIViewController *from = [coordinator viewControllerForKey:UITransitionContextFromViewControllerKey];
|
|
332
332
|
UIViewController *to = [coordinator viewControllerForKey:UITransitionContextToViewControllerKey];
|
|
333
333
|
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
[self resetButtonLabelInNavBar:self.nav.navigationBar];
|
|
337
|
-
}
|
|
334
|
+
// Fix a system bug https://github.com/listenzz/HBDNavigationBar/issues/35
|
|
335
|
+
[self resetButtonLabelInNavBar:self.nav.navigationBar];
|
|
338
336
|
|
|
339
337
|
if (self.nav.poppingViewController) {
|
|
340
338
|
// Inspired by QMUI
|
|
@@ -371,11 +369,9 @@
|
|
|
371
369
|
}
|
|
372
370
|
} else {
|
|
373
371
|
[self.nav updateNavigationBarForViewController:viewController];
|
|
374
|
-
if (
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
self.nav.navigationBar.standardAppearance.backgroundColor = viewController.hbd_barTintColor;
|
|
378
|
-
}
|
|
372
|
+
if (to == viewController) {
|
|
373
|
+
self.nav.navigationBar.scrollEdgeAppearance.backgroundColor = viewController.hbd_barTintColor;
|
|
374
|
+
self.nav.navigationBar.standardAppearance.backgroundColor = viewController.hbd_barTintColor;
|
|
379
375
|
}
|
|
380
376
|
}
|
|
381
377
|
|
|
@@ -399,10 +395,8 @@
|
|
|
399
395
|
}
|
|
400
396
|
}
|
|
401
397
|
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
self.nav.navigationBar.standardAppearance.backgroundColor = UIColor.clearColor;
|
|
405
|
-
}
|
|
398
|
+
self.nav.navigationBar.scrollEdgeAppearance.backgroundColor = UIColor.clearColor;
|
|
399
|
+
self.nav.navigationBar.standardAppearance.backgroundColor = UIColor.clearColor;
|
|
406
400
|
|
|
407
401
|
if (shouldAnimateTabBar) {
|
|
408
402
|
[self completeTabBarTransitionFrom:from to:to cancelled:context.isCancelled];
|
|
@@ -462,13 +456,11 @@
|
|
|
462
456
|
}
|
|
463
457
|
|
|
464
458
|
- (void)resetButtonLabelInNavBar:(UINavigationBar *)navBar {
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
break;
|
|
471
|
-
}
|
|
459
|
+
for (UIView *view in navBar.subviews) {
|
|
460
|
+
NSString *viewName = [[[view classForCoder] description] stringByReplacingOccurrencesOfString:@"_" withString:@""];
|
|
461
|
+
if ([viewName isEqualToString:@"UINavigationBarContentView"]) {
|
|
462
|
+
[self resetButtonLabelInView:view];
|
|
463
|
+
break;
|
|
472
464
|
}
|
|
473
465
|
}
|
|
474
466
|
}
|
|
@@ -562,15 +554,13 @@
|
|
|
562
554
|
[self.navigationBar setTranslucent:YES];
|
|
563
555
|
[self.navigationBar setShadowImage:[UINavigationBar appearance].shadowImage];
|
|
564
556
|
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
self.navigationBar.standardAppearance = [scrollEdgeAppearance copy];
|
|
573
|
-
}
|
|
557
|
+
UINavigationBarAppearance *scrollEdgeAppearance = [[UINavigationBarAppearance alloc] init];
|
|
558
|
+
[scrollEdgeAppearance configureWithTransparentBackground];
|
|
559
|
+
scrollEdgeAppearance.shadowColor = UIColor.clearColor;
|
|
560
|
+
scrollEdgeAppearance.backgroundColor = UIColor.clearColor;
|
|
561
|
+
[scrollEdgeAppearance setBackIndicatorImage:[UINavigationBar appearance].backIndicatorImage transitionMaskImage:[UINavigationBar appearance].backIndicatorTransitionMaskImage];
|
|
562
|
+
self.navigationBar.scrollEdgeAppearance = scrollEdgeAppearance;
|
|
563
|
+
self.navigationBar.standardAppearance = [scrollEdgeAppearance copy];
|
|
574
564
|
|
|
575
565
|
self.navigationDelegate = [[HBDNavigationControllerDelegate alloc] initWithNavigationController:self];
|
|
576
566
|
self.navigationDelegate.proxyDelegate = self.delegate;
|
|
@@ -593,7 +583,7 @@
|
|
|
593
583
|
}
|
|
594
584
|
}
|
|
595
585
|
|
|
596
|
-
/// 修正非 iPhone X 机型在 iOS
|
|
586
|
+
/// 修正非 iPhone X 机型在 iOS 15+ 上,随 hbd_statusBarHidden 切换时系统 safe area 不准确的问题。
|
|
597
587
|
/// 刘海屏由系统处理即可;非刘海屏状态栏高度 20pt,系统有时报 0 或 40,需用 additionalSafeAreaInsets 补偿。
|
|
598
588
|
- (void)viewSafeAreaInsetsDidChange {
|
|
599
589
|
[super viewSafeAreaInsetsDidChange];
|
|
@@ -601,21 +591,19 @@
|
|
|
601
591
|
return;
|
|
602
592
|
}
|
|
603
593
|
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
UIEdgeInsets additionalInsets = self.additionalSafeAreaInsets;
|
|
594
|
+
UIEdgeInsets safeAreaInsets = self.view.safeAreaInsets;
|
|
595
|
+
UIEdgeInsets additionalInsets = self.additionalSafeAreaInsets;
|
|
607
596
|
|
|
608
|
-
|
|
597
|
+
BOOL statusBarHidden = RCTKeyWindow().windowScene.statusBarManager.statusBarHidden;
|
|
609
598
|
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
599
|
+
// 状态栏隐藏时系统可能把 top 算成 0,补 20pt 避免内容贴顶
|
|
600
|
+
if (statusBarHidden && safeAreaInsets.top == 0) {
|
|
601
|
+
self.additionalSafeAreaInsets = UIEdgeInsetsMake(20, additionalInsets.left, additionalInsets.bottom, additionalInsets.right);
|
|
602
|
+
}
|
|
614
603
|
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
}
|
|
604
|
+
// 状态栏显示时系统有时把 top 算成 40(多算 20pt),减 20pt 使有效 top 为状态栏高度
|
|
605
|
+
if (!statusBarHidden && safeAreaInsets.top == 40) {
|
|
606
|
+
self.additionalSafeAreaInsets = UIEdgeInsetsMake(-20, additionalInsets.left, additionalInsets.bottom, additionalInsets.right);
|
|
619
607
|
}
|
|
620
608
|
}
|
|
621
609
|
|
|
@@ -633,10 +621,7 @@
|
|
|
633
621
|
self.poppingViewController = self.topViewController;
|
|
634
622
|
}
|
|
635
623
|
|
|
636
|
-
|
|
637
|
-
// vc != self.topViewController
|
|
638
|
-
[self fixClickBackIssue];
|
|
639
|
-
return vc;
|
|
624
|
+
return [super popViewControllerAnimated:animated];
|
|
640
625
|
}
|
|
641
626
|
|
|
642
627
|
- (NSArray<UIViewController *> *)popToViewController:(UIViewController *)viewController animated:(BOOL)animated {
|
|
@@ -644,9 +629,7 @@
|
|
|
644
629
|
self.poppingViewController = self.topViewController;
|
|
645
630
|
}
|
|
646
631
|
|
|
647
|
-
|
|
648
|
-
[self fixClickBackIssue];
|
|
649
|
-
return array;
|
|
632
|
+
return [super popToViewController:viewController animated:animated];
|
|
650
633
|
}
|
|
651
634
|
|
|
652
635
|
- (NSArray<UIViewController *> *)popToRootViewControllerAnimated:(BOOL)animated {
|
|
@@ -654,22 +637,7 @@
|
|
|
654
637
|
self.poppingViewController = self.topViewController;
|
|
655
638
|
}
|
|
656
639
|
|
|
657
|
-
|
|
658
|
-
[self fixClickBackIssue];
|
|
659
|
-
return array;
|
|
660
|
-
}
|
|
661
|
-
|
|
662
|
-
- (void)fixClickBackIssue {
|
|
663
|
-
if (@available(iOS 13.0, *)) {
|
|
664
|
-
return;
|
|
665
|
-
}
|
|
666
|
-
|
|
667
|
-
// fix:ios 11,12,当前后两个页面的 barStyle 不一样时,点击返回按钮返回,前一个页面的标题颜色响应迟缓或不响应
|
|
668
|
-
id <UIViewControllerTransitionCoordinator> coordinator = self.transitionCoordinator;
|
|
669
|
-
if (!(coordinator && coordinator.interactive)) {
|
|
670
|
-
self.navigationBar.barStyle = self.topViewController.hbd_barStyle;
|
|
671
|
-
self.navigationBar.titleTextAttributes = self.topViewController.hbd_titleTextAttributes;
|
|
672
|
-
}
|
|
640
|
+
return [super popToRootViewControllerAnimated:animated];
|
|
673
641
|
}
|
|
674
642
|
|
|
675
643
|
- (void)updateNavigationBarForViewController:(UIViewController *)vc {
|
|
@@ -691,10 +659,8 @@
|
|
|
691
659
|
- (void)updateNavigationBarTintColorForViewController:(UIViewController *)vc {
|
|
692
660
|
self.navigationBar.tintColor = vc.hbd_tintColor;
|
|
693
661
|
self.navigationBar.titleTextAttributes = vc.hbd_titleTextAttributes;
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
self.navigationBar.standardAppearance.titleTextAttributes = vc.hbd_titleTextAttributes;
|
|
697
|
-
}
|
|
662
|
+
self.navigationBar.scrollEdgeAppearance.titleTextAttributes = vc.hbd_titleTextAttributes;
|
|
663
|
+
self.navigationBar.standardAppearance.titleTextAttributes = vc.hbd_titleTextAttributes;
|
|
698
664
|
}
|
|
699
665
|
|
|
700
666
|
- (void)updateNavigationBarAlphaForViewController:(UIViewController *)vc {
|
|
@@ -109,13 +109,21 @@
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
- (CGFloat)hbd_statusBarHeight {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
112
|
+
UIWindow *window = self.view.window ?: self.navigationController.view.window;
|
|
113
|
+
UIWindowScene *scene = window.windowScene;
|
|
114
|
+
if (!scene) {
|
|
115
|
+
NSArray *connectedScenes = [[UIApplication sharedApplication].connectedScenes allObjects];
|
|
116
|
+
for (id connectedScene in connectedScenes) {
|
|
117
|
+
if ([connectedScene isKindOfClass:[UIWindowScene class]]) {
|
|
118
|
+
UIWindowScene *windowScene = (UIWindowScene *)connectedScene;
|
|
119
|
+
if (windowScene.activationState == UISceneActivationStateForegroundActive) {
|
|
120
|
+
scene = windowScene;
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
116
124
|
}
|
|
117
125
|
}
|
|
118
|
-
return
|
|
126
|
+
return scene ? scene.statusBarManager.statusBarFrame.size.height : 0;
|
|
119
127
|
}
|
|
120
128
|
|
|
121
129
|
/// 局部隐藏 topBar 或局部透明 topBar(非全局隐藏)时,需将 SafeArea 顶部修正为状态栏高度
|
|
@@ -56,12 +56,9 @@
|
|
|
56
56
|
if (tabBarBackgroundColor) {
|
|
57
57
|
if (@available(iOS 26.0, *)) {
|
|
58
58
|
// [tabBar setBackgroundColor: [HBDUtils colorWithHexString:tabBarBackgroundColor]];
|
|
59
|
-
} else
|
|
60
|
-
if (@available(iOS 15.0, *)) {
|
|
59
|
+
} else {
|
|
61
60
|
[tabBar standardAppearance].backgroundImage = [HBDUtils imageWithColor:[HBDUtils colorWithHexString:tabBarBackgroundColor]];
|
|
62
61
|
[tabBar scrollEdgeAppearance].backgroundImage = [HBDUtils imageWithColor:[HBDUtils colorWithHexString:tabBarBackgroundColor]];
|
|
63
|
-
} else {
|
|
64
|
-
[tabBar setBackgroundImage:[HBDUtils imageWithColor:[HBDUtils colorWithHexString:tabBarBackgroundColor]]];
|
|
65
62
|
}
|
|
66
63
|
}
|
|
67
64
|
|
|
@@ -8,6 +8,24 @@
|
|
|
8
8
|
|
|
9
9
|
@implementation HBDViewController (Garden)
|
|
10
10
|
|
|
11
|
+
- (void)applyImageInsetsForButtonItem:(UIBarButtonItem *)buttonItem
|
|
12
|
+
button:(HBDImageBarButton *)button
|
|
13
|
+
alignmentRectInsets:(UIEdgeInsets)alignmentRectInsets {
|
|
14
|
+
UIEdgeInsets imageInsets = buttonItem.imageInsets;
|
|
15
|
+
if (!UIEdgeInsetsEqualToEdgeInsets(imageInsets, UIEdgeInsetsZero)) {
|
|
16
|
+
UIButtonConfiguration *configuration = button.configuration ? [button.configuration copy] : [UIButtonConfiguration plainButtonConfiguration];
|
|
17
|
+
if (!configuration.image) {
|
|
18
|
+
UIImage *currentImage = [button imageForState:UIControlStateNormal];
|
|
19
|
+
if (currentImage) {
|
|
20
|
+
configuration.image = currentImage;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
configuration.contentInsets = NSDirectionalEdgeInsetsMake(imageInsets.top, imageInsets.left, imageInsets.bottom, imageInsets.right);
|
|
24
|
+
button.configuration = configuration;
|
|
25
|
+
}
|
|
26
|
+
button.alignmentRectInsetsOverride = alignmentRectInsets;
|
|
27
|
+
}
|
|
28
|
+
|
|
11
29
|
- (void)setLeftBarButtonItem:(NSDictionary *)item {
|
|
12
30
|
if (self.hbd_barHidden) {
|
|
13
31
|
return;
|
|
@@ -23,8 +41,7 @@
|
|
|
23
41
|
UIView *customView = buttonItem.customView;
|
|
24
42
|
if ([customView isKindOfClass:[HBDImageBarButton class]]) {
|
|
25
43
|
HBDImageBarButton *button = (HBDImageBarButton *)customView;
|
|
26
|
-
|
|
27
|
-
button.alignmentRectInsetsOverride = UIEdgeInsetsMake(0, 4, 0, -4);
|
|
44
|
+
[self applyImageInsetsForButtonItem:buttonItem button:button alignmentRectInsets:UIEdgeInsetsMake(0, 4, 0, -4)];
|
|
28
45
|
}
|
|
29
46
|
[array addObject:buttonItem];
|
|
30
47
|
|
|
@@ -49,8 +66,7 @@
|
|
|
49
66
|
UIView *customView = buttonItem.customView;
|
|
50
67
|
if ([customView isKindOfClass:[HBDImageBarButton class]]) {
|
|
51
68
|
HBDImageBarButton *button = (HBDImageBarButton *)customView;
|
|
52
|
-
|
|
53
|
-
button.alignmentRectInsetsOverride = UIEdgeInsetsMake(0, -4, 0, 4);
|
|
69
|
+
[self applyImageInsetsForButtonItem:buttonItem button:button alignmentRectInsets:UIEdgeInsetsMake(0, -4, 0, 4)];
|
|
54
70
|
}
|
|
55
71
|
[array addObject:buttonItem];
|
|
56
72
|
|
|
@@ -78,8 +94,7 @@
|
|
|
78
94
|
UIView *customView = buttonItem.customView;
|
|
79
95
|
if ([customView isKindOfClass:[HBDImageBarButton class]]) {
|
|
80
96
|
HBDImageBarButton *button = (HBDImageBarButton *)customView;
|
|
81
|
-
|
|
82
|
-
button.alignmentRectInsetsOverride = UIEdgeInsetsMake(0, 4, 0, -4);
|
|
97
|
+
[self applyImageInsetsForButtonItem:buttonItem button:button alignmentRectInsets:UIEdgeInsetsMake(0, 4, 0, -4)];
|
|
83
98
|
}
|
|
84
99
|
}
|
|
85
100
|
|
|
@@ -105,8 +120,7 @@
|
|
|
105
120
|
UIView *customView = buttonItem.customView;
|
|
106
121
|
if ([customView isKindOfClass:[HBDImageBarButton class]]) {
|
|
107
122
|
HBDImageBarButton *button = (HBDImageBarButton *)customView;
|
|
108
|
-
|
|
109
|
-
button.alignmentRectInsetsOverride = UIEdgeInsetsMake(0, -4, 0, 4);
|
|
123
|
+
[self applyImageInsetsForButtonItem:buttonItem button:button alignmentRectInsets:UIEdgeInsetsMake(0, -4, 0, 4)];
|
|
110
124
|
}
|
|
111
125
|
}
|
|
112
126
|
|
|
@@ -63,11 +63,7 @@
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
- (UIStatusBarStyle)preferredStatusBarStyle {
|
|
66
|
-
|
|
67
|
-
return self.hbd_barStyle == UIBarStyleDefault ? UIStatusBarStyleDarkContent : UIStatusBarStyleLightContent;
|
|
68
|
-
} else {
|
|
69
|
-
return self.hbd_barStyle == UIBarStyleDefault ? UIStatusBarStyleDefault : UIStatusBarStyleLightContent;
|
|
70
|
-
}
|
|
66
|
+
return self.hbd_barStyle == UIBarStyleDefault ? UIStatusBarStyleDarkContent : UIStatusBarStyleLightContent;
|
|
71
67
|
}
|
|
72
68
|
|
|
73
69
|
- (BOOL)prefersStatusBarHidden {
|
|
@@ -94,10 +90,7 @@
|
|
|
94
90
|
}
|
|
95
91
|
|
|
96
92
|
- (void)adjustScreenOrientation {
|
|
97
|
-
UIWindowScene *windowScene =
|
|
98
|
-
if (@available(iOS 13.0, *)) {
|
|
99
|
-
windowScene = [self getWindowScene];
|
|
100
|
-
}
|
|
93
|
+
UIWindowScene *windowScene = [self getWindowScene];
|
|
101
94
|
|
|
102
95
|
if (!self.forceScreenLandscape && windowScene != nil && windowScene.interfaceOrientation != UIInterfaceOrientationPortrait && ![[self hbd_mode] isEqual:@"modal"]) {
|
|
103
96
|
[self setScreenOrientation:UIInterfaceOrientationPortrait usingMask:UIInterfaceOrientationMaskPortrait];
|
|
@@ -131,7 +124,7 @@
|
|
|
131
124
|
[UIViewController attemptRotationToDeviceOrientation];
|
|
132
125
|
}
|
|
133
126
|
|
|
134
|
-
- (UIWindowScene *)getWindowScene
|
|
127
|
+
- (UIWindowScene *)getWindowScene {
|
|
135
128
|
UIWindow *window = self.view.window ?: self.navigationController.view.window;
|
|
136
129
|
if ([window.windowScene isKindOfClass:[UIWindowScene class]]) {
|
|
137
130
|
return window.windowScene;
|
|
@@ -313,9 +306,7 @@
|
|
|
313
306
|
if ([GlobalStyle globalStyle].isBackTitleHidden) {
|
|
314
307
|
UIBarButtonItem *buttonItem = [[HBDBackBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStylePlain target:nil action:NULL];
|
|
315
308
|
self.navigationItem.backBarButtonItem = buttonItem;
|
|
316
|
-
|
|
317
|
-
self.navigationItem.backButtonDisplayMode = UINavigationItemBackButtonDisplayModeMinimal;
|
|
318
|
-
}
|
|
309
|
+
self.navigationItem.backButtonDisplayMode = UINavigationItemBackButtonDisplayModeMinimal;
|
|
319
310
|
}
|
|
320
311
|
|
|
321
312
|
NSNumber *swipeBackEnabled = options[@"swipeBackEnabled"];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hybrid-navigation",
|
|
3
3
|
"description": "React Native Navigation that supports seamless navigation between Native and React.",
|
|
4
|
-
"version": "3.1.
|
|
4
|
+
"version": "3.1.5",
|
|
5
5
|
"main": "./dist/index",
|
|
6
6
|
"module": "./dist/index",
|
|
7
7
|
"types": "./dist/index.d.ts",
|