react-native-unistyles 3.0.24 → 3.1.0
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.
- package/android/src/main/cxx/NativeUnistylesModule.cpp +7 -4
- package/android/src/main/cxx/NativeUnistylesModule.h +9 -3
- package/android/src/main/cxx/cpp-adapter.cpp +1 -1
- package/android/src/main/java/com/unistyles/NativePlatform+android.kt +22 -4
- package/android/src/main/java/com/unistyles/UnistylesModule.kt +1 -0
- package/cxx/core/StyleSheetRegistry.cpp +11 -11
- package/cxx/core/StyleSheetRegistry.h +4 -4
- package/cxx/core/UnistylesRegistry.cpp +27 -14
- package/cxx/core/UnistylesRegistry.h +4 -1
- package/cxx/hybridObjects/HybridShadowRegistry.cpp +5 -0
- package/cxx/hybridObjects/HybridStyleSheet.cpp +2 -14
- package/cxx/hybridObjects/HybridStyleSheet.h +0 -2
- package/ios/UnistylesModuleOnLoad.mm +10 -2
- package/lib/commonjs/components/AdaptiveTheme.js +1 -1
- package/lib/commonjs/components/AdaptiveTheme.js.map +1 -1
- package/lib/commonjs/components/ApplyScopedTheme.js.map +1 -1
- package/lib/commonjs/components/Display.js.map +1 -1
- package/lib/commonjs/components/Hide.js.map +1 -1
- package/lib/commonjs/components/NamedTheme.js +2 -2
- package/lib/commonjs/components/NamedTheme.js.map +1 -1
- package/lib/commonjs/components/ScopedTheme.js.map +1 -1
- package/lib/commonjs/components/native/ActivityIndicator.js.map +1 -1
- package/lib/commonjs/components/native/Animated.js.map +1 -1
- package/lib/commonjs/components/native/FlatList.js.map +1 -1
- package/lib/commonjs/components/native/Image.js.map +1 -1
- package/lib/commonjs/components/native/Image.native.js.map +1 -1
- package/lib/commonjs/components/native/ImageBackground.js.map +1 -1
- package/lib/commonjs/components/native/ImageBackground.native.js.map +1 -1
- package/lib/commonjs/components/native/KeyboardAvoidingView.js.map +1 -1
- package/lib/commonjs/components/native/NativeText.native.js.map +1 -1
- package/lib/commonjs/components/native/NativeView.native.js.map +1 -1
- package/lib/commonjs/components/native/Pressable.js.map +1 -1
- package/lib/commonjs/components/native/Pressable.native.js.map +1 -1
- package/lib/commonjs/components/native/RefreshControl.js.map +1 -1
- package/lib/commonjs/components/native/SafeAreaView.js.map +1 -1
- package/lib/commonjs/components/native/ScrollView.js.map +1 -1
- package/lib/commonjs/components/native/SectionList.js.map +1 -1
- package/lib/commonjs/components/native/Switch.js.map +1 -1
- package/lib/commonjs/components/native/Text.js.map +1 -1
- package/lib/commonjs/components/native/TextInput.js.map +1 -1
- package/lib/commonjs/components/native/TouchableHighlight.js.map +1 -1
- package/lib/commonjs/components/native/TouchableOpacity.js.map +1 -1
- package/lib/commonjs/components/native/View.js.map +1 -1
- package/lib/commonjs/components/native/VirtualizedList.js.map +1 -1
- package/lib/commonjs/core/createUnistylesElement.js.map +1 -1
- package/lib/commonjs/core/createUnistylesElement.native.js.map +1 -1
- package/lib/commonjs/core/createUnistylesImageBackground.js.map +1 -1
- package/lib/commonjs/core/getClassname.js.map +1 -1
- package/lib/commonjs/core/parseBoxShadow.js.map +1 -1
- package/lib/commonjs/core/useProxifiedUnistyles/listener.js.map +1 -1
- package/lib/commonjs/core/useProxifiedUnistyles/listener.native.js +0 -1
- package/lib/commonjs/core/useProxifiedUnistyles/listener.native.js.map +1 -1
- package/lib/commonjs/core/useProxifiedUnistyles/useProxifiedUnistyles.js.map +1 -1
- package/lib/commonjs/core/useUnistyles.js.map +1 -1
- package/lib/commonjs/core/warn.js.map +1 -1
- package/lib/commonjs/core/withUnistyles/withUnistyles.js +3 -1
- package/lib/commonjs/core/withUnistyles/withUnistyles.js.map +1 -1
- package/lib/commonjs/core/withUnistyles/withUnistyles.native.js +6 -0
- package/lib/commonjs/core/withUnistyles/withUnistyles.native.js.map +1 -1
- package/lib/commonjs/hooks/useMedia.js.map +1 -1
- package/lib/commonjs/hooks/useMedia.native.js +0 -1
- package/lib/commonjs/hooks/useMedia.native.js.map +1 -1
- package/lib/commonjs/index.js +6 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/mocks.js +28 -8
- package/lib/commonjs/mocks.js.map +1 -1
- package/lib/commonjs/mq.js.map +1 -1
- package/lib/commonjs/reanimated/useAnimatedTheme.js.map +1 -1
- package/lib/commonjs/reanimated/useAnimatedTheme.native.js +0 -1
- package/lib/commonjs/reanimated/useAnimatedTheme.native.js.map +1 -1
- package/lib/commonjs/reanimated/variant/useAnimatedVariantColor.js.map +1 -1
- package/lib/commonjs/reanimated/variant/useUpdateVariantColor.js.map +1 -1
- package/lib/commonjs/reanimated/variant/useUpdateVariantColor.native.js +0 -1
- package/lib/commonjs/reanimated/variant/useUpdateVariantColor.native.js.map +1 -1
- package/lib/commonjs/server/getServerUnistyles.js.map +1 -1
- package/lib/commonjs/server/useServerUnistyles.js.map +1 -1
- package/lib/commonjs/specs/NativePlatform/NativePlatform.nitro.js.map +1 -1
- package/lib/commonjs/specs/ShadowRegistry/index.js +9 -5
- package/lib/commonjs/specs/ShadowRegistry/index.js.map +1 -1
- package/lib/commonjs/specs/StatusBar/index.js.map +1 -1
- package/lib/commonjs/specs/StyleSheet/index.js.map +1 -1
- package/lib/commonjs/specs/TurboUnistyles/NativeTurboUnistyles.js.map +1 -1
- package/lib/commonjs/specs/UnistylesRuntime/index.js.map +1 -1
- package/lib/commonjs/specs/index.native.js +1 -1
- package/lib/commonjs/specs/index.native.js.map +1 -1
- package/lib/commonjs/specs/types.js.map +1 -1
- package/lib/commonjs/types/index.js.map +1 -1
- package/lib/commonjs/types/stylesheet.js.map +1 -1
- package/lib/commonjs/utils.js.map +1 -1
- package/lib/commonjs/web/convert/index.js.map +1 -1
- package/lib/commonjs/web/convert/object/boxShadow.js.map +1 -1
- package/lib/commonjs/web/convert/object/filter.js.map +1 -1
- package/lib/commonjs/web/convert/object/objectStyle.js.map +1 -1
- package/lib/commonjs/web/convert/object/transform.js.map +1 -1
- package/lib/commonjs/web/convert/pseudo.js.map +1 -1
- package/lib/commonjs/web/convert/shadow/boxShadow.js.map +1 -1
- package/lib/commonjs/web/convert/shadow/getShadowBreakpoints.js.map +1 -1
- package/lib/commonjs/web/convert/shadow/textShadow.js.map +1 -1
- package/lib/commonjs/web/convert/types.js.map +1 -1
- package/lib/commonjs/web/convert/utils.js.map +1 -1
- package/lib/commonjs/web/create.js +1 -5
- package/lib/commonjs/web/create.js.map +1 -1
- package/lib/commonjs/web/css/core.js.map +1 -1
- package/lib/commonjs/web/css/state.js.map +1 -1
- package/lib/commonjs/web/css/utils.js.map +1 -1
- package/lib/commonjs/web/index.js +1 -0
- package/lib/commonjs/web/index.js.map +1 -1
- package/lib/commonjs/web/listener.js +29 -8
- package/lib/commonjs/web/listener.js.map +1 -1
- package/lib/commonjs/web/registry.js.map +1 -1
- package/lib/commonjs/web/runtime.js +1 -2
- package/lib/commonjs/web/runtime.js.map +1 -1
- package/lib/commonjs/web/shadowRegistry.js.map +1 -1
- package/lib/commonjs/web/state.js +3 -3
- package/lib/commonjs/web/state.js.map +1 -1
- package/lib/commonjs/web/utils/common.js.map +1 -1
- package/lib/commonjs/web/utils/createUnistylesRef.js.map +1 -1
- package/lib/commonjs/web/utils/unistyle.js +2 -0
- package/lib/commonjs/web/utils/unistyle.js.map +1 -1
- package/lib/commonjs/web/variants.js.map +1 -1
- package/lib/commonjs/web-only/getWebProps.js.map +1 -1
- package/lib/commonjs/web-only/index.js.map +1 -1
- package/lib/module/components/AdaptiveTheme.js +1 -1
- package/lib/module/components/AdaptiveTheme.js.map +1 -1
- package/lib/module/components/ApplyScopedTheme.js.map +1 -1
- package/lib/module/components/Display.js.map +1 -1
- package/lib/module/components/Hide.js.map +1 -1
- package/lib/module/components/NamedTheme.js +2 -2
- package/lib/module/components/NamedTheme.js.map +1 -1
- package/lib/module/components/ScopedTheme.js.map +1 -1
- package/lib/module/components/native/ActivityIndicator.js.map +1 -1
- package/lib/module/components/native/Animated.js.map +1 -1
- package/lib/module/components/native/FlatList.js.map +1 -1
- package/lib/module/components/native/Image.js.map +1 -1
- package/lib/module/components/native/Image.native.js.map +1 -1
- package/lib/module/components/native/ImageBackground.js.map +1 -1
- package/lib/module/components/native/ImageBackground.native.js.map +1 -1
- package/lib/module/components/native/KeyboardAvoidingView.js.map +1 -1
- package/lib/module/components/native/NativeText.native.js.map +1 -1
- package/lib/module/components/native/NativeView.native.js.map +1 -1
- package/lib/module/components/native/Pressable.js.map +1 -1
- package/lib/module/components/native/Pressable.native.js.map +1 -1
- package/lib/module/components/native/RefreshControl.js.map +1 -1
- package/lib/module/components/native/SafeAreaView.js.map +1 -1
- package/lib/module/components/native/ScrollView.js.map +1 -1
- package/lib/module/components/native/SectionList.js.map +1 -1
- package/lib/module/components/native/Switch.js.map +1 -1
- package/lib/module/components/native/Text.js.map +1 -1
- package/lib/module/components/native/TextInput.js.map +1 -1
- package/lib/module/components/native/TouchableHighlight.js.map +1 -1
- package/lib/module/components/native/TouchableOpacity.js.map +1 -1
- package/lib/module/components/native/View.js.map +1 -1
- package/lib/module/components/native/VirtualizedList.js.map +1 -1
- package/lib/module/core/createUnistylesElement.js.map +1 -1
- package/lib/module/core/createUnistylesElement.native.js.map +1 -1
- package/lib/module/core/createUnistylesImageBackground.js.map +1 -1
- package/lib/module/core/getClassname.js.map +1 -1
- package/lib/module/core/parseBoxShadow.js.map +1 -1
- package/lib/module/core/useProxifiedUnistyles/listener.js.map +1 -1
- package/lib/module/core/useProxifiedUnistyles/listener.native.js +0 -1
- package/lib/module/core/useProxifiedUnistyles/listener.native.js.map +1 -1
- package/lib/module/core/useProxifiedUnistyles/useProxifiedUnistyles.js.map +1 -1
- package/lib/module/core/useUnistyles.js.map +1 -1
- package/lib/module/core/warn.js.map +1 -1
- package/lib/module/core/withUnistyles/withUnistyles.js +3 -1
- package/lib/module/core/withUnistyles/withUnistyles.js.map +1 -1
- package/lib/module/core/withUnistyles/withUnistyles.native.js +6 -0
- package/lib/module/core/withUnistyles/withUnistyles.native.js.map +1 -1
- package/lib/module/hooks/useMedia.js.map +1 -1
- package/lib/module/hooks/useMedia.native.js +0 -1
- package/lib/module/hooks/useMedia.native.js.map +1 -1
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/mocks.js +28 -8
- package/lib/module/mocks.js.map +1 -1
- package/lib/module/mq.js.map +1 -1
- package/lib/module/reanimated/useAnimatedTheme.js.map +1 -1
- package/lib/module/reanimated/useAnimatedTheme.native.js +0 -1
- package/lib/module/reanimated/useAnimatedTheme.native.js.map +1 -1
- package/lib/module/reanimated/variant/useAnimatedVariantColor.js.map +1 -1
- package/lib/module/reanimated/variant/useUpdateVariantColor.js.map +1 -1
- package/lib/module/reanimated/variant/useUpdateVariantColor.native.js +0 -1
- package/lib/module/reanimated/variant/useUpdateVariantColor.native.js.map +1 -1
- package/lib/module/server/getServerUnistyles.js.map +1 -1
- package/lib/module/server/useServerUnistyles.js.map +1 -1
- package/lib/module/specs/NativePlatform/NativePlatform.nitro.js.map +1 -1
- package/lib/module/specs/ShadowRegistry/index.js +9 -5
- package/lib/module/specs/ShadowRegistry/index.js.map +1 -1
- package/lib/module/specs/StatusBar/index.js.map +1 -1
- package/lib/module/specs/StyleSheet/index.js.map +1 -1
- package/lib/module/specs/TurboUnistyles/NativeTurboUnistyles.js.map +1 -1
- package/lib/module/specs/UnistylesRuntime/index.js.map +1 -1
- package/lib/module/specs/index.native.js +1 -1
- package/lib/module/specs/index.native.js.map +1 -1
- package/lib/module/specs/types.js.map +1 -1
- package/lib/module/types/index.js.map +1 -1
- package/lib/module/types/stylesheet.js.map +1 -1
- package/lib/module/utils.js.map +1 -1
- package/lib/module/web/convert/index.js.map +1 -1
- package/lib/module/web/convert/object/boxShadow.js.map +1 -1
- package/lib/module/web/convert/object/filter.js.map +1 -1
- package/lib/module/web/convert/object/objectStyle.js.map +1 -1
- package/lib/module/web/convert/object/transform.js.map +1 -1
- package/lib/module/web/convert/pseudo.js.map +1 -1
- package/lib/module/web/convert/shadow/boxShadow.js.map +1 -1
- package/lib/module/web/convert/shadow/getShadowBreakpoints.js.map +1 -1
- package/lib/module/web/convert/shadow/textShadow.js.map +1 -1
- package/lib/module/web/convert/types.js.map +1 -1
- package/lib/module/web/convert/utils.js.map +1 -1
- package/lib/module/web/create.js +2 -6
- package/lib/module/web/create.js.map +1 -1
- package/lib/module/web/css/core.js.map +1 -1
- package/lib/module/web/css/state.js.map +1 -1
- package/lib/module/web/css/utils.js.map +1 -1
- package/lib/module/web/index.js +1 -0
- package/lib/module/web/index.js.map +1 -1
- package/lib/module/web/listener.js +29 -8
- package/lib/module/web/listener.js.map +1 -1
- package/lib/module/web/registry.js.map +1 -1
- package/lib/module/web/runtime.js +1 -2
- package/lib/module/web/runtime.js.map +1 -1
- package/lib/module/web/shadowRegistry.js.map +1 -1
- package/lib/module/web/state.js +3 -3
- package/lib/module/web/state.js.map +1 -1
- package/lib/module/web/utils/common.js.map +1 -1
- package/lib/module/web/utils/createUnistylesRef.js.map +1 -1
- package/lib/module/web/utils/unistyle.js +2 -0
- package/lib/module/web/utils/unistyle.js.map +1 -1
- package/lib/module/web/variants.js.map +1 -1
- package/lib/module/web-only/getWebProps.js.map +1 -1
- package/lib/module/web-only/index.js.map +1 -1
- package/lib/typescript/src/__tests__/mocks.spec.d.ts +2 -0
- package/lib/typescript/src/__tests__/mocks.spec.d.ts.map +1 -0
- package/lib/typescript/src/__tests__/web-listener.spec.d.ts +2 -0
- package/lib/typescript/src/__tests__/web-listener.spec.d.ts.map +1 -0
- package/lib/typescript/src/components/AdaptiveTheme.d.ts +1 -1
- package/lib/typescript/src/components/AdaptiveTheme.d.ts.map +1 -1
- package/lib/typescript/src/components/ApplyScopedTheme.d.ts.map +1 -1
- package/lib/typescript/src/components/Display.d.ts.map +1 -1
- package/lib/typescript/src/components/Hide.d.ts.map +1 -1
- package/lib/typescript/src/components/NamedTheme.d.ts +1 -1
- package/lib/typescript/src/components/NamedTheme.d.ts.map +1 -1
- package/lib/typescript/src/components/ScopedTheme.d.ts.map +1 -1
- package/lib/typescript/src/components/native/ActivityIndicator.d.ts.map +1 -1
- package/lib/typescript/src/components/native/Animated.d.ts.map +1 -1
- package/lib/typescript/src/components/native/FlatList.d.ts.map +1 -1
- package/lib/typescript/src/components/native/Image.d.ts.map +1 -1
- package/lib/typescript/src/components/native/Image.native.d.ts.map +1 -1
- package/lib/typescript/src/components/native/ImageBackground.d.ts.map +1 -1
- package/lib/typescript/src/components/native/ImageBackground.native.d.ts.map +1 -1
- package/lib/typescript/src/components/native/KeyboardAvoidingView.d.ts.map +1 -1
- package/lib/typescript/src/components/native/NativeText.native.d.ts.map +1 -1
- package/lib/typescript/src/components/native/NativeView.native.d.ts.map +1 -1
- package/lib/typescript/src/components/native/Pressable.d.ts +1 -1
- package/lib/typescript/src/components/native/Pressable.d.ts.map +1 -1
- package/lib/typescript/src/components/native/Pressable.native.d.ts +1 -1
- package/lib/typescript/src/components/native/Pressable.native.d.ts.map +1 -1
- package/lib/typescript/src/components/native/RefreshControl.d.ts.map +1 -1
- package/lib/typescript/src/components/native/SafeAreaView.d.ts.map +1 -1
- package/lib/typescript/src/components/native/ScrollView.d.ts.map +1 -1
- package/lib/typescript/src/components/native/SectionList.d.ts.map +1 -1
- package/lib/typescript/src/components/native/Switch.d.ts.map +1 -1
- package/lib/typescript/src/components/native/Text.d.ts.map +1 -1
- package/lib/typescript/src/components/native/TextInput.d.ts.map +1 -1
- package/lib/typescript/src/components/native/TouchableHighlight.d.ts.map +1 -1
- package/lib/typescript/src/components/native/TouchableOpacity.d.ts.map +1 -1
- package/lib/typescript/src/components/native/View.d.ts.map +1 -1
- package/lib/typescript/src/components/native/VirtualizedList.d.ts.map +1 -1
- package/lib/typescript/src/core/createUnistylesElement.d.ts.map +1 -1
- package/lib/typescript/src/core/createUnistylesElement.native.d.ts.map +1 -1
- package/lib/typescript/src/core/createUnistylesImageBackground.d.ts.map +1 -1
- package/lib/typescript/src/core/getClassname.d.ts.map +1 -1
- package/lib/typescript/src/core/parseBoxShadow.d.ts.map +1 -1
- package/lib/typescript/src/core/useProxifiedUnistyles/listener.d.ts.map +1 -1
- package/lib/typescript/src/core/useProxifiedUnistyles/listener.native.d.ts +1 -1
- package/lib/typescript/src/core/useProxifiedUnistyles/listener.native.d.ts.map +1 -1
- package/lib/typescript/src/core/useProxifiedUnistyles/types.d.ts.map +1 -1
- package/lib/typescript/src/core/useProxifiedUnistyles/useProxifiedUnistyles.d.ts +1 -1
- package/lib/typescript/src/core/useProxifiedUnistyles/useProxifiedUnistyles.d.ts.map +1 -1
- package/lib/typescript/src/core/useUnistyles.d.ts.map +1 -1
- package/lib/typescript/src/core/withUnistyles/types.d.ts +1 -1
- package/lib/typescript/src/core/withUnistyles/types.d.ts.map +1 -1
- package/lib/typescript/src/core/withUnistyles/withUnistyles.d.ts.map +1 -1
- package/lib/typescript/src/core/withUnistyles/withUnistyles.native.d.ts.map +1 -1
- package/lib/typescript/src/global.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useMedia.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useMedia.native.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/mq.d.ts.map +1 -1
- package/lib/typescript/src/reanimated/useAnimatedTheme.d.ts.map +1 -1
- package/lib/typescript/src/reanimated/useAnimatedTheme.native.d.ts.map +1 -1
- package/lib/typescript/src/reanimated/variant/types.d.ts.map +1 -1
- package/lib/typescript/src/reanimated/variant/useAnimatedVariantColor.d.ts.map +1 -1
- package/lib/typescript/src/reanimated/variant/useUpdateVariantColor.d.ts +1 -1
- package/lib/typescript/src/reanimated/variant/useUpdateVariantColor.d.ts.map +1 -1
- package/lib/typescript/src/reanimated/variant/useUpdateVariantColor.native.d.ts +1 -1
- package/lib/typescript/src/reanimated/variant/useUpdateVariantColor.native.d.ts.map +1 -1
- package/lib/typescript/src/server/getServerUnistyles.d.ts +1 -1
- package/lib/typescript/src/server/getServerUnistyles.d.ts.map +1 -1
- package/lib/typescript/src/server/types.d.ts.map +1 -1
- package/lib/typescript/src/server/useServerUnistyles.d.ts.map +1 -1
- package/lib/typescript/src/specs/NativePlatform/NativePlatform.nitro.d.ts.map +1 -1
- package/lib/typescript/src/specs/NavigtionBar/UnistylesNavigationBar.nitro.d.ts.map +1 -1
- package/lib/typescript/src/specs/ShadowRegistry/index.d.ts.map +1 -1
- package/lib/typescript/src/specs/ShadowRegistry/types.d.ts +4 -5
- package/lib/typescript/src/specs/ShadowRegistry/types.d.ts.map +1 -1
- package/lib/typescript/src/specs/StatusBar/UnistylesStatusBar.nitro.d.ts.map +1 -1
- package/lib/typescript/src/specs/StatusBar/index.d.ts +1 -1
- package/lib/typescript/src/specs/StatusBar/index.d.ts.map +1 -1
- package/lib/typescript/src/specs/StyleSheet/UnistylesStyleSheet.nitro.d.ts +0 -1
- package/lib/typescript/src/specs/StyleSheet/UnistylesStyleSheet.nitro.d.ts.map +1 -1
- package/lib/typescript/src/specs/StyleSheet/index.d.ts +3 -3
- package/lib/typescript/src/specs/StyleSheet/index.d.ts.map +1 -1
- package/lib/typescript/src/specs/UnistylesRuntime/UnistylesRuntime.nitro.d.ts.map +1 -1
- package/lib/typescript/src/specs/UnistylesRuntime/index.d.ts +1 -1
- package/lib/typescript/src/specs/UnistylesRuntime/index.d.ts.map +1 -1
- package/lib/typescript/src/specs/index.native.d.ts +4 -4
- package/lib/typescript/src/specs/index.native.d.ts.map +1 -1
- package/lib/typescript/src/specs/types.d.ts.map +1 -1
- package/lib/typescript/src/types/breakpoints.d.ts +2 -2
- package/lib/typescript/src/types/breakpoints.d.ts.map +1 -1
- package/lib/typescript/src/types/core.d.ts.map +1 -1
- package/lib/typescript/src/types/index.d.ts +1 -1
- package/lib/typescript/src/types/index.d.ts.map +1 -1
- package/lib/typescript/src/types/stylesheet.d.ts +1 -1
- package/lib/typescript/src/types/stylesheet.d.ts.map +1 -1
- package/lib/typescript/src/types/variants.d.ts.map +1 -1
- package/lib/typescript/src/utils.d.ts.map +1 -1
- package/lib/typescript/src/web/convert/index.d.ts.map +1 -1
- package/lib/typescript/src/web/convert/object/boxShadow.d.ts.map +1 -1
- package/lib/typescript/src/web/convert/object/filter.d.ts.map +1 -1
- package/lib/typescript/src/web/convert/object/objectStyle.d.ts.map +1 -1
- package/lib/typescript/src/web/convert/object/transform.d.ts.map +1 -1
- package/lib/typescript/src/web/convert/pseudo.d.ts.map +1 -1
- package/lib/typescript/src/web/convert/types.d.ts +2 -2
- package/lib/typescript/src/web/convert/types.d.ts.map +1 -1
- package/lib/typescript/src/web/convert/utils.d.ts.map +1 -1
- package/lib/typescript/src/web/create.d.ts +1 -1
- package/lib/typescript/src/web/create.d.ts.map +1 -1
- package/lib/typescript/src/web/css/core.d.ts.map +1 -1
- package/lib/typescript/src/web/css/state.d.ts.map +1 -1
- package/lib/typescript/src/web/css/utils.d.ts.map +1 -1
- package/lib/typescript/src/web/index.d.ts.map +1 -1
- package/lib/typescript/src/web/listener.d.ts +5 -1
- package/lib/typescript/src/web/listener.d.ts.map +1 -1
- package/lib/typescript/src/web/registry.d.ts +1 -1
- package/lib/typescript/src/web/registry.d.ts.map +1 -1
- package/lib/typescript/src/web/runtime.d.ts +1 -1
- package/lib/typescript/src/web/runtime.d.ts.map +1 -1
- package/lib/typescript/src/web/shadowRegistry.d.ts.map +1 -1
- package/lib/typescript/src/web/state.d.ts.map +1 -1
- package/lib/typescript/src/web/types.d.ts +1 -1
- package/lib/typescript/src/web/types.d.ts.map +1 -1
- package/lib/typescript/src/web/utils/common.d.ts.map +1 -1
- package/lib/typescript/src/web/utils/createUnistylesRef.d.ts.map +1 -1
- package/lib/typescript/src/web/utils/unistyle.d.ts +1 -1
- package/lib/typescript/src/web/utils/unistyle.d.ts.map +1 -1
- package/lib/typescript/src/web/variants.d.ts.map +1 -1
- package/lib/typescript/src/web-only/getWebProps.d.ts.map +1 -1
- package/lib/typescript/src/web-only/index.d.ts.map +1 -1
- package/nitrogen/generated/android/c++/JHybridNativePlatformSpec.cpp +36 -42
- package/nitrogen/generated/android/c++/JHybridNativePlatformSpec.hpp +19 -22
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/HybridNativePlatformSpec.kt +15 -18
- package/nitrogen/generated/android/unistylesOnLoad.cpp +14 -9
- package/nitrogen/generated/android/unistylesOnLoad.hpp +13 -4
- package/nitrogen/generated/shared/c++/HybridUnistylesStyleSheetSpec.cpp +0 -1
- package/nitrogen/generated/shared/c++/HybridUnistylesStyleSheetSpec.hpp +0 -1
- package/package.json +43 -44
- package/plugin/index.d.ts +34 -28
- package/plugin/index.js +113 -103
- package/repack-plugin/index.d.ts +2 -2
- package/src/components/AdaptiveTheme.tsx +8 -12
- package/src/components/ApplyScopedTheme.tsx +2 -0
- package/src/components/Display.tsx +2 -3
- package/src/components/Hide.tsx +2 -3
- package/src/components/NamedTheme.tsx +9 -14
- package/src/components/ScopedTheme.tsx +22 -27
- package/src/components/native/ActivityIndicator.tsx +1 -0
- package/src/components/native/Animated.tsx +2 -1
- package/src/components/native/FlatList.tsx +1 -0
- package/src/components/native/Image.native.tsx +1 -0
- package/src/components/native/Image.tsx +11 -7
- package/src/components/native/ImageBackground.native.tsx +1 -0
- package/src/components/native/ImageBackground.tsx +11 -7
- package/src/components/native/KeyboardAvoidingView.tsx +1 -0
- package/src/components/native/NativeText.native.tsx +3 -1
- package/src/components/native/NativeView.native.tsx +3 -1
- package/src/components/native/Pressable.native.tsx +8 -8
- package/src/components/native/Pressable.tsx +25 -20
- package/src/components/native/RefreshControl.tsx +1 -0
- package/src/components/native/SafeAreaView.tsx +1 -0
- package/src/components/native/ScrollView.tsx +1 -0
- package/src/components/native/SectionList.tsx +1 -0
- package/src/components/native/Switch.tsx +1 -0
- package/src/components/native/Text.tsx +1 -0
- package/src/components/native/TextInput.tsx +1 -0
- package/src/components/native/TouchableHighlight.tsx +1 -0
- package/src/components/native/TouchableOpacity.tsx +1 -0
- package/src/components/native/View.tsx +1 -0
- package/src/components/native/VirtualizedList.tsx +1 -0
- package/src/core/createUnistylesElement.native.tsx +4 -2
- package/src/core/createUnistylesElement.tsx +14 -17
- package/src/core/createUnistylesImageBackground.tsx +6 -4
- package/src/core/getClassname.ts +4 -11
- package/src/core/parseBoxShadow.ts +11 -24
- package/src/core/passForwardRef.ts +1 -1
- package/src/core/useProxifiedUnistyles/listener.native.ts +3 -3
- package/src/core/useProxifiedUnistyles/listener.ts +10 -3
- package/src/core/useProxifiedUnistyles/types.ts +2 -2
- package/src/core/useProxifiedUnistyles/useProxifiedUnistyles.ts +13 -9
- package/src/core/useUnistyles.ts +2 -1
- package/src/core/warn.ts +4 -4
- package/src/core/withUnistyles/types.ts +7 -4
- package/src/core/withUnistyles/withUnistyles.native.tsx +53 -44
- package/src/core/withUnistyles/withUnistyles.tsx +30 -24
- package/src/global.ts +2 -2
- package/src/hooks/useMedia.native.ts +2 -2
- package/src/hooks/useMedia.ts +6 -3
- package/src/index.ts +1 -0
- package/src/mocks.ts +74 -49
- package/src/mq.ts +23 -15
- package/src/reanimated/useAnimatedTheme.native.ts +4 -3
- package/src/reanimated/useAnimatedTheme.ts +6 -2
- package/src/reanimated/variant/types.ts +11 -10
- package/src/reanimated/variant/useAnimatedVariantColor.ts +7 -7
- package/src/reanimated/variant/useUpdateVariantColor.native.ts +10 -6
- package/src/reanimated/variant/useUpdateVariantColor.ts +21 -21
- package/src/server/getServerUnistyles.tsx +11 -4
- package/src/server/index.ts +0 -1
- package/src/server/types.ts +1 -1
- package/src/server/useServerUnistyles.tsx +4 -1
- package/src/specs/NativePlatform/NativePlatform.nitro.ts +30 -27
- package/src/specs/NavigtionBar/UnistylesNavigationBar.nitro.ts +3 -3
- package/src/specs/ShadowRegistry/ShadowRegistry.nitro.ts +1 -1
- package/src/specs/ShadowRegistry/index.ts +35 -29
- package/src/specs/ShadowRegistry/types.ts +9 -10
- package/src/specs/StatusBar/UnistylesStatusBar.nitro.ts +4 -4
- package/src/specs/StatusBar/index.ts +5 -5
- package/src/specs/StyleSheet/UnistylesStyleSheet.nitro.ts +2 -2
- package/src/specs/StyleSheet/index.ts +32 -27
- package/src/specs/TurboUnistyles/NativeTurboUnistyles.ts +1 -0
- package/src/specs/UnistylesRuntime/UnistylesRuntime.nitro.ts +26 -25
- package/src/specs/UnistylesRuntime/index.ts +20 -20
- package/src/specs/index.native.ts +6 -18
- package/src/specs/types.ts +9 -8
- package/src/types/accessibility.ts +2 -2
- package/src/types/breakpoints.ts +61 -59
- package/src/types/core.ts +17 -17
- package/src/types/index.ts +2 -9
- package/src/types/stylesheet.ts +27 -19
- package/src/types/variants.ts +3 -11
- package/src/utils.ts +16 -16
- package/src/web/convert/index.ts +6 -2
- package/src/web/convert/object/boxShadow.ts +23 -18
- package/src/web/convert/object/filter.ts +30 -13
- package/src/web/convert/object/objectStyle.ts +33 -23
- package/src/web/convert/object/transform.ts +10 -8
- package/src/web/convert/pseudo.ts +2 -2
- package/src/web/convert/shadow/boxShadow.ts +6 -6
- package/src/web/convert/shadow/getShadowBreakpoints.ts +4 -4
- package/src/web/convert/shadow/textShadow.ts +6 -6
- package/src/web/convert/style.ts +25 -25
- package/src/web/convert/types.ts +4 -3
- package/src/web/convert/utils.ts +20 -10
- package/src/web/create.ts +29 -20
- package/src/web/css/core.ts +2 -1
- package/src/web/css/state.ts +11 -8
- package/src/web/css/utils.ts +2 -1
- package/src/web/index.ts +7 -4
- package/src/web/listener.ts +61 -18
- package/src/web/mock.ts +2 -2
- package/src/web/registry.ts +17 -10
- package/src/web/runtime.ts +23 -17
- package/src/web/shadowRegistry.ts +26 -24
- package/src/web/state.ts +23 -16
- package/src/web/types.ts +5 -5
- package/src/web/utils/common.ts +7 -9
- package/src/web/utils/createUnistylesRef.ts +18 -14
- package/src/web/utils/unistyle.ts +53 -34
- package/src/web/variants.ts +19 -11
- package/src/web-only/getWebProps.ts +5 -6
- package/src/web-only/index.ts +0 -1
- package/LICENSE +0 -20
- package/README.md +0 -178
- package/lib/typescript/plugin/src/consts.d.ts +0 -17
- package/lib/typescript/plugin/src/consts.d.ts.map +0 -1
- package/lib/typescript/repack-plugin/src/index.d.ts +0 -18
- package/lib/typescript/repack-plugin/src/index.d.ts.map +0 -1
- package/lib/typescript/repack-plugin/src/loader.d.ts +0 -9
- package/lib/typescript/repack-plugin/src/loader.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unistyle.d.ts","sourceRoot":"","sources":["../../../../../src/web/utils/unistyle.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"unistyle.d.ts","sourceRoot":"","sources":["../../../../../src/web/utils/unistyle.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAA;AACzF,OAAO,KAAK,EAAE,UAAU,EAAE,yBAAyB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACpG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAElD,OAAO,EAAE,WAAW,EAAe,MAAM,mBAAmB,CAAA;AAG5D,OAAO,EAA4C,KAAK,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAG3F,eAAO,MAAM,aAAa,GAAI,QAAQ,WAAW,qBAQhD,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC1B,iBAAiB,EAAE,yBAAyB,CAAC,UAAU,CAAC,CAAA;IACxD,UAAU,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAA;IACxB,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,CAAA;CACrE,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,CAAC,EAAE,QAAQ,CAAC,EAAE,SAAS,eAAe,MAcnE,CAAA;AAED,eAAO,MAAM,cAAc,GAAI,QAAQ,GAAG;;aAYzC,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,QAAQ,eAAe,OAazD,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,OAAO,MAAM,EAAE,gBAAgB,KAAK,CAAC,MAAM,CAAC,WAiCzE,CAAA;AAED,eAAO,MAAM,2BAA2B,GAAI,OAAO,GAAG,yBAUrD,CAAA;AAED,eAAO,MAAM,YAAY,GAAI,OAAO,GAAG,EAAE,MAAM,MAAM,KAAG,OAUvD,CAAA;AAED,eAAO,MAAM,gBAAgB,GAAI,OAAO,GAAG,KAAG,OAe7C,CAAA;AAED,eAAO,MAAM,mBAAmB,GAAI,OAAO,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAG,KAAK,IAAI,iBAIzE,CAAA;AAED,eAAO,MAAM,YAAY,GAAI,KAAK,MAAM,EAAE,OAAO,GAAG,EAAE,aAAU,KAAG,CAAC,MAAM,EAAE,GAAG,CAiB9E,CAAA;AAED,eAAO,MAAM,yBAAyB,GAAI,CAAC,EACvC,SAAS,gBAAgB,EACzB,QAAQ,OAAO,CAAC,MAAM,CAAC,MAAM,oBAAoB,EAAE,CAAC,CAAC,CAAC,kBAgBzD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variants.d.ts","sourceRoot":"","sources":["../../../../src/web/variants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"variants.d.ts","sourceRoot":"","sources":["../../../../src/web/variants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAiB/C,eAAO,MAAM,WAAW,GAAI,QAAQ,eAAe,EAAE,kBAAkB,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,2DAgCzF,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getWebProps.d.ts","sourceRoot":"","sources":["../../../../src/web-only/getWebProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE7C,OAAO,KAAK,EAAE,OAAO,EAAmB,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"getWebProps.d.ts","sourceRoot":"","sources":["../../../../src/web-only/getWebProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE7C,OAAO,KAAK,EAAE,OAAO,EAAmB,MAAM,UAAU,CAAA;AAKxD,eAAO,MAAM,WAAW,GAAI,CAAC,EAAE,OAAO,SAAS,CAAC,OAAO,CAAC,EAAE,eAAe,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;;;CAS7F,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/web-only/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/web-only/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA"}
|
|
@@ -41,37 +41,31 @@ namespace margelo::nitro::unistyles { enum class UnistyleDependency; }
|
|
|
41
41
|
|
|
42
42
|
namespace margelo::nitro::unistyles {
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
});
|
|
44
|
+
std::shared_ptr<JHybridNativePlatformSpec> JHybridNativePlatformSpec::JavaPart::getJHybridNativePlatformSpec() {
|
|
45
|
+
auto hybridObject = JHybridObject::JavaPart::getJHybridObject();
|
|
46
|
+
auto castHybridObject = std::dynamic_pointer_cast<JHybridNativePlatformSpec>(hybridObject);
|
|
47
|
+
if (castHybridObject == nullptr) [[unlikely]] {
|
|
48
|
+
throw std::runtime_error("Failed to downcast JHybridObject to JHybridNativePlatformSpec!");
|
|
49
|
+
}
|
|
50
|
+
return castHybridObject;
|
|
52
51
|
}
|
|
53
52
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
return method(_javaPart);
|
|
53
|
+
jni::local_ref<JHybridNativePlatformSpec::CxxPart::jhybriddata> JHybridNativePlatformSpec::CxxPart::initHybrid(jni::alias_ref<jhybridobject> jThis) {
|
|
54
|
+
return makeCxxInstance(jThis);
|
|
57
55
|
}
|
|
58
56
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
57
|
+
std::shared_ptr<JHybridObject> JHybridNativePlatformSpec::CxxPart::createHybridObject(const jni::local_ref<JHybridObject::JavaPart>& javaPart) {
|
|
58
|
+
auto castJavaPart = jni::dynamic_ref_cast<JHybridNativePlatformSpec::JavaPart>(javaPart);
|
|
59
|
+
if (castJavaPart == nullptr) [[unlikely]] {
|
|
60
|
+
throw std::runtime_error("Failed to cast JHybridObject::JavaPart to JHybridNativePlatformSpec::JavaPart!");
|
|
62
61
|
}
|
|
63
|
-
return
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
void JHybridNativePlatformSpec::dispose() noexcept {
|
|
67
|
-
static const auto method = javaClassStatic()->getMethod<void()>("dispose");
|
|
68
|
-
method(_javaPart);
|
|
62
|
+
return std::make_shared<JHybridNativePlatformSpec>(castJavaPart);
|
|
69
63
|
}
|
|
70
64
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
65
|
+
void JHybridNativePlatformSpec::CxxPart::registerNatives() {
|
|
66
|
+
registerHybrid({
|
|
67
|
+
makeNativeMethod("initHybrid", JHybridNativePlatformSpec::CxxPart::initHybrid),
|
|
68
|
+
});
|
|
75
69
|
}
|
|
76
70
|
|
|
77
71
|
// Properties
|
|
@@ -79,86 +73,86 @@ namespace margelo::nitro::unistyles {
|
|
|
79
73
|
|
|
80
74
|
// Methods
|
|
81
75
|
Insets JHybridNativePlatformSpec::getInsets() {
|
|
82
|
-
static const auto method = javaClassStatic()->getMethod<jni::local_ref<JInsets>()>("getInsets");
|
|
76
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JInsets>()>("getInsets");
|
|
83
77
|
auto __result = method(_javaPart);
|
|
84
78
|
return __result->toCpp();
|
|
85
79
|
}
|
|
86
80
|
ColorScheme JHybridNativePlatformSpec::getColorScheme() {
|
|
87
|
-
static const auto method = javaClassStatic()->getMethod<jni::local_ref<JColorScheme>()>("getColorScheme");
|
|
81
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JColorScheme>()>("getColorScheme");
|
|
88
82
|
auto __result = method(_javaPart);
|
|
89
83
|
return __result->toCpp();
|
|
90
84
|
}
|
|
91
85
|
double JHybridNativePlatformSpec::getFontScale() {
|
|
92
|
-
static const auto method = javaClassStatic()->getMethod<double()>("getFontScale");
|
|
86
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("getFontScale");
|
|
93
87
|
auto __result = method(_javaPart);
|
|
94
88
|
return __result;
|
|
95
89
|
}
|
|
96
90
|
double JHybridNativePlatformSpec::getPixelRatio() {
|
|
97
|
-
static const auto method = javaClassStatic()->getMethod<double()>("getPixelRatio");
|
|
91
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<double()>("getPixelRatio");
|
|
98
92
|
auto __result = method(_javaPart);
|
|
99
93
|
return __result;
|
|
100
94
|
}
|
|
101
95
|
Orientation JHybridNativePlatformSpec::getOrientation() {
|
|
102
|
-
static const auto method = javaClassStatic()->getMethod<jni::local_ref<JOrientation>()>("getOrientation");
|
|
96
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JOrientation>()>("getOrientation");
|
|
103
97
|
auto __result = method(_javaPart);
|
|
104
98
|
return __result->toCpp();
|
|
105
99
|
}
|
|
106
100
|
std::string JHybridNativePlatformSpec::getContentSizeCategory() {
|
|
107
|
-
static const auto method = javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getContentSizeCategory");
|
|
101
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getContentSizeCategory");
|
|
108
102
|
auto __result = method(_javaPart);
|
|
109
103
|
return __result->toStdString();
|
|
110
104
|
}
|
|
111
105
|
Dimensions JHybridNativePlatformSpec::getScreenDimensions() {
|
|
112
|
-
static const auto method = javaClassStatic()->getMethod<jni::local_ref<JDimensions>()>("getScreenDimensions");
|
|
106
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JDimensions>()>("getScreenDimensions");
|
|
113
107
|
auto __result = method(_javaPart);
|
|
114
108
|
return __result->toCpp();
|
|
115
109
|
}
|
|
116
110
|
Dimensions JHybridNativePlatformSpec::getStatusBarDimensions() {
|
|
117
|
-
static const auto method = javaClassStatic()->getMethod<jni::local_ref<JDimensions>()>("getStatusBarDimensions");
|
|
111
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JDimensions>()>("getStatusBarDimensions");
|
|
118
112
|
auto __result = method(_javaPart);
|
|
119
113
|
return __result->toCpp();
|
|
120
114
|
}
|
|
121
115
|
Dimensions JHybridNativePlatformSpec::getNavigationBarDimensions() {
|
|
122
|
-
static const auto method = javaClassStatic()->getMethod<jni::local_ref<JDimensions>()>("getNavigationBarDimensions");
|
|
116
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JDimensions>()>("getNavigationBarDimensions");
|
|
123
117
|
auto __result = method(_javaPart);
|
|
124
118
|
return __result->toCpp();
|
|
125
119
|
}
|
|
126
120
|
bool JHybridNativePlatformSpec::getPrefersRtlDirection() {
|
|
127
|
-
static const auto method = javaClassStatic()->getMethod<jboolean()>("getPrefersRtlDirection");
|
|
121
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<jboolean()>("getPrefersRtlDirection");
|
|
128
122
|
auto __result = method(_javaPart);
|
|
129
123
|
return static_cast<bool>(__result);
|
|
130
124
|
}
|
|
131
125
|
void JHybridNativePlatformSpec::setRootViewBackgroundColor(double color) {
|
|
132
|
-
static const auto method = javaClassStatic()->getMethod<void(double /* color */)>("setRootViewBackgroundColor");
|
|
126
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(double /* color */)>("setRootViewBackgroundColor");
|
|
133
127
|
method(_javaPart, color);
|
|
134
128
|
}
|
|
135
129
|
void JHybridNativePlatformSpec::setNavigationBarHidden(bool isHidden) {
|
|
136
|
-
static const auto method = javaClassStatic()->getMethod<void(jboolean /* isHidden */)>("setNavigationBarHidden");
|
|
130
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jboolean /* isHidden */)>("setNavigationBarHidden");
|
|
137
131
|
method(_javaPart, isHidden);
|
|
138
132
|
}
|
|
139
133
|
void JHybridNativePlatformSpec::setStatusBarHidden(bool isHidden) {
|
|
140
|
-
static const auto method = javaClassStatic()->getMethod<void(jboolean /* isHidden */)>("setStatusBarHidden");
|
|
134
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jboolean /* isHidden */)>("setStatusBarHidden");
|
|
141
135
|
method(_javaPart, isHidden);
|
|
142
136
|
}
|
|
143
137
|
void JHybridNativePlatformSpec::setImmersiveMode(bool isEnabled) {
|
|
144
|
-
static const auto method = javaClassStatic()->getMethod<void(jboolean /* isEnabled */)>("setImmersiveMode");
|
|
138
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jboolean /* isEnabled */)>("setImmersiveMode");
|
|
145
139
|
method(_javaPart, isEnabled);
|
|
146
140
|
}
|
|
147
141
|
UnistylesNativeMiniRuntime JHybridNativePlatformSpec::getMiniRuntime() {
|
|
148
|
-
static const auto method = javaClassStatic()->getMethod<jni::local_ref<JUnistylesNativeMiniRuntime>()>("getMiniRuntime");
|
|
142
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JUnistylesNativeMiniRuntime>()>("getMiniRuntime");
|
|
149
143
|
auto __result = method(_javaPart);
|
|
150
144
|
return __result->toCpp();
|
|
151
145
|
}
|
|
152
146
|
void JHybridNativePlatformSpec::registerPlatformListener(const std::function<void(const std::vector<UnistyleDependency>& /* dependencies */, const UnistylesNativeMiniRuntime& /* miniRuntime */)>& callback) {
|
|
153
|
-
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime::javaobject> /* callback */)>("registerPlatformListener_cxx");
|
|
147
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime::javaobject> /* callback */)>("registerPlatformListener_cxx");
|
|
154
148
|
method(_javaPart, JFunc_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime_cxx::fromCpp(callback));
|
|
155
149
|
}
|
|
156
150
|
void JHybridNativePlatformSpec::registerImeListener(const std::function<void(const UnistylesNativeMiniRuntime& /* miniRuntime */)>& callback) {
|
|
157
|
-
static const auto method = javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_UnistylesNativeMiniRuntime::javaobject> /* callback */)>("registerImeListener_cxx");
|
|
151
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_UnistylesNativeMiniRuntime::javaobject> /* callback */)>("registerImeListener_cxx");
|
|
158
152
|
method(_javaPart, JFunc_void_UnistylesNativeMiniRuntime_cxx::fromCpp(callback));
|
|
159
153
|
}
|
|
160
154
|
void JHybridNativePlatformSpec::unregisterPlatformListeners() {
|
|
161
|
-
static const auto method = javaClassStatic()->getMethod<void()>("unregisterPlatformListeners");
|
|
155
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void()>("unregisterPlatformListeners");
|
|
162
156
|
method(_javaPart);
|
|
163
157
|
}
|
|
164
158
|
|
|
@@ -18,34 +18,33 @@ namespace margelo::nitro::unistyles {
|
|
|
18
18
|
|
|
19
19
|
using namespace facebook;
|
|
20
20
|
|
|
21
|
-
class JHybridNativePlatformSpec: public
|
|
22
|
-
public virtual HybridNativePlatformSpec {
|
|
21
|
+
class JHybridNativePlatformSpec: public virtual HybridNativePlatformSpec, public virtual JHybridObject {
|
|
23
22
|
public:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
HybridBase
|
|
33
|
-
|
|
23
|
+
struct JavaPart: public jni::JavaClass<JavaPart, JHybridObject::JavaPart> {
|
|
24
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/unistyles/HybridNativePlatformSpec;";
|
|
25
|
+
std::shared_ptr<JHybridNativePlatformSpec> getJHybridNativePlatformSpec();
|
|
26
|
+
};
|
|
27
|
+
struct CxxPart: public jni::HybridClass<CxxPart, JHybridObject::CxxPart> {
|
|
28
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/unistyles/HybridNativePlatformSpec$CxxPart;";
|
|
29
|
+
static jni::local_ref<jhybriddata> initHybrid(jni::alias_ref<jhybridobject> jThis);
|
|
30
|
+
static void registerNatives();
|
|
31
|
+
using HybridBase::HybridBase;
|
|
32
|
+
protected:
|
|
33
|
+
std::shared_ptr<JHybridObject> createHybridObject(const jni::local_ref<JHybridObject::JavaPart>& javaPart) override;
|
|
34
|
+
};
|
|
34
35
|
|
|
35
36
|
public:
|
|
37
|
+
explicit JHybridNativePlatformSpec(const jni::local_ref<JHybridNativePlatformSpec::JavaPart>& javaPart):
|
|
38
|
+
HybridObject(HybridNativePlatformSpec::TAG),
|
|
39
|
+
JHybridObject(javaPart),
|
|
40
|
+
_javaPart(jni::make_global(javaPart)) {}
|
|
36
41
|
~JHybridNativePlatformSpec() override {
|
|
37
42
|
// Hermes GC can destroy JS objects on a non-JNI Thread.
|
|
38
43
|
jni::ThreadScope::WithClassLoader([&] { _javaPart.reset(); });
|
|
39
44
|
}
|
|
40
45
|
|
|
41
46
|
public:
|
|
42
|
-
|
|
43
|
-
bool equals(const std::shared_ptr<HybridObject>& other) override;
|
|
44
|
-
void dispose() noexcept override;
|
|
45
|
-
std::string toString() override;
|
|
46
|
-
|
|
47
|
-
public:
|
|
48
|
-
inline const jni::global_ref<JHybridNativePlatformSpec::javaobject>& getJavaPart() const noexcept {
|
|
47
|
+
inline const jni::global_ref<JHybridNativePlatformSpec::JavaPart>& getJavaPart() const noexcept {
|
|
49
48
|
return _javaPart;
|
|
50
49
|
}
|
|
51
50
|
|
|
@@ -75,9 +74,7 @@ namespace margelo::nitro::unistyles {
|
|
|
75
74
|
void unregisterPlatformListeners() override;
|
|
76
75
|
|
|
77
76
|
private:
|
|
78
|
-
|
|
79
|
-
using HybridBase::HybridBase;
|
|
80
|
-
jni::global_ref<JHybridNativePlatformSpec::javaobject> _javaPart;
|
|
77
|
+
jni::global_ref<JHybridNativePlatformSpec::JavaPart> _javaPart;
|
|
81
78
|
};
|
|
82
79
|
|
|
83
80
|
} // namespace margelo::nitro::unistyles
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/HybridNativePlatformSpec.kt
CHANGED
|
@@ -24,23 +24,6 @@ import com.margelo.nitro.core.HybridObject
|
|
|
24
24
|
"LocalVariableName", "PropertyName", "PrivatePropertyName", "FunctionName"
|
|
25
25
|
)
|
|
26
26
|
abstract class HybridNativePlatformSpec: HybridObject() {
|
|
27
|
-
@DoNotStrip
|
|
28
|
-
private var mHybridData: HybridData = initHybrid()
|
|
29
|
-
|
|
30
|
-
init {
|
|
31
|
-
super.updateNative(mHybridData)
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
override fun updateNative(hybridData: HybridData) {
|
|
35
|
-
mHybridData = hybridData
|
|
36
|
-
super.updateNative(hybridData)
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// Default implementation of `HybridObject.toString()`
|
|
40
|
-
override fun toString(): String {
|
|
41
|
-
return "[HybridObject NativePlatform]"
|
|
42
|
-
}
|
|
43
|
-
|
|
44
27
|
// Properties
|
|
45
28
|
|
|
46
29
|
|
|
@@ -127,7 +110,21 @@ abstract class HybridNativePlatformSpec: HybridObject() {
|
|
|
127
110
|
@Keep
|
|
128
111
|
abstract fun unregisterPlatformListeners(): Unit
|
|
129
112
|
|
|
130
|
-
|
|
113
|
+
// Default implementation of `HybridObject.toString()`
|
|
114
|
+
override fun toString(): String {
|
|
115
|
+
return "[HybridObject NativePlatform]"
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// C++ backing class
|
|
119
|
+
@DoNotStrip
|
|
120
|
+
@Keep
|
|
121
|
+
protected open class CxxPart(javaPart: HybridNativePlatformSpec): HybridObject.CxxPart(javaPart) {
|
|
122
|
+
// C++ JHybridNativePlatformSpec::CxxPart::initHybrid(...)
|
|
123
|
+
external override fun initHybrid(): HybridData
|
|
124
|
+
}
|
|
125
|
+
override fun createCxxPart(): CxxPart {
|
|
126
|
+
return CxxPart(this)
|
|
127
|
+
}
|
|
131
128
|
|
|
132
129
|
companion object {
|
|
133
130
|
protected const val TAG = "HybridNativePlatformSpec"
|
|
@@ -22,19 +22,24 @@
|
|
|
22
22
|
namespace margelo::nitro::unistyles {
|
|
23
23
|
|
|
24
24
|
int initialize(JavaVM* vm) {
|
|
25
|
+
return facebook::jni::initialize(vm, []() {
|
|
26
|
+
::margelo::nitro::unistyles::registerAllNatives();
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
void registerAllNatives() {
|
|
25
33
|
using namespace margelo::nitro;
|
|
26
34
|
using namespace margelo::nitro::unistyles;
|
|
27
|
-
using namespace facebook;
|
|
28
35
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
margelo::nitro::unistyles::JFunc_void_UnistylesNativeMiniRuntime_cxx::registerNatives();
|
|
36
|
+
// Register native JNI methods
|
|
37
|
+
margelo::nitro::unistyles::JHybridNativePlatformSpec::CxxPart::registerNatives();
|
|
38
|
+
margelo::nitro::unistyles::JFunc_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime_cxx::registerNatives();
|
|
39
|
+
margelo::nitro::unistyles::JFunc_void_UnistylesNativeMiniRuntime_cxx::registerNatives();
|
|
34
40
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
});
|
|
41
|
+
// Register Nitro Hybrid Objects
|
|
42
|
+
|
|
38
43
|
}
|
|
39
44
|
|
|
40
45
|
} // namespace margelo::nitro::unistyles
|
|
@@ -6,20 +6,29 @@
|
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#include <jni.h>
|
|
9
|
+
#include <functional>
|
|
9
10
|
#include <NitroModules/NitroDefines.hpp>
|
|
10
11
|
|
|
11
12
|
namespace margelo::nitro::unistyles {
|
|
12
13
|
|
|
14
|
+
[[deprecated("Use registerNatives() instead.")]]
|
|
15
|
+
int initialize(JavaVM* vm);
|
|
16
|
+
|
|
13
17
|
/**
|
|
14
|
-
*
|
|
15
|
-
* Call this in your `JNI_OnLoad` function (probably inside `cpp-adapter.cpp`)
|
|
18
|
+
* Register the native (C++) part of unistyles, and autolinks all Hybrid Objects.
|
|
19
|
+
* Call this in your `JNI_OnLoad` function (probably inside `cpp-adapter.cpp`),
|
|
20
|
+
* inside a `facebook::jni::initialize(vm, ...)` call.
|
|
16
21
|
* Example:
|
|
17
22
|
* ```cpp (cpp-adapter.cpp)
|
|
18
23
|
* JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void*) {
|
|
19
|
-
* return
|
|
24
|
+
* return facebook::jni::initialize(vm, []() {
|
|
25
|
+
* // register all unistyles HybridObjects
|
|
26
|
+
* margelo::nitro::unistyles::registerNatives();
|
|
27
|
+
* // any other custom registrations go here.
|
|
28
|
+
* });
|
|
20
29
|
* }
|
|
21
30
|
* ```
|
|
22
31
|
*/
|
|
23
|
-
|
|
32
|
+
void registerAllNatives();
|
|
24
33
|
|
|
25
34
|
} // namespace margelo::nitro::unistyles
|
|
@@ -15,7 +15,6 @@ namespace margelo::nitro::unistyles {
|
|
|
15
15
|
// load custom methods/properties
|
|
16
16
|
registerHybrids(this, [](Prototype& prototype) {
|
|
17
17
|
prototype.registerHybridGetter("hairlineWidth", &HybridUnistylesStyleSheetSpec::getHairlineWidth);
|
|
18
|
-
prototype.registerHybridGetter("unid", &HybridUnistylesStyleSheetSpec::getUnid);
|
|
19
18
|
prototype.registerHybridMethod("addChangeListener", &HybridUnistylesStyleSheetSpec::addChangeListener);
|
|
20
19
|
});
|
|
21
20
|
}
|
package/package.json
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-unistyles",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "Level up your React Native StyleSheet",
|
|
5
5
|
"scripts": {
|
|
6
|
-
"test": "NODE_ENV=babel-test jest ./plugin",
|
|
6
|
+
"test": "NODE_ENV=babel-test jest ./plugin ./src/__tests__",
|
|
7
7
|
"test:coverage": "NODE_ENV=babel-test jest --passWithNoTests --coverage",
|
|
8
8
|
"tsc": "node_modules/typescript/bin/tsc --noEmit",
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"check
|
|
12
|
-
"
|
|
13
|
-
"
|
|
9
|
+
"format": "oxfmt src plugin repack-plugin",
|
|
10
|
+
"lint": "oxlint src plugin repack-plugin",
|
|
11
|
+
"check": "oxfmt src plugin repack-plugin && oxlint --fix src plugin repack-plugin",
|
|
12
|
+
"check:ci": "oxfmt --check src plugin repack-plugin && oxlint src plugin repack-plugin",
|
|
13
|
+
"prepare": "bob build && bun run plugin:build && bun run repack:plugin:build",
|
|
14
|
+
"precommit": "concurrently 'bun run tsc' 'bun run lint' 'bun run check' 'bun run test' 'bun run circular:check'",
|
|
14
15
|
"plugin:build": "node plugin/esbuild.js",
|
|
15
16
|
"repack:plugin:build": "node repack-plugin/esbuild.js",
|
|
16
17
|
"circular:check": "dpdm --no-warning --no-tree -T --exit-code circular:1 src/**/*.ts",
|
|
@@ -125,36 +126,35 @@
|
|
|
125
126
|
"publishConfig": {
|
|
126
127
|
"registry": "https://registry.npmjs.org/"
|
|
127
128
|
},
|
|
129
|
+
"dependencies": {
|
|
130
|
+
"@babel/types": "7.29.0"
|
|
131
|
+
},
|
|
128
132
|
"devDependencies": {
|
|
129
|
-
"@
|
|
130
|
-
"@
|
|
131
|
-
"@
|
|
132
|
-
"@
|
|
133
|
-
"@
|
|
134
|
-
"@
|
|
135
|
-
"
|
|
136
|
-
"
|
|
137
|
-
"
|
|
138
|
-
"
|
|
139
|
-
"
|
|
140
|
-
"
|
|
141
|
-
"babel
|
|
142
|
-
"
|
|
143
|
-
"
|
|
144
|
-
"
|
|
145
|
-
"
|
|
146
|
-
"
|
|
147
|
-
"
|
|
148
|
-
"
|
|
149
|
-
"
|
|
150
|
-
"react": "
|
|
151
|
-
"react-native": "
|
|
152
|
-
"react-native-
|
|
153
|
-
"
|
|
154
|
-
"react-native-reanimated": "3.17.5",
|
|
155
|
-
"react-native-web": "0.20.0",
|
|
156
|
-
"react-test-renderer": "19.1.0",
|
|
157
|
-
"typescript": "5.8.3"
|
|
133
|
+
"@callstack/repack": "5.2.4",
|
|
134
|
+
"@commitlint/config-conventional": "20.4.2",
|
|
135
|
+
"@react-native/normalize-colors": "0.83.2",
|
|
136
|
+
"@rspack/core": "1.7.6",
|
|
137
|
+
"@types/jest": "30.0.0",
|
|
138
|
+
"@types/react": "19.2.14",
|
|
139
|
+
"babel-plugin-tester": "12.0.0",
|
|
140
|
+
"commitlint": "20.4.2",
|
|
141
|
+
"concurrently": "9.2.1",
|
|
142
|
+
"dpdm": "4.0.1",
|
|
143
|
+
"esbuild": "0.27.3",
|
|
144
|
+
"jest": "30.2.0",
|
|
145
|
+
"@babel/plugin-syntax-jsx": "7.28.6",
|
|
146
|
+
"@babel/runtime": "7.28.6",
|
|
147
|
+
"@react-native/babel-preset": "0.83.2",
|
|
148
|
+
"nitrogen": "0.35.0",
|
|
149
|
+
"oxfmt": "0.35.0",
|
|
150
|
+
"oxlint": "1.50.0",
|
|
151
|
+
"react": "19.2.0",
|
|
152
|
+
"react-native": "0.83.2",
|
|
153
|
+
"react-native-builder-bob": "0.40.18",
|
|
154
|
+
"react-native-nitro-modules": "0.35.0",
|
|
155
|
+
"react-native-reanimated": "4.2.2",
|
|
156
|
+
"react-native-web": "0.21.2",
|
|
157
|
+
"typescript": "5.9.3"
|
|
158
158
|
},
|
|
159
159
|
"peerDependencies": {
|
|
160
160
|
"@react-native/normalize-colors": "*",
|
|
@@ -167,27 +167,26 @@
|
|
|
167
167
|
"peerDependenciesMeta": {
|
|
168
168
|
"react-native-reanimated": {
|
|
169
169
|
"optional": true
|
|
170
|
+
},
|
|
171
|
+
"react-native-edge-to-edge": {
|
|
172
|
+
"optional": true
|
|
170
173
|
}
|
|
171
174
|
},
|
|
172
|
-
"workspaces": [
|
|
173
|
-
"example",
|
|
174
|
-
"docs",
|
|
175
|
-
"expo-example"
|
|
176
|
-
],
|
|
177
|
-
"packageManager": "yarn@3.6.1",
|
|
178
175
|
"engines": {
|
|
179
|
-
"node": ">= 18.0
|
|
176
|
+
"node": ">= 20.18.0"
|
|
180
177
|
},
|
|
181
178
|
"jest": {
|
|
182
179
|
"preset": "react-native",
|
|
183
180
|
"modulePathIgnorePatterns": [
|
|
184
|
-
"<rootDir>/docs/node_modules",
|
|
185
181
|
"<rootDir>/lib/",
|
|
186
182
|
"<rootDir>/cxx/tests"
|
|
187
183
|
],
|
|
188
184
|
"testMatch": [
|
|
189
185
|
"**/*.spec.(ts|tsx|js)"
|
|
190
186
|
],
|
|
187
|
+
"transformIgnorePatterns": [
|
|
188
|
+
"node_modules/(?!(.bun/.*?/node_modules/)?(react-native|@react-native|react-native-nitro-modules|react-native-reanimated)/)"
|
|
189
|
+
],
|
|
191
190
|
"coverageReporters": [
|
|
192
191
|
"html"
|
|
193
192
|
]
|
package/plugin/index.d.ts
CHANGED
|
@@ -2,17 +2,17 @@ interface RemapImport {
|
|
|
2
2
|
/**
|
|
3
3
|
* The target import name if `isDefault` is false.
|
|
4
4
|
*/
|
|
5
|
-
name?: string
|
|
5
|
+
name?: string
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Whether the import is default.
|
|
9
9
|
*/
|
|
10
|
-
isDefault: boolean
|
|
10
|
+
isDefault: boolean
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* The path to the target import.
|
|
14
14
|
*/
|
|
15
|
-
path: string
|
|
15
|
+
path: string
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* The name of the Unistyles component, check `react-native-unistyles/src/components/native`
|
|
@@ -27,7 +27,7 @@ export interface RemapConfig {
|
|
|
27
27
|
/**
|
|
28
28
|
* The node_modules path.
|
|
29
29
|
*/
|
|
30
|
-
path: string
|
|
30
|
+
path: string
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
* An array of import objects with the following properties:
|
|
@@ -42,13 +42,13 @@ export interface UnistylesPluginOptions {
|
|
|
42
42
|
* Add root folder of your project. All files under this folder will be processed by the Babel plugin.
|
|
43
43
|
* If you need to process extra folders, use with `autoProcessPaths` option.
|
|
44
44
|
*/
|
|
45
|
-
root: string
|
|
45
|
+
root: string
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
autoProcessImports?: Array<string
|
|
48
|
+
* Example: ['@codemask/styles']
|
|
49
|
+
* Enable this option if you want to process only files containing specific imports.
|
|
50
|
+
*/
|
|
51
|
+
autoProcessImports?: Array<string>
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
54
|
* Example:
|
|
@@ -94,30 +94,36 @@ export interface UnistylesPluginOptions {
|
|
|
94
94
|
* imports.name is Optional if library used export default
|
|
95
95
|
* imports.mapTo - name of the component from react-native-unistyles/src/components/native
|
|
96
96
|
*/
|
|
97
|
-
autoRemapImports?: Array<RemapConfig
|
|
97
|
+
autoRemapImports?: Array<RemapConfig>
|
|
98
98
|
|
|
99
99
|
/**
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
autoProcessPaths?: Array<string
|
|
100
|
+
* Example: ['external-library/components']
|
|
101
|
+
* Enable this option to process some 3rd party components under `node_modules`.
|
|
102
|
+
* Under these paths we will replace `react-native` imports with `react-native-unistyles` factories that will borrow components refs [read more](https://www.unistyl.es/v3/other/babel-plugin#3-component-factory-borrowing-ref).
|
|
103
|
+
*
|
|
104
|
+
* Defaults to:
|
|
105
|
+
*
|
|
106
|
+
* ```ts
|
|
107
|
+
* ['react-native-reanimated/src/component']
|
|
108
|
+
* ```
|
|
109
|
+
*/
|
|
110
|
+
autoProcessPaths?: Array<string>
|
|
111
111
|
|
|
112
112
|
/**
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
debug?: boolean
|
|
113
|
+
* In order to list detected dependencies by the Babel plugin you can enable the `debug` flag.
|
|
114
|
+
* It will `console.log` name of the file and component with Unistyles dependencies.
|
|
115
|
+
*/
|
|
116
|
+
debug?: boolean
|
|
117
117
|
|
|
118
118
|
/**
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
119
|
+
* Only applicable for Unistyles monorepo for
|
|
120
|
+
* path resolution, don't use it!
|
|
121
|
+
*/
|
|
122
122
|
isLocal?: boolean
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Absolute path to the local package root.
|
|
126
|
+
* Used with `isLocal` for monorepo development to resolve component imports.
|
|
127
|
+
*/
|
|
128
|
+
localPath?: string
|
|
123
129
|
}
|