@mpxjs/webpack-plugin 2.10.17 → 2.10.18-beta.2

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 (262) hide show
  1. package/lib/config.js +60 -0
  2. package/lib/file-loader.js +4 -1
  3. package/lib/global.d.ts +231 -0
  4. package/lib/index.js +70 -73
  5. package/lib/init.js +3 -0
  6. package/lib/json-compiler/index.js +13 -4
  7. package/lib/loader.js +4 -0
  8. package/lib/platform/json/wx/index.js +6 -0
  9. package/lib/platform/style/wx/index.js +102 -72
  10. package/lib/platform/template/wx/component-config/ad.js +5 -0
  11. package/lib/platform/template/wx/component-config/button.js +10 -3
  12. package/lib/platform/template/wx/component-config/camera.js +25 -3
  13. package/lib/platform/template/wx/component-config/canvas.js +8 -1
  14. package/lib/platform/template/wx/component-config/cover-image.js +7 -2
  15. package/lib/platform/template/wx/component-config/cover-view.js +3 -1
  16. package/lib/platform/template/wx/component-config/form.js +27 -2
  17. package/lib/platform/template/wx/component-config/image.js +5 -0
  18. package/lib/platform/template/wx/component-config/input.js +10 -0
  19. package/lib/platform/template/wx/component-config/label.js +10 -2
  20. package/lib/platform/template/wx/component-config/map.js +11 -0
  21. package/lib/platform/template/wx/component-config/movable-area.js +4 -1
  22. package/lib/platform/template/wx/component-config/movable-view.js +17 -2
  23. package/lib/platform/template/wx/component-config/navigator.js +26 -0
  24. package/lib/platform/template/wx/component-config/picker-view.js +12 -0
  25. package/lib/platform/template/wx/component-config/picker.js +3 -1
  26. package/lib/platform/template/wx/component-config/progress.js +11 -1
  27. package/lib/platform/template/wx/component-config/rich-text.js +5 -0
  28. package/lib/platform/template/wx/component-config/scroll-view.js +12 -1
  29. package/lib/platform/template/wx/component-config/slider.js +8 -0
  30. package/lib/platform/template/wx/component-config/swiper-item.js +5 -2
  31. package/lib/platform/template/wx/component-config/swiper.js +10 -0
  32. package/lib/platform/template/wx/component-config/text.js +5 -0
  33. package/lib/platform/template/wx/component-config/textarea.js +19 -2
  34. package/lib/platform/template/wx/component-config/unsupported.js +10 -1
  35. package/lib/platform/template/wx/component-config/video.js +10 -0
  36. package/lib/platform/template/wx/index.js +21 -1
  37. package/lib/react/LoadAsyncChunkModule.js +1 -1
  38. package/lib/react/processStyles.js +21 -9
  39. package/lib/react/script-helper.js +2 -2
  40. package/lib/react/style-helper.js +76 -13
  41. package/lib/resolver/AddModePlugin.js +17 -7
  42. package/lib/resolver/ExtendComponentsPlugin.js +60 -0
  43. package/lib/runtime/components/ali/mpx-section-list.mpx +566 -0
  44. package/lib/runtime/components/ali/mpx-sticky-header.mpx +212 -0
  45. package/lib/runtime/components/ali/mpx-sticky-section.mpx +17 -0
  46. package/lib/runtime/components/react/animationHooks/index.ts +75 -0
  47. package/lib/runtime/components/react/animationHooks/useAnimationAPIHooks.ts +197 -0
  48. package/lib/runtime/components/react/animationHooks/useTransitionHooks.ts +301 -0
  49. package/lib/runtime/components/react/animationHooks/utils.ts +197 -0
  50. package/lib/runtime/components/react/context.ts +12 -3
  51. package/lib/runtime/components/react/dist/animationHooks/index.d.ts +15 -0
  52. package/lib/runtime/components/react/dist/animationHooks/index.js +67 -0
  53. package/lib/runtime/components/react/dist/animationHooks/useAnimationAPIHooks.d.ts +3 -0
  54. package/lib/runtime/components/react/dist/animationHooks/useAnimationAPIHooks.js +181 -0
  55. package/lib/runtime/components/react/dist/animationHooks/useTransitionHooks.d.ts +3 -0
  56. package/lib/runtime/components/react/dist/animationHooks/useTransitionHooks.js +279 -0
  57. package/lib/runtime/components/react/dist/animationHooks/utils.d.ts +109 -0
  58. package/lib/runtime/components/react/dist/animationHooks/utils.js +151 -0
  59. package/lib/runtime/components/react/dist/context.d.ts +10 -3
  60. package/lib/runtime/components/react/dist/context.js +1 -2
  61. package/lib/runtime/components/react/dist/event.config.d.ts +0 -1
  62. package/lib/runtime/components/react/dist/getInnerListeners.d.ts +0 -1
  63. package/lib/runtime/components/react/dist/mpx-async-suspense.d.ts +0 -1
  64. package/lib/runtime/components/react/dist/mpx-async-suspense.jsx +3 -1
  65. package/lib/runtime/components/react/dist/mpx-button.d.ts +0 -1
  66. package/lib/runtime/components/react/dist/mpx-camera.d.ts +31 -0
  67. package/lib/runtime/components/react/dist/mpx-camera.jsx +236 -0
  68. package/lib/runtime/components/react/dist/mpx-canvas/Bus.d.ts +0 -1
  69. package/lib/runtime/components/react/dist/mpx-canvas/CanvasGradient.d.ts +0 -1
  70. package/lib/runtime/components/react/dist/mpx-canvas/CanvasRenderingContext2D.d.ts +0 -1
  71. package/lib/runtime/components/react/dist/mpx-canvas/Image.d.ts +0 -1
  72. package/lib/runtime/components/react/dist/mpx-canvas/ImageData.d.ts +0 -1
  73. package/lib/runtime/components/react/dist/mpx-canvas/constructorsRegistry.d.ts +0 -1
  74. package/lib/runtime/components/react/dist/mpx-canvas/html.d.ts +0 -1
  75. package/lib/runtime/components/react/dist/mpx-canvas/index.d.ts +0 -1
  76. package/lib/runtime/components/react/dist/mpx-canvas/utils.d.ts +0 -1
  77. package/lib/runtime/components/react/dist/mpx-checkbox-group.d.ts +0 -1
  78. package/lib/runtime/components/react/dist/mpx-checkbox.d.ts +0 -1
  79. package/lib/runtime/components/react/dist/mpx-form.d.ts +0 -1
  80. package/lib/runtime/components/react/dist/mpx-icon/index.d.ts +0 -1
  81. package/lib/runtime/components/react/dist/mpx-image.d.ts +0 -1
  82. package/lib/runtime/components/react/dist/mpx-image.jsx +2 -2
  83. package/lib/runtime/components/react/dist/mpx-inline-text.d.ts +0 -1
  84. package/lib/runtime/components/react/dist/mpx-input.d.ts +2 -1
  85. package/lib/runtime/components/react/dist/mpx-input.jsx +66 -50
  86. package/lib/runtime/components/react/dist/mpx-keyboard-avoiding-view.d.ts +0 -1
  87. package/lib/runtime/components/react/dist/mpx-keyboard-avoiding-view.jsx +35 -6
  88. package/lib/runtime/components/react/dist/mpx-label.d.ts +0 -1
  89. package/lib/runtime/components/react/dist/mpx-movable-area.d.ts +0 -1
  90. package/lib/runtime/components/react/dist/mpx-movable-view.d.ts +0 -1
  91. package/lib/runtime/components/react/dist/mpx-nav.d.ts +0 -1
  92. package/lib/runtime/components/react/dist/mpx-navigator.d.ts +0 -1
  93. package/lib/runtime/components/react/dist/mpx-picker/date.d.ts +0 -1
  94. package/lib/runtime/components/react/dist/mpx-picker/dateData.d.ts +0 -1
  95. package/lib/runtime/components/react/dist/mpx-picker/index.d.ts +0 -1
  96. package/lib/runtime/components/react/dist/mpx-picker/multiSelector.d.ts +0 -1
  97. package/lib/runtime/components/react/dist/mpx-picker/region.d.ts +0 -1
  98. package/lib/runtime/components/react/dist/mpx-picker/regionData.d.ts +0 -1
  99. package/lib/runtime/components/react/dist/mpx-picker/selector.d.ts +0 -1
  100. package/lib/runtime/components/react/dist/mpx-picker/time.d.ts +0 -1
  101. package/lib/runtime/components/react/dist/mpx-picker/type.d.ts +0 -1
  102. package/lib/runtime/components/react/dist/mpx-picker-view/index.d.ts +0 -1
  103. package/lib/runtime/components/react/dist/mpx-picker-view/pickerVIewContext.d.ts +0 -1
  104. package/lib/runtime/components/react/dist/mpx-picker-view-column/index.d.ts +0 -1
  105. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewColumnItem.d.ts +0 -1
  106. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewColumnItemLite.d.ts +0 -1
  107. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewFaces.d.ts +0 -1
  108. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewIndicator.d.ts +0 -1
  109. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewMask.d.ts +0 -1
  110. package/lib/runtime/components/react/dist/mpx-popup/index.d.ts +0 -1
  111. package/lib/runtime/components/react/dist/mpx-popup/popupBase.d.ts +0 -1
  112. package/lib/runtime/components/react/dist/mpx-portal/index.d.ts +0 -1
  113. package/lib/runtime/components/react/dist/mpx-portal/portal-host.d.ts +0 -1
  114. package/lib/runtime/components/react/dist/mpx-portal/portal-manager.d.ts +0 -1
  115. package/lib/runtime/components/react/dist/mpx-portal/portal-manager.jsx +2 -2
  116. package/lib/runtime/components/react/dist/mpx-progress.d.ts +0 -1
  117. package/lib/runtime/components/react/dist/mpx-radio-group.d.ts +0 -1
  118. package/lib/runtime/components/react/dist/mpx-radio.d.ts +0 -1
  119. package/lib/runtime/components/react/dist/mpx-rich-text/html.d.ts +0 -1
  120. package/lib/runtime/components/react/dist/mpx-rich-text/index.d.ts +0 -1
  121. package/lib/runtime/components/react/dist/mpx-root-portal.d.ts +0 -1
  122. package/lib/runtime/components/react/dist/mpx-scroll-view.d.ts +0 -1
  123. package/lib/runtime/components/react/dist/mpx-scroll-view.jsx +84 -78
  124. package/lib/runtime/components/react/dist/mpx-section-list.d.ts +48 -0
  125. package/lib/runtime/components/react/dist/mpx-section-list.jsx +292 -0
  126. package/lib/runtime/components/react/dist/mpx-simple-text.d.ts +0 -1
  127. package/lib/runtime/components/react/dist/mpx-simple-view.d.ts +0 -1
  128. package/lib/runtime/components/react/dist/mpx-slider.d.ts +0 -1
  129. package/lib/runtime/components/react/dist/mpx-sticky-header.d.ts +0 -1
  130. package/lib/runtime/components/react/dist/mpx-sticky-header.jsx +20 -20
  131. package/lib/runtime/components/react/dist/mpx-sticky-section.d.ts +0 -1
  132. package/lib/runtime/components/react/dist/mpx-swiper-item.d.ts +0 -1
  133. package/lib/runtime/components/react/dist/mpx-swiper.d.ts +11 -1
  134. package/lib/runtime/components/react/dist/mpx-swiper.jsx +136 -83
  135. package/lib/runtime/components/react/dist/mpx-switch.d.ts +0 -1
  136. package/lib/runtime/components/react/dist/mpx-text.d.ts +0 -1
  137. package/lib/runtime/components/react/dist/mpx-textarea.d.ts +0 -1
  138. package/lib/runtime/components/react/dist/mpx-textarea.jsx +1 -0
  139. package/lib/runtime/components/react/dist/mpx-video.d.ts +0 -1
  140. package/lib/runtime/components/react/dist/mpx-view.d.ts +3 -3
  141. package/lib/runtime/components/react/dist/mpx-view.jsx +22 -8
  142. package/lib/runtime/components/react/dist/mpx-web-view.d.ts +0 -1
  143. package/lib/runtime/components/react/dist/mpx-web-view.jsx +1 -1
  144. package/lib/runtime/components/react/dist/parser.d.ts +0 -1
  145. package/lib/runtime/components/react/dist/useNodesRef.d.ts +0 -1
  146. package/lib/runtime/components/react/dist/utils.d.ts +10 -9
  147. package/lib/runtime/components/react/dist/utils.jsx +47 -24
  148. package/lib/runtime/components/react/mpx-async-suspense.tsx +3 -1
  149. package/lib/runtime/components/react/mpx-camera.tsx +327 -0
  150. package/lib/runtime/components/react/mpx-image.tsx +2 -2
  151. package/lib/runtime/components/react/mpx-input.tsx +77 -54
  152. package/lib/runtime/components/react/mpx-keyboard-avoiding-view.tsx +35 -6
  153. package/lib/runtime/components/react/mpx-portal/portal-manager.tsx +2 -2
  154. package/lib/runtime/components/react/mpx-scroll-view.tsx +110 -114
  155. package/lib/runtime/components/react/mpx-section-list.tsx +439 -0
  156. package/lib/runtime/components/react/mpx-sticky-header.tsx +24 -24
  157. package/lib/runtime/components/react/mpx-swiper.tsx +156 -81
  158. package/lib/runtime/components/react/mpx-textarea.tsx +1 -0
  159. package/lib/runtime/components/react/mpx-view.tsx +27 -12
  160. package/lib/runtime/components/react/mpx-web-view.tsx +1 -1
  161. package/lib/runtime/components/react/tsconfig.json +26 -0
  162. package/lib/runtime/components/react/types/global.d.ts +1 -0
  163. package/lib/runtime/components/react/utils.tsx +51 -27
  164. package/lib/runtime/components/web/mpx-scroll-view.vue +5 -2
  165. package/lib/runtime/components/web/mpx-section-list.vue +551 -0
  166. package/lib/runtime/components/wx/mpx-section-list-default/list-footer.mpx +26 -0
  167. package/lib/runtime/components/wx/mpx-section-list-default/list-header.mpx +26 -0
  168. package/lib/runtime/components/wx/mpx-section-list-default/list-item.mpx +26 -0
  169. package/lib/runtime/components/wx/mpx-section-list-default/section-header.mpx +26 -0
  170. package/lib/runtime/components/wx/mpx-section-list.mpx +209 -0
  171. package/lib/runtime/components/wx/mpx-sticky-header.mpx +40 -0
  172. package/lib/runtime/components/wx/mpx-sticky-section.mpx +31 -0
  173. package/lib/runtime/optionProcessor.js +5 -0
  174. package/lib/runtime/optionProcessorReact.js +7 -0
  175. package/lib/runtime/stringify.wxs +2 -2
  176. package/lib/script-setup-compiler/index.js +1 -2
  177. package/lib/style-compiler/strip-conditional.js +244 -0
  178. package/lib/template-compiler/compiler.js +9 -8
  179. package/lib/utils/const.js +29 -0
  180. package/lib/utils/dom-tag-config.js +1 -1
  181. package/lib/utils/string.js +25 -1
  182. package/lib/wxss/loader.js +4 -1
  183. package/lib/wxss/utils.js +7 -2
  184. package/package.json +7 -14
  185. package/LICENSE +0 -433
  186. package/lib/runtime/components/react/dist/context.d.ts.map +0 -1
  187. package/lib/runtime/components/react/dist/event.config.d.ts.map +0 -1
  188. package/lib/runtime/components/react/dist/getInnerListeners.d.ts.map +0 -1
  189. package/lib/runtime/components/react/dist/mpx-async-suspense.d.ts.map +0 -1
  190. package/lib/runtime/components/react/dist/mpx-button.d.ts.map +0 -1
  191. package/lib/runtime/components/react/dist/mpx-canvas/Bus.d.ts.map +0 -1
  192. package/lib/runtime/components/react/dist/mpx-canvas/CanvasGradient.d.ts.map +0 -1
  193. package/lib/runtime/components/react/dist/mpx-canvas/CanvasRenderingContext2D.d.ts.map +0 -1
  194. package/lib/runtime/components/react/dist/mpx-canvas/Image.d.ts.map +0 -1
  195. package/lib/runtime/components/react/dist/mpx-canvas/ImageData.d.ts.map +0 -1
  196. package/lib/runtime/components/react/dist/mpx-canvas/constructorsRegistry.d.ts.map +0 -1
  197. package/lib/runtime/components/react/dist/mpx-canvas/html.d.ts.map +0 -1
  198. package/lib/runtime/components/react/dist/mpx-canvas/index.d.ts.map +0 -1
  199. package/lib/runtime/components/react/dist/mpx-canvas/utils.d.ts.map +0 -1
  200. package/lib/runtime/components/react/dist/mpx-checkbox-group.d.ts.map +0 -1
  201. package/lib/runtime/components/react/dist/mpx-checkbox.d.ts.map +0 -1
  202. package/lib/runtime/components/react/dist/mpx-form.d.ts.map +0 -1
  203. package/lib/runtime/components/react/dist/mpx-icon/index.d.ts.map +0 -1
  204. package/lib/runtime/components/react/dist/mpx-image.d.ts.map +0 -1
  205. package/lib/runtime/components/react/dist/mpx-inline-text.d.ts.map +0 -1
  206. package/lib/runtime/components/react/dist/mpx-input.d.ts.map +0 -1
  207. package/lib/runtime/components/react/dist/mpx-keyboard-avoiding-view.d.ts.map +0 -1
  208. package/lib/runtime/components/react/dist/mpx-label.d.ts.map +0 -1
  209. package/lib/runtime/components/react/dist/mpx-movable-area.d.ts.map +0 -1
  210. package/lib/runtime/components/react/dist/mpx-movable-view.d.ts.map +0 -1
  211. package/lib/runtime/components/react/dist/mpx-nav.d.ts.map +0 -1
  212. package/lib/runtime/components/react/dist/mpx-navigator.d.ts.map +0 -1
  213. package/lib/runtime/components/react/dist/mpx-picker/date.d.ts.map +0 -1
  214. package/lib/runtime/components/react/dist/mpx-picker/dateData.d.ts.map +0 -1
  215. package/lib/runtime/components/react/dist/mpx-picker/index.d.ts.map +0 -1
  216. package/lib/runtime/components/react/dist/mpx-picker/multiSelector.d.ts.map +0 -1
  217. package/lib/runtime/components/react/dist/mpx-picker/region.d.ts.map +0 -1
  218. package/lib/runtime/components/react/dist/mpx-picker/regionData.d.ts.map +0 -1
  219. package/lib/runtime/components/react/dist/mpx-picker/selector.d.ts.map +0 -1
  220. package/lib/runtime/components/react/dist/mpx-picker/time.d.ts.map +0 -1
  221. package/lib/runtime/components/react/dist/mpx-picker/type.d.ts.map +0 -1
  222. package/lib/runtime/components/react/dist/mpx-picker-view/index.d.ts.map +0 -1
  223. package/lib/runtime/components/react/dist/mpx-picker-view/pickerVIewContext.d.ts.map +0 -1
  224. package/lib/runtime/components/react/dist/mpx-picker-view-column/index.d.ts.map +0 -1
  225. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewColumnItem.d.ts.map +0 -1
  226. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewColumnItemLite.d.ts.map +0 -1
  227. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewFaces.d.ts.map +0 -1
  228. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewIndicator.d.ts.map +0 -1
  229. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewMask.d.ts.map +0 -1
  230. package/lib/runtime/components/react/dist/mpx-popup/index.d.ts.map +0 -1
  231. package/lib/runtime/components/react/dist/mpx-popup/popupBase.d.ts.map +0 -1
  232. package/lib/runtime/components/react/dist/mpx-portal/index.d.ts.map +0 -1
  233. package/lib/runtime/components/react/dist/mpx-portal/portal-host.d.ts.map +0 -1
  234. package/lib/runtime/components/react/dist/mpx-portal/portal-manager.d.ts.map +0 -1
  235. package/lib/runtime/components/react/dist/mpx-progress.d.ts.map +0 -1
  236. package/lib/runtime/components/react/dist/mpx-radio-group.d.ts.map +0 -1
  237. package/lib/runtime/components/react/dist/mpx-radio.d.ts.map +0 -1
  238. package/lib/runtime/components/react/dist/mpx-rich-text/html.d.ts.map +0 -1
  239. package/lib/runtime/components/react/dist/mpx-rich-text/index.d.ts.map +0 -1
  240. package/lib/runtime/components/react/dist/mpx-root-portal.d.ts.map +0 -1
  241. package/lib/runtime/components/react/dist/mpx-scroll-view.d.ts.map +0 -1
  242. package/lib/runtime/components/react/dist/mpx-simple-text.d.ts.map +0 -1
  243. package/lib/runtime/components/react/dist/mpx-simple-view.d.ts.map +0 -1
  244. package/lib/runtime/components/react/dist/mpx-slider.d.ts.map +0 -1
  245. package/lib/runtime/components/react/dist/mpx-sticky-header.d.ts.map +0 -1
  246. package/lib/runtime/components/react/dist/mpx-sticky-section.d.ts.map +0 -1
  247. package/lib/runtime/components/react/dist/mpx-swiper-item.d.ts.map +0 -1
  248. package/lib/runtime/components/react/dist/mpx-swiper.d.ts.map +0 -1
  249. package/lib/runtime/components/react/dist/mpx-switch.d.ts.map +0 -1
  250. package/lib/runtime/components/react/dist/mpx-text.d.ts.map +0 -1
  251. package/lib/runtime/components/react/dist/mpx-textarea.d.ts.map +0 -1
  252. package/lib/runtime/components/react/dist/mpx-video.d.ts.map +0 -1
  253. package/lib/runtime/components/react/dist/mpx-view.d.ts.map +0 -1
  254. package/lib/runtime/components/react/dist/mpx-web-view.d.ts.map +0 -1
  255. package/lib/runtime/components/react/dist/parser.d.ts.map +0 -1
  256. package/lib/runtime/components/react/dist/useAnimationHooks.d.ts +0 -33
  257. package/lib/runtime/components/react/dist/useAnimationHooks.d.ts.map +0 -1
  258. package/lib/runtime/components/react/dist/useAnimationHooks.js +0 -289
  259. package/lib/runtime/components/react/dist/useNodesRef.d.ts.map +0 -1
  260. package/lib/runtime/components/react/dist/utils.d.ts.map +0 -1
  261. package/lib/runtime/components/react/useAnimationHooks.ts +0 -320
  262. package/lib/style-compiler/strip-conditional-loader.js +0 -289
@@ -31,7 +31,9 @@ export interface InputProps {
31
31
  'parent-font-size'?: number;
32
32
  'parent-width'?: number;
33
33
  'parent-height'?: number;
34
+ 'keyboard-type'?: string;
34
35
  'adjust-position': boolean;
36
+ 'hold-keyboard'?: boolean;
35
37
  bindinput?: (evt: NativeSyntheticEvent<TextInputTextInputEventData> | unknown) => void;
36
38
  bindfocus?: (evt: NativeSyntheticEvent<TextInputFocusEventData> | unknown) => void;
37
39
  bindblur?: (evt: NativeSyntheticEvent<TextInputFocusEventData> | unknown) => void;
@@ -47,4 +49,3 @@ export interface PrivateInputProps {
47
49
  type FinalInputProps = InputProps & PrivateInputProps;
48
50
  declare const Input: import("react").ForwardRefExoticComponent<InputProps & PrivateInputProps & import("react").RefAttributes<HandlerRef<TextInput, FinalInputProps>>>;
49
51
  export default Input;
50
- //# sourceMappingURL=mpx-input.d.ts.map
@@ -18,7 +18,7 @@
18
18
  * ✔ selection-start
19
19
  * ✔ selection-end
20
20
  * ✔ adjust-position
21
- * hold-keyboard
21
+ * hold-keyboard
22
22
  * ✘ safe-password-cert-path
23
23
  * ✘ safe-password-length
24
24
  * ✘ safe-password-time-stamp
@@ -40,19 +40,19 @@
40
40
  import { forwardRef, useRef, useState, useContext, useEffect, createElement } from 'react';
41
41
  import { TextInput } from 'react-native';
42
42
  import { warn } from '@mpxjs/utils';
43
- import { useUpdateEffect, useTransformStyle, useLayout, extendObject, isIOS } from './utils';
43
+ import { useUpdateEffect, useTransformStyle, useLayout, extendObject, isAndroid } from './utils';
44
44
  import useInnerProps, { getCustomEvent } from './getInnerListeners';
45
45
  import useNodesRef from './useNodesRef';
46
46
  import { FormContext, KeyboardAvoidContext } from './context';
47
47
  import Portal from './mpx-portal';
48
- const keyboardTypeMap = {
49
- text: 'default',
48
+ const inputModeMap = {
49
+ text: 'text',
50
50
  number: 'numeric',
51
- idcard: 'default',
52
- digit: isIOS ? 'decimal-pad' : 'numeric'
51
+ idcard: 'text',
52
+ digit: 'decimal'
53
53
  };
54
54
  const Input = forwardRef((props, ref) => {
55
- const { style = {}, allowFontScaling = false, type = 'text', value, password, 'placeholder-style': placeholderStyle = {}, disabled, maxlength = 140, 'cursor-spacing': cursorSpacing = 0, 'auto-focus': autoFocus, focus, 'confirm-type': confirmType = 'done', 'confirm-hold': confirmHold = false, cursor, 'cursor-color': cursorColor, 'selection-start': selectionStart = -1, 'selection-end': selectionEnd = -1, 'enable-var': enableVar, 'external-var-context': externalVarContext, 'parent-font-size': parentFontSize, 'parent-width': parentWidth, 'parent-height': parentHeight, 'adjust-position': adjustPosition = true, bindinput, bindfocus, bindblur, bindconfirm, bindselectionchange,
55
+ const { style = {}, allowFontScaling = false, type = 'text', value, password, 'placeholder-style': placeholderStyle = {}, disabled, maxlength = 140, 'cursor-spacing': cursorSpacing = 0, 'auto-focus': autoFocus, focus, 'confirm-type': confirmType = 'done', 'confirm-hold': confirmHold = false, cursor, 'cursor-color': cursorColor, 'selection-start': selectionStart = -1, 'selection-end': selectionEnd = -1, 'enable-var': enableVar, 'external-var-context': externalVarContext, 'parent-font-size': parentFontSize, 'parent-width': parentWidth, 'parent-height': parentHeight, 'adjust-position': adjustPosition = true, 'keyboard-type': originalKeyboardType, 'hold-keyboard': holdKeyboard = false, bindinput, bindfocus, bindblur, bindconfirm, bindselectionchange,
56
56
  // private
57
57
  multiline, 'auto-height': autoHeight, bindlinechange } = props;
58
58
  const formContext = useContext(FormContext);
@@ -72,18 +72,18 @@ const Input = forwardRef((props, ref) => {
72
72
  return value + '';
73
73
  return '';
74
74
  };
75
- const keyboardType = keyboardTypeMap[type];
76
75
  const defaultValue = parseValue(value);
76
+ // 微信小程序的 input 永远是单行,textAlignVertical 固定为 auto
77
+ // multiline 为 true 时表示是 textarea 组件复用此逻辑
77
78
  const textAlignVertical = multiline ? 'top' : 'auto';
79
+ const isAutoFocus = !!autoFocus || !!focus;
78
80
  const tmpValue = useRef(defaultValue);
79
81
  const cursorIndex = useRef(0);
80
82
  const lineCount = useRef(0);
81
83
  const [inputValue, setInputValue] = useState(defaultValue);
82
84
  const [contentHeight, setContentHeight] = useState(0);
83
85
  const [selection, setSelection] = useState({ start: -1, end: tmpValue.current.length });
84
- const styleObj = extendObject({ padding: 0, backgroundColor: '#fff' }, style, multiline && autoHeight
85
- ? { height: 'auto', minHeight: Math.max(style?.minHeight || 35, contentHeight) }
86
- : {});
86
+ const styleObj = extendObject({ padding: 0, backgroundColor: '#fff' }, style, multiline && autoHeight ? { height: 'auto' } : {});
87
87
  const { hasPositionFixed, hasSelfPercent, normalStyle, setWidth, setHeight } = useTransformStyle(styleObj, { enableVar, externalVarContext, parentFontSize, parentWidth, parentHeight });
88
88
  const nodeRef = useRef(null);
89
89
  useNodesRef(props, ref, nodeRef, {
@@ -145,47 +145,54 @@ const Input = forwardRef((props, ref) => {
145
145
  };
146
146
  const setKeyboardAvoidContext = () => {
147
147
  if (keyboardAvoid) {
148
- keyboardAvoid.current = { cursorSpacing, ref: nodeRef, adjustPosition };
148
+ keyboardAvoid.current = { cursorSpacing, ref: nodeRef, adjustPosition, holdKeyboard, readyToShow: true };
149
149
  }
150
150
  };
151
151
  const onTouchStart = () => {
152
- // sometimes the focus event occurs later than the keyboardWillShow event
152
+ // 手动聚焦时初始化 keyboardAvoid 上下文
153
+ // auto-focus/focus 不会触发而是在 useEffect 中初始化
153
154
  setKeyboardAvoidContext();
154
155
  };
155
156
  const onTouchEnd = (evt) => {
156
157
  evt.nativeEvent.origin = 'input';
157
158
  };
158
159
  const onFocus = (evt) => {
159
- setKeyboardAvoidContext();
160
- if (bindfocus) {
161
- const focusAction = () => {
162
- bindfocus(getCustomEvent('focus', evt, {
163
- detail: {
164
- value: tmpValue.current || '',
165
- height: keyboardAvoid?.current?.keyboardHeight
166
- },
167
- layoutRef
168
- }, props));
169
- if (keyboardAvoid?.current?.onKeyboardShow) {
170
- keyboardAvoid.current.onKeyboardShow = undefined;
171
- }
172
- };
173
- if (keyboardAvoid?.current) {
174
- // keyboardAvoiding
175
- if (keyboardAvoid.current.keyboardHeight) {
176
- // iOS: keyboard 获取高度时机 keyboardWillShow 在 input focus 之前,可以立即执行
177
- focusAction();
178
- }
179
- else {
180
- // Android,Harmony: keyboard 获取高度时机 keyboardDidShow 在 input focus 之后,需要延迟回调
181
- evt.persist();
182
- keyboardAvoid.current.onKeyboardShow = focusAction;
183
- }
160
+ if (!keyboardAvoid?.current) {
161
+ // Android:从一个正聚焦状态 input,聚焦到另一个新的 input 时,正常会触发如下时序:
162
+ // 新的 Input `onTouchStart` -> 旧输入框键盘 `keyboardDidHide` -> 新的 Input `onFocus`
163
+ // 导致这里的 keyboardAvoid.current 为 null,所以需要判空重新初始化。
164
+ setKeyboardAvoidContext();
165
+ }
166
+ const focusAction = () => {
167
+ bindfocus?.(getCustomEvent('focus', evt, {
168
+ detail: {
169
+ value: tmpValue.current || '',
170
+ height: keyboardAvoid?.current?.keyboardHeight
171
+ },
172
+ layoutRef
173
+ }, props));
174
+ if (keyboardAvoid?.current?.onKeyboardShow) {
175
+ keyboardAvoid.current.onKeyboardShow = undefined;
184
176
  }
185
- else {
186
- // keyboardAvoiding,直接执行 focus 回调
177
+ };
178
+ if (keyboardAvoid?.current) {
179
+ // 有 keyboardAvoiding
180
+ if (keyboardAvoid.current.keyboardHeight) {
181
+ // 仅以下场景触发顺序:先 keyboardWillShow 获取高度 -> 后 onFocus,可以立即执行
182
+ // - iOS + 手动点击聚焦
187
183
  focusAction();
188
184
  }
185
+ else {
186
+ // 其他场景触发顺序:先 onFocus -> 后 keyboardWillShow 获取高度 -> 执行回调
187
+ // - iOS + auto-focus/focus=true 自动聚焦
188
+ // - Android 手动点击聚焦/自动聚焦 都一样
189
+ evt.persist();
190
+ keyboardAvoid.current.onKeyboardShow = focusAction;
191
+ }
192
+ }
193
+ else {
194
+ // 兜底:无 keyboardAvoiding 直接执行 focus 回调
195
+ focusAction();
189
196
  }
190
197
  };
191
198
  const onBlur = (evt) => {
@@ -260,36 +267,45 @@ const Input = forwardRef((props, ref) => {
260
267
  };
261
268
  }, []);
262
269
  useEffect(() => {
263
- if (focus) {
270
+ if (isAutoFocus) {
271
+ // auto-focus/focus=true 初始化 keyboardAvoidContext
264
272
  setKeyboardAvoidContext();
265
273
  }
266
- }, [focus]);
274
+ }, [isAutoFocus]);
267
275
  useUpdateEffect(() => {
268
276
  if (!nodeRef?.current) {
269
277
  return;
270
278
  }
271
- focus
279
+ // RN autoFocus 属性仅在初次渲染时生效
280
+ // 后续更新需要手动调用 focus/blur 方法,和微信小程序对齐
281
+ isAutoFocus
272
282
  ? nodeRef.current?.focus()
273
283
  : nodeRef.current?.blur();
274
- }, [focus]);
284
+ }, [isAutoFocus]);
285
+ // 使用 multiline 来修复光标位置问题
286
+ // React Native 的 TextInput 在 textAlign center + placeholder 时光标会跑到右边
287
+ // 这个问题只在 Android 上出现
288
+ // 参考:https://github.com/facebook/react-native/issues/28794 (Android only)
289
+ const needMultilineFix = isAndroid && !multiline;
275
290
  const innerProps = useInnerProps(extendObject({}, props, layoutProps, {
276
291
  ref: nodeRef,
277
292
  style: extendObject({}, normalStyle, layoutStyle),
278
293
  allowFontScaling,
279
- keyboardType: keyboardType,
294
+ inputMode: originalKeyboardType ? undefined : inputModeMap[type],
295
+ keyboardType: originalKeyboardType,
280
296
  secureTextEntry: !!password,
281
297
  defaultValue: defaultValue,
282
298
  value: inputValue,
283
299
  maxLength: maxlength === -1 ? undefined : maxlength,
284
300
  editable: !disabled,
285
- autoFocus: !!autoFocus || !!focus,
301
+ autoFocus: isAutoFocus,
286
302
  selection: selectionStart > -1 || typeof cursor === 'number' ? selection : undefined,
287
303
  selectionColor: cursorColor,
288
- blurOnSubmit: !multiline && !confirmHold,
304
+ blurOnSubmit: multiline ? confirmType !== 'return' : !confirmHold,
289
305
  underlineColorAndroid: 'rgba(0,0,0,0)',
290
306
  textAlignVertical: textAlignVertical,
291
307
  placeholderTextColor: placeholderStyle?.color,
292
- multiline: !!multiline,
308
+ multiline: multiline || needMultilineFix,
293
309
  onTouchStart,
294
310
  onTouchEnd,
295
311
  onFocus,
@@ -297,8 +313,8 @@ const Input = forwardRef((props, ref) => {
297
313
  onChange,
298
314
  onSelectionChange,
299
315
  onContentSizeChange,
300
- onSubmitEditing: bindconfirm && !multiline && onSubmitEditing
301
- }, !!multiline && confirmType === 'return' ? {} : { enterKeyHint: confirmType }), [
316
+ onSubmitEditing: bindconfirm && onSubmitEditing
317
+ }, needMultilineFix ? { numberOfLines: 1 } : {}, !!multiline && confirmType === 'return' ? {} : { enterKeyHint: confirmType }), [
302
318
  'type',
303
319
  'password',
304
320
  'placeholder-style',
@@ -10,4 +10,3 @@ declare const KeyboardAvoidingView: {
10
10
  displayName: string;
11
11
  };
12
12
  export default KeyboardAvoidingView;
13
- //# sourceMappingURL=mpx-keyboard-avoiding-view.d.ts.map
@@ -14,9 +14,12 @@ const KeyboardAvoidingView = ({ children, style, contentContainerStyle }) => {
14
14
  // 比如机型 iPhone 11 Pro,可能会导致显隐动画冲突
15
15
  // 因此增加状态标记 + cancelAnimation 来优化
16
16
  const isShow = useRef(false);
17
+ const keybaordHandleTimerRef = useRef(null);
17
18
  const animatedStyle = useAnimatedStyle(() => ({
18
- // translate/position top可能会导致底部渲染区域缺失
19
- marginTop: -offset.value,
19
+ // translate/position top+ overflow hidden 在 android 上时因为键盘顶起让页面高度变小,同时元素位置上移
20
+ // 此时最底部的区域是超出了页面高度的,hidden生效就被隐藏掉,因此需要 android 配置聚焦时禁用高度缩小
21
+ // margin-top 因为在 react-native 上和 flex 1 同时存在时,负值只会让容器高度整体变高,不会让元素上移
22
+ transform: [{ translateY: -offset.value }],
20
23
  flexBasis: basic.value
21
24
  }));
22
25
  const resetKeyboard = () => {
@@ -26,11 +29,20 @@ const KeyboardAvoidingView = ({ children, style, contentContainerStyle }) => {
26
29
  isShow.current = false;
27
30
  if (keyboardAvoid?.current) {
28
31
  const inputRef = keyboardAvoid.current.ref?.current;
29
- if (inputRef && inputRef.isFocused()) {
32
+ if (inputRef && inputRef.isFocused() && !keyboardAvoid.current.readyToShow) {
30
33
  // 修复 Android 点击键盘收起按钮时当前 input 没触发失焦的问题
34
+ // keyboardAvoid.current.readyToShow = true 表示聚焦到了新的输入框,不需要手动触发失焦
31
35
  inputRef.blur();
32
36
  }
33
- keyboardAvoid.current = null;
37
+ if (!keyboardAvoid.current.onKeyboardShow) {
38
+ // 修复部分 Android 机型可能时序问题:当从 input 已聚焦状态,聚焦到另一个 input 时,可能时序:
39
+ // - 新的 Input `onTouchStart` -> 新的 Input `onFocus` -> 旧输入框键盘 `keyboardDidHide` -> 新输入框键盘 `keyboardDidShow`
40
+ // - 此时 keyboardAvoid.current 如果清空 null,会导致新输入框键盘 `keyboardDidShow` 回调 keybaordAvoding 执行失败。
41
+ // 修复方案:
42
+ // 如果出现时序问题,那么新的 Input `onFocus` 会更早执行,那么 `keyboardAvoid.current.onKeyboardShow` 存在,
43
+ // 那么不应该重置为 null,反之,说明时正常情况,应当重置为 null。
44
+ keyboardAvoid.current = null;
45
+ }
34
46
  }
35
47
  cancelAnimation(offset);
36
48
  offset.value = withTiming(0, { duration, easing });
@@ -38,13 +50,20 @@ const KeyboardAvoidingView = ({ children, style, contentContainerStyle }) => {
38
50
  };
39
51
  const onTouchEnd = ({ nativeEvent }) => {
40
52
  if (nativeEvent.origin !== 'input') {
53
+ if (keyboardAvoid?.current?.holdKeyboard) {
54
+ return;
55
+ }
41
56
  Keyboard.isVisible() && Keyboard.dismiss();
42
57
  }
43
58
  };
44
59
  useEffect(() => {
45
60
  let subscriptions = [];
46
61
  function keybaordAvoding(evt) {
47
- if (!keyboardAvoid?.current || isShow.current) {
62
+ if (keyboardAvoid?.current?.readyToShow) {
63
+ // 重置标记位
64
+ keyboardAvoid.current.readyToShow = false;
65
+ }
66
+ if (!keyboardAvoid?.current) {
48
67
  return;
49
68
  }
50
69
  isShow.current = true;
@@ -84,13 +103,23 @@ const KeyboardAvoidingView = ({ children, style, contentContainerStyle }) => {
84
103
  }
85
104
  }
86
105
  if (isIOS) {
87
- subscriptions = [Keyboard.addListener('keyboardWillShow', keybaordAvoding), Keyboard.addListener('keyboardWillHide', resetKeyboard)];
106
+ subscriptions = [
107
+ Keyboard.addListener('keyboardWillShow', (evt) => {
108
+ if (keybaordHandleTimerRef.current) {
109
+ clearTimeout(keybaordHandleTimerRef.current);
110
+ }
111
+ // iphone 在input聚焦时长按滑动后会导致 show 事件先于 focus 事件发生,因此等一下,等 focus 先触发拿到 input,避免键盘出现但input没顶上去
112
+ keybaordHandleTimerRef.current = setTimeout(() => keybaordAvoding(evt), 32);
113
+ }),
114
+ Keyboard.addListener('keyboardWillHide', resetKeyboard)
115
+ ];
88
116
  }
89
117
  else {
90
118
  subscriptions = [Keyboard.addListener('keyboardDidShow', keybaordAvoding), Keyboard.addListener('keyboardDidHide', resetKeyboard)];
91
119
  }
92
120
  return () => {
93
121
  subscriptions.forEach(subscription => subscription.remove());
122
+ keybaordHandleTimerRef.current && clearTimeout(keybaordHandleTimerRef.current);
94
123
  };
95
124
  }, [keyboardAvoid]);
96
125
  return (<View style={style} onTouchEnd={onTouchEnd} onTouchMove={onTouchEnd}>
@@ -18,4 +18,3 @@ export interface LabelProps {
18
18
  }
19
19
  declare const Label: import("react").ForwardRefExoticComponent<LabelProps & import("react").RefAttributes<HandlerRef<View, LabelProps>>>;
20
20
  export default Label;
21
- //# sourceMappingURL=mpx-label.d.ts.map
@@ -18,4 +18,3 @@ interface MovableAreaProps {
18
18
  }
19
19
  declare const _MovableArea: import("react").ForwardRefExoticComponent<MovableAreaProps & import("react").RefAttributes<HandlerRef<View, MovableAreaProps>>>;
20
20
  export default _MovableArea;
21
- //# sourceMappingURL=mpx-movable-area.d.ts.map
@@ -63,4 +63,3 @@ interface MovableViewProps {
63
63
  }
64
64
  declare const _MovableView: import("react").ForwardRefExoticComponent<MovableViewProps & import("react").RefAttributes<HandlerRef<View, MovableViewProps>>>;
65
65
  export default _MovableView;
66
- //# sourceMappingURL=mpx-movable-view.d.ts.map
@@ -6,4 +6,3 @@ export interface MpxNavProps {
6
6
  }
7
7
  declare const MpxNav: import("react").MemoExoticComponent<({ pageConfig, navigation }: MpxNavProps) => import("react").JSX.Element>;
8
8
  export default MpxNav;
9
- //# sourceMappingURL=mpx-nav.d.ts.map
@@ -7,4 +7,3 @@ interface _NavigatorProps extends _ViewProps {
7
7
  }
8
8
  declare const _Navigator: import("react").ForwardRefExoticComponent<_NavigatorProps & import("react").RefAttributes<any>>;
9
9
  export default _Navigator;
10
- //# sourceMappingURL=mpx-navigator.d.ts.map
@@ -4,4 +4,3 @@ import { DateProps } from './type';
4
4
  import { HandlerRef } from '../useNodesRef';
5
5
  declare const PickerDate: React.ForwardRefExoticComponent<Omit<DateProps, "ref"> & React.RefAttributes<HandlerRef<View, DateProps>>>;
6
6
  export default PickerDate;
7
- //# sourceMappingURL=date.d.ts.map
@@ -5,4 +5,3 @@ export declare const years: string[];
5
5
  export declare const months: string[];
6
6
  export declare const daysInMonthLength: (year: number, month: number) => 30 | 28 | 29 | 31;
7
7
  export declare const daysInMonth: (year: number, month: number) => string[];
8
- //# sourceMappingURL=dateData.d.ts.map
@@ -4,4 +4,3 @@ import { HandlerRef } from '../useNodesRef';
4
4
  import { PickerProps } from './type';
5
5
  declare const Picker: React.ForwardRefExoticComponent<(Omit<import("./type").DateProps, "ref"> | Omit<import("./type").SelectorProps, "ref"> | Omit<import("./type").MultiSelectorProps, "ref"> | Omit<import("./type").TimeProps, "ref"> | Omit<import("./type").RegionProps, "ref">) & React.RefAttributes<HandlerRef<View, PickerProps>>>;
6
6
  export default Picker;
7
- //# sourceMappingURL=index.d.ts.map
@@ -4,4 +4,3 @@ import { MultiSelectorProps } from './type';
4
4
  import { HandlerRef } from '../useNodesRef';
5
5
  declare const PickerMultiSelector: React.ForwardRefExoticComponent<Omit<MultiSelectorProps, "ref"> & React.RefAttributes<HandlerRef<View, MultiSelectorProps>>>;
6
6
  export default PickerMultiSelector;
7
- //# sourceMappingURL=multiSelector.d.ts.map
@@ -4,4 +4,3 @@ import { RegionProps } from './type';
4
4
  import { HandlerRef } from '../useNodesRef';
5
5
  declare const PickerRegion: React.ForwardRefExoticComponent<Omit<RegionProps, "ref"> & React.RefAttributes<HandlerRef<View, RegionProps>>>;
6
6
  export default PickerRegion;
7
- //# sourceMappingURL=region.d.ts.map
@@ -1,3 +1,2 @@
1
1
  import { RegionObj } from './type';
2
2
  export declare const regionData: RegionObj[];
3
- //# sourceMappingURL=regionData.d.ts.map
@@ -4,4 +4,3 @@ import { SelectorProps } from './type';
4
4
  import { HandlerRef } from '../useNodesRef';
5
5
  declare const PickerSelector: React.ForwardRefExoticComponent<Omit<SelectorProps, "ref"> & React.RefAttributes<HandlerRef<View, SelectorProps>>>;
6
6
  export default PickerSelector;
7
- //# sourceMappingURL=selector.d.ts.map
@@ -4,4 +4,3 @@ import { TimeProps } from './type';
4
4
  import { HandlerRef } from '../useNodesRef';
5
5
  declare const PickerTime: React.ForwardRefExoticComponent<Omit<TimeProps, "ref"> & React.RefAttributes<HandlerRef<View, TimeProps>>>;
6
6
  export default PickerTime;
7
- //# sourceMappingURL=time.d.ts.map
@@ -104,4 +104,3 @@ export interface FormType {
104
104
  }
105
105
  export type PickerProps = SelectorProps | MultiSelectorProps | TimeProps | DateProps | RegionProps;
106
106
  export type LanguageCode = 'zh-CN' | 'en-US';
107
- //# sourceMappingURL=type.d.ts.map
@@ -30,4 +30,3 @@ interface PickerViewProps {
30
30
  }
31
31
  declare const _PickerView: React.ForwardRefExoticComponent<PickerViewProps & React.RefAttributes<HandlerRef<View, PickerViewProps>>>;
32
32
  export default _PickerView;
33
- //# sourceMappingURL=index.d.ts.map
@@ -6,4 +6,3 @@ export declare const usePickerViewColumnAnimationContext: () => ContextValue;
6
6
  export declare const PickerViewStyleContext: import("react").Context<Record<string, any> | undefined>;
7
7
  export declare const usePickerViewStyleContext: () => Record<string, any> | undefined;
8
8
  export {};
9
- //# sourceMappingURL=pickerVIewContext.d.ts.map
@@ -21,4 +21,3 @@ interface ColumnProps {
21
21
  }
22
22
  declare const _PickerViewColumn: React.ForwardRefExoticComponent<ColumnProps & React.RefAttributes<HandlerRef<ScrollView & View, ColumnProps>>>;
23
23
  export default _PickerViewColumn;
24
- //# sourceMappingURL=index.d.ts.map
@@ -12,4 +12,3 @@ interface PickerColumnItemProps {
12
12
  }
13
13
  declare const PickerViewColumnItem: React.FC<PickerColumnItemProps>;
14
14
  export default PickerViewColumnItem;
15
- //# sourceMappingURL=pickerViewColumnItem.d.ts.map
@@ -11,4 +11,3 @@ interface PickerColumnItemProps {
11
11
  }
12
12
  declare const PickerViewColumnItem: React.FC<PickerColumnItemProps>;
13
13
  export default PickerViewColumnItem;
14
- //# sourceMappingURL=pickerViewColumnItemLite.d.ts.map
@@ -14,4 +14,3 @@ export declare const degToRad: (deg: number) => number;
14
14
  export declare const calcPickerHeight: (faces: Faces[], itemHeight: number) => number;
15
15
  export declare const calcHeightOffsets: (itemHeight: number) => number[];
16
16
  export declare const createFaces: (itemHeight: number, visibleCount: number) => Faces[];
17
- //# sourceMappingURL=pickerViewFaces.d.ts.map
@@ -10,4 +10,3 @@ declare const _PickerViewIndicator: {
10
10
  displayName: string;
11
11
  };
12
12
  export default _PickerViewIndicator;
13
- //# sourceMappingURL=pickerViewIndicator.d.ts.map
@@ -9,4 +9,3 @@ declare const _PickerViewMask: {
9
9
  displayName: string;
10
10
  };
11
11
  export default _PickerViewMask;
12
- //# sourceMappingURL=pickerViewMask.d.ts.map
@@ -20,4 +20,3 @@ declare const createPopupManager: (options?: IUsePopupOptions) => {
20
20
  remove: () => void;
21
21
  };
22
22
  export { createPopupManager };
23
- //# sourceMappingURL=index.d.ts.map
@@ -14,4 +14,3 @@ declare const PopupBase: {
14
14
  displayName: string;
15
15
  };
16
16
  export default PopupBase;
17
- //# sourceMappingURL=popupBase.d.ts.map
@@ -13,4 +13,3 @@ declare const Portal: {
13
13
  update: (key: number, e: ReactNode) => void;
14
14
  };
15
15
  export default Portal;
16
- //# sourceMappingURL=index.d.ts.map
@@ -27,4 +27,3 @@ declare class PortalGuard {
27
27
  export declare const portal: PortalGuard;
28
28
  declare const PortalHost: ({ children }: PortalHostProps) => JSX.Element;
29
29
  export default PortalHost;
30
- //# sourceMappingURL=portal-host.d.ts.map
@@ -7,4 +7,3 @@ export type State = {
7
7
  };
8
8
  declare const _PortalManager: import("react").ForwardRefExoticComponent<import("react").RefAttributes<unknown>>;
9
9
  export default _PortalManager;
10
- //# sourceMappingURL=portal-manager.d.ts.map
@@ -7,7 +7,7 @@ const _PortalManager = forwardRef((props, ref) => {
7
7
  setState((prevState) => ({
8
8
  portals: [...prevState.portals, { key, children }]
9
9
  }));
10
- }, [state]);
10
+ }, []);
11
11
  const update = useCallback((key, children) => {
12
12
  setState((prevState) => ({
13
13
  portals: prevState.portals.map((item) => {
@@ -17,7 +17,7 @@ const _PortalManager = forwardRef((props, ref) => {
17
17
  return item;
18
18
  })
19
19
  }));
20
- }, [state]);
20
+ }, []);
21
21
  const unmount = useCallback((key) => {
22
22
  setState((prevState) => ({
23
23
  portals: prevState.portals.filter((item) => item.key !== key)
@@ -21,4 +21,3 @@ export interface ProgressProps {
21
21
  }
22
22
  declare const Progress: import("react").ForwardRefExoticComponent<ProgressProps & import("react").RefAttributes<HandlerRef<View, ProgressProps>>>;
23
23
  export default Progress;
24
- //# sourceMappingURL=mpx-progress.d.ts.map
@@ -18,4 +18,3 @@ export interface RadioGroupProps {
18
18
  }
19
19
  declare const radioGroup: import("react").ForwardRefExoticComponent<RadioGroupProps & import("react").RefAttributes<HandlerRef<View, RadioGroupProps>>>;
20
20
  export default radioGroup;
21
- //# sourceMappingURL=mpx-radio-group.d.ts.map
@@ -24,4 +24,3 @@ export interface RadioProps {
24
24
  }
25
25
  declare const Radio: import("react").ForwardRefExoticComponent<RadioProps & import("react").RefAttributes<HandlerRef<View, RadioProps>>>;
26
26
  export default Radio;
27
- //# sourceMappingURL=mpx-radio.d.ts.map
@@ -1,2 +1 @@
1
1
  export declare const generateHTML: (html: string) => string;
2
- //# sourceMappingURL=html.d.ts.map
@@ -22,4 +22,3 @@ interface _RichTextProps extends ViewProps {
22
22
  }
23
23
  declare const _RichText: import("react").ForwardRefExoticComponent<_RichTextProps & import("react").RefAttributes<HandlerRef<View, _RichTextProps>>>;
24
24
  export default _RichText;
25
- //# sourceMappingURL=index.d.ts.map
@@ -12,4 +12,3 @@ declare const _RootPortal: {
12
12
  displayName: string;
13
13
  };
14
14
  export default _RootPortal;
15
- //# sourceMappingURL=mpx-root-portal.d.ts.map
@@ -52,4 +52,3 @@ declare const _ScrollView: import("react").ForwardRefExoticComponent<ScrollViewP
52
52
  children?: ReactNode;
53
53
  } & import("react-native-gesture-handler").NativeViewGestureHandlerProps & import("react").RefAttributes<import("react").ComponentType<any>>> & import("react-native").ScrollView & View, ScrollViewProps>>>;
54
54
  export default _ScrollView;
55
- //# sourceMappingURL=mpx-scroll-view.d.ts.map