@mpxjs/webpack-plugin 2.10.14-beta.5 → 2.10.14-beta.7

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.
Files changed (183) hide show
  1. package/lib/platform/template/wx/component-config/button.js +12 -3
  2. package/lib/runtime/components/react/context.ts +0 -1
  3. package/lib/runtime/components/react/dist/context.d.ts +3 -6
  4. package/lib/runtime/components/react/dist/context.d.ts.map +1 -0
  5. package/lib/runtime/components/react/dist/context.js +1 -1
  6. package/lib/runtime/components/react/dist/event.config.d.ts +1 -0
  7. package/lib/runtime/components/react/dist/event.config.d.ts.map +1 -0
  8. package/lib/runtime/components/react/dist/getInnerListeners.d.ts +1 -0
  9. package/lib/runtime/components/react/dist/getInnerListeners.d.ts.map +1 -0
  10. package/lib/runtime/components/react/dist/getInnerListeners.js +35 -21
  11. package/lib/runtime/components/react/dist/mpx-async-suspense.d.ts +1 -0
  12. package/lib/runtime/components/react/dist/mpx-async-suspense.d.ts.map +1 -0
  13. package/lib/runtime/components/react/dist/mpx-async-suspense.jsx +2 -2
  14. package/lib/runtime/components/react/dist/mpx-button.d.ts +1 -0
  15. package/lib/runtime/components/react/dist/mpx-button.d.ts.map +1 -0
  16. package/lib/runtime/components/react/dist/mpx-camera.d.ts +27 -0
  17. package/lib/runtime/components/react/dist/mpx-camera.d.ts.map +1 -0
  18. package/lib/runtime/components/react/dist/mpx-camera.jsx +197 -0
  19. package/lib/runtime/components/react/dist/mpx-canvas/Bus.d.ts +1 -0
  20. package/lib/runtime/components/react/dist/mpx-canvas/Bus.d.ts.map +1 -0
  21. package/lib/runtime/components/react/dist/mpx-canvas/CanvasGradient.d.ts +1 -0
  22. package/lib/runtime/components/react/dist/mpx-canvas/CanvasGradient.d.ts.map +1 -0
  23. package/lib/runtime/components/react/dist/mpx-canvas/CanvasRenderingContext2D.d.ts +1 -0
  24. package/lib/runtime/components/react/dist/mpx-canvas/CanvasRenderingContext2D.d.ts.map +1 -0
  25. package/lib/runtime/components/react/dist/mpx-canvas/Image.d.ts +1 -0
  26. package/lib/runtime/components/react/dist/mpx-canvas/Image.d.ts.map +1 -0
  27. package/lib/runtime/components/react/dist/mpx-canvas/ImageData.d.ts +1 -0
  28. package/lib/runtime/components/react/dist/mpx-canvas/ImageData.d.ts.map +1 -0
  29. package/lib/runtime/components/react/dist/mpx-canvas/constructorsRegistry.d.ts +1 -0
  30. package/lib/runtime/components/react/dist/mpx-canvas/constructorsRegistry.d.ts.map +1 -0
  31. package/lib/runtime/components/react/dist/mpx-canvas/html.d.ts +1 -0
  32. package/lib/runtime/components/react/dist/mpx-canvas/html.d.ts.map +1 -0
  33. package/lib/runtime/components/react/dist/mpx-canvas/index.d.ts +1 -0
  34. package/lib/runtime/components/react/dist/mpx-canvas/index.d.ts.map +1 -0
  35. package/lib/runtime/components/react/dist/mpx-canvas/utils.d.ts +1 -0
  36. package/lib/runtime/components/react/dist/mpx-canvas/utils.d.ts.map +1 -0
  37. package/lib/runtime/components/react/dist/mpx-checkbox-group.d.ts +1 -0
  38. package/lib/runtime/components/react/dist/mpx-checkbox-group.d.ts.map +1 -0
  39. package/lib/runtime/components/react/dist/mpx-checkbox.d.ts +1 -0
  40. package/lib/runtime/components/react/dist/mpx-checkbox.d.ts.map +1 -0
  41. package/lib/runtime/components/react/dist/mpx-form.d.ts +1 -0
  42. package/lib/runtime/components/react/dist/mpx-form.d.ts.map +1 -0
  43. package/lib/runtime/components/react/dist/mpx-icon/index.d.ts +1 -0
  44. package/lib/runtime/components/react/dist/mpx-icon/index.d.ts.map +1 -0
  45. package/lib/runtime/components/react/dist/mpx-image.d.ts +1 -0
  46. package/lib/runtime/components/react/dist/mpx-image.d.ts.map +1 -0
  47. package/lib/runtime/components/react/dist/mpx-image.jsx +81 -37
  48. package/lib/runtime/components/react/dist/mpx-inline-text.d.ts +1 -0
  49. package/lib/runtime/components/react/dist/mpx-inline-text.d.ts.map +1 -0
  50. package/lib/runtime/components/react/dist/mpx-input.d.ts +2 -7
  51. package/lib/runtime/components/react/dist/mpx-input.d.ts.map +1 -0
  52. package/lib/runtime/components/react/dist/mpx-input.jsx +19 -12
  53. package/lib/runtime/components/react/dist/mpx-keyboard-avoiding-view.d.ts +1 -0
  54. package/lib/runtime/components/react/dist/mpx-keyboard-avoiding-view.d.ts.map +1 -0
  55. package/lib/runtime/components/react/dist/mpx-keyboard-avoiding-view.jsx +15 -22
  56. package/lib/runtime/components/react/dist/mpx-label.d.ts +1 -0
  57. package/lib/runtime/components/react/dist/mpx-label.d.ts.map +1 -0
  58. package/lib/runtime/components/react/dist/mpx-movable-area.d.ts +1 -0
  59. package/lib/runtime/components/react/dist/mpx-movable-area.d.ts.map +1 -0
  60. package/lib/runtime/components/react/dist/mpx-movable-view.d.ts +5 -2
  61. package/lib/runtime/components/react/dist/mpx-movable-view.d.ts.map +1 -0
  62. package/lib/runtime/components/react/dist/mpx-movable-view.jsx +102 -34
  63. package/lib/runtime/components/react/dist/mpx-nav.d.ts +9 -0
  64. package/lib/runtime/components/react/dist/mpx-nav.d.ts.map +1 -0
  65. package/lib/runtime/components/react/dist/mpx-nav.jsx +132 -0
  66. package/lib/runtime/components/react/dist/mpx-navigator.d.ts +1 -0
  67. package/lib/runtime/components/react/dist/mpx-navigator.d.ts.map +1 -0
  68. package/lib/runtime/components/react/dist/mpx-picker/date.d.ts +1 -0
  69. package/lib/runtime/components/react/dist/mpx-picker/date.d.ts.map +1 -0
  70. package/lib/runtime/components/react/dist/mpx-picker/dateData.d.ts +1 -0
  71. package/lib/runtime/components/react/dist/mpx-picker/dateData.d.ts.map +1 -0
  72. package/lib/runtime/components/react/dist/mpx-picker/index.d.ts +1 -0
  73. package/lib/runtime/components/react/dist/mpx-picker/index.d.ts.map +1 -0
  74. package/lib/runtime/components/react/dist/mpx-picker/multiSelector.d.ts +1 -0
  75. package/lib/runtime/components/react/dist/mpx-picker/multiSelector.d.ts.map +1 -0
  76. package/lib/runtime/components/react/dist/mpx-picker/region.d.ts +1 -0
  77. package/lib/runtime/components/react/dist/mpx-picker/region.d.ts.map +1 -0
  78. package/lib/runtime/components/react/dist/mpx-picker/regionData.d.ts +1 -0
  79. package/lib/runtime/components/react/dist/mpx-picker/regionData.d.ts.map +1 -0
  80. package/lib/runtime/components/react/dist/mpx-picker/selector.d.ts +1 -0
  81. package/lib/runtime/components/react/dist/mpx-picker/selector.d.ts.map +1 -0
  82. package/lib/runtime/components/react/dist/mpx-picker/time.d.ts +1 -0
  83. package/lib/runtime/components/react/dist/mpx-picker/time.d.ts.map +1 -0
  84. package/lib/runtime/components/react/dist/mpx-picker/type.d.ts +1 -0
  85. package/lib/runtime/components/react/dist/mpx-picker/type.d.ts.map +1 -0
  86. package/lib/runtime/components/react/dist/mpx-picker-view/index.d.ts +2 -0
  87. package/lib/runtime/components/react/dist/mpx-picker-view/index.d.ts.map +1 -0
  88. package/lib/runtime/components/react/dist/mpx-picker-view/index.jsx +4 -3
  89. package/lib/runtime/components/react/dist/mpx-picker-view/pickerVIewContext.d.ts +1 -0
  90. package/lib/runtime/components/react/dist/mpx-picker-view/pickerVIewContext.d.ts.map +1 -0
  91. package/lib/runtime/components/react/dist/mpx-picker-view-column/index.d.ts +2 -0
  92. package/lib/runtime/components/react/dist/mpx-picker-view-column/index.d.ts.map +1 -0
  93. package/lib/runtime/components/react/dist/mpx-picker-view-column/index.jsx +15 -21
  94. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewColumnItem.d.ts +1 -0
  95. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewColumnItem.d.ts.map +1 -0
  96. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewColumnItem.jsx +8 -11
  97. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewColumnItemLite.d.ts +14 -0
  98. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewColumnItemLite.d.ts.map +1 -0
  99. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewColumnItemLite.jsx +20 -0
  100. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewFaces.d.ts +1 -0
  101. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewFaces.d.ts.map +1 -0
  102. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewIndicator.d.ts +1 -0
  103. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewIndicator.d.ts.map +1 -0
  104. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewMask.d.ts +1 -0
  105. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewMask.d.ts.map +1 -0
  106. package/lib/runtime/components/react/dist/mpx-popup/index.d.ts +1 -0
  107. package/lib/runtime/components/react/dist/mpx-popup/index.d.ts.map +1 -0
  108. package/lib/runtime/components/react/dist/mpx-popup/popupBase.d.ts +1 -0
  109. package/lib/runtime/components/react/dist/mpx-popup/popupBase.d.ts.map +1 -0
  110. package/lib/runtime/components/react/dist/mpx-portal/index.d.ts +1 -0
  111. package/lib/runtime/components/react/dist/mpx-portal/index.d.ts.map +1 -0
  112. package/lib/runtime/components/react/dist/mpx-portal/index.jsx +5 -1
  113. package/lib/runtime/components/react/dist/mpx-portal/portal-host.d.ts +1 -0
  114. package/lib/runtime/components/react/dist/mpx-portal/portal-host.d.ts.map +1 -0
  115. package/lib/runtime/components/react/dist/mpx-portal/portal-manager.d.ts +1 -0
  116. package/lib/runtime/components/react/dist/mpx-portal/portal-manager.d.ts.map +1 -0
  117. package/lib/runtime/components/react/dist/mpx-portal/portal-manager.jsx +3 -5
  118. package/lib/runtime/components/react/dist/mpx-progress.d.ts +24 -0
  119. package/lib/runtime/components/react/dist/mpx-progress.d.ts.map +1 -0
  120. package/lib/runtime/components/react/dist/mpx-progress.jsx +163 -0
  121. package/lib/runtime/components/react/dist/mpx-radio-group.d.ts +1 -0
  122. package/lib/runtime/components/react/dist/mpx-radio-group.d.ts.map +1 -0
  123. package/lib/runtime/components/react/dist/mpx-radio.d.ts +1 -0
  124. package/lib/runtime/components/react/dist/mpx-radio.d.ts.map +1 -0
  125. package/lib/runtime/components/react/dist/mpx-rich-text/html.d.ts +1 -0
  126. package/lib/runtime/components/react/dist/mpx-rich-text/html.d.ts.map +1 -0
  127. package/lib/runtime/components/react/dist/mpx-rich-text/index.d.ts +1 -0
  128. package/lib/runtime/components/react/dist/mpx-rich-text/index.d.ts.map +1 -0
  129. package/lib/runtime/components/react/dist/mpx-root-portal.d.ts +1 -0
  130. package/lib/runtime/components/react/dist/mpx-root-portal.d.ts.map +1 -0
  131. package/lib/runtime/components/react/dist/mpx-scroll-view.d.ts +1 -0
  132. package/lib/runtime/components/react/dist/mpx-scroll-view.d.ts.map +1 -0
  133. package/lib/runtime/components/react/dist/mpx-scroll-view.jsx +69 -51
  134. package/lib/runtime/components/react/dist/mpx-simple-text.d.ts +1 -0
  135. package/lib/runtime/components/react/dist/mpx-simple-text.d.ts.map +1 -0
  136. package/lib/runtime/components/react/dist/mpx-simple-view.d.ts +1 -0
  137. package/lib/runtime/components/react/dist/mpx-simple-view.d.ts.map +1 -0
  138. package/lib/runtime/components/react/dist/mpx-slider.d.ts +31 -0
  139. package/lib/runtime/components/react/dist/mpx-slider.d.ts.map +1 -0
  140. package/lib/runtime/components/react/dist/mpx-slider.jsx +321 -0
  141. package/lib/runtime/components/react/dist/mpx-sticky-header.d.ts +1 -0
  142. package/lib/runtime/components/react/dist/mpx-sticky-header.d.ts.map +1 -0
  143. package/lib/runtime/components/react/dist/mpx-sticky-section.d.ts +1 -0
  144. package/lib/runtime/components/react/dist/mpx-sticky-section.d.ts.map +1 -0
  145. package/lib/runtime/components/react/dist/mpx-swiper-item.d.ts +1 -0
  146. package/lib/runtime/components/react/dist/mpx-swiper-item.d.ts.map +1 -0
  147. package/lib/runtime/components/react/dist/mpx-swiper.d.ts +1 -0
  148. package/lib/runtime/components/react/dist/mpx-swiper.d.ts.map +1 -0
  149. package/lib/runtime/components/react/dist/mpx-swiper.jsx +9 -16
  150. package/lib/runtime/components/react/dist/mpx-switch.d.ts +1 -0
  151. package/lib/runtime/components/react/dist/mpx-switch.d.ts.map +1 -0
  152. package/lib/runtime/components/react/dist/mpx-text.d.ts +3 -1
  153. package/lib/runtime/components/react/dist/mpx-text.d.ts.map +1 -0
  154. package/lib/runtime/components/react/dist/mpx-text.jsx +33 -5
  155. package/lib/runtime/components/react/dist/mpx-textarea.d.ts +1 -0
  156. package/lib/runtime/components/react/dist/mpx-textarea.d.ts.map +1 -0
  157. package/lib/runtime/components/react/dist/mpx-video.d.ts +1 -0
  158. package/lib/runtime/components/react/dist/mpx-video.d.ts.map +1 -0
  159. package/lib/runtime/components/react/dist/mpx-view.d.ts +1 -0
  160. package/lib/runtime/components/react/dist/mpx-view.d.ts.map +1 -0
  161. package/lib/runtime/components/react/dist/mpx-view.jsx +1 -1
  162. package/lib/runtime/components/react/dist/mpx-web-view.d.ts +1 -0
  163. package/lib/runtime/components/react/dist/mpx-web-view.d.ts.map +1 -0
  164. package/lib/runtime/components/react/dist/mpx-web-view.jsx +21 -2
  165. package/lib/runtime/components/react/dist/parser.d.ts +1 -0
  166. package/lib/runtime/components/react/dist/parser.d.ts.map +1 -0
  167. package/lib/runtime/components/react/dist/useAnimationHooks.d.ts +1 -0
  168. package/lib/runtime/components/react/dist/useAnimationHooks.d.ts.map +1 -0
  169. package/lib/runtime/components/react/dist/useNodesRef.d.ts +1 -0
  170. package/lib/runtime/components/react/dist/useNodesRef.d.ts.map +1 -0
  171. package/lib/runtime/components/react/dist/utils.d.ts +1 -0
  172. package/lib/runtime/components/react/dist/utils.d.ts.map +1 -0
  173. package/lib/runtime/components/react/dist/utils.jsx +16 -6
  174. package/lib/runtime/components/react/mpx-input.tsx +1 -9
  175. package/lib/runtime/components/react/mpx-keyboard-avoiding-view.tsx +15 -13
  176. package/lib/runtime/components/react/nav.tsx +67 -76
  177. package/package.json +1 -1
  178. package/lib/runtime/components/react/dist/mpx-nav-container.d.ts +0 -9
  179. package/lib/runtime/components/react/dist/mpx-nav-container.jsx +0 -23
  180. package/lib/runtime/components/react/dist/nav.d.ts +0 -11
  181. package/lib/runtime/components/react/dist/nav.jsx +0 -141
  182. package/lib/runtime/components/react/dist/useNavShared.d.ts +0 -2
  183. package/lib/runtime/components/react/dist/useNavShared.js +0 -6
@@ -1,23 +0,0 @@
1
- import { useNavShared } from './useNavShared';
2
- import { NavSharedContext } from './context';
3
- import { useLayoutEffect, useMemo, useState } from 'react';
4
- import { isAndroid } from './utils';
5
- export default function MpxNavContainer(props) {
6
- const [, setCustomNav] = useNavShared();
7
- useLayoutEffect(() => {
8
- if (!isAndroid)
9
- return;
10
- if (props.children) {
11
- setCustomNav(props.children);
12
- }
13
- return () => {
14
- setCustomNav(undefined);
15
- };
16
- }, [props.children]);
17
- return isAndroid ? null : props.children;
18
- }
19
- export function NavSharedProvider({ children }) {
20
- const [customNav, setCustomNav] = useState();
21
- const value = useMemo(() => ({ customNav, setCustomNav }), [customNav]);
22
- return <NavSharedContext.Provider value={value}>{children}</NavSharedContext.Provider>;
23
- }
@@ -1,11 +0,0 @@
1
- /// <reference types="react" />
2
- export declare function useInnerHeaderHeight(pageConfig: PageConfig): number;
3
- export interface MpxNavProps {
4
- pageConfig: PageConfig;
5
- navigation: any;
6
- }
7
- export interface MpxNavFactorOptions {
8
- Mpx: any;
9
- }
10
- declare function createMpxNav(options: MpxNavFactorOptions): import("react").MemoExoticComponent<({ pageConfig, navigation }: MpxNavProps) => import("react").JSX.Element>;
11
- export default createMpxNav;
@@ -1,141 +0,0 @@
1
- /* eslint-disable space-before-function-paren */
2
- import { useState, useMemo, memo } from 'react';
3
- import { useSafeAreaInsets } from 'react-native-safe-area-context';
4
- import { StatusBar, processColor, TouchableWithoutFeedback, Image, View, StyleSheet, Text } from 'react-native';
5
- import { useNavShared } from './useNavShared';
6
- function convertToHex(color) {
7
- try {
8
- const intColor = processColor(color);
9
- if (intColor === null || intColor === undefined) {
10
- return null;
11
- }
12
- // 将32位整数颜色值转换为RGBA
13
- const r = (intColor >> 16) & 255;
14
- const g = (intColor >> 8) & 255;
15
- const b = intColor & 255;
16
- // 转换为十六进制
17
- const hexR = r.toString(16).padStart(2, '0');
18
- const hexG = g.toString(16).padStart(2, '0');
19
- const hexB = b.toString(16).padStart(2, '0');
20
- return `#${hexR}${hexG}${hexB}`;
21
- }
22
- catch (error) {
23
- return null;
24
- }
25
- }
26
- const titleHeight = 44;
27
- export function useInnerHeaderHeight(pageConfig) {
28
- const safeArea = useSafeAreaInsets();
29
- if (pageConfig.navigationStyle === 'custom') {
30
- return 0;
31
- }
32
- else {
33
- const safeAreaTop = safeArea?.top || 0;
34
- const headerHeight = safeAreaTop + titleHeight;
35
- return headerHeight;
36
- }
37
- }
38
- const styles = StyleSheet.create({
39
- header: {
40
- elevation: 3
41
- },
42
- headerContent: {
43
- flexDirection: 'row',
44
- alignItems: 'center',
45
- justifyContent: 'center'
46
- },
47
- backButton: {
48
- position: 'absolute',
49
- height: '100%',
50
- width: 40,
51
- left: 0,
52
- top: 0,
53
- alignItems: 'center',
54
- justifyContent: 'center'
55
- },
56
- backButtonImage: {
57
- width: 22,
58
- height: 22
59
- },
60
- title: {
61
- fontSize: 17,
62
- fontWeight: 600,
63
- width: '60%',
64
- textAlign: 'center'
65
- }
66
- });
67
- const NavColor = {
68
- White: '#ffffff',
69
- Black: '#000000'
70
- };
71
- // navigationBarTextStyle 只支持黑白 'white'/'black
72
- const validBarTextStyle = (textStyle) => {
73
- const textStyleColor = convertToHex(textStyle);
74
- if (textStyle && textStyleColor && [NavColor.White, NavColor.Black].includes(textStyleColor)) {
75
- return textStyleColor;
76
- }
77
- else {
78
- return NavColor.White;
79
- }
80
- };
81
- const BACK_ICON = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAABICAYAAACqT5alAAAA2UlEQVR4nO3bMQrCUBRE0Yla6AYEN2nnBrTL+izcitW3MRDkEUWSvPzJvfCqgMwhZbAppWhNbbIHzB1g9wATERFRVyvpkj1irlpJ5X326D7WHh1hbdFD2CLpLmmftm7kfsEe09aNHFiBrT+wAlt/YAW2/sAKbP2BFdj6Ayuwy+ufz6XPL893krZ//O6iu2n4LT8kndLWTRTo4EC7BDo40C6BDg60S6CDA+0S6OBAuwQ6uNWiD2nrJmoIfU7cNWkR2hbb1UfbY7uuWhGWiIg+a/iHuHmA3QPs3gu4JW9Gan+OJAAAAABJRU5ErkJggg==';
82
- function createMpxNav(options) {
83
- const { Mpx } = options;
84
- const innerNav = memo(({ pageConfig, navigation }) => {
85
- const [innerPageConfig, setPageConfig] = useState(pageConfig || {});
86
- const [customNav] = useNavShared();
87
- const safeAreaTop = useSafeAreaInsets()?.top || 0;
88
- navigation.setPageConfig = (config) => {
89
- setPageConfig(Object.assign({}, innerPageConfig, config));
90
- };
91
- const isCustom = innerPageConfig.navigationStyle === 'custom';
92
- const navigationBarTextStyle = useMemo(() => validBarTextStyle(innerPageConfig.navigationBarTextStyle), [innerPageConfig.navigationBarTextStyle]);
93
- // 状态栏的颜色
94
- const statusBarElement = (<StatusBar translucent backgroundColor='transparent' barStyle={navigationBarTextStyle === NavColor.White ? 'light-content' : 'dark-content'}></StatusBar>);
95
- if (isCustom)
96
- return (<>
97
- {statusBarElement}
98
- {customNav}
99
- </>);
100
- // 假设是栈导航,获取栈的长度
101
- const stackLength = navigation.getState()?.routes?.length;
102
- const onStackTopBack = Mpx.config?.rnConfig?.onStackTopBack;
103
- const isHandleStackTopBack = typeof onStackTopBack === 'function';
104
- // 回退按钮与图标
105
- // prettier-ignore
106
- const backElement = stackLength > 1 || isHandleStackTopBack
107
- ? (<TouchableWithoutFeedback onPress={() => {
108
- if (stackLength <= 1 && isHandleStackTopBack) {
109
- onStackTopBack();
110
- return;
111
- }
112
- navigation.goBack();
113
- }}>
114
- <View style={[styles.backButton]}>
115
- <Image style={[styles.backButtonImage, { tintColor: navigationBarTextStyle }]} source={{ uri: BACK_ICON }}></Image>
116
- </View>
117
- </TouchableWithoutFeedback>)
118
- : null;
119
- return (<View style={[
120
- styles.header,
121
- {
122
- paddingTop: safeAreaTop,
123
- backgroundColor: innerPageConfig.navigationBarBackgroundColor || '#000000'
124
- }
125
- ]}>
126
- {statusBarElement}
127
- {/* TODO: 确定 height 的有效性 */}
128
- {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}
129
- {/* @ts-expect-error */}
130
- <View style={styles.headerContent} height={titleHeight}>
131
- {backElement}
132
- <Text style={[styles.title, { color: navigationBarTextStyle }]} numberOfLines={1}>
133
- {innerPageConfig.navigationBarTitleText?.trim() || ''}
134
- </Text>
135
- </View>
136
- </View>);
137
- });
138
- innerNav.displayName = 'MpxNav';
139
- return innerNav;
140
- }
141
- export default createMpxNav;
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare function useNavShared(): readonly [import("react").ReactNode, (value: import("react").ReactNode) => void];
@@ -1,6 +0,0 @@
1
- import { useContext } from 'react';
2
- import { NavSharedContext } from './context';
3
- export function useNavShared() {
4
- const navSharedValue = useContext(NavSharedContext);
5
- return [navSharedValue.customNav, navSharedValue.setCustomNav];
6
- }