@tarojs/plugin-platform-harmony-ets 4.0.0-alpha.36 → 4.0.0-alpha.37

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 (68) hide show
  1. package/dist/apis/base/weapp/life-cycle.ts +1 -1
  2. package/dist/apis/framework/index.ts +1 -1
  3. package/dist/apis/media/image/index.ts +135 -124
  4. package/dist/apis/route/index.ts +2 -1
  5. package/dist/apis/ui/background.ts +1 -1
  6. package/dist/apis/ui/navigation-bar/index.ts +1 -1
  7. package/dist/apis/ui/tab-bar.ts +2 -1
  8. package/dist/components-harmony-ets/button.ets +1 -1
  9. package/dist/components-harmony-ets/checkbox.ets +2 -1
  10. package/dist/components-harmony-ets/form.ets +1 -0
  11. package/dist/components-harmony-ets/index.ets +90 -37
  12. package/dist/components-harmony-ets/input.ets +2 -2
  13. package/dist/components-harmony-ets/label.ets +2 -1
  14. package/dist/components-harmony-ets/listView.ets +1 -1
  15. package/dist/components-harmony-ets/movableArea.ets +3 -3
  16. package/dist/components-harmony-ets/navigationBar.ets +1 -1
  17. package/dist/components-harmony-ets/pageMeta.ets +1 -1
  18. package/dist/components-harmony-ets/pseudo.ets +1 -1
  19. package/dist/components-harmony-ets/radio.ets +3 -2
  20. package/dist/components-harmony-ets/scrollList.ets +2 -2
  21. package/dist/components-harmony-ets/scrollView.ets +1 -1
  22. package/dist/components-harmony-ets/slider.ets +1 -1
  23. package/dist/components-harmony-ets/style.ets +6 -7
  24. package/dist/components-harmony-ets/swiper.ets +1 -1
  25. package/dist/components-harmony-ets/switch.ets +1 -1
  26. package/dist/components-harmony-ets/text.ets +2 -2
  27. package/dist/components-harmony-ets/utils/helper.ets +2 -2
  28. package/dist/components-harmony-ets/utils/styles.ets +6 -5
  29. package/dist/components-harmony-ets/video.ets +1 -1
  30. package/dist/components-harmony-ets/view.ets +2 -1
  31. package/dist/components-harmony-ets/webView.ets +1 -1
  32. package/dist/index.js +1 -1
  33. package/dist/index.js.map +1 -1
  34. package/dist/runtime-ets/bom/document.ts +2 -1
  35. package/dist/runtime-ets/bom/getComputedStyle.ts +2 -1
  36. package/dist/runtime-ets/bom/navigator.ts +21 -1
  37. package/dist/runtime-ets/bom/raf.ts +37 -1
  38. package/dist/runtime-ets/bom/window.ts +5 -4
  39. package/dist/runtime-ets/constant.ts +10 -17
  40. package/dist/runtime-ets/current.ts +1 -0
  41. package/dist/runtime-ets/dom/document.ts +1 -1
  42. package/dist/runtime-ets/dom/element/canvas.ts +2 -3
  43. package/dist/runtime-ets/dom/element/element.ts +5 -6
  44. package/dist/runtime-ets/dom/element/movableView.ts +8 -12
  45. package/dist/runtime-ets/dom/eventTarget.ts +1 -1
  46. package/dist/runtime-ets/dom/node.ts +3 -2
  47. package/dist/runtime-ets/index.ts +7 -21
  48. package/dist/runtime-ets/interface/index.ts +0 -6
  49. package/dist/runtime-ets/utils/index.ts +6 -4
  50. package/dist/runtime-framework/react/app.ts +2 -1
  51. package/dist/runtime-framework/react/hooks.ts +1 -1
  52. package/dist/runtime-framework/react/native-page.ts +15 -44
  53. package/dist/runtime-framework/react/page.ts +2 -1
  54. package/dist/runtime-framework/solid/app.ts +2 -1
  55. package/dist/runtime-framework/solid/hooks.ts +1 -1
  56. package/dist/runtime-framework/solid/page.ts +2 -1
  57. package/dist/runtime-utils.js +166 -134
  58. package/dist/runtime-utils.js.map +1 -1
  59. package/dist/runtime.js +166 -134
  60. package/dist/runtime.js.map +1 -1
  61. package/package.json +9 -9
  62. package/dist/runtime-ets/bom/URL.ts +0 -2
  63. package/dist/runtime-ets/bom/history.ts +0 -1
  64. package/dist/runtime-ets/bom/location.ts +0 -1
  65. package/dist/runtime-ets/dom/event-source.ts +0 -1
  66. package/dist/runtime-ets/emitter/emitter.ts +0 -1
  67. package/dist/runtime-ets/env.ts +0 -1
  68. package/dist/runtime-ets/utils/router.ts +0 -9
@@ -1,4 +1,4 @@
1
- import { eventCenter } from '@tarojs/runtime'
1
+ import { eventCenter } from '@tarojs/runtime/dist/runtime.esm'
2
2
 
3
3
  import type Taro from '@tarojs/taro/types'
4
4
 
@@ -24,4 +24,4 @@ export { Current, getCurrentInstance } from '@tarojs/runtime'
24
24
 
25
25
  export const requirePlugin = temporarilyNotSupport('requirePlugin')
26
26
 
27
- export { eventCenter, Events, History } from '@tarojs/runtime'
27
+ export { eventCenter, Events, History } from '@tarojs/runtime/dist/runtime.esm'
@@ -16,7 +16,8 @@ import { Current } from '@tarojs/runtime'
16
16
  import { isNull } from '@tarojs/shared'
17
17
 
18
18
  import { getSystemInfoSync } from '../../base'
19
- import { callAsyncFail, callAsyncSuccess, temporarilyNotSupport, validateParams } from '../../utils'
19
+ import { callAsyncFail, callAsyncSuccess, requestPermissions, temporarilyNotSupport, validateParams } from '../../utils'
20
+ import { IMAGE_PERMISSION } from '../../utils/permissions'
20
21
 
21
22
  import type Taro from '@tarojs/taro/types'
22
23
 
@@ -112,143 +113,117 @@ async function saveImage(compressedImageData, compressedImageUri) {
112
113
 
113
114
  export const compressImage: typeof Taro.compressImage = function (options) {
114
115
  return new Promise((resolve, reject) => {
115
- try {
116
- validateParams('compressImage', options, compressImageSchema)
117
- } catch (error) {
118
- const res = { errMsg: error.message }
119
- return callAsyncFail(reject, res, options)
120
- }
121
- const { src, quality = 80, compressedWidth, compressedHeight } = options
122
- const srcAfterCompress = src.includes('_after_compress') ? src : src.split('.').join('_after_compress.')
123
- const file = fs.openSync(src, fs.OpenMode.READ_ONLY)
124
-
125
- // const stat = fs.statSync(file.fd)
126
- // console.log('[Taro] 压缩前图片的大小为:', stat.size)
127
-
128
- const source = image.createImageSource(file.fd)
129
- if (isNull(source)) {
130
- const createImageSourceError = { errMsg: 'compressImage fail: createImageSource has failed.' }
131
- callAsyncFail(reject, createImageSourceError, options)
132
- return
133
- }
116
+ requestPermissions(IMAGE_PERMISSION).then(() => {
117
+ try {
118
+ validateParams('compressImage', options, compressImageSchema)
119
+ } catch (error) {
120
+ const res = { errMsg: error.message }
121
+ return callAsyncFail(reject, res, options)
122
+ }
123
+ const { src, quality = 80, compressedWidth, compressedHeight } = options
124
+ const srcAfterCompress = src.includes('_after_compress') ? src : src.split('.').join('_after_compress.')
125
+ const file = fs.openSync(src, fs.OpenMode.READ_ONLY)
126
+
127
+ // const stat = fs.statSync(file.fd)
128
+ // console.log('[Taro] 压缩前图片的大小为:', stat.size)
129
+
130
+ const source = image.createImageSource(file.fd)
131
+ if (isNull(source)) {
132
+ const createImageSourceError = { errMsg: 'compressImage fail: createImageSource has failed.' }
133
+ callAsyncFail(reject, createImageSourceError, options)
134
+ return
135
+ }
134
136
 
135
- const width = source.getImageInfoSync().size.width
136
- const height = source.getImageInfoSync().size.height
137
- let wantWidth = compressedWidth || compressedHeight || 0
138
- let wantHeight = compressedHeight || compressedWidth || 0
137
+ const width = source.getImageInfoSync().size.width
138
+ const height = source.getImageInfoSync().size.height
139
+ let wantWidth = compressedWidth || compressedHeight || 0
140
+ let wantHeight = compressedHeight || compressedWidth || 0
139
141
 
140
- if (width > wantWidth || height > wantHeight) {
141
- const heightRatio = height / wantHeight
142
- const widthRatio = width / wantWidth
143
- const finalRatio = heightRatio < widthRatio ? heightRatio : widthRatio
142
+ if (width > wantWidth || height > wantHeight) {
143
+ const heightRatio = height / wantHeight
144
+ const widthRatio = width / wantWidth
145
+ const finalRatio = heightRatio < widthRatio ? heightRatio : widthRatio
144
146
 
145
- wantWidth = Math.round(width / finalRatio)
146
- wantHeight = Math.round(height / finalRatio)
147
- }
147
+ wantWidth = Math.round(width / finalRatio)
148
+ wantHeight = Math.round(height / finalRatio)
149
+ }
148
150
 
149
- const decodingOptions = {
150
- editable: true,
151
- desiredPixelFormat: image.PixelMapFormat.RGBA_8888,
152
- desiredSize: { width: wantWidth, height: wantHeight }
153
- }
154
- source.createPixelMap(decodingOptions, (error, pixelMap) => {
155
- if (error !== undefined) {
156
- fs.closeSync(file)
157
- const res = { errMsg: error }
158
- callAsyncFail(reject, res, options)
159
- } else {
160
- const packer = image.createImagePacker(file.fd)
161
- if (isNull(packer)) {
151
+ const decodingOptions = {
152
+ editable: true,
153
+ desiredPixelFormat: image.PixelMapFormat.RGBA_8888,
154
+ desiredSize: { width: wantWidth, height: wantHeight }
155
+ }
156
+ source.createPixelMap(decodingOptions, (error, pixelMap) => {
157
+ if (error !== undefined) {
162
158
  fs.closeSync(file)
163
- const createImagePackerError = { errMsg: 'compressImage fail: createImagePacker has failed.' }
164
- callAsyncFail(reject, createImagePackerError, options)
165
- return
166
- }
159
+ const res = { errMsg: error }
160
+ callAsyncFail(reject, res, options)
161
+ } else {
162
+ const packer = image.createImagePacker(file.fd)
163
+ if (isNull(packer)) {
164
+ fs.closeSync(file)
165
+ const createImagePackerError = { errMsg: 'compressImage fail: createImagePacker has failed.' }
166
+ callAsyncFail(reject, createImagePackerError, options)
167
+ return
168
+ }
167
169
 
168
- const isPNG = src.endsWith('.png')
169
- const packingOptionsOHOS: IPackingOptionOHOS = {
170
- format: isPNG ? 'image/png' : 'image/jpeg',
171
- quality: quality
172
- }
173
- packer.packing(pixelMap, packingOptionsOHOS).then((value) => {
174
- fs.closeSync(file)
175
- saveImage(value, srcAfterCompress).then(result => {
176
- callAsyncSuccess(resolve, { tempFilePath: result.imageUri }, options)
170
+ const isPNG = src.endsWith('.png')
171
+ const packingOptionsOHOS: IPackingOptionOHOS = {
172
+ format: isPNG ? 'image/png' : 'image/jpeg',
173
+ quality: quality
174
+ }
175
+ packer.packing(pixelMap, packingOptionsOHOS).then((value) => {
176
+ fs.closeSync(file)
177
+ saveImage(value, srcAfterCompress).then(result => {
178
+ callAsyncSuccess(resolve, { tempFilePath: result.imageUri }, options)
179
+ })
180
+ }).catch((error) => {
181
+ fs.closeSync(file)
182
+ callAsyncFail(reject, error, options)
177
183
  })
178
- }).catch((error) => {
179
- fs.closeSync(file)
180
- callAsyncFail(reject, error, options)
181
- })
182
- }
184
+ }
185
+ })
186
+ }, (error: string) => {
187
+ const res = { errMsg: error }
188
+ return callAsyncFail(reject, res, options)
183
189
  })
184
190
  })
185
191
  }
186
192
 
187
193
  export const chooseImage: typeof Taro.chooseImage = function (options) {
188
194
  return new Promise((resolve, reject) => {
189
- try {
190
- validateParams('chooseImage', options, chooseImageSchema)
191
- } catch (error) {
192
- const res = { errMsg: error.message }
193
- return callAsyncFail(reject, res, options)
194
- }
195
-
196
- const { count = 9 } = options
197
- const photoViewPicker = new picker.PhotoViewPicker()
198
- let sizeType = options.sizeType
199
-
200
- if (!sizeType || !sizeType.length) {
201
- sizeType = ['compressed', 'original']
202
- }
203
-
204
- photoSelectOptions.maxSelectNumber = count // 选择媒体文件的最大数目
205
- photoSelectOptions.MIMEType = picker.PhotoViewMIMETypes.IMAGE_TYPE // 过滤选择媒体文件类型为IMAGE
195
+ requestPermissions(IMAGE_PERMISSION).then(() => {
196
+ try {
197
+ validateParams('chooseImage', options, chooseImageSchema)
198
+ } catch (error) {
199
+ const res = { errMsg: error.message }
200
+ return callAsyncFail(reject, res, options)
201
+ }
206
202
 
207
- photoViewPicker.select(photoSelectOptions).then((photoSelectResult) => {
208
- const result: IChooseImageData = {}
209
- const isOrigin = photoSelectResult.isOriginalPhoto
203
+ const { count = 9 } = options
204
+ const photoViewPicker = new picker.PhotoViewPicker()
205
+ let sizeType = options.sizeType
210
206
 
211
- if (isOrigin) {
212
- const tempFilePaths: string[] = []
213
- const tempFiles = photoSelectResult.photoUris.map(uri => {
214
- const file = fs.openSync(uri, fs.OpenMode.READ_ONLY)
215
- const stat = fs.statSync(file.fd)
216
- const size = stat.size
207
+ if (!sizeType || !sizeType.length) {
208
+ sizeType = ['compressed', 'original']
209
+ }
217
210
 
218
- fs.closeSync(file)
219
- tempFilePaths.push(uri)
211
+ photoSelectOptions.maxSelectNumber = count // 选择媒体文件的最大数目
212
+ photoSelectOptions.MIMEType = picker.PhotoViewMIMETypes.IMAGE_TYPE // 过滤选择媒体文件类型为IMAGE
220
213
 
221
- return {
222
- size,
223
- path: uri,
224
- }
225
- })
226
-
227
- result.tempFiles = tempFiles
228
- result.tempFilePaths = tempFilePaths
229
-
230
- callAsyncSuccess(resolve, result, options)
231
- } else {
232
- const actions: Promise<string>[] = photoSelectResult.photoUris.map(uri => {
233
- return new Promise<string>(resolve => {
234
- compressImage({
235
- src: uri,
236
- compressedWidth: getSystemInfoSync().screenWidth / 2,
237
- compressedHeight: getSystemInfoSync().screenHeight / 2,
238
- success: (compressResult) => {
239
- resolve(compressResult.tempFilePath)
240
- }
241
- })
242
- })
243
- })
214
+ photoViewPicker.select(photoSelectOptions).then((photoSelectResult) => {
215
+ const result: IChooseImageData = {}
216
+ const isOrigin = photoSelectResult.isOriginalPhoto
244
217
 
245
- Promise.all(actions).then(tempFilePaths => {
246
- const tempFiles = tempFilePaths.map(uri => {
218
+ if (isOrigin) {
219
+ const tempFilePaths: string[] = []
220
+ const tempFiles = photoSelectResult.photoUris.map(uri => {
247
221
  const file = fs.openSync(uri, fs.OpenMode.READ_ONLY)
248
222
  const stat = fs.statSync(file.fd)
249
- const size: number = stat.size
223
+ const size = stat.size
250
224
 
251
225
  fs.closeSync(file)
226
+ tempFilePaths.push(uri)
252
227
 
253
228
  return {
254
229
  size,
@@ -256,17 +231,53 @@ export const chooseImage: typeof Taro.chooseImage = function (options) {
256
231
  }
257
232
  })
258
233
 
259
- result.tempFilePaths = tempFilePaths
260
234
  result.tempFiles = tempFiles
235
+ result.tempFilePaths = tempFilePaths
261
236
 
262
237
  callAsyncSuccess(resolve, result, options)
263
- }).catch(error => {
264
- const res = { errMsg: error }
265
- return callAsyncFail(reject, res, options)
266
- })
267
- }
268
- }).catch((error) => {
269
- callAsyncFail(reject, error, options)
238
+ } else {
239
+ const actions: Promise<string>[] = photoSelectResult.photoUris.map(uri => {
240
+ return new Promise<string>(resolve => {
241
+ compressImage({
242
+ src: uri,
243
+ compressedWidth: getSystemInfoSync().screenWidth / 2,
244
+ compressedHeight: getSystemInfoSync().screenHeight / 2,
245
+ success: (compressResult) => {
246
+ resolve(compressResult.tempFilePath)
247
+ }
248
+ })
249
+ })
250
+ })
251
+
252
+ Promise.all(actions).then(tempFilePaths => {
253
+ const tempFiles = tempFilePaths.map(uri => {
254
+ const file = fs.openSync(uri, fs.OpenMode.READ_ONLY)
255
+ const stat = fs.statSync(file.fd)
256
+ const size: number = stat.size
257
+
258
+ fs.closeSync(file)
259
+
260
+ return {
261
+ size,
262
+ path: uri,
263
+ }
264
+ })
265
+
266
+ result.tempFilePaths = tempFilePaths
267
+ result.tempFiles = tempFiles
268
+
269
+ callAsyncSuccess(resolve, result, options)
270
+ }).catch(error => {
271
+ const res = { errMsg: error }
272
+ return callAsyncFail(reject, res, options)
273
+ })
274
+ }
275
+ }).catch((error) => {
276
+ callAsyncFail(reject, error, options)
277
+ })
278
+ }, (error: string) => {
279
+ const res = { errMsg: error }
280
+ return callAsyncFail(reject, res, options)
270
281
  })
271
282
  })
272
283
  }
@@ -1,5 +1,6 @@
1
1
  import router from '@ohos.router'
2
- import { eventCenter, window } from '@tarojs/runtime'
2
+ import { window } from '@tarojs/runtime' // eslint-disable-line import/no-duplicates
3
+ import { eventCenter } from '@tarojs/runtime/dist/runtime.esm' // eslint-disable-line import/no-duplicates
3
4
  import { queryToJson } from '@tarojs/shared'
4
5
 
5
6
  import { callAsyncFail, callAsyncSuccess } from '../utils'
@@ -1,4 +1,4 @@
1
- import { eventCenter } from '@tarojs/runtime'
1
+ import { eventCenter } from '@tarojs/runtime/dist/runtime.esm'
2
2
 
3
3
  import { temporarilyNotSupport } from '../utils'
4
4
  import { MethodHandler } from '../utils/handler'
@@ -1,4 +1,4 @@
1
- import { eventCenter } from '@tarojs/runtime'
1
+ import { eventCenter } from '@tarojs/runtime/dist/runtime.esm'
2
2
 
3
3
  import { MethodHandler } from '../../utils/handler'
4
4
 
@@ -1,4 +1,5 @@
1
- import { Current, eventCenter } from '@tarojs/runtime'
1
+ import { Current } from '@tarojs/runtime' // eslint-disable-line import/no-duplicates
2
+ import { eventCenter } from '@tarojs/runtime/dist/runtime.esm' // eslint-disable-line import/no-duplicates
2
3
 
3
4
  import { callAsyncFail, callAsyncSuccess } from '../utils'
4
5
 
@@ -4,7 +4,7 @@ import { BUTTON_THEME_COLOR } from './utils/constant/style'
4
4
  import { TOUCH_EVENT_MAP } from './utils/constant/event'
5
5
  import { shouldBindEvent, getNodeThresholds } from './utils/helper'
6
6
 
7
- import type { TaroAny, TaroButtonElement, TaroEvent, TaroStyleType } from '@tarojs/runtime'
7
+ import type { TaroAny, TaroEvent, TaroButtonElement, TaroStyleType } from '@tarojs/runtime'
8
8
 
9
9
  interface ButtonAttrs {
10
10
  disabled?: boolean
@@ -4,7 +4,8 @@ import commonStyleModify, { rowModify, columnModify } from './style'
4
4
  import { FlexManager } from './utils/flexManager'
5
5
  import { shouldBindEvent, getNodeThresholds } from './utils/helper'
6
6
 
7
- import type { TaroAny, TaroCheckboxElement, TaroCheckboxGroupElement, TaroEvent } from '@tarojs/runtime'
7
+ import type { TaroAny, TaroEvent, TaroCheckboxElement, TaroCheckboxGroupElement } from '@tarojs/runtime'
8
+ import { isUndefined } from '@tarojs/shared'
8
9
 
9
10
  interface CheckboxOptions {
10
11
  name?: string
@@ -7,6 +7,7 @@ import { FlexManager } from './utils/flexManager'
7
7
  import { shouldBindEvent, getNodeThresholds } from './utils/helper'
8
8
 
9
9
  import type { TaroAny, TaroFormElement } from '@tarojs/runtime'
10
+ import { isUndefined } from '@tarojs/shared'
10
11
 
11
12
  @Component
12
13
  export default struct TaroForm {
@@ -1,39 +1,92 @@
1
- export { default as TaroImage, getImageMode } from './image'
2
- export { default as TaroText } from './text'
3
- export { default as TaroView } from './view'
4
- export { default as TaroIcon } from './icon'
5
- export { default as TaroForm } from './form'
6
- export { default as TaroLabel } from './label'
7
- export { default as TaroInput } from './input'
8
- export { default as TaroVideo } from './video'
9
- export { default as TaroCanvas } from './canvas'
10
- export { default as TaroButton, getButtonColor } from './button'
11
- export { default as TaroPicker } from './picker'
12
- export { default as TaroSlider } from './slider'
13
- export { default as TaroSwitch } from './switch'
14
- export { default as TaroSwiper } from './swiper'
15
- export { default as TaroWebView } from './webView'
16
- export { default as TaroTextArea } from './textArea'
17
- export { default as TaroRichText } from './richText'
18
- export { default as TaroProgress } from './progress'
19
- export { default as TaroInnerHtml } from './innerHtml'
20
- export { default as TaroScrollView } from './scrollView'
21
- export { default as TaroMovableArea } from './movableArea'
22
- export { default as TaroMovableView } from './movableView'
23
- export { TaroRadio, TaroRadioGroup } from './radio'
24
- export { TaroCheckboxGroup, TaroCheckbox } from './checkbox'
25
- export { default as TaroPageMeta, IComponentAttributeUpdateEvents } from './pageMeta'
26
- export { default as TaroNavigationBar } from './navigationBar'
1
+ import TaroImage, { getImageMode } from './image'
2
+ import TaroText from './text'
3
+ import TaroView from './view'
4
+ import TaroIcon from './icon'
5
+ import TaroForm from './form'
6
+ import TaroLabel from './label'
7
+ import TaroInput from './input'
8
+ import TaroVideo from './video'
9
+ import TaroCanvas from './canvas'
10
+ import TaroButton from './button'
11
+ import TaroPicker from './picker'
12
+ import TaroSlider from './slider'
13
+ import TaroSwitch from './switch'
14
+ import TaroSwiper from './swiper'
15
+ import TaroWebView from './webView'
16
+ import TaroTextArea from './textArea'
17
+ import TaroRichText from './richText'
18
+ import TaroProgress from './progress'
19
+ import TaroInnerHtml from './innerHtml'
20
+ import TaroScrollView from './scrollView'
21
+ import TaroMovableArea from './movableArea'
22
+ import TaroMovableView from './movableView'
23
+ import { TaroRadio, TaroRadioGroup } from './radio'
24
+ import { TaroCheckboxGroup, TaroCheckbox } from './checkbox'
25
+ import TaroPageMeta from './pageMeta'
26
+ import TaroNavigationBar from './navigationBar'
27
27
 
28
- export { default as TaroListView } from './listView'
29
- export { default as TaroStickySection } from './stickySection'
30
- export { default as TaroScrollList } from './scrollList'
28
+ import TaroListView from './listView'
29
+ import TaroStickySection from './stickySection'
30
+ import TaroScrollList from './scrollList'
31
31
 
32
- export { default as commonStyleModify, rowModify, columnModify, textModify, setNormalTextAttributeIntoInstance } from './style'
33
- export { TOUCH_EVENT_MAP } from './utils/constant/event'
34
- export { BUTTON_THEME_COLOR } from './utils/constant/style'
35
- export { DynamicCenter } from './utils/DynamicCenter'
36
- export { FlexManager } from './utils/flexManager'
37
- export { isTagFirstChild } from './utils/helper'
38
- export { getStyleAttr } from './utils/styles'
39
- export { shouldBindEvent, getNodeThresholds, getNormalAttributes, getFontAttributes } from './utils/helper'
32
+ import commonStyleModify, { rowModify, columnModify, textModify, setNormalTextAttributeIntoInstance } from './style'
33
+ import { getButtonColor } from './button'
34
+ import { FlexManager } from './utils/flexManager'
35
+ import { DynamicCenter } from './utils/DynamicCenter'
36
+ import { TOUCH_EVENT_MAP } from './utils/constant/event'
37
+ import { BUTTON_THEME_COLOR } from './utils/constant/style'
38
+ import { getStyleAttr } from './utils/styles'
39
+ import { shouldBindEvent, getNodeThresholds, getNormalAttributes, getFontAttributes } from './utils/helper'
40
+
41
+ export {
42
+ textModify,
43
+ getStyleAttr,
44
+ FlexManager,
45
+ DynamicCenter,
46
+ getButtonColor,
47
+ TOUCH_EVENT_MAP,
48
+ shouldBindEvent,
49
+ getFontAttributes,
50
+ commonStyleModify,
51
+ rowModify,
52
+ columnModify,
53
+ getNodeThresholds,
54
+ BUTTON_THEME_COLOR,
55
+ getNormalAttributes,
56
+ setNormalTextAttributeIntoInstance,
57
+ getImageMode,
58
+ }
59
+
60
+ export {
61
+ TaroImage,
62
+ TaroCanvas,
63
+ TaroText,
64
+ TaroView,
65
+ TaroIcon,
66
+ TaroForm,
67
+ TaroLabel,
68
+ TaroInput,
69
+ TaroVideo,
70
+ TaroButton,
71
+ TaroPicker,
72
+ TaroSlider,
73
+ TaroSwitch,
74
+ TaroSwiper,
75
+ TaroWebView,
76
+ TaroTextArea,
77
+ TaroRichText,
78
+ TaroProgress,
79
+ TaroInnerHtml,
80
+ TaroScrollView,
81
+ TaroMovableArea,
82
+ TaroMovableView,
83
+ TaroRadio,
84
+ TaroRadioGroup,
85
+ TaroCheckboxGroup,
86
+ TaroCheckbox,
87
+ TaroPageMeta,
88
+ TaroNavigationBar,
89
+ TaroListView,
90
+ TaroStickySection,
91
+ TaroScrollList
92
+ }
@@ -4,7 +4,7 @@ import commonStyleModify from './style'
4
4
  import { parseStyles, shouldBindEvent, getNodeThresholds, getStyleAttr } from './utils/helper'
5
5
  import { INPUT_TYPE_MAP, INPUT_CONFIRM_MAP } from './utils/constant/style'
6
6
 
7
- import type { TaroAny, TaroEvent, TaroInputElement, TaroStyleType } from '@tarojs/runtime'
7
+ import type { TaroStyleType, TaroAny, TaroInputElement, TaroEvent } from '@tarojs/runtime'
8
8
 
9
9
  interface InputAttrs {
10
10
  textAlign?: TextAlign
@@ -91,7 +91,7 @@ export default struct TaroInput {
91
91
  .placeholderFont(getPlaceholderFont(this.node))
92
92
  .enterKeyType(INPUT_CONFIRM_MAP.get(this.node._attrs?.confirmType) || EnterKeyType.Done)
93
93
  .padding(0) // Note: 移出 Input 默认 padding 设置
94
- .backgroundColor(getStyleAttr(this.node, "backgroundColor"))
94
+ .backgroundColor(getStyleAttr(this.node, "backgroundColor"))//
95
95
  .attributeModifier(commonStyleModify.setNode(this.node).setAnimationStyle(this.overwriteStyle))
96
96
  .styles(this.node?.hmStyle)
97
97
  .attrs(getAttributes(this.node))
@@ -6,7 +6,8 @@ import { TOUCH_EVENT_MAP } from './utils/constant/event'
6
6
  import { FlexManager } from './utils/flexManager'
7
7
  import { shouldBindEvent, getNodeThresholds } from './utils/helper'
8
8
 
9
- import type { TaroAny, TaroElement, TaroCheckboxElement, TaroLabelElement, TaroRadioElement } from '@tarojs/runtime'
9
+ import type { TaroLabelElement, TaroElement, TaroAny, TaroRadioElement, TaroCheckboxElement } from '@tarojs/runtime'
10
+ import { isUndefined } from '@tarojs/shared'
10
11
 
11
12
  function handleTargetChange (id: string) {
12
13
  const taro: TaroAny = Current.taro
@@ -1,6 +1,6 @@
1
1
  import commonStyleModify from './style'
2
2
 
3
- import type { TaroAny, TaroViewElement } from '@tarojs/runtime'
3
+ import type { TaroViewElement, TaroAny } from '@tarojs/runtime'
4
4
 
5
5
  @Reusable
6
6
  @Component
@@ -1,9 +1,9 @@
1
+ import type { TaroAny, TaroMovableAreaElement, TaroMovableViewElement } from '@tarojs/runtime'
1
2
  import { isTaroMovableViewElement } from '@tarojs/runtime'
2
3
  import commonStyleModify, { rowModify, columnModify } from './style'
3
4
 
4
5
  import { FlexManager } from './utils/flexManager'
5
-
6
- import type { TaroAny, TaroMovableAreaElement } from '@tarojs/runtime'
6
+ import { isUndefined } from '@tarojs/shared'
7
7
 
8
8
  @Component
9
9
  export default struct TaroMovableArea {
@@ -123,4 +123,4 @@ function sizeChangeHandle(node: TaroMovableAreaElement, newValue: Area | SizeOpt
123
123
  }
124
124
  }
125
125
  })
126
- }
126
+ }
@@ -1,4 +1,4 @@
1
- import { eventCenter } from '@tarojs/runtime'
1
+ import { eventCenter } from '@tarojs/runtime/dist/runtime.esm'
2
2
 
3
3
  import { isTagFirstChild } from './utils/helper'
4
4
 
@@ -1,4 +1,4 @@
1
- import { APP, eventCenter } from '@tarojs/runtime'
1
+ import { APP, eventCenter } from '@tarojs/runtime/dist/runtime.esm'
2
2
  import { getCurrentInstance, pageScrollTo } from '@tarojs/taro'
3
3
 
4
4
  import { isTagFirstChild } from './utils/helper'
@@ -1,7 +1,7 @@
1
1
  import { getFontAttributes } from './utils/helper'
2
2
  import { pseudoModify } from './style'
3
3
 
4
- import type { TaroAny, TaroStyleType, TaroTextStyleType, TaroViewElement } from '@tarojs/runtime'
4
+ import type { TaroViewElement, TaroStyleType, TaroTextStyleType, TaroAny } from '@tarojs/runtime'
5
5
 
6
6
  @Extend(Flex)
7
7
  function flexAttrs (style: TaroStyleType) {
@@ -1,11 +1,12 @@
1
- import { AREA_CHANGE_EVENT_NAME, eventHandler, getComponentEventCallback, VISIBLE_CHANGE_EVENT_NAME, createTaroEvent } from '@tarojs/runtime'
1
+ import { eventHandler, getComponentEventCallback, AREA_CHANGE_EVENT_NAME, VISIBLE_CHANGE_EVENT_NAME, createTaroEvent } from '@tarojs/runtime'
2
2
 
3
3
  import commonStyleModify, { rowModify, columnModify } from './style'
4
4
  import { TOUCH_EVENT_MAP } from './utils/constant/event'
5
5
  import { FlexManager } from './utils/flexManager'
6
6
  import { shouldBindEvent, getNodeThresholds } from './utils/helper'
7
7
 
8
- import type { HarmonyType, TaroAny, TaroEvent, TaroRadioElement, TaroRadioGroupElement } from '@tarojs/runtime'
8
+ import { TaroEvent, TaroAny, HarmonyType, TaroRadioGroupElement, TaroRadioElement } from '@tarojs/runtime'
9
+ import { isUndefined } from '@tarojs/shared'
9
10
 
10
11
  interface RadioAttrs {
11
12
  radioStyle?: HarmonyType.RadioStyle
@@ -4,7 +4,7 @@ import commonStyleModify from './style'
4
4
  import { TOUCH_EVENT_MAP } from './utils/constant/event'
5
5
  import { getNodeThresholds, shouldBindEvent } from './utils/helper'
6
6
 
7
- import type { TaroAny, TaroEvent, TaroScrollViewElement } from '@tarojs/runtime'
7
+ import type { TaroScrollViewElement, TaroAny, TaroEvent } from '@tarojs/runtime'
8
8
 
9
9
  interface ScrollViewAttrs {
10
10
  scrollBar: BarState
@@ -62,7 +62,7 @@ export default struct TaroScrollList {
62
62
  }
63
63
  }
64
64
 
65
- handleScroll = (scrollOffset: number) => {
65
+ handleScroll = (scrollOffset: number) => {
66
66
  handleScrollEvent(this.node, 'scroll', scrollOffset)
67
67
  }
68
68
 
@@ -6,7 +6,7 @@ import { FlexManager } from './utils/flexManager'
6
6
  import { TOUCH_EVENT_MAP } from './utils/constant/event'
7
7
  import { getNodeThresholds, getStyleAttr, shouldBindEvent } from './utils/helper'
8
8
 
9
- import type { TaroAny, TaroEvent, TaroScrollViewElement } from '@tarojs/runtime'
9
+ import type { TaroAny, TaroScrollViewElement, TaroEvent } from '@tarojs/runtime'
10
10
 
11
11
  interface ScrollViewAttrs {
12
12
  scrollBar: BarState