@mpxjs/webpack-plugin 2.10.16-beta.7 → 2.10.16-perf.1

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 (254) hide show
  1. package/lib/config.js +0 -60
  2. package/lib/dependencies/AppEntryDependency.js +2 -2
  3. package/lib/dependencies/ResolveDependency.js +1 -1
  4. package/lib/file-loader.js +3 -13
  5. package/lib/helpers.js +0 -2
  6. package/lib/index.js +15 -40
  7. package/lib/json-compiler/helper.js +2 -72
  8. package/lib/json-compiler/index.js +56 -16
  9. package/lib/json-compiler/plugin.js +2 -2
  10. package/lib/loader.js +4 -10
  11. package/lib/native-loader.js +3 -6
  12. package/lib/platform/json/wx/index.js +29 -30
  13. package/lib/platform/style/wx/index.js +1 -8
  14. package/lib/platform/template/wx/component-config/ad.js +0 -5
  15. package/lib/platform/template/wx/component-config/button.js +5 -21
  16. package/lib/platform/template/wx/component-config/camera.js +3 -25
  17. package/lib/platform/template/wx/component-config/canvas.js +1 -8
  18. package/lib/platform/template/wx/component-config/component.js +33 -31
  19. package/lib/platform/template/wx/component-config/cover-image.js +2 -7
  20. package/lib/platform/template/wx/component-config/cover-view.js +1 -3
  21. package/lib/platform/template/wx/component-config/fix-component-name.js +2 -2
  22. package/lib/platform/template/wx/component-config/form.js +2 -27
  23. package/lib/platform/template/wx/component-config/image.js +0 -5
  24. package/lib/platform/template/wx/component-config/input.js +0 -10
  25. package/lib/platform/template/wx/component-config/label.js +2 -10
  26. package/lib/platform/template/wx/component-config/map.js +0 -11
  27. package/lib/platform/template/wx/component-config/movable-area.js +1 -4
  28. package/lib/platform/template/wx/component-config/movable-view.js +2 -17
  29. package/lib/platform/template/wx/component-config/navigator.js +0 -26
  30. package/lib/platform/template/wx/component-config/picker-view.js +0 -12
  31. package/lib/platform/template/wx/component-config/picker.js +1 -3
  32. package/lib/platform/template/wx/component-config/progress.js +1 -11
  33. package/lib/platform/template/wx/component-config/rich-text.js +0 -5
  34. package/lib/platform/template/wx/component-config/scroll-view.js +1 -12
  35. package/lib/platform/template/wx/component-config/slider.js +0 -8
  36. package/lib/platform/template/wx/component-config/swiper-item.js +2 -5
  37. package/lib/platform/template/wx/component-config/swiper.js +0 -10
  38. package/lib/platform/template/wx/component-config/text.js +0 -5
  39. package/lib/platform/template/wx/component-config/textarea.js +2 -19
  40. package/lib/platform/template/wx/component-config/unsupported.js +1 -10
  41. package/lib/platform/template/wx/component-config/video.js +0 -10
  42. package/lib/platform/template/wx/index.js +1 -21
  43. package/lib/react/index.js +0 -2
  44. package/lib/react/processJSON.js +71 -39
  45. package/lib/react/processStyles.js +2 -3
  46. package/lib/react/processTemplate.js +6 -8
  47. package/lib/react/script-helper.js +16 -6
  48. package/lib/react/style-helper.js +2 -10
  49. package/lib/runtime/components/react/context.ts +6 -12
  50. package/lib/runtime/components/react/dist/context.js +0 -1
  51. package/lib/runtime/components/react/dist/mpx-image.jsx +62 -100
  52. package/lib/runtime/components/react/dist/mpx-input.jsx +9 -35
  53. package/lib/runtime/components/react/dist/mpx-keyboard-avoiding-view.jsx +50 -58
  54. package/lib/runtime/components/react/dist/mpx-picker-view/index.jsx +3 -4
  55. package/lib/runtime/components/react/dist/mpx-picker-view-column/index.jsx +18 -12
  56. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewColumnItem.jsx +11 -8
  57. package/lib/runtime/components/react/dist/mpx-portal/index.jsx +1 -5
  58. package/lib/runtime/components/react/dist/mpx-scroll-view.jsx +14 -6
  59. package/lib/runtime/components/react/dist/mpx-text.jsx +5 -33
  60. package/lib/runtime/components/react/dist/mpx-view.jsx +1 -1
  61. package/lib/runtime/components/react/dist/mpx-web-view.jsx +1 -1
  62. package/lib/runtime/components/react/dist/utils.jsx +6 -16
  63. package/lib/runtime/components/react/mpx-image.tsx +82 -123
  64. package/lib/runtime/components/react/mpx-input.tsx +16 -41
  65. package/lib/runtime/components/react/mpx-keyboard-avoiding-view.tsx +49 -66
  66. package/lib/runtime/components/react/mpx-picker-view/index.tsx +2 -5
  67. package/lib/runtime/components/react/mpx-picker-view-column/index.tsx +21 -26
  68. package/lib/runtime/components/react/mpx-picker-view-column/pickerViewColumnItem.tsx +12 -8
  69. package/lib/runtime/components/react/mpx-portal/index.tsx +2 -8
  70. package/lib/runtime/components/react/mpx-scroll-view.tsx +17 -6
  71. package/lib/runtime/components/react/mpx-text.tsx +5 -38
  72. package/lib/runtime/components/react/mpx-view.tsx +1 -1
  73. package/lib/runtime/components/react/mpx-web-view.tsx +1 -1
  74. package/lib/runtime/components/react/types/common.d.ts +0 -19
  75. package/lib/runtime/components/react/utils.tsx +6 -15
  76. package/lib/runtime/stringify.wxs +2 -2
  77. package/lib/script-setup-compiler/index.js +2 -2
  78. package/lib/style-compiler/index.js +2 -3
  79. package/lib/style-compiler/load-postcss-config.js +1 -1
  80. package/lib/style-compiler/plugins/trans-special.js +2 -10
  81. package/lib/style-compiler/strip-conditional-loader.js +15 -178
  82. package/lib/template-compiler/bind-this.js +2 -2
  83. package/lib/template-compiler/compiler.js +72 -270
  84. package/lib/template-compiler/gen-node-react.js +6 -18
  85. package/lib/template-compiler/index.js +10 -12
  86. package/lib/template-compiler/parse-exps.js +1 -1
  87. package/lib/utils/const.js +1 -2
  88. package/lib/utils/dom-tag-config.js +6 -6
  89. package/lib/utils/env.js +1 -6
  90. package/lib/utils/pre-process-json.js +0 -5
  91. package/lib/web/index.js +0 -2
  92. package/lib/web/processJSON.js +16 -44
  93. package/lib/web/processScript.js +1 -1
  94. package/lib/web/processTemplate.js +4 -6
  95. package/lib/web/script-helper.js +9 -19
  96. package/lib/wxs/pre-loader.js +1 -1
  97. package/lib/wxss/loader.js +9 -1
  98. package/package.json +4 -15
  99. package/lib/dependencies/RecordModuleIdMapDependency.js +0 -49
  100. package/lib/runtime/components/react/dist/context.d.ts +0 -75
  101. package/lib/runtime/components/react/dist/context.d.ts.map +0 -1
  102. package/lib/runtime/components/react/dist/event.config.d.ts +0 -8
  103. package/lib/runtime/components/react/dist/event.config.d.ts.map +0 -1
  104. package/lib/runtime/components/react/dist/getInnerListeners.d.ts +0 -8
  105. package/lib/runtime/components/react/dist/getInnerListeners.d.ts.map +0 -1
  106. package/lib/runtime/components/react/dist/mpx-async-suspense.d.ts +0 -13
  107. package/lib/runtime/components/react/dist/mpx-async-suspense.d.ts.map +0 -1
  108. package/lib/runtime/components/react/dist/mpx-button.d.ts +0 -69
  109. package/lib/runtime/components/react/dist/mpx-button.d.ts.map +0 -1
  110. package/lib/runtime/components/react/dist/mpx-camera.d.ts +0 -28
  111. package/lib/runtime/components/react/dist/mpx-camera.d.ts.map +0 -1
  112. package/lib/runtime/components/react/dist/mpx-camera.jsx +0 -102
  113. package/lib/runtime/components/react/dist/mpx-canvas/Bus.d.ts +0 -24
  114. package/lib/runtime/components/react/dist/mpx-canvas/Bus.d.ts.map +0 -1
  115. package/lib/runtime/components/react/dist/mpx-canvas/CanvasGradient.d.ts +0 -8
  116. package/lib/runtime/components/react/dist/mpx-canvas/CanvasGradient.d.ts.map +0 -1
  117. package/lib/runtime/components/react/dist/mpx-canvas/CanvasRenderingContext2D.d.ts +0 -7
  118. package/lib/runtime/components/react/dist/mpx-canvas/CanvasRenderingContext2D.d.ts.map +0 -1
  119. package/lib/runtime/components/react/dist/mpx-canvas/Image.d.ts +0 -21
  120. package/lib/runtime/components/react/dist/mpx-canvas/Image.d.ts.map +0 -1
  121. package/lib/runtime/components/react/dist/mpx-canvas/ImageData.d.ts +0 -9
  122. package/lib/runtime/components/react/dist/mpx-canvas/ImageData.d.ts.map +0 -1
  123. package/lib/runtime/components/react/dist/mpx-canvas/constructorsRegistry.d.ts +0 -11
  124. package/lib/runtime/components/react/dist/mpx-canvas/constructorsRegistry.d.ts.map +0 -1
  125. package/lib/runtime/components/react/dist/mpx-canvas/html.d.ts +0 -3
  126. package/lib/runtime/components/react/dist/mpx-canvas/html.d.ts.map +0 -1
  127. package/lib/runtime/components/react/dist/mpx-canvas/index.d.ts +0 -33
  128. package/lib/runtime/components/react/dist/mpx-canvas/index.d.ts.map +0 -1
  129. package/lib/runtime/components/react/dist/mpx-canvas/utils.d.ts +0 -53
  130. package/lib/runtime/components/react/dist/mpx-canvas/utils.d.ts.map +0 -1
  131. package/lib/runtime/components/react/dist/mpx-checkbox-group.d.ts +0 -21
  132. package/lib/runtime/components/react/dist/mpx-checkbox-group.d.ts.map +0 -1
  133. package/lib/runtime/components/react/dist/mpx-checkbox.d.ts +0 -33
  134. package/lib/runtime/components/react/dist/mpx-checkbox.d.ts.map +0 -1
  135. package/lib/runtime/components/react/dist/mpx-form.d.ts +0 -28
  136. package/lib/runtime/components/react/dist/mpx-form.d.ts.map +0 -1
  137. package/lib/runtime/components/react/dist/mpx-icon/index.d.ts +0 -19
  138. package/lib/runtime/components/react/dist/mpx-icon/index.d.ts.map +0 -1
  139. package/lib/runtime/components/react/dist/mpx-image.d.ts +0 -22
  140. package/lib/runtime/components/react/dist/mpx-image.d.ts.map +0 -1
  141. package/lib/runtime/components/react/dist/mpx-inline-text.d.ts +0 -8
  142. package/lib/runtime/components/react/dist/mpx-inline-text.d.ts.map +0 -1
  143. package/lib/runtime/components/react/dist/mpx-input.d.ts +0 -50
  144. package/lib/runtime/components/react/dist/mpx-input.d.ts.map +0 -1
  145. package/lib/runtime/components/react/dist/mpx-keyboard-avoiding-view.d.ts +0 -13
  146. package/lib/runtime/components/react/dist/mpx-keyboard-avoiding-view.d.ts.map +0 -1
  147. package/lib/runtime/components/react/dist/mpx-label.d.ts +0 -21
  148. package/lib/runtime/components/react/dist/mpx-label.d.ts.map +0 -1
  149. package/lib/runtime/components/react/dist/mpx-movable-area.d.ts +0 -21
  150. package/lib/runtime/components/react/dist/mpx-movable-area.d.ts.map +0 -1
  151. package/lib/runtime/components/react/dist/mpx-movable-view.d.ts +0 -66
  152. package/lib/runtime/components/react/dist/mpx-movable-view.d.ts.map +0 -1
  153. package/lib/runtime/components/react/dist/mpx-nav.d.ts +0 -9
  154. package/lib/runtime/components/react/dist/mpx-nav.d.ts.map +0 -1
  155. package/lib/runtime/components/react/dist/mpx-nav.jsx +0 -132
  156. package/lib/runtime/components/react/dist/mpx-navigator.d.ts +0 -10
  157. package/lib/runtime/components/react/dist/mpx-navigator.d.ts.map +0 -1
  158. package/lib/runtime/components/react/dist/mpx-picker/date.d.ts +0 -7
  159. package/lib/runtime/components/react/dist/mpx-picker/date.d.ts.map +0 -1
  160. package/lib/runtime/components/react/dist/mpx-picker/dateData.d.ts +0 -8
  161. package/lib/runtime/components/react/dist/mpx-picker/dateData.d.ts.map +0 -1
  162. package/lib/runtime/components/react/dist/mpx-picker/index.d.ts +0 -7
  163. package/lib/runtime/components/react/dist/mpx-picker/index.d.ts.map +0 -1
  164. package/lib/runtime/components/react/dist/mpx-picker/multiSelector.d.ts +0 -7
  165. package/lib/runtime/components/react/dist/mpx-picker/multiSelector.d.ts.map +0 -1
  166. package/lib/runtime/components/react/dist/mpx-picker/region.d.ts +0 -7
  167. package/lib/runtime/components/react/dist/mpx-picker/region.d.ts.map +0 -1
  168. package/lib/runtime/components/react/dist/mpx-picker/regionData.d.ts +0 -3
  169. package/lib/runtime/components/react/dist/mpx-picker/regionData.d.ts.map +0 -1
  170. package/lib/runtime/components/react/dist/mpx-picker/selector.d.ts +0 -7
  171. package/lib/runtime/components/react/dist/mpx-picker/selector.d.ts.map +0 -1
  172. package/lib/runtime/components/react/dist/mpx-picker/time.d.ts +0 -7
  173. package/lib/runtime/components/react/dist/mpx-picker/time.d.ts.map +0 -1
  174. package/lib/runtime/components/react/dist/mpx-picker/type.d.ts +0 -107
  175. package/lib/runtime/components/react/dist/mpx-picker/type.d.ts.map +0 -1
  176. package/lib/runtime/components/react/dist/mpx-picker-view/index.d.ts +0 -33
  177. package/lib/runtime/components/react/dist/mpx-picker-view/index.d.ts.map +0 -1
  178. package/lib/runtime/components/react/dist/mpx-picker-view/pickerVIewContext.d.ts +0 -9
  179. package/lib/runtime/components/react/dist/mpx-picker-view/pickerVIewContext.d.ts.map +0 -1
  180. package/lib/runtime/components/react/dist/mpx-picker-view-column/index.d.ts +0 -24
  181. package/lib/runtime/components/react/dist/mpx-picker-view-column/index.d.ts.map +0 -1
  182. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewColumnItem.d.ts +0 -15
  183. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewColumnItem.d.ts.map +0 -1
  184. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewColumnItemLite.d.ts +0 -14
  185. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewColumnItemLite.d.ts.map +0 -1
  186. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewColumnItemLite.jsx +0 -20
  187. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewFaces.d.ts +0 -17
  188. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewFaces.d.ts.map +0 -1
  189. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewIndicator.d.ts +0 -13
  190. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewIndicator.d.ts.map +0 -1
  191. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewMask.d.ts +0 -12
  192. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewMask.d.ts.map +0 -1
  193. package/lib/runtime/components/react/dist/mpx-popup/index.d.ts +0 -23
  194. package/lib/runtime/components/react/dist/mpx-popup/index.d.ts.map +0 -1
  195. package/lib/runtime/components/react/dist/mpx-popup/popupBase.d.ts +0 -17
  196. package/lib/runtime/components/react/dist/mpx-popup/popupBase.d.ts.map +0 -1
  197. package/lib/runtime/components/react/dist/mpx-portal/index.d.ts +0 -16
  198. package/lib/runtime/components/react/dist/mpx-portal/index.d.ts.map +0 -1
  199. package/lib/runtime/components/react/dist/mpx-portal/portal-host.d.ts +0 -30
  200. package/lib/runtime/components/react/dist/mpx-portal/portal-host.d.ts.map +0 -1
  201. package/lib/runtime/components/react/dist/mpx-portal/portal-manager.d.ts +0 -10
  202. package/lib/runtime/components/react/dist/mpx-portal/portal-manager.d.ts.map +0 -1
  203. package/lib/runtime/components/react/dist/mpx-progress.d.ts +0 -24
  204. package/lib/runtime/components/react/dist/mpx-progress.d.ts.map +0 -1
  205. package/lib/runtime/components/react/dist/mpx-radio-group.d.ts +0 -21
  206. package/lib/runtime/components/react/dist/mpx-radio-group.d.ts.map +0 -1
  207. package/lib/runtime/components/react/dist/mpx-radio.d.ts +0 -27
  208. package/lib/runtime/components/react/dist/mpx-radio.d.ts.map +0 -1
  209. package/lib/runtime/components/react/dist/mpx-rich-text/html.d.ts +0 -2
  210. package/lib/runtime/components/react/dist/mpx-rich-text/html.d.ts.map +0 -1
  211. package/lib/runtime/components/react/dist/mpx-rich-text/index.d.ts +0 -25
  212. package/lib/runtime/components/react/dist/mpx-rich-text/index.d.ts.map +0 -1
  213. package/lib/runtime/components/react/dist/mpx-root-portal.d.ts +0 -15
  214. package/lib/runtime/components/react/dist/mpx-root-portal.d.ts.map +0 -1
  215. package/lib/runtime/components/react/dist/mpx-scroll-view.d.ts +0 -55
  216. package/lib/runtime/components/react/dist/mpx-scroll-view.d.ts.map +0 -1
  217. package/lib/runtime/components/react/dist/mpx-simple-text.d.ts +0 -8
  218. package/lib/runtime/components/react/dist/mpx-simple-text.d.ts.map +0 -1
  219. package/lib/runtime/components/react/dist/mpx-simple-view.d.ts +0 -8
  220. package/lib/runtime/components/react/dist/mpx-simple-view.d.ts.map +0 -1
  221. package/lib/runtime/components/react/dist/mpx-slider.d.ts +0 -31
  222. package/lib/runtime/components/react/dist/mpx-slider.d.ts.map +0 -1
  223. package/lib/runtime/components/react/dist/mpx-sticky-header.d.ts +0 -18
  224. package/lib/runtime/components/react/dist/mpx-sticky-header.d.ts.map +0 -1
  225. package/lib/runtime/components/react/dist/mpx-sticky-section.d.ts +0 -16
  226. package/lib/runtime/components/react/dist/mpx-sticky-section.d.ts.map +0 -1
  227. package/lib/runtime/components/react/dist/mpx-swiper-item.d.ts +0 -19
  228. package/lib/runtime/components/react/dist/mpx-swiper-item.d.ts.map +0 -1
  229. package/lib/runtime/components/react/dist/mpx-swiper.d.ts +0 -53
  230. package/lib/runtime/components/react/dist/mpx-swiper.d.ts.map +0 -1
  231. package/lib/runtime/components/react/dist/mpx-switch.d.ts +0 -27
  232. package/lib/runtime/components/react/dist/mpx-switch.d.ts.map +0 -1
  233. package/lib/runtime/components/react/dist/mpx-text.d.ts +0 -23
  234. package/lib/runtime/components/react/dist/mpx-text.d.ts.map +0 -1
  235. package/lib/runtime/components/react/dist/mpx-textarea.d.ts +0 -8
  236. package/lib/runtime/components/react/dist/mpx-textarea.d.ts.map +0 -1
  237. package/lib/runtime/components/react/dist/mpx-video.d.ts +0 -102
  238. package/lib/runtime/components/react/dist/mpx-video.d.ts.map +0 -1
  239. package/lib/runtime/components/react/dist/mpx-view.d.ts +0 -35
  240. package/lib/runtime/components/react/dist/mpx-view.d.ts.map +0 -1
  241. package/lib/runtime/components/react/dist/mpx-web-view.d.ts +0 -23
  242. package/lib/runtime/components/react/dist/mpx-web-view.d.ts.map +0 -1
  243. package/lib/runtime/components/react/dist/parser.d.ts +0 -40
  244. package/lib/runtime/components/react/dist/parser.d.ts.map +0 -1
  245. package/lib/runtime/components/react/dist/useAnimationHooks.d.ts +0 -33
  246. package/lib/runtime/components/react/dist/useAnimationHooks.d.ts.map +0 -1
  247. package/lib/runtime/components/react/dist/useNodesRef.d.ts +0 -12
  248. package/lib/runtime/components/react/dist/useNodesRef.d.ts.map +0 -1
  249. package/lib/runtime/components/react/dist/utils.d.ts +0 -123
  250. package/lib/runtime/components/react/dist/utils.d.ts.map +0 -1
  251. package/lib/runtime/components/react/mpx-camera.tsx +0 -167
  252. package/lib/runtime/components/react/mpx-nav.tsx +0 -155
  253. package/lib/runtime/components/react/mpx-picker-view-column/pickerViewColumnItemLite.tsx +0 -55
  254. package/lib/utils/get-build-tag-component.js +0 -35
@@ -74,10 +74,10 @@ const isNativeMiniTag = makeMap(
74
74
  */
75
75
  const isBuildInWebTag = makeMap(
76
76
  'mpx-image,mpx-picker-view,mpx-slider,mpx-textarea,mpx-input,mpx-picker,' +
77
- 'mpx-swiper-item,mpx-video,mpx-button,mpx-progress,' +
77
+ 'mpx-swiper-item,mpx-video,mpx-button,mpx-keep-alive,mpx-progress,' +
78
78
  'mpx-swiper,mpx-view,mpx-checkbox-group,mpx-movable-area,mpx-radio-group,' +
79
79
  'mpx-switch,mpx-web-view,mpx-checkbox,mpx-movable-view,mpx-radio,' +
80
- 'mpx-form,mpx-navigator,mpx-rich-text,' +
80
+ 'mpx-tab-bar-container,mpx-form,mpx-navigator,mpx-rich-text,mpx-tab-bar,' +
81
81
  'mpx-icon,mpx-picker-view-column,mpx-scroll-view,mpx-text'
82
82
  )
83
83
 
@@ -86,12 +86,12 @@ const isBuildInWebTag = makeMap(
86
86
  */
87
87
  const isBuildInReactTag = makeMap(
88
88
  'mpx-web-view,mpx-view,mpx-video,mpx-textarea,mpx-text,mpx-switch,' +
89
- 'mpx-swiper,mpx-swiper-item,mpx-scroll-view,' +
89
+ 'mpx-swiper,mpx-swiper-item,mpx-simple-view,mpx-simple-text,mpx-scroll-view,' +
90
90
  'mpx-root-portal,mpx-radio,mpx-radio-group,mpx-navigator,mpx-movable-view,' +
91
- 'mpx-movable-area,mpx-label,mpx-input,' +
91
+ 'mpx-movable-area,mpx-label,mpx-keyboard-avoiding-view,mpx-input,mpx-inline-text,' +
92
92
  'mpx-image,mpx-form,mpx-checkbox,mpx-checkbox-group,mpx-button,' +
93
- 'mpx-rich-text,mpx-picker-view-column,mpx-picker-view,mpx-picker,' +
94
- 'mpx-icon,mpx-canvas,mpx-camera'
93
+ 'mpx-rich-text,mpx-portal,mpx-popup,mpx-picker-view-column,mpx-picker-view,mpx-picker,' +
94
+ 'mpx-icon,mpx-canvas'
95
95
  )
96
96
 
97
97
  const isSpace = makeMap('ensp,emsp,nbsp')
package/lib/utils/env.js CHANGED
@@ -10,13 +10,8 @@ function isMiniProgram (mode) {
10
10
  return !isWeb(mode) && !isReact(mode)
11
11
  }
12
12
 
13
- function isNoMode (mode) {
14
- return mode === 'noMode'
15
- }
16
-
17
13
  module.exports = {
18
14
  isWeb,
19
15
  isReact,
20
- isMiniProgram,
21
- isNoMode
16
+ isMiniProgram
22
17
  }
@@ -31,7 +31,6 @@ module.exports = function ({
31
31
  let componentGenerics = {}
32
32
  const usingComponentsInfo = {}
33
33
  const usingComponents = {}
34
- let originalUsingComponents
35
34
  const finalCallback = (err) => {
36
35
  if (err) return callback(err)
37
36
  if (ctorType === 'app') {
@@ -44,7 +43,6 @@ module.exports = function ({
44
43
  componentPlaceholder,
45
44
  componentGenerics,
46
45
  usingComponentsInfo: Object.assign({}, usingComponentsInfo, mpx.globalComponentsInfo),
47
- originalUsingComponents,
48
46
  jsonContent
49
47
  })
50
48
  }
@@ -63,9 +61,6 @@ module.exports = function ({
63
61
  if (ctorType !== 'app') {
64
62
  rulesRunnerOptions.mainKey = pagesMap[resourcePath] ? 'page' : 'component'
65
63
  }
66
-
67
- originalUsingComponents = ret.usingComponents ? Object.keys(ret.usingComponents) : []
68
-
69
64
  const rulesRunner = getRulesRunner(rulesRunnerOptions)
70
65
  try {
71
66
  if (rulesRunner) rulesRunner(ret)
package/lib/web/index.js CHANGED
@@ -21,7 +21,6 @@ module.exports = function ({
21
21
  hasComment,
22
22
  isNative,
23
23
  usingComponentsInfo,
24
- originalUsingComponents,
25
24
  componentGenerics,
26
25
  autoScope,
27
26
  callback
@@ -71,7 +70,6 @@ module.exports = function ({
71
70
  moduleId,
72
71
  ctorType,
73
72
  usingComponentsInfo,
74
- originalUsingComponents,
75
73
  componentGenerics
76
74
  }, callback)
77
75
  },
@@ -37,38 +37,23 @@ module.exports = function (jsonContent, {
37
37
 
38
38
  const emitWarning = (msg) => {
39
39
  loaderContext.emitWarning(
40
- new Error('[Mpx json warning][' + loaderContext.resource + ']: ' + msg)
40
+ new Error('[json processor][' + loaderContext.resource + ']: ' + msg)
41
41
  )
42
42
  }
43
43
 
44
44
  const emitError = (msg) => {
45
45
  loaderContext.emitError(
46
- new Error('[Mpx json error][' + loaderContext.resource + ']: ' + msg)
46
+ new Error('[json compiler][' + loaderContext.resource + ']: ' + msg)
47
47
  )
48
48
  }
49
49
 
50
50
  const stringifyRequest = r => loaderUtils.stringifyRequest(loaderContext, r)
51
51
 
52
- function fillInComponentsMap (name, entry, tarRoot) {
53
- const { resource, outputPath } = entry
54
- const { resourcePath } = parseRequest(resource)
55
- componentsMap[resourcePath] = outputPath
56
- loaderContext._module && loaderContext._module.addPresentationalDependency(new RecordResourceMapDependency(resourcePath, 'component', outputPath))
57
- localComponentsMap[name] = {
58
- resource: addQuery(resource, {
59
- isComponent: true,
60
- outputPath
61
- }),
62
- async: tarRoot
63
- }
64
- }
65
-
66
52
  const {
67
53
  isUrlRequest,
68
54
  urlToRequest,
69
55
  processPage,
70
- processComponent,
71
- processPlaceholder
56
+ processComponent
72
57
  } = createJSONHelper({
73
58
  loaderContext,
74
59
  emitWarning,
@@ -255,7 +240,7 @@ module.exports = function (jsonContent, {
255
240
  if (oldResourcePath !== resourcePath) {
256
241
  const oldOutputPath = outputPath
257
242
  outputPath = mpx.getOutputPath(resourcePath, 'page', { conflictPath: outputPath })
258
- emitWarning(`Current page [${resourcePath}] is registered with a conflict outputPath [${oldOutputPath}] which is already existed in system, will be renamed with [${outputPath}], use ?resolve to get the real outputPath!`)
243
+ emitWarning(new Error(`Current page [${resourcePath}] is registered with a conflict outputPath [${oldOutputPath}] which is already existed in system, will be renamed with [${outputPath}], use ?resolve to get the real outputPath!`))
259
244
  }
260
245
  }
261
246
 
@@ -302,35 +287,22 @@ module.exports = function (jsonContent, {
302
287
 
303
288
  const processComponents = (components, context, callback) => {
304
289
  if (components) {
305
- const asyncComponents = []
306
- const resolveResourcePathMap = new Map()
307
290
  async.eachOf(components, (component, name, callback) => {
308
- processComponent(component, context, {}, (err, entry = {}, { tarRoot, placeholder, resourcePath } = {}) => {
291
+ processComponent(component, context, {}, (err, { resource, outputPath } = {}, { tarRoot } = {}) => {
309
292
  if (err) return callback(err === RESOLVE_IGNORED_ERR ? null : err)
310
- const { relativePath, resource } = entry
311
- const { queryObj } = parseRequest(resource)
312
-
313
- tarRoot = queryObj.async || tarRoot
314
-
315
- resolveResourcePathMap.set(name, resourcePath)
316
- if (tarRoot) asyncComponents.push({ name, tarRoot, placeholder, relativePath })
317
-
318
- fillInComponentsMap(name, entry, tarRoot)
293
+ const { resourcePath, queryObj } = parseRequest(resource)
294
+ componentsMap[resourcePath] = outputPath
295
+ loaderContext._module && loaderContext._module.addPresentationalDependency(new RecordResourceMapDependency(resourcePath, 'component', outputPath))
296
+ localComponentsMap[name] = {
297
+ resource: addQuery(resource, {
298
+ isComponent: true,
299
+ outputPath
300
+ }),
301
+ async: queryObj.async || tarRoot
302
+ }
319
303
  callback()
320
304
  })
321
- }, (err) => {
322
- if (err) return callback(err)
323
- async.each(asyncComponents, ({ name, tarRoot, placeholder, relativePath }, callback) => {
324
- processPlaceholder({ jsonObj, context, name, tarRoot, placeholder, relativePath, resolveResourcePathMap }, (err, placeholder) => {
325
- if (err) return callback(err)
326
- if (placeholder) {
327
- const { name, entry } = placeholder
328
- fillInComponentsMap(name, entry, '')
329
- }
330
- callback()
331
- })
332
- }, callback)
333
- })
305
+ }, callback)
334
306
  } else {
335
307
  callback()
336
308
  }
@@ -78,12 +78,12 @@ module.exports = function (script, {
78
78
  }
79
79
  content += getRequireScript({ ctorType, script, loaderContext })
80
80
  content += `
81
- // @ts-ignore
82
81
  export default processComponentOption({
83
82
  option: global.__mpxOptionsMap[${JSON.stringify(moduleId)}],
84
83
  ctorType: ${JSON.stringify(ctorType)},
85
84
  outputPath: ${JSON.stringify(outputPath)},
86
85
  pageConfig: ${JSON.stringify(pageConfig)},
86
+ // @ts-ignore
87
87
  componentsMap: ${shallowStringify(componentsMap)},
88
88
  componentGenerics: ${JSON.stringify(componentGenerics)},
89
89
  genericsInfo: ${JSON.stringify(genericsInfo)},
@@ -13,7 +13,6 @@ module.exports = function (template, {
13
13
  moduleId,
14
14
  ctorType,
15
15
  usingComponentsInfo,
16
- originalUsingComponents,
17
16
  componentGenerics
18
17
  }, callback) {
19
18
  const mpx = loaderContext.getMpx()
@@ -52,10 +51,10 @@ module.exports = function (template, {
52
51
  if (template) {
53
52
  // 由于远端src template资源引用的相对路径可能发生变化,暂时不支持。
54
53
  if (template.src) {
55
- return callback(new Error('[Mpx template error][' + loaderContext.resource + ']: ' + 'template content must be inline in .mpx files!'))
54
+ return callback(new Error('[mpx loader][' + loaderContext.resource + ']: ' + 'template content must be inline in .mpx files!'))
56
55
  }
57
56
  if (template.lang) {
58
- return callback(new Error('[Mpx template error][' + loaderContext.resource + ']: ' + 'template lang is not supported in trans web mode temporarily, we will support it in the future!'))
57
+ return callback(new Error('[mpx loader][' + loaderContext.resource + ']: ' + 'template lang is not supported in trans web mode temporarily, we will support it in the future!'))
59
58
  }
60
59
 
61
60
  output += genComponentTag(template, (template) => {
@@ -66,19 +65,18 @@ module.exports = function (template, {
66
65
  const templateSrcMode = template.mode || srcMode
67
66
  const warn = (msg) => {
68
67
  loaderContext.emitWarning(
69
- new Error('[Mpx template error][' + loaderContext.resource + ']: ' + msg)
68
+ new Error('[template compiler][' + loaderContext.resource + ']: ' + msg)
70
69
  )
71
70
  }
72
71
  const error = (msg) => {
73
72
  loaderContext.emitError(
74
- new Error('[Mpx template error][' + loaderContext.resource + ']: ' + msg)
73
+ new Error('[template compiler][' + loaderContext.resource + ']: ' + msg)
75
74
  )
76
75
  }
77
76
  const { root, meta } = templateCompiler.parse(template.content, {
78
77
  warn,
79
78
  error,
80
79
  usingComponentsInfo, // processTemplate中无其他地方使用,直接透传 string 类型
81
- originalUsingComponents,
82
80
  hasComment,
83
81
  isNative,
84
82
  ctorType,
@@ -24,29 +24,19 @@ function buildComponentsMap ({ localComponentsMap, builtInComponentsMap, loaderC
24
24
  Object.keys(localComponentsMap).forEach((componentName) => {
25
25
  const componentCfg = localComponentsMap[componentName]
26
26
  const componentRequest = stringifyRequest(loaderContext, componentCfg.resource)
27
-
28
27
  if (componentCfg.async) {
29
- const placeholder = jsonConfig.componentPlaceholder && jsonConfig.componentPlaceholder[componentName]
30
- if (placeholder) {
28
+ // todo 暂时只处理局部注册的组件作为componentPlaceholder,暂不支持全局组件和原生组件,如使用了支持范围外的组件将不进行placeholder渲染及替换
29
+ if (jsonConfig.componentPlaceholder && jsonConfig.componentPlaceholder[componentName] && localComponentsMap[jsonConfig.componentPlaceholder[componentName]]) {
30
+ const placeholder = jsonConfig.componentPlaceholder[componentName]
31
31
  const placeholderCfg = localComponentsMap[placeholder]
32
- if (placeholderCfg) {
33
- if (placeholderCfg.async) {
34
- loaderContext.emitWarning(
35
- new Error(`[Mpx json error][${loaderContext.resource}]: componentPlaceholder ${placeholder} should not be a async component, please check!`)
36
- )
37
- }
38
- const placeholderRequest = stringifyRequest(loaderContext, placeholderCfg.resource)
39
- componentsMap[componentName] = `function(){return {component: import(${getAsyncChunkName(componentCfg.async)}${componentRequest}).then(function(res){return getComponent(res)}), loading: getComponent(require(${placeholderRequest}))}}`
40
- } else {
41
- loaderContext.emitError(
42
- new Error(`[json processor][${loaderContext.resource}]: componentPlaceholder ${placeholder} is not built-in component or custom component, please check!`)
32
+ const placeholderRequest = stringifyRequest(loaderContext, placeholderCfg.resource)
33
+ if (placeholderCfg.async) {
34
+ loaderContext.emitWarning(
35
+ new Error(`[json processor][${loaderContext.resource}]: componentPlaceholder ${placeholder} should not be a async component, please check!`)
43
36
  )
44
- componentsMap[componentName] = `function(){return import(${getAsyncChunkName(componentCfg.async)}${componentRequest}).then(function(res){return getComponent(res)})}`
45
37
  }
38
+ componentsMap[componentName] = `function(){return {component: import(${getAsyncChunkName(componentCfg.async)}${componentRequest}).then(function(res){return getComponent(res)}), loading: getComponent(require(${placeholderRequest}))}}`
46
39
  } else {
47
- loaderContext.emitError(
48
- new Error(`[json processor][${loaderContext.resource}]: ${componentName} has no componentPlaceholder, please check!`)
49
- )
50
40
  componentsMap[componentName] = `function(){return import(${getAsyncChunkName(componentCfg.async)}${componentRequest}).then(function(res){return getComponent(res)})}`
51
41
  }
52
42
  } else {
@@ -85,7 +75,7 @@ function buildPagesMap ({ localPagesMap, loaderContext, tabBar, tabBarMap, tabBa
85
75
  }
86
76
  } else {
87
77
  loaderContext.emitWarning(
88
- new Error(`[Mpx json error][${loaderContext.resource}]: TabBar page path ${pagePath} is not exist in local page map, please check!`)
78
+ new Error(`[json processor][${loaderContext.resource}]: TabBar page path ${pagePath} is not exist in local page map, please check!`)
89
79
  )
90
80
  }
91
81
  })
@@ -100,7 +100,7 @@ module.exports = function (content) {
100
100
  MemberExpression (path) {
101
101
  const property = path.node.property
102
102
  if (
103
- property && (property.name === 'constructor' || property.value === 'constructor') &&
103
+ (property.name === 'constructor' || property.value === 'constructor') &&
104
104
  !(t.isMemberExpression(path.parent) && path.parentKey === 'object')
105
105
  ) {
106
106
  path.replaceWith(t.memberExpression(path.node, t.identifier('name')))
@@ -32,6 +32,13 @@ const {
32
32
  } = require('./utils')
33
33
  const createHelpers = require('../helpers')
34
34
 
35
+ const RN_PRESET_OPTIMISATION = {
36
+ reduceInitial: false,
37
+ normalizeWhitespace: false,
38
+ minifyFontValues: false,
39
+ convertValues: false
40
+ }
41
+
35
42
  module.exports = async function loader (content, map, meta) {
36
43
  const rawOptions = this.getOptions(schema)
37
44
  const plugins = []
@@ -150,11 +157,12 @@ module.exports = async function loader (content, map, meta) {
150
157
  )
151
158
  }
152
159
 
153
- if (this.minimize && !isRN) {
160
+ if (this.minimize) {
154
161
  const cssnano = require('cssnano')
155
162
  const minimizeOptions = rawOptions.minimize || {}
156
163
  const presetOptimisation = Object.assign(
157
164
  {},
165
+ isRN ? RN_PRESET_OPTIMISATION : {},
158
166
  minimizeOptions.optimisation
159
167
  )
160
168
  let cssnanoConfig = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mpxjs/webpack-plugin",
3
- "version": "2.10.16-beta.7",
3
+ "version": "2.10.16-perf.1",
4
4
  "description": "mpx compile core",
5
5
  "keywords": [
6
6
  "mpx"
@@ -29,10 +29,7 @@
29
29
  "@better-scroll/wheel": "^2.5.1",
30
30
  "@better-scroll/zoom": "^2.5.1",
31
31
  "@mpxjs/template-engine": "^2.8.7",
32
- "@mpxjs/utils": "^2.10.16-beta.7",
33
- "postcss-less": "^6.0.0",
34
- "postcss-scss": "^4.0.9",
35
- "postcss-styl": "^0.12.3",
32
+ "@mpxjs/utils": "^2.10.16",
36
33
  "acorn": "^8.11.3",
37
34
  "acorn-walk": "^7.2.0",
38
35
  "async": "^2.6.0",
@@ -54,7 +51,6 @@
54
51
  "mime": "^2.2.2",
55
52
  "object-assign": "^4.1.1",
56
53
  "postcss": "^8.4.5",
57
- "postcss-import": "^16.1.1",
58
54
  "postcss-load-config": "^3.1.1",
59
55
  "postcss-modules-extract-imports": "^3.0.0",
60
56
  "postcss-modules-local-by-default": "^4.0.0",
@@ -67,9 +63,6 @@
67
63
  "webpack-virtual-modules": "^0.6.0"
68
64
  },
69
65
  "peerDependencies": {
70
- "postcss-less": "^6.0.0",
71
- "postcss-scss": "^4.0.9",
72
- "postcss-styl": "^0.12.3",
73
66
  "webpack": "^5.75.0"
74
67
  },
75
68
  "publishConfig": {
@@ -85,19 +78,16 @@
85
78
  "url": "https://github.com/didi/mpx/issues"
86
79
  },
87
80
  "scripts": {
88
- "test": "jest --passWithNoTests",
81
+ "test": "jest",
89
82
  "copy-icons": "cp -r ./lib/runtime/components/react/mpx-icon/icons ./lib/runtime/components/react/dist/mpx-icon/icons",
90
83
  "build": "rimraf ./lib/runtime/components/react/dist && tsc && npm run copy-icons"
91
84
  },
92
85
  "devDependencies": {
93
86
  "@d11/react-native-fast-image": "^8.6.12",
94
- "@mpxjs/api-proxy": "^2.10.16-beta.7",
87
+ "@mpxjs/api-proxy": "^2.10.16",
95
88
  "@types/babel-traverse": "^6.25.4",
96
89
  "@types/babel-types": "^7.0.4",
97
- "@types/glob": "^8.1.0",
98
- "@types/postcss-import": "^14.0.3",
99
90
  "@types/react": "^18.2.79",
100
- "glob": "^11.0.2",
101
91
  "react-native": "^0.74.5",
102
92
  "react-native-gesture-handler": "^2.18.1",
103
93
  "react-native-linear-gradient": "^2.8.3",
@@ -105,7 +95,6 @@
105
95
  "react-native-safe-area-context": "^4.12.0",
106
96
  "react-native-svg": "^15.8.0",
107
97
  "react-native-video": "^6.9.0",
108
- "react-native-vision-camera": "^4.7.2",
109
98
  "react-native-webview": "^13.12.2",
110
99
  "rimraf": "^6.0.1"
111
100
  },
@@ -1,49 +0,0 @@
1
- const NullDependency = require('webpack/lib/dependencies/NullDependency')
2
- const makeSerializable = require('webpack/lib/util/makeSerializable')
3
-
4
- class RecordModuleIdMapDependency extends NullDependency {
5
- constructor (moduleId, filePath) {
6
- super()
7
- this.moduleId = moduleId
8
- this.filePath = filePath
9
- }
10
-
11
- get type () {
12
- return 'mpx record module id map'
13
- }
14
-
15
- mpxAction (module, compilation, callback) {
16
- const mpx = compilation.__mpx__
17
- const { moduleId, filePath } = this
18
- // 确保 resourceModuleIdMap 存在
19
- if (!mpx.resourceModuleIdMap) {
20
- mpx.resourceModuleIdMap = {}
21
- }
22
- // 记录 moduleId 和 filePath 的映射关系
23
- mpx.resourceModuleIdMap[moduleId] = filePath
24
- return callback()
25
- }
26
-
27
- serialize (context) {
28
- const { write } = context
29
- write(this.moduleId)
30
- write(this.filePath)
31
- super.serialize(context)
32
- }
33
-
34
- deserialize (context) {
35
- const { read } = context
36
- this.moduleId = read()
37
- this.filePath = read()
38
- super.deserialize(context)
39
- }
40
- }
41
-
42
- RecordModuleIdMapDependency.Template = class RecordModuleIdMapDependencyTemplate {
43
- apply () {
44
- }
45
- }
46
-
47
- makeSerializable(RecordModuleIdMapDependency, '@mpxjs/webpack-plugin/lib/dependencies/RecordModuleIdMapDependency')
48
-
49
- module.exports = RecordModuleIdMapDependency
@@ -1,75 +0,0 @@
1
- import { Dispatch, MutableRefObject, SetStateAction } from 'react';
2
- import { NativeSyntheticEvent, Animated } from 'react-native';
3
- export type LabelContextValue = MutableRefObject<{
4
- triggerChange: (evt: NativeSyntheticEvent<TouchEvent>) => void;
5
- }>;
6
- export type KeyboardAvoidContextValue = MutableRefObject<{
7
- cursorSpacing: number;
8
- ref: MutableRefObject<any>;
9
- adjustPosition: boolean;
10
- keyboardHeight?: number;
11
- onKeyboardShow?: () => void;
12
- } | null>;
13
- export interface GroupValue {
14
- [key: string]: {
15
- checked: boolean;
16
- setValue: Dispatch<SetStateAction<boolean>>;
17
- };
18
- }
19
- export interface GroupContextValue {
20
- groupValue: GroupValue;
21
- notifyChange: (evt: NativeSyntheticEvent<TouchEvent>) => void;
22
- }
23
- export interface FormFieldValue {
24
- getValue: () => any;
25
- resetValue: ({ newVal, type }: {
26
- newVal?: any;
27
- type?: string;
28
- }) => void;
29
- }
30
- export interface FormContextValue {
31
- formValuesMap: Map<string, FormFieldValue>;
32
- submit: () => void;
33
- reset: () => void;
34
- }
35
- export interface IntersectionObserver {
36
- [key: number]: {
37
- throttleMeasure: () => void;
38
- };
39
- }
40
- export interface PortalContextValue {
41
- mount: (children: React.ReactNode, key?: number | null, id?: number | null) => number | undefined;
42
- update: (key: number, children: React.ReactNode) => void;
43
- unmount: (key: number) => void;
44
- }
45
- export interface ScrollViewContextValue {
46
- gestureRef: React.RefObject<any> | null;
47
- scrollOffset: Animated.Value;
48
- }
49
- export interface RouteContextValue {
50
- pageId: number;
51
- navigation: Record<string, any>;
52
- }
53
- export interface StickyContextValue {
54
- registerStickyHeader: Function;
55
- unregisterStickyHeader: Function;
56
- }
57
- export declare const MovableAreaContext: import("react").Context<{
58
- width: number;
59
- height: number;
60
- }>;
61
- export declare const FormContext: import("react").Context<FormContextValue | null>;
62
- export declare const CheckboxGroupContext: import("react").Context<GroupContextValue | null>;
63
- export declare const RadioGroupContext: import("react").Context<GroupContextValue | null>;
64
- export declare const LabelContext: import("react").Context<LabelContextValue | null>;
65
- export declare const PickerContext: import("react").Context<null>;
66
- export declare const VarContext: import("react").Context<{}>;
67
- export declare const IntersectionObserverContext: import("react").Context<IntersectionObserver | null>;
68
- export declare const RouteContext: import("react").Context<RouteContextValue | null>;
69
- export declare const SwiperContext: import("react").Context<{}>;
70
- export declare const KeyboardAvoidContext: import("react").Context<KeyboardAvoidContextValue | null>;
71
- export declare const ScrollViewContext: import("react").Context<ScrollViewContextValue>;
72
- export declare const PortalContext: import("react").Context<PortalContextValue>;
73
- export declare const StickyContext: import("react").Context<StickyContextValue>;
74
- export declare const ProviderContext: import("react").Context<null>;
75
- //# sourceMappingURL=context.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,QAAQ,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AACjF,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAG7D,MAAM,MAAM,iBAAiB,GAAG,gBAAgB,CAAC;IAC/C,aAAa,EAAE,CAAC,GAAG,EAAE,oBAAoB,CAAC,UAAU,CAAC,KAAK,IAAI,CAAA;CAC/D,CAAC,CAAA;AAEF,MAAM,MAAM,yBAAyB,GAAG,gBAAgB,CAAC;IACvD,aAAa,EAAE,MAAM,CAAA;IACrB,GAAG,EAAE,gBAAgB,CAAC,GAAG,CAAC,CAAA;IAC1B,cAAc,EAAE,OAAO,CAAA;IACvB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,cAAc,CAAC,EAAE,MAAM,IAAI,CAAA;CAC5B,GAAG,IAAI,CAAC,CAAA;AAET,MAAM,WAAW,UAAU;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,QAAQ,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAA;KAAE,CAAA;CACjF;AAED,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,UAAU,CAAA;IACtB,YAAY,EAAE,CAAC,GAAG,EAAE,oBAAoB,CAAC,UAAU,CAAC,KAAK,IAAI,CAAA;CAC9D;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,GAAG,CAAA;IACnB,UAAU,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE;QAAE,MAAM,CAAC,EAAE,GAAG,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;CACxE;AAED,MAAM,WAAW,gBAAgB;IAC/B,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAA;IAC1C,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,KAAK,EAAE,MAAM,IAAI,CAAA;CAClB;AAED,MAAM,WAAW,oBAAoB;IACnC,CAAC,GAAG,EAAE,MAAM,GAAG;QACb,eAAe,EAAE,MAAM,IAAI,CAAA;KAC5B,CAAA;CACF;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,KAAK,MAAM,GAAG,SAAS,CAAA;IACjG,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,KAAK,IAAI,CAAA;IACxD,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;CAC/B;AAED,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA;IACvC,YAAY,EAAE,QAAQ,CAAC,KAAK,CAAA;CAC7B;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAChC;AAED,MAAM,WAAW,kBAAkB;IACjC,oBAAoB,EAAE,QAAQ,CAAA;IAC9B,sBAAsB,EAAE,QAAQ,CAAA;CACjC;AAED,eAAO,MAAM,kBAAkB;;;EAAyC,CAAA;AAExE,eAAO,MAAM,WAAW,kDAA+C,CAAA;AAEvE,eAAO,MAAM,oBAAoB,mDAAgD,CAAA;AAEjF,eAAO,MAAM,iBAAiB,mDAAgD,CAAA;AAE9E,eAAO,MAAM,YAAY,mDAAgD,CAAA;AAEzE,eAAO,MAAM,aAAa,+BAAsB,CAAA;AAEhD,eAAO,MAAM,UAAU,6BAAoB,CAAA;AAE3C,eAAO,MAAM,2BAA2B,sDAAmD,CAAA;AAE3F,eAAO,MAAM,YAAY,mDAAgD,CAAA;AAEzE,eAAO,MAAM,aAAa,6BAAoB,CAAA;AAE9C,eAAO,MAAM,oBAAoB,2DAAwD,CAAA;AAEzF,eAAO,MAAM,iBAAiB,iDAAmG,CAAA;AAEjI,eAAO,MAAM,aAAa,6CAAiD,CAAA;AAE3E,eAAO,MAAM,aAAa,6CAAkG,CAAA;AAE5H,eAAO,MAAM,eAAe,+BAAsB,CAAA"}
@@ -1,8 +0,0 @@
1
- declare const eventConfigMap: {
2
- [key: string]: {
3
- bitFlag: string;
4
- events: string[];
5
- };
6
- };
7
- export default eventConfigMap;
8
- //# sourceMappingURL=event.config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"event.config.d.ts","sourceRoot":"","sources":["../event.config.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,cAAc,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,CAAA;KAAE,CAAA;CAyB3E,CAAA;AAED,eAAe,cAAc,CAAA"}
@@ -1,8 +0,0 @@
1
- import { Props, RawConfig, RemoveProps, LayoutRef, ExtendedNativeTouchEvent } from './types/getInnerListeners';
2
- export declare const getCustomEvent: (type: string | undefined, oe: any, { detail, layoutRef }: {
3
- detail?: Record<string, unknown> | undefined;
4
- layoutRef?: LayoutRef | undefined;
5
- }, props?: Props) => any;
6
- declare const useInnerProps: (props?: Props, userRemoveProps?: RemoveProps, rawConfig?: RawConfig) => Record<string, (e: ExtendedNativeTouchEvent) => void> & Omit<Props, string>;
7
- export default useInnerProps;
8
- //# sourceMappingURL=getInnerListeners.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getInnerListeners.d.ts","sourceRoot":"","sources":["../getInnerListeners.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,EAEL,SAAS,EAET,WAAW,EAEX,SAAS,EACT,wBAAwB,EAEzB,MAAM,2BAA2B,CAAA;AAsElC,eAAO,MAAM,cAAc,iCAErB,GAAG;;;WAKA,KAAK,QAgBb,CAAA;AAyID,QAAA,MAAM,aAAa,WACV,KAAK,6CAEA,SAAS,wBA8Dc,wBAAwB,KAAK,IAAI,uBA2BrE,CAAA;AACD,eAAe,aAAa,CAAA"}
@@ -1,13 +0,0 @@
1
- import { ComponentType, ReactNode } from 'react';
2
- interface AsyncSuspenseProps {
3
- type: 'component' | 'page';
4
- chunkName: string;
5
- moduleId: string;
6
- innerProps: any;
7
- getLoading?: () => ComponentType<unknown>;
8
- getFallback?: () => ComponentType<unknown>;
9
- getChildren: () => Promise<ReactNode>;
10
- }
11
- declare const AsyncSuspense: React.FC<AsyncSuspenseProps>;
12
- export default AsyncSuspense;
13
- //# sourceMappingURL=mpx-async-suspense.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mpx-async-suspense.d.ts","sourceRoot":"","sources":["../mpx-async-suspense.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,aAAa,EAAkC,SAAS,EAAiB,MAAM,OAAO,CAAA;AAiGzG,UAAU,kBAAkB;IAC1B,IAAI,EAAE,WAAW,GAAG,MAAM,CAAA;IAC1B,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,GAAG,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,aAAa,CAAC,OAAO,CAAC,CAAA;IACzC,WAAW,CAAC,EAAE,MAAM,aAAa,CAAC,OAAO,CAAC,CAAA;IAC1C,WAAW,EAAE,MAAM,OAAO,CAAC,SAAS,CAAC,CAAA;CACtC;AAID,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA6E/C,CAAA;AAID,eAAe,aAAa,CAAA"}
@@ -1,69 +0,0 @@
1
- /**
2
- * ✔ size
3
- * ✔ type
4
- * ✔ plain
5
- * ✔ disabled
6
- * ✔ loading
7
- * ✔ form-type
8
- * - open-type: Partially. Only support `share`、`getUserInfo`
9
- * ✔ hover-class: Convert hoverClass to hoverStyle.
10
- * ✔ hover-style
11
- * ✘ hover-stop-propagation
12
- * ✔ hover-start-time
13
- * ✔ hover-stay-time
14
- * ✘ lang
15
- * ✘ session-from
16
- * ✘ send-message-title
17
- * ✘ send-message-path
18
- * ✘ send-message-img
19
- * ✘ app-parameter
20
- * ✘ show-message-card
21
- * ✘ phone-number-no-quota-toast
22
- * ✘ bindgetuserinfo
23
- * ✘ bindcontact
24
- * ✘ createliveactivity
25
- * ✘ bindgetphonenumber
26
- * ✘ bindgetphonenumber
27
- * ✘ bindgetrealtimephonenumber
28
- * ✘ binderror
29
- * ✘ bindopensetting
30
- * ✘ bindlaunchapp
31
- * ✘ bindlaunchapp
32
- * ✘ bindchooseavatar
33
- * ✘ bindchooseavatar
34
- * ✘ bindagreeprivacyauthorization
35
- * ✔ bindtap
36
- */
37
- import { ReactNode } from 'react';
38
- import { View, ViewStyle, TextStyle, NativeSyntheticEvent } from 'react-native';
39
- import { HandlerRef } from './useNodesRef';
40
- import type { ExtendedViewStyle } from './types/common';
41
- export type Type = 'default' | 'primary' | 'warn';
42
- export type OpenType = 'share' | 'getUserInfo';
43
- export type OpenTypeEvent = 'onShareAppMessage' | 'onUserInfo';
44
- export interface ButtonProps {
45
- size?: string;
46
- type?: Type;
47
- plain?: boolean;
48
- disabled?: boolean;
49
- loading?: boolean;
50
- 'hover-class'?: string;
51
- 'hover-style'?: ExtendedViewStyle;
52
- 'hover-start-time'?: number;
53
- 'hover-stay-time'?: number;
54
- 'open-type'?: OpenType;
55
- 'form-type'?: 'submit' | 'reset';
56
- 'enable-offset'?: boolean;
57
- 'enable-var'?: boolean;
58
- 'external-var-context'?: Record<string, any>;
59
- 'parent-font-size'?: number;
60
- 'parent-width'?: number;
61
- 'parent-height'?: number;
62
- style?: ViewStyle & TextStyle & Record<string, any>;
63
- children: ReactNode;
64
- bindgetuserinfo?: (userInfo: any) => void;
65
- bindtap?: (evt: NativeSyntheticEvent<TouchEvent> | unknown) => void;
66
- }
67
- declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HandlerRef<View, ButtonProps>>>;
68
- export default Button;
69
- //# sourceMappingURL=mpx-button.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mpx-button.d.ts","sourceRoot":"","sources":["../mpx-button.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,OAAO,EAAoC,SAAS,EAA+B,MAAM,OAAO,CAAA;AAChG,OAAO,EACL,IAAI,EAEJ,SAAS,EACT,SAAS,EAGT,oBAAoB,EAErB,MAAM,cAAc,CAAA;AAKrB,OAAoB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAEvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAGvD,MAAM,MAAM,IAAI,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,CAAA;AAOjD,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,aAAa,CAAA;AAE9C,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG,YAAY,CAAA;AAE9D,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,aAAa,CAAC,EAAE,iBAAiB,CAAA;IACjC,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,WAAW,CAAC,EAAE,QAAQ,CAAA;IACtB,WAAW,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAA;IAChC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,sBAAsB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC5C,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACnD,QAAQ,EAAE,SAAS,CAAA;IACnB,eAAe,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,KAAK,IAAI,CAAA;IACzC,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,oBAAoB,CAAC,UAAU,CAAC,GAAG,OAAO,KAAK,IAAI,CAAA;CACpE;AA4GD,QAAA,MAAM,MAAM,uHAqOV,CAAA;AAIF,eAAe,MAAM,CAAA"}