@mpxjs/webpack-plugin 2.10.3-beta.4 → 2.10.4

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 (71) hide show
  1. package/LICENSE +433 -0
  2. package/lib/index.js +1 -1
  3. package/lib/platform/template/wx/component-config/input.js +1 -1
  4. package/lib/platform/template/wx/component-config/text.js +18 -3
  5. package/lib/platform/template/wx/component-config/view.js +0 -2
  6. package/lib/platform/template/wx/index.js +41 -93
  7. package/lib/react/processScript.js +1 -18
  8. package/lib/runtime/components/react/dist/event.config.js +1 -0
  9. package/lib/runtime/components/react/dist/getInnerListeners.js +18 -7
  10. package/lib/runtime/components/react/dist/mpx-canvas/index.jsx +1 -1
  11. package/lib/runtime/components/react/dist/mpx-inline-text.jsx +11 -0
  12. package/lib/runtime/components/react/dist/mpx-input.jsx +3 -6
  13. package/lib/runtime/components/react/dist/mpx-keyboard-avoiding-view.jsx +2 -2
  14. package/lib/runtime/components/react/dist/mpx-picker/date.jsx +194 -68
  15. package/lib/runtime/components/react/dist/mpx-picker/dateData.js +17 -0
  16. package/lib/runtime/components/react/dist/mpx-picker/index.jsx +178 -96
  17. package/lib/runtime/components/react/dist/mpx-picker/multiSelector.jsx +79 -139
  18. package/lib/runtime/components/react/dist/mpx-picker/region.jsx +190 -90
  19. package/lib/runtime/components/react/dist/mpx-picker/selector.jsx +60 -75
  20. package/lib/runtime/components/react/dist/mpx-picker/time.jsx +100 -228
  21. package/lib/runtime/components/react/dist/{mpx-picker-view.jsx → mpx-picker-view/index.jsx} +3 -3
  22. package/lib/runtime/components/react/dist/{mpx-picker-view-column.jsx → mpx-picker-view-column/index.jsx} +64 -16
  23. package/lib/runtime/components/react/dist/{mpx-picker-view-column-item.jsx → mpx-picker-view-column/pickerViewColumnItem.jsx} +8 -5
  24. package/lib/runtime/components/react/dist/{pickerFaces.js → mpx-picker-view-column/pickerViewFaces.js} +6 -0
  25. package/lib/runtime/components/react/dist/mpx-popup/index.jsx +61 -0
  26. package/lib/runtime/components/react/dist/mpx-popup/popupBase.jsx +92 -0
  27. package/lib/runtime/components/react/dist/mpx-scroll-view.jsx +192 -25
  28. package/lib/runtime/components/react/dist/mpx-simple-text.jsx +8 -7
  29. package/lib/runtime/components/react/dist/mpx-simple-view.jsx +11 -15
  30. package/lib/runtime/components/react/dist/mpx-swiper.jsx +2 -2
  31. package/lib/runtime/components/react/dist/mpx-video.jsx +3 -3
  32. package/lib/runtime/components/react/dist/mpx-web-view.jsx +4 -4
  33. package/lib/runtime/components/react/dist/utils.jsx +1 -1
  34. package/lib/runtime/components/react/event.config.ts +2 -0
  35. package/lib/runtime/components/react/getInnerListeners.ts +28 -25
  36. package/lib/runtime/components/react/mpx-canvas/index.tsx +2 -2
  37. package/lib/runtime/components/react/mpx-inline-text.tsx +18 -0
  38. package/lib/runtime/components/react/mpx-input.tsx +2 -6
  39. package/lib/runtime/components/react/mpx-keyboard-avoiding-view.tsx +1 -1
  40. package/lib/runtime/components/react/mpx-picker/date.tsx +226 -69
  41. package/lib/runtime/components/react/mpx-picker/dateData.ts +22 -0
  42. package/lib/runtime/components/react/mpx-picker/index.tsx +239 -118
  43. package/lib/runtime/components/react/mpx-picker/multiSelector.tsx +96 -139
  44. package/lib/runtime/components/react/mpx-picker/region.tsx +217 -89
  45. package/lib/runtime/components/react/mpx-picker/selector.tsx +75 -80
  46. package/lib/runtime/components/react/mpx-picker/time.tsx +119 -236
  47. package/lib/runtime/components/react/mpx-picker/type.ts +85 -71
  48. package/lib/runtime/components/react/{mpx-picker-view.tsx → mpx-picker-view/index.tsx} +7 -7
  49. package/lib/runtime/components/react/{mpx-picker-view-column.tsx → mpx-picker-view-column/index.tsx} +70 -19
  50. package/lib/runtime/components/react/{mpx-picker-view-column-item.tsx → mpx-picker-view-column/pickerViewColumnItem.tsx} +8 -5
  51. package/lib/runtime/components/react/{pickerFaces.ts → mpx-picker-view-column/pickerViewFaces.ts} +7 -0
  52. package/lib/runtime/components/react/mpx-popup/index.tsx +86 -0
  53. package/lib/runtime/components/react/mpx-popup/popupBase.tsx +130 -0
  54. package/lib/runtime/components/react/mpx-scroll-view.tsx +249 -43
  55. package/lib/runtime/components/react/mpx-simple-text.tsx +10 -8
  56. package/lib/runtime/components/react/mpx-simple-view.tsx +11 -16
  57. package/lib/runtime/components/react/mpx-swiper.tsx +2 -4
  58. package/lib/runtime/components/react/mpx-video.tsx +2 -2
  59. package/lib/runtime/components/react/mpx-web-view.tsx +4 -4
  60. package/lib/runtime/components/react/types/getInnerListeners.d.ts +5 -1
  61. package/lib/runtime/components/react/utils.tsx +1 -1
  62. package/lib/runtime/components/web/mpx-input.vue +1 -1
  63. package/lib/runtime/stringify.wxs +2 -2
  64. package/lib/template-compiler/compiler.js +7 -7
  65. package/package.json +4 -5
  66. /package/lib/runtime/components/react/dist/{pickerVIewContext.js → mpx-picker-view/pickerVIewContext.js} +0 -0
  67. /package/lib/runtime/components/react/dist/{pickerViewIndicator.jsx → mpx-picker-view-column/pickerViewIndicator.jsx} +0 -0
  68. /package/lib/runtime/components/react/dist/{pickerViewMask.jsx → mpx-picker-view-column/pickerViewMask.jsx} +0 -0
  69. /package/lib/runtime/components/react/{pickerVIewContext.ts → mpx-picker-view/pickerVIewContext.ts} +0 -0
  70. /package/lib/runtime/components/react/{pickerViewIndicator.tsx → mpx-picker-view-column/pickerViewIndicator.tsx} +0 -0
  71. /package/lib/runtime/components/react/{pickerViewMask.tsx → mpx-picker-view-column/pickerViewMask.tsx} +0 -0
@@ -176,11 +176,11 @@ const i18nWxsPath = normalize.lib('runtime/i18n.wxs')
176
176
  const i18nWxsLoaderPath = normalize.lib('wxs/i18n-loader.js')
177
177
  // 添加~前缀避免wxs绝对路径在存在projectRoot时被拼接为错误路径
178
178
  const i18nWxsRequest = '~' + i18nWxsLoaderPath + '!' + i18nWxsPath
179
- const i18nModuleName = '__i18n__'
179
+ const i18nModuleName = '_i'
180
180
  const stringifyWxsPath = '~' + normalize.lib('runtime/stringify.wxs')
181
- const stringifyModuleName = '__stringify__'
181
+ const stringifyModuleName = '_s'
182
182
  const optionalChainWxsPath = '~' + normalize.lib('runtime/oc.wxs')
183
- const optionalChainWxsName = '__oc__'
183
+ const optionalChainWxsName = '_o'
184
184
 
185
185
  const tagRES = /(\{\{(?:.|\n|\r)+?\}\})(?!})/
186
186
  const tagRE = /\{\{((?:.|\n|\r)+?)\}\}(?!})/
@@ -2135,8 +2135,8 @@ function processText (el, options, meta) {
2135
2135
  function processWrapTextReact (el, options, meta) {
2136
2136
  const parent = el.parent
2137
2137
  const parentTag = parent.tag
2138
- if (parentTag !== 'mpx-text' && parentTag !== 'Text' && parentTag !== 'wxs') {
2139
- const wrapper = createASTElement('mpx-simple-text')
2138
+ if (parentTag !== 'mpx-text' && parentTag !== 'mpx-simple-text' && parentTag !== 'Text' && parentTag !== 'wxs') {
2139
+ const wrapper = createASTElement('mpx-inline-text')
2140
2140
  wrapper.isBuiltIn = true
2141
2141
  const inheritAttrs = []
2142
2142
  parent.attrsList.forEach(({ name, value }) => {
@@ -2207,7 +2207,7 @@ function processClass (el, meta) {
2207
2207
  addAttrs(el, [{
2208
2208
  name: targetType,
2209
2209
  // swan中externalClass是通过编译时静态实现,因此需要保留原有的staticClass形式避免externalClass失效
2210
- value: mode === 'swan' && staticClass ? `${staticClass} {{${stringifyModuleName}.stringifyClass('', ${dynamicClassExp})}}` : `{{${stringifyModuleName}.stringifyClass(${staticClassExp}, ${dynamicClassExp})}}`
2210
+ value: mode === 'swan' && staticClass ? `${staticClass} {{${stringifyModuleName}.c('', ${dynamicClassExp})}}` : `{{${stringifyModuleName}.c(${staticClassExp}, ${dynamicClassExp})}}`
2211
2211
  }])
2212
2212
  injectWxs(meta, stringifyModuleName, stringifyWxsPath)
2213
2213
  } else if (staticClass) {
@@ -2240,7 +2240,7 @@ function processStyle (el, meta) {
2240
2240
  const dynamicStyleExp = parseMustacheWithContext(dynamicStyle).result
2241
2241
  addAttrs(el, [{
2242
2242
  name: targetType,
2243
- value: `{{${stringifyModuleName}.stringifyStyle(${staticStyleExp}, ${dynamicStyleExp})}}`
2243
+ value: `{{${stringifyModuleName}.s(${staticStyleExp}, ${dynamicStyleExp})}}`
2244
2244
  }])
2245
2245
  injectWxs(meta, stringifyModuleName, stringifyWxsPath)
2246
2246
  } else if (staticStyle) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mpxjs/webpack-plugin",
3
- "version": "2.10.3-beta.4",
3
+ "version": "2.10.4",
4
4
  "description": "mpx compile core",
5
5
  "keywords": [
6
6
  "mpx"
@@ -28,7 +28,7 @@
28
28
  "@better-scroll/wheel": "^2.5.1",
29
29
  "@better-scroll/zoom": "^2.5.1",
30
30
  "@mpxjs/template-engine": "^2.8.7",
31
- "@mpxjs/utils": "^2.10.2",
31
+ "@mpxjs/utils": "^2.10.4",
32
32
  "acorn": "^8.11.3",
33
33
  "acorn-walk": "^7.2.0",
34
34
  "async": "^2.6.0",
@@ -82,9 +82,8 @@
82
82
  "build": "rimraf ./lib/runtime/components/react/dist && tsc && npm run copy-icons"
83
83
  },
84
84
  "devDependencies": {
85
- "@ant-design/react-native": "^5.2.2",
86
85
  "@d11/react-native-fast-image": "^8.6.12",
87
- "@mpxjs/api-proxy": "^2.10.3",
86
+ "@mpxjs/api-proxy": "^2.10.4",
88
87
  "@types/babel-traverse": "^6.25.4",
89
88
  "@types/babel-types": "^7.0.4",
90
89
  "@types/react": "^18.2.79",
@@ -101,5 +100,5 @@
101
100
  "engines": {
102
101
  "node": ">=14.14.0"
103
102
  },
104
- "gitHead": "2d37697869b9bdda3efab92dda8c910b68fd05c0"
103
+ "gitHead": "c877bcebc894c75fe107f7b997cee5b494932e43"
105
104
  }