@mpxjs/core 2.10.14-beta.1 → 2.10.14-beta.6

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/@types/index.d.ts CHANGED
@@ -381,6 +381,13 @@ export interface RnConfig {
381
381
  * @param packages 分包名数组
382
382
  */
383
383
  downloadChunkAsync?: (packages: Array<string>) => void;
384
+
385
+ /**
386
+ * bundle 中是否关闭 android 键盘避让功能,如果关闭需要将该配置设置为 false,使用 mpx 内置的键盘避让逻辑
387
+ * @platform android
388
+ * @default true
389
+ */
390
+ enableNativeKeyboardAvoiding?: boolean
384
391
  }
385
392
 
386
393
  interface MpxConfig {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mpxjs/core",
3
- "version": "2.10.14-beta.1",
3
+ "version": "2.10.14-beta.6",
4
4
  "description": "mpx runtime core",
5
5
  "keywords": [
6
6
  "miniprogram",
@@ -10,7 +10,7 @@ import { createElement, memo, useRef, useEffect } from 'react'
10
10
  import * as ReactNative from 'react-native'
11
11
  import { initAppProvides } from './export/inject'
12
12
  import { NavigationContainer, createNativeStackNavigator, SafeAreaProvider, GestureHandlerRootView } from './env/navigationHelper'
13
- import createMpxNav from '@mpxjs/webpack-plugin/lib/runtime/components/react/dist/nav'
13
+ import MpxNav from '@mpxjs/webpack-plugin/lib/runtime/components/react/dist/nav'
14
14
  import { NavSharedProvider } from '@mpxjs/webpack-plugin/lib/runtime/components/react/dist/mpx-nav-container'
15
15
 
16
16
  const appHooksMap = makeMap(mergeLifecycle(LIFECYCLE).app)
@@ -34,15 +34,6 @@ function filterOptions (options, appData) {
34
34
  return newOptions
35
35
  }
36
36
 
37
- let CachedMpxNav = null
38
-
39
- function getMpxNav() {
40
- // Mpx toplevel 执行时获取不到
41
- return (CachedMpxNav ??= createMpxNav({
42
- Mpx
43
- }))
44
- }
45
-
46
37
  export default function createApp (options) {
47
38
  const appData = {}
48
39
  // app选项目前不需要进行转换
@@ -76,7 +67,7 @@ export default function createApp (options) {
76
67
  flex: 1
77
68
  }
78
69
  },
79
- createElement(getMpxNav(), {
70
+ createElement(MpxNav, {
80
71
  pageConfig: pageConfig,
81
72
  navigation
82
73
  }),