@mpxjs/webpack-plugin 2.10.9 → 2.10.11

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.
@@ -10,7 +10,6 @@ module.exports = function (content) {
10
10
  if (!mpx) {
11
11
  return content
12
12
  }
13
-
14
13
  const mode = mpx.mode
15
14
  const env = mpx.env
16
15
  const i18n = mpx.i18n
@@ -34,7 +34,7 @@
34
34
  import { ScrollView, RefreshControl, Gesture, GestureDetector } from 'react-native-gesture-handler';
35
35
  import { Animated as RNAnimated } from 'react-native';
36
36
  import { isValidElement, Children, useRef, useState, useEffect, forwardRef, useContext, useMemo, createElement } from 'react';
37
- import Animated, { useAnimatedRef, useSharedValue, withTiming, useAnimatedStyle, runOnJS } from 'react-native-reanimated';
37
+ import Animated, { useSharedValue, withTiming, useAnimatedStyle, runOnJS } from 'react-native-reanimated';
38
38
  import { warn, hasOwn } from '@mpxjs/utils';
39
39
  import useInnerProps, { getCustomEvent } from './getInnerListeners';
40
40
  import useNodesRef from './useNodesRef';
@@ -78,7 +78,7 @@ const _ScrollView = forwardRef((scrollViewProps = {}, ref) => {
78
78
  const hasRefresher = refresherContent && refresherEnabled;
79
79
  const { normalStyle, hasVarDec, varContextRef, hasSelfPercent, hasPositionFixed, setWidth, setHeight } = useTransformStyle(style, { enableVar, externalVarContext, parentFontSize, parentWidth, parentHeight });
80
80
  const { textStyle, innerStyle = {} } = splitStyle(normalStyle);
81
- const scrollViewRef = useAnimatedRef();
81
+ const scrollViewRef = useRef(null);
82
82
  useNodesRef(props, ref, scrollViewRef, {
83
83
  style: normalStyle,
84
84
  scrollOffset: scrollOptions,
@@ -34,7 +34,7 @@
34
34
  import { ScrollView, RefreshControl, Gesture, GestureDetector } from 'react-native-gesture-handler'
35
35
  import { View, NativeSyntheticEvent, NativeScrollEvent, LayoutChangeEvent, ViewStyle, Animated as RNAnimated } from 'react-native'
36
36
  import { isValidElement, Children, JSX, ReactNode, RefObject, useRef, useState, useEffect, forwardRef, useContext, useMemo, createElement } from 'react'
37
- import Animated, { useAnimatedRef, useSharedValue, withTiming, useAnimatedStyle, runOnJS } from 'react-native-reanimated'
37
+ import Animated, { useSharedValue, withTiming, useAnimatedStyle, runOnJS } from 'react-native-reanimated'
38
38
  import { warn, hasOwn } from '@mpxjs/utils'
39
39
  import useInnerProps, { getCustomEvent } from './getInnerListeners'
40
40
  import useNodesRef, { HandlerRef } from './useNodesRef'
@@ -209,7 +209,7 @@ const _ScrollView = forwardRef<HandlerRef<ScrollView & View, ScrollViewProps>, S
209
209
 
210
210
  const { textStyle, innerStyle = {} } = splitStyle(normalStyle)
211
211
 
212
- const scrollViewRef = useAnimatedRef<ScrollView>()
212
+ const scrollViewRef = useRef<ScrollView>(null)
213
213
  useNodesRef(props, ref, scrollViewRef, {
214
214
  style: normalStyle,
215
215
  scrollOffset: scrollOptions,
@@ -1,5 +1,4 @@
1
1
  import { useRef, useImperativeHandle, RefObject, ForwardedRef } from 'react'
2
- import { useAnimatedRef } from 'react-native-reanimated'
3
2
 
4
3
  type Obj = Record<string, any>
5
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mpxjs/webpack-plugin",
3
- "version": "2.10.9",
3
+ "version": "2.10.11",
4
4
  "description": "mpx compile core",
5
5
  "keywords": [
6
6
  "mpx"
@@ -100,5 +100,5 @@
100
100
  "engines": {
101
101
  "node": ">=14.14.0"
102
102
  },
103
- "gitHead": "be35dbe5958da40bf149768171798b4776e63937"
103
+ "gitHead": "4ea2a49ba7989edb3b0e292ed41e357d476d70fc"
104
104
  }