react-native-unistyles 3.0.0-beta.4 → 3.0.0-beta.6
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/README.md +18 -3
- package/android/src/main/cxx/NativeUnistylesModule.cpp +2 -2
- package/android/src/main/cxx/NativeUnistylesModule.h +1 -1
- package/android/src/main/java/com/unistyles/NativePlatform+android.kt +1 -2
- package/android/src/main/java/com/unistyles/NativePlatform+insets.kt +4 -0
- package/android/src/main/java/com/unistyles/NativePlatform+listener.kt +2 -1
- package/android/src/main/java/com/unistyles/UnistylesModule.kt +0 -4
- package/android/src/main/java/com/unistyles/UnistylesPackage.kt +6 -6
- package/components/native/ActivityIndicator/package.json +2 -1
- package/components/native/Animated/package.json +5 -0
- package/components/native/FlatList/package.json +2 -1
- package/components/native/Image/package.json +2 -1
- package/components/native/ImageBackground/package.json +2 -1
- package/components/native/KeyboardAvoidingView/package.json +2 -1
- package/components/native/NativeText/package.json +5 -0
- package/components/native/NativeView/package.json +5 -0
- package/components/native/Pressable/package.json +1 -1
- package/components/native/RefreshControl/package.json +2 -1
- package/components/native/ScrollView/package.json +2 -1
- package/components/native/SectionList/package.json +2 -1
- package/components/native/Switch/package.json +2 -1
- package/components/native/Text/package.json +2 -1
- package/components/native/TextInput/package.json +2 -1
- package/components/native/TouchableHighlight/package.json +2 -1
- package/components/native/TouchableOpacity/package.json +2 -1
- package/components/native/View/package.json +2 -1
- package/components/native/VirtualizedList/package.json +2 -1
- package/cxx/common/Constants.h +4 -4
- package/cxx/common/Helpers.h +1 -1
- package/cxx/core/HashGenerator.cpp +23 -0
- package/cxx/core/HashGenerator.h +13 -0
- package/cxx/core/HostUnistyle.cpp +83 -0
- package/cxx/core/HostUnistyle.h +27 -0
- package/cxx/core/RNStyle.h +18 -0
- package/cxx/core/Unistyle.h +13 -4
- package/cxx/core/UnistyleWrapper.h +92 -47
- package/cxx/core/UnistylesRegistry.cpp +40 -11
- package/cxx/core/UnistylesRegistry.h +5 -4
- package/cxx/hybridObjects/HybridNavigationBar.cpp +3 -3
- package/cxx/hybridObjects/HybridNavigationBar.h +2 -2
- package/cxx/hybridObjects/HybridShadowRegistry.cpp +39 -45
- package/cxx/hybridObjects/HybridShadowRegistry.h +0 -10
- package/cxx/hybridObjects/HybridStatusBar.cpp +3 -3
- package/cxx/hybridObjects/HybridStatusBar.h +2 -2
- package/cxx/hybridObjects/HybridStyleSheet.cpp +52 -10
- package/cxx/hybridObjects/HybridStyleSheet.h +2 -1
- package/cxx/hybridObjects/HybridUnistylesRuntime.cpp +15 -15
- package/cxx/hybridObjects/HybridUnistylesRuntime.h +2 -2
- package/cxx/parser/Parser.cpp +26 -27
- package/cxx/parser/Parser.h +2 -1
- package/ios/NativePlatform+ios.swift +21 -11
- package/ios/NativePlatform.swift +2 -2
- package/ios/UnistylesModuleOnLoad.h +4 -4
- package/ios/UnistylesModuleOnLoad.mm +5 -8
- package/lib/commonjs/components/ScopedTheme.js.map +1 -1
- package/lib/commonjs/components/index.js +0 -7
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/components/native/Animated.js +23 -0
- package/lib/commonjs/components/native/Animated.js.map +1 -0
- package/lib/commonjs/components/native/ImageBackground.js +47 -1
- package/lib/commonjs/components/native/ImageBackground.js.map +1 -1
- package/lib/commonjs/components/native/ImageBackground.native.js +10 -0
- package/lib/commonjs/components/native/ImageBackground.native.js.map +1 -0
- package/lib/commonjs/components/native/NativeText.js +13 -0
- package/lib/commonjs/components/native/NativeText.js.map +1 -0
- package/lib/commonjs/components/native/NativeText.native.js +18 -0
- package/lib/commonjs/components/native/NativeText.native.js.map +1 -0
- package/lib/commonjs/components/native/NativeView.js +9 -0
- package/lib/commonjs/components/native/NativeView.js.map +1 -0
- package/lib/commonjs/components/native/NativeView.native.js +20 -0
- package/lib/commonjs/components/native/NativeView.native.js.map +1 -0
- package/lib/commonjs/components/native/Pressable.js +26 -51
- package/lib/commonjs/components/native/Pressable.js.map +1 -1
- package/lib/commonjs/components/native/Pressable.native.js +25 -9
- package/lib/commonjs/components/native/Pressable.native.js.map +1 -1
- package/lib/commonjs/core/createUnistylesElement.js +33 -5
- package/lib/commonjs/core/createUnistylesElement.js.map +1 -1
- package/lib/commonjs/core/createUnistylesElement.native.js +54 -0
- package/lib/commonjs/core/createUnistylesElement.native.js.map +1 -0
- package/lib/commonjs/core/createUnistylesImageBackground.js +41 -15
- package/lib/commonjs/core/createUnistylesImageBackground.js.map +1 -1
- package/lib/commonjs/core/getClassname.js +23 -0
- package/lib/commonjs/core/getClassname.js.map +1 -0
- package/lib/commonjs/core/getClassname.native.js +9 -0
- package/lib/commonjs/core/getClassname.native.js.map +1 -0
- package/lib/commonjs/core/index.js +14 -7
- package/lib/commonjs/core/index.js.map +1 -1
- package/lib/commonjs/core/passForwardRef.js +2 -2
- package/lib/commonjs/core/passForwardRef.js.map +1 -1
- package/lib/commonjs/core/useProxifiedUnistyles/index.js +13 -0
- package/lib/commonjs/core/useProxifiedUnistyles/index.js.map +1 -0
- package/lib/commonjs/core/useProxifiedUnistyles/listener.js +22 -0
- package/lib/commonjs/core/useProxifiedUnistyles/listener.js.map +1 -0
- package/lib/commonjs/core/useProxifiedUnistyles/listener.native.js +26 -0
- package/lib/commonjs/core/useProxifiedUnistyles/listener.native.js.map +1 -0
- package/lib/commonjs/core/useProxifiedUnistyles/types.js +6 -0
- package/lib/commonjs/core/useProxifiedUnistyles/types.js.map +1 -0
- package/lib/commonjs/core/{withUnistyles/useDependencies.js → useProxifiedUnistyles/useProxifiedUnistyles.js} +22 -22
- package/lib/commonjs/core/useProxifiedUnistyles/useProxifiedUnistyles.js.map +1 -0
- package/lib/commonjs/core/useUnistyles.js +19 -0
- package/lib/commonjs/core/useUnistyles.js.map +1 -0
- package/lib/commonjs/core/warn.js +16 -0
- package/lib/commonjs/core/warn.js.map +1 -0
- package/lib/commonjs/core/withUnistyles/withUnistyles.js +19 -55
- package/lib/commonjs/core/withUnistyles/withUnistyles.js.map +1 -1
- package/lib/commonjs/core/withUnistyles/withUnistyles.native.js +32 -65
- package/lib/commonjs/core/withUnistyles/withUnistyles.native.js.map +1 -1
- package/lib/commonjs/index.js +23 -4
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/server/getServerUnistyles.js +40 -0
- package/lib/commonjs/server/getServerUnistyles.js.map +1 -0
- package/lib/commonjs/server/hydrateServerUnistyles.js +17 -0
- package/lib/commonjs/server/hydrateServerUnistyles.js.map +1 -0
- package/lib/commonjs/server/index.js +34 -0
- package/lib/commonjs/server/index.js.map +1 -0
- package/lib/commonjs/server/resetServerUnistyles.js +16 -0
- package/lib/commonjs/server/resetServerUnistyles.js.map +1 -0
- package/lib/commonjs/server/types.js +8 -0
- package/lib/commonjs/server/types.js.map +1 -0
- package/lib/commonjs/server/useServerUnistyles.js +27 -0
- package/lib/commonjs/server/useServerUnistyles.js.map +1 -0
- package/lib/commonjs/specs/ShadowRegistry/index.js +6 -3
- package/lib/commonjs/specs/ShadowRegistry/index.js.map +1 -1
- package/lib/commonjs/specs/StyleSheet/index.js.map +1 -1
- package/lib/commonjs/utils.js +19 -2
- package/lib/commonjs/utils.js.map +1 -1
- package/lib/commonjs/web/convert/object/filter.js +2 -2
- package/lib/commonjs/web/convert/object/filter.js.map +1 -1
- package/lib/commonjs/web/convert/style.js +4 -4
- package/lib/commonjs/web/convert/style.js.map +1 -1
- package/lib/commonjs/web/create.js +20 -15
- package/lib/commonjs/web/create.js.map +1 -1
- package/lib/commonjs/web/css/core.js +55 -0
- package/lib/commonjs/web/css/core.js.map +1 -0
- package/lib/commonjs/web/css/index.js +17 -0
- package/lib/commonjs/web/css/index.js.map +1 -0
- package/lib/commonjs/web/css/state.js +155 -0
- package/lib/commonjs/web/css/state.js.map +1 -0
- package/lib/commonjs/web/css/utils.js +47 -0
- package/lib/commonjs/web/css/utils.js.map +1 -0
- package/lib/commonjs/web/index.js +14 -18
- package/lib/commonjs/web/index.js.map +1 -1
- package/lib/commonjs/web/listener.js +9 -7
- package/lib/commonjs/web/listener.js.map +1 -1
- package/lib/commonjs/web/registry.js +44 -123
- package/lib/commonjs/web/registry.js.map +1 -1
- package/lib/commonjs/web/runtime.js +28 -21
- package/lib/commonjs/web/runtime.js.map +1 -1
- package/lib/commonjs/web/services.js +28 -0
- package/lib/commonjs/web/services.js.map +1 -0
- package/lib/commonjs/web/shadowRegistry.js +46 -93
- package/lib/commonjs/web/shadowRegistry.js.map +1 -1
- package/lib/commonjs/web/state.js +39 -9
- package/lib/commonjs/web/state.js.map +1 -1
- package/lib/commonjs/web/types.js +6 -0
- package/lib/commonjs/web/types.js.map +1 -0
- package/lib/commonjs/web/utils/common.js +29 -9
- package/lib/commonjs/web/utils/common.js.map +1 -1
- package/lib/commonjs/web/utils/unistyle.js +32 -19
- package/lib/commonjs/web/utils/unistyle.js.map +1 -1
- package/lib/commonjs/web/variants.js +25 -27
- package/lib/commonjs/web/variants.js.map +1 -1
- package/lib/module/components/ScopedTheme.js.map +1 -1
- package/lib/module/components/index.js +0 -1
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/components/native/Animated.js +19 -0
- package/lib/module/components/native/Animated.js.map +1 -0
- package/lib/module/components/native/ImageBackground.js +47 -2
- package/lib/module/components/native/ImageBackground.js.map +1 -1
- package/lib/module/components/native/ImageBackground.native.js +6 -0
- package/lib/module/components/native/ImageBackground.native.js.map +1 -0
- package/lib/module/components/native/NativeText.js +4 -0
- package/lib/module/components/native/NativeText.js.map +1 -0
- package/lib/module/components/native/NativeText.native.js +15 -0
- package/lib/module/components/native/NativeText.native.js.map +1 -0
- package/lib/module/components/native/NativeView.js +5 -0
- package/lib/module/components/native/NativeView.js.map +1 -0
- package/lib/module/components/native/NativeView.native.js +17 -0
- package/lib/module/components/native/NativeView.native.js.map +1 -0
- package/lib/module/components/native/Pressable.js +27 -52
- package/lib/module/components/native/Pressable.js.map +1 -1
- package/lib/module/components/native/Pressable.native.js +26 -10
- package/lib/module/components/native/Pressable.native.js.map +1 -1
- package/lib/module/core/createUnistylesElement.js +33 -5
- package/lib/module/core/createUnistylesElement.js.map +1 -1
- package/lib/module/core/createUnistylesElement.native.js +47 -0
- package/lib/module/core/createUnistylesElement.native.js.map +1 -0
- package/lib/module/core/createUnistylesImageBackground.js +39 -14
- package/lib/module/core/createUnistylesImageBackground.js.map +1 -1
- package/lib/module/core/getClassname.js +18 -0
- package/lib/module/core/getClassname.js.map +1 -0
- package/lib/module/core/getClassname.native.js +4 -0
- package/lib/module/core/getClassname.native.js.map +1 -0
- package/lib/module/core/index.js +2 -1
- package/lib/module/core/index.js.map +1 -1
- package/lib/module/core/passForwardRef.js +2 -2
- package/lib/module/core/passForwardRef.js.map +1 -1
- package/lib/module/core/useProxifiedUnistyles/index.js +4 -0
- package/lib/module/core/useProxifiedUnistyles/index.js.map +1 -0
- package/lib/module/core/useProxifiedUnistyles/listener.js +17 -0
- package/lib/module/core/useProxifiedUnistyles/listener.js.map +1 -0
- package/lib/module/core/useProxifiedUnistyles/listener.native.js +21 -0
- package/lib/module/core/useProxifiedUnistyles/listener.native.js.map +1 -0
- package/lib/module/core/useProxifiedUnistyles/types.js +4 -0
- package/lib/module/core/useProxifiedUnistyles/types.js.map +1 -0
- package/lib/module/core/{withUnistyles/useDependencies.js → useProxifiedUnistyles/useProxifiedUnistyles.js} +19 -19
- package/lib/module/core/useProxifiedUnistyles/useProxifiedUnistyles.js.map +1 -0
- package/lib/module/core/useUnistyles.js +14 -0
- package/lib/module/core/useUnistyles.js.map +1 -0
- package/lib/module/core/warn.js +11 -0
- package/lib/module/core/warn.js.map +1 -0
- package/lib/module/core/withUnistyles/withUnistyles.js +19 -55
- package/lib/module/core/withUnistyles/withUnistyles.js.map +1 -1
- package/lib/module/core/withUnistyles/withUnistyles.native.js +33 -66
- package/lib/module/core/withUnistyles/withUnistyles.native.js.map +1 -1
- package/lib/module/index.js +3 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/server/getServerUnistyles.js +34 -0
- package/lib/module/server/getServerUnistyles.js.map +1 -0
- package/lib/module/server/hydrateServerUnistyles.js +12 -0
- package/lib/module/server/hydrateServerUnistyles.js.map +1 -0
- package/lib/module/server/index.js +7 -0
- package/lib/module/server/index.js.map +1 -0
- package/lib/module/server/resetServerUnistyles.js +11 -0
- package/lib/module/server/resetServerUnistyles.js.map +1 -0
- package/lib/module/server/types.js +4 -0
- package/lib/module/server/types.js.map +1 -0
- package/lib/module/server/useServerUnistyles.js +22 -0
- package/lib/module/server/useServerUnistyles.js.map +1 -0
- package/lib/module/specs/ShadowRegistry/index.js +6 -3
- package/lib/module/specs/ShadowRegistry/index.js.map +1 -1
- package/lib/module/specs/StyleSheet/index.js.map +1 -1
- package/lib/module/utils.js +16 -1
- package/lib/module/utils.js.map +1 -1
- package/lib/module/web/convert/object/filter.js +2 -2
- package/lib/module/web/convert/object/filter.js.map +1 -1
- package/lib/module/web/convert/style.js +4 -4
- package/lib/module/web/convert/style.js.map +1 -1
- package/lib/module/web/create.js +20 -15
- package/lib/module/web/create.js.map +1 -1
- package/lib/module/web/css/core.js +50 -0
- package/lib/module/web/css/core.js.map +1 -0
- package/lib/module/web/css/index.js +4 -0
- package/lib/module/web/css/index.js.map +1 -0
- package/lib/module/web/css/state.js +150 -0
- package/lib/module/web/css/state.js.map +1 -0
- package/lib/module/web/css/utils.js +41 -0
- package/lib/module/web/css/utils.js.map +1 -0
- package/lib/module/web/index.js +10 -5
- package/lib/module/web/index.js.map +1 -1
- package/lib/module/web/listener.js +8 -7
- package/lib/module/web/listener.js.map +1 -1
- package/lib/module/web/registry.js +44 -124
- package/lib/module/web/registry.js.map +1 -1
- package/lib/module/web/runtime.js +27 -21
- package/lib/module/web/runtime.js.map +1 -1
- package/lib/module/web/services.js +23 -0
- package/lib/module/web/services.js.map +1 -0
- package/lib/module/web/shadowRegistry.js +46 -94
- package/lib/module/web/shadowRegistry.js.map +1 -1
- package/lib/module/web/state.js +39 -10
- package/lib/module/web/state.js.map +1 -1
- package/lib/module/web/types.js +4 -0
- package/lib/module/web/types.js.map +1 -0
- package/lib/module/web/utils/common.js +26 -7
- package/lib/module/web/utils/common.js.map +1 -1
- package/lib/module/web/utils/unistyle.js +31 -17
- package/lib/module/web/utils/unistyle.js.map +1 -1
- package/lib/module/web/variants.js +25 -27
- package/lib/module/web/variants.js.map +1 -1
- package/lib/typescript/src/components/index.d.ts +0 -1
- package/lib/typescript/src/components/index.d.ts.map +1 -1
- package/lib/typescript/src/components/native/ActivityIndicator.d.ts +1 -1
- package/lib/typescript/src/components/native/ActivityIndicator.d.ts.map +1 -1
- package/lib/typescript/src/components/native/Animated.d.ts +39 -0
- package/lib/typescript/src/components/native/Animated.d.ts.map +1 -0
- package/lib/typescript/src/components/native/FlatList.d.ts +1 -1
- package/lib/typescript/src/components/native/FlatList.d.ts.map +1 -1
- package/lib/typescript/src/components/native/Image.d.ts +1 -1
- package/lib/typescript/src/components/native/Image.d.ts.map +1 -1
- package/lib/typescript/src/components/native/ImageBackground.d.ts +1 -2
- package/lib/typescript/src/components/native/ImageBackground.d.ts.map +1 -1
- package/lib/typescript/src/components/native/ImageBackground.native.d.ts +2 -0
- package/lib/typescript/src/components/native/ImageBackground.native.d.ts.map +1 -0
- package/lib/typescript/src/components/native/KeyboardAvoidingView.d.ts +1 -1
- package/lib/typescript/src/components/native/KeyboardAvoidingView.d.ts.map +1 -1
- package/lib/typescript/src/components/native/NativeText.d.ts +2 -0
- package/lib/typescript/src/components/native/NativeText.d.ts.map +1 -0
- package/lib/typescript/src/components/native/NativeText.native.d.ts +2 -0
- package/lib/typescript/src/components/native/NativeText.native.d.ts.map +1 -0
- package/lib/typescript/src/components/native/NativeView.d.ts +3 -0
- package/lib/typescript/src/components/native/NativeView.d.ts.map +1 -0
- package/lib/typescript/src/components/native/NativeView.native.d.ts +3 -0
- package/lib/typescript/src/components/native/NativeView.native.d.ts.map +1 -0
- package/lib/typescript/src/components/native/Pressable.d.ts +3 -2
- package/lib/typescript/src/components/native/Pressable.d.ts.map +1 -1
- package/lib/typescript/src/components/native/Pressable.native.d.ts.map +1 -1
- package/lib/typescript/src/components/native/RefreshControl.d.ts +1 -1
- package/lib/typescript/src/components/native/RefreshControl.d.ts.map +1 -1
- package/lib/typescript/src/components/native/ScrollView.d.ts +1 -1
- package/lib/typescript/src/components/native/ScrollView.d.ts.map +1 -1
- package/lib/typescript/src/components/native/SectionList.d.ts +1 -1
- package/lib/typescript/src/components/native/SectionList.d.ts.map +1 -1
- package/lib/typescript/src/components/native/Switch.d.ts +1 -1
- package/lib/typescript/src/components/native/Switch.d.ts.map +1 -1
- package/lib/typescript/src/components/native/Text.d.ts +1 -1
- package/lib/typescript/src/components/native/Text.d.ts.map +1 -1
- package/lib/typescript/src/components/native/TextInput.d.ts +1 -1
- package/lib/typescript/src/components/native/TextInput.d.ts.map +1 -1
- package/lib/typescript/src/components/native/TouchableHighlight.d.ts +1 -1
- package/lib/typescript/src/components/native/TouchableHighlight.d.ts.map +1 -1
- package/lib/typescript/src/components/native/TouchableOpacity.d.ts +1 -1
- package/lib/typescript/src/components/native/TouchableOpacity.d.ts.map +1 -1
- package/lib/typescript/src/components/native/View.d.ts +1 -1
- package/lib/typescript/src/components/native/View.d.ts.map +1 -1
- package/lib/typescript/src/components/native/VirtualizedList.d.ts +1 -1
- package/lib/typescript/src/components/native/VirtualizedList.d.ts.map +1 -1
- package/lib/typescript/src/core/createUnistylesElement.d.ts +1 -2
- package/lib/typescript/src/core/createUnistylesElement.d.ts.map +1 -1
- package/lib/typescript/src/core/createUnistylesElement.native.d.ts +2 -0
- package/lib/typescript/src/core/createUnistylesElement.native.d.ts.map +1 -0
- package/lib/typescript/src/core/createUnistylesImageBackground.d.ts +2 -3
- package/lib/typescript/src/core/createUnistylesImageBackground.d.ts.map +1 -1
- package/lib/typescript/src/core/getClassname.d.ts +7 -0
- package/lib/typescript/src/core/getClassname.d.ts.map +1 -0
- package/lib/typescript/src/core/getClassname.native.d.ts +2 -0
- package/lib/typescript/src/core/getClassname.native.d.ts.map +1 -0
- package/lib/typescript/src/core/index.d.ts +2 -1
- package/lib/typescript/src/core/index.d.ts.map +1 -1
- package/lib/typescript/src/core/passForwardRef.d.ts.map +1 -1
- package/lib/typescript/src/core/useProxifiedUnistyles/index.d.ts +2 -0
- package/lib/typescript/src/core/useProxifiedUnistyles/index.d.ts.map +1 -0
- package/lib/typescript/src/core/useProxifiedUnistyles/listener.d.ts +3 -0
- package/lib/typescript/src/core/useProxifiedUnistyles/listener.d.ts.map +1 -0
- package/lib/typescript/src/core/useProxifiedUnistyles/listener.native.d.ts +3 -0
- package/lib/typescript/src/core/useProxifiedUnistyles/listener.native.d.ts.map +1 -0
- package/lib/typescript/src/core/useProxifiedUnistyles/types.d.ts +7 -0
- package/lib/typescript/src/core/useProxifiedUnistyles/types.d.ts.map +1 -0
- package/lib/typescript/src/core/useProxifiedUnistyles/useProxifiedUnistyles.d.ts +8 -0
- package/lib/typescript/src/core/useProxifiedUnistyles/useProxifiedUnistyles.d.ts.map +1 -0
- package/lib/typescript/src/core/useUnistyles.d.ts +6 -0
- package/lib/typescript/src/core/useUnistyles.d.ts.map +1 -0
- package/lib/typescript/src/core/warn.d.ts +3 -0
- package/lib/typescript/src/core/warn.d.ts.map +1 -0
- package/lib/typescript/src/core/withUnistyles/withUnistyles.d.ts +0 -3
- 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/index.d.ts +3 -2
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/server/getServerUnistyles.d.ts +4 -0
- package/lib/typescript/src/server/getServerUnistyles.d.ts.map +1 -0
- package/lib/typescript/src/server/hydrateServerUnistyles.d.ts +8 -0
- package/lib/typescript/src/server/hydrateServerUnistyles.d.ts.map +1 -0
- package/lib/typescript/src/server/index.d.ts +5 -0
- package/lib/typescript/src/server/index.d.ts.map +1 -0
- package/lib/typescript/src/server/resetServerUnistyles.d.ts +2 -0
- package/lib/typescript/src/server/resetServerUnistyles.d.ts.map +1 -0
- package/lib/typescript/src/server/types.d.ts +5 -0
- package/lib/typescript/src/server/types.d.ts.map +1 -0
- package/lib/typescript/src/server/useServerUnistyles.d.ts +4 -0
- package/lib/typescript/src/server/useServerUnistyles.d.ts.map +1 -0
- package/lib/typescript/src/specs/ShadowRegistry/index.d.ts +0 -3
- package/lib/typescript/src/specs/ShadowRegistry/index.d.ts.map +1 -1
- package/lib/typescript/src/specs/StyleSheet/index.d.ts +5 -1
- package/lib/typescript/src/specs/StyleSheet/index.d.ts.map +1 -1
- package/lib/typescript/src/utils.d.ts +2 -0
- package/lib/typescript/src/utils.d.ts.map +1 -1
- package/lib/typescript/src/web/convert/style.d.ts.map +1 -1
- package/lib/typescript/src/web/create.d.ts.map +1 -1
- package/lib/typescript/src/web/css/core.d.ts +3 -0
- package/lib/typescript/src/web/css/core.d.ts.map +1 -0
- package/lib/typescript/src/web/css/index.d.ts +2 -0
- package/lib/typescript/src/web/css/index.d.ts.map +1 -0
- package/lib/typescript/src/web/css/state.d.ts +30 -0
- package/lib/typescript/src/web/css/state.d.ts.map +1 -0
- package/lib/typescript/src/web/css/utils.d.ts +4 -0
- package/lib/typescript/src/web/css/utils.d.ts.map +1 -0
- package/lib/typescript/src/web/index.d.ts +7 -1
- package/lib/typescript/src/web/index.d.ts.map +1 -1
- package/lib/typescript/src/web/listener.d.ts +4 -3
- package/lib/typescript/src/web/listener.d.ts.map +1 -1
- package/lib/typescript/src/web/registry.d.ts +11 -8
- package/lib/typescript/src/web/registry.d.ts.map +1 -1
- package/lib/typescript/src/web/runtime.d.ts +6 -4
- package/lib/typescript/src/web/runtime.d.ts.map +1 -1
- package/lib/typescript/src/web/services.d.ts +15 -0
- package/lib/typescript/src/web/services.d.ts.map +1 -0
- package/lib/typescript/src/web/shadowRegistry.d.ts +10 -13
- package/lib/typescript/src/web/shadowRegistry.d.ts.map +1 -1
- package/lib/typescript/src/web/state.d.ts +7 -3
- package/lib/typescript/src/web/state.d.ts.map +1 -1
- package/lib/typescript/src/web/types.d.ts +13 -0
- package/lib/typescript/src/web/types.d.ts.map +1 -0
- package/lib/typescript/src/web/utils/common.d.ts +2 -1
- package/lib/typescript/src/web/utils/common.d.ts.map +1 -1
- package/lib/typescript/src/web/utils/unistyle.d.ts +5 -4
- package/lib/typescript/src/web/utils/unistyle.d.ts.map +1 -1
- package/lib/typescript/src/web/variants.d.ts +2 -2
- package/lib/typescript/src/web/variants.d.ts.map +1 -1
- package/nitrogen/generated/android/c++/JColorScheme.hpp +2 -1
- package/nitrogen/generated/android/c++/JDimensions.hpp +2 -1
- package/nitrogen/generated/android/c++/JFunc_void_UnistylesNativeMiniRuntime.hpp +36 -10
- package/nitrogen/generated/android/c++/JFunc_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime.hpp +53 -19
- package/nitrogen/generated/android/c++/JHybridNativePlatformSpec.cpp +5 -5
- package/nitrogen/generated/android/c++/JHybridNativePlatformSpec.hpp +1 -1
- package/nitrogen/generated/android/c++/JInsets.hpp +2 -1
- package/nitrogen/generated/android/c++/JOrientation.hpp +2 -1
- package/nitrogen/generated/android/c++/JUnistyleDependency.hpp +2 -1
- package/nitrogen/generated/android/c++/JUnistylesNativeMiniRuntime.hpp +2 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/ColorScheme.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/Dimensions.kt +10 -5
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/Func_void_UnistylesNativeMiniRuntime.kt +43 -14
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime.kt +43 -14
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/HybridNativePlatformSpec.kt +10 -10
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/Insets.kt +13 -8
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/Orientation.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/UnistyleDependency.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/UnistylesNativeMiniRuntime.kt +19 -14
- package/nitrogen/generated/android/unistyles+autolinking.cmake +4 -1
- package/nitrogen/generated/android/unistyles+autolinking.gradle +1 -1
- package/nitrogen/generated/android/unistylesOnLoad.cpp +7 -3
- package/nitrogen/generated/android/unistylesOnLoad.hpp +1 -1
- package/nitrogen/generated/ios/Unistyles+autolinking.rb +1 -1
- package/nitrogen/generated/ios/Unistyles-Swift-Cxx-Bridge.cpp +21 -6
- package/nitrogen/generated/ios/Unistyles-Swift-Cxx-Bridge.hpp +105 -27
- package/nitrogen/generated/ios/Unistyles-Swift-Cxx-Umbrella.hpp +5 -3
- package/nitrogen/generated/ios/c++/HybridNativePlatformSpecSwift.cpp +1 -1
- package/nitrogen/generated/ios/c++/HybridNativePlatformSpecSwift.hpp +92 -33
- package/nitrogen/generated/ios/swift/ColorScheme.swift +1 -1
- package/nitrogen/generated/ios/swift/Dimensions.swift +1 -1
- package/nitrogen/generated/ios/swift/Func_void_UnistylesNativeMiniRuntime.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime.swift +46 -0
- package/nitrogen/generated/ios/swift/HybridNativePlatformSpec.swift +36 -23
- package/nitrogen/generated/ios/swift/HybridNativePlatformSpec_cxx.swift +327 -0
- package/nitrogen/generated/ios/swift/Insets.swift +1 -1
- package/nitrogen/generated/ios/swift/Orientation.swift +1 -1
- package/nitrogen/generated/ios/swift/UnistyleDependency.swift +1 -1
- package/nitrogen/generated/ios/swift/UnistylesNativeMiniRuntime.swift +1 -1
- package/nitrogen/generated/shared/c++/ColorScheme.hpp +1 -1
- package/nitrogen/generated/shared/c++/Dimensions.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridNativePlatformSpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridNativePlatformSpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridUnistylesNavigationBarSpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridUnistylesNavigationBarSpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridUnistylesRuntimeSpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridUnistylesRuntimeSpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridUnistylesShadowRegistrySpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridUnistylesShadowRegistrySpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridUnistylesStatusBarSpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridUnistylesStatusBarSpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridUnistylesStyleSheetSpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridUnistylesStyleSheetSpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/Insets.hpp +1 -1
- package/nitrogen/generated/shared/c++/Orientation.hpp +1 -1
- package/nitrogen/generated/shared/c++/UnistyleDependency.hpp +2 -2
- package/nitrogen/generated/shared/c++/UnistylesCxxMiniRuntime.hpp +1 -1
- package/nitrogen/generated/shared/c++/UnistylesNativeMiniRuntime.hpp +1 -1
- package/package.json +23 -14
- package/plugin/consts.js +63 -0
- package/plugin/exotic.js +54 -0
- package/plugin/import.js +1 -21
- package/plugin/index.d.ts +89 -0
- package/plugin/index.js +58 -96
- package/plugin/stylesheet.js +28 -1
- package/plugin/variants.js +49 -75
- package/src/components/ScopedTheme.tsx +1 -1
- package/src/components/index.ts +0 -1
- package/src/components/native/Animated.tsx +17 -0
- package/src/components/native/ImageBackground.native.tsx +4 -0
- package/src/components/native/ImageBackground.tsx +57 -2
- package/src/components/native/NativeText.native.tsx +12 -0
- package/src/components/native/NativeText.tsx +1 -0
- package/src/components/native/NativeView.native.tsx +13 -0
- package/src/components/native/NativeView.tsx +3 -0
- package/src/components/native/Pressable.native.tsx +32 -15
- package/src/components/native/Pressable.tsx +35 -69
- package/src/core/createUnistylesElement.native.tsx +51 -0
- package/src/core/createUnistylesElement.tsx +47 -8
- package/src/core/createUnistylesImageBackground.tsx +44 -18
- package/src/core/getClassname.native.ts +1 -0
- package/src/core/getClassname.ts +14 -0
- package/src/core/index.ts +2 -1
- package/src/core/passForwardRef.ts +1 -2
- package/src/core/useProxifiedUnistyles/index.ts +1 -0
- package/src/core/useProxifiedUnistyles/listener.native.ts +18 -0
- package/src/core/useProxifiedUnistyles/listener.ts +13 -0
- package/src/core/useProxifiedUnistyles/types.ts +7 -0
- package/src/core/{withUnistyles/useDependencies.ts → useProxifiedUnistyles/useProxifiedUnistyles.ts} +19 -26
- package/src/core/useUnistyles.ts +11 -0
- package/src/core/warn.ts +13 -0
- package/src/core/withUnistyles/withUnistyles.native.tsx +39 -68
- package/src/core/withUnistyles/withUnistyles.tsx +19 -56
- package/src/index.ts +3 -2
- package/src/server/getServerUnistyles.tsx +21 -0
- package/src/server/hydrateServerUnistyles.ts +17 -0
- package/src/server/index.ts +5 -0
- package/src/server/resetServerUnistyles.ts +9 -0
- package/src/server/types.ts +4 -0
- package/src/server/useServerUnistyles.tsx +22 -0
- package/src/specs/ShadowRegistry/index.ts +12 -9
- package/src/specs/StyleSheet/index.ts +6 -1
- package/src/utils.ts +32 -11
- package/src/web/convert/object/filter.ts +2 -2
- package/src/web/convert/style.ts +8 -7
- package/src/web/create.ts +23 -18
- package/src/web/css/core.ts +58 -0
- package/src/web/css/index.ts +1 -0
- package/src/web/css/state.ts +191 -0
- package/src/web/css/utils.ts +54 -0
- package/src/web/index.ts +18 -5
- package/src/web/listener.ts +8 -8
- package/src/web/registry.ts +47 -152
- package/src/web/runtime.ts +32 -22
- package/src/web/services.ts +28 -0
- package/src/web/shadowRegistry.ts +46 -104
- package/src/web/state.ts +46 -11
- package/src/web/types.ts +13 -0
- package/src/web/utils/common.ts +32 -8
- package/src/web/utils/unistyle.ts +46 -25
- package/src/web/variants.ts +27 -27
- package/cxx/core/HostStyle.cpp +0 -73
- package/cxx/core/HostStyle.h +0 -34
- package/lib/commonjs/components/Variants.js +0 -36
- package/lib/commonjs/components/Variants.js.map +0 -1
- package/lib/commonjs/core/createUnistylesComponent.js +0 -16
- package/lib/commonjs/core/createUnistylesComponent.js.map +0 -1
- package/lib/commonjs/core/withUnistyles/useDependencies.js.map +0 -1
- package/lib/module/components/Variants.js +0 -29
- package/lib/module/components/Variants.js.map +0 -1
- package/lib/module/core/createUnistylesComponent.js +0 -11
- package/lib/module/core/createUnistylesComponent.js.map +0 -1
- package/lib/module/core/withUnistyles/useDependencies.js.map +0 -1
- package/lib/typescript/src/components/Variants.d.ts +0 -7
- package/lib/typescript/src/components/Variants.d.ts.map +0 -1
- package/lib/typescript/src/core/createUnistylesComponent.d.ts +0 -14
- package/lib/typescript/src/core/createUnistylesComponent.d.ts.map +0 -1
- package/lib/typescript/src/core/withUnistyles/useDependencies.d.ts +0 -13
- package/lib/typescript/src/core/withUnistyles/useDependencies.d.ts.map +0 -1
- package/nitrogen/generated/android/unistylesOnLoad.kt +0 -1
- package/nitrogen/generated/ios/swift/HybridNativePlatformSpecCxx.swift +0 -314
- package/plugin/style.js +0 -168
- package/src/components/Variants.tsx +0 -30
- package/src/core/createUnistylesComponent.tsx +0 -14
@@ -36,10 +36,7 @@ jsi::Value HybridStyleSheet::create(jsi::Runtime& rt, const jsi::Value &thisVal,
|
|
36
36
|
parser.buildUnistyles(rt, registeredStyleSheet);
|
37
37
|
parser.parseUnistyles(rt, registeredStyleSheet);
|
38
38
|
|
39
|
-
|
40
|
-
auto styleHostObject = jsi::Object::createFromHostObject(rt, style);
|
41
|
-
|
42
|
-
return styleHostObject;
|
39
|
+
return core::toRNStyle(rt, registeredStyleSheet, this->_unistylesRuntime, {});
|
43
40
|
}
|
44
41
|
|
45
42
|
jsi::Value HybridStyleSheet::configure(jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *arguments, size_t count) {
|
@@ -80,6 +77,10 @@ jsi::Value HybridStyleSheet::configure(jsi::Runtime &rt, const jsi::Value &thisV
|
|
80
77
|
}
|
81
78
|
|
82
79
|
jsi::Value HybridStyleSheet::init(jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *arguments, size_t count) {
|
80
|
+
if (this->isInitialized) {
|
81
|
+
return jsi::Value::undefined();
|
82
|
+
}
|
83
|
+
|
83
84
|
// create new state
|
84
85
|
auto& registry = core::UnistylesRegistry::get();
|
85
86
|
|
@@ -87,6 +88,8 @@ jsi::Value HybridStyleSheet::init(jsi::Runtime &rt, const jsi::Value &thisVal, c
|
|
87
88
|
|
88
89
|
loadExternalMethods(thisVal, rt);
|
89
90
|
registerHooks(rt);
|
91
|
+
|
92
|
+
this->isInitialized = true;
|
90
93
|
|
91
94
|
return jsi::Value::undefined();
|
92
95
|
}
|
@@ -121,6 +124,24 @@ void HybridStyleSheet::parseSettings(jsi::Runtime &rt, jsi::Object settings) {
|
|
121
124
|
return;
|
122
125
|
}
|
123
126
|
|
127
|
+
if (propertyName == "CSSVars") {
|
128
|
+
return;
|
129
|
+
}
|
130
|
+
|
131
|
+
if (propertyName == "nativeBreakpointsMode") {
|
132
|
+
helpers::assertThat(rt, propertyValue.isString(), "StyleSheet.configure's nativeBreakpointsMode must be a string");
|
133
|
+
|
134
|
+
auto mode = propertyValue.asString(rt).utf8(rt);
|
135
|
+
|
136
|
+
helpers::assertThat(rt, mode == "pixels" || mode == "points", "StyleSheet.configure's nativeBreakpointsMode must be one of: pixels or points");
|
137
|
+
|
138
|
+
if (mode == "points") {
|
139
|
+
registry.shouldUsePointsForBreakpoints = true;
|
140
|
+
}
|
141
|
+
|
142
|
+
return;
|
143
|
+
}
|
144
|
+
|
124
145
|
helpers::assertThat(rt, false, "StyleSheet.configure's settings received unexpected key: '" + std::string(propertyName) + "'");
|
125
146
|
});
|
126
147
|
}
|
@@ -135,7 +156,13 @@ void HybridStyleSheet::parseBreakpoints(jsi::Runtime &rt, jsi::Object breakpoint
|
|
135
156
|
auto& state = registry.getState(rt);
|
136
157
|
|
137
158
|
registry.registerBreakpoints(rt, sortedBreakpoints);
|
138
|
-
|
159
|
+
|
160
|
+
auto rawWidth = this->_unistylesRuntime->getScreen().width;
|
161
|
+
auto width = registry.shouldUsePointsForBreakpoints
|
162
|
+
? rawWidth / this->_unistylesRuntime->getPixelRatio()
|
163
|
+
: rawWidth;
|
164
|
+
|
165
|
+
state.computeCurrentBreakpoint(width);
|
139
166
|
}
|
140
167
|
|
141
168
|
void HybridStyleSheet::parseThemes(jsi::Runtime &rt, jsi::Object themes) {
|
@@ -250,8 +277,6 @@ void HybridStyleSheet::onPlatformDependenciesChange(std::vector<UnistyleDependen
|
|
250
277
|
|
251
278
|
if (dependencyMap.empty()) {
|
252
279
|
this->notifyJSListeners(dependencies);
|
253
|
-
|
254
|
-
return;
|
255
280
|
}
|
256
281
|
|
257
282
|
// in a later step, we will rebuild only Unistyles with mounted StyleSheets
|
@@ -260,6 +285,13 @@ void HybridStyleSheet::onPlatformDependenciesChange(std::vector<UnistyleDependen
|
|
260
285
|
auto dependentStyleSheets = registry.getStyleSheetsToRefresh(rt, dependencies);
|
261
286
|
|
262
287
|
parser.rebuildUnistylesInDependencyMap(rt, dependencyMap, dependentStyleSheets, std::nullopt);
|
288
|
+
|
289
|
+
// we need to stop here if there is nothing to update at the moment,
|
290
|
+
// but we need to compute dependentStyleSheets
|
291
|
+
if (dependencyMap.empty()) {
|
292
|
+
return;
|
293
|
+
}
|
294
|
+
|
263
295
|
parser.rebuildShadowLeafUpdates(rt, dependencyMap);
|
264
296
|
|
265
297
|
this->notifyJSListeners(dependencies);
|
@@ -281,7 +313,12 @@ void HybridStyleSheet::onPlatformNativeDependenciesChange(std::vector<UnistyleDe
|
|
281
313
|
auto dimensionsIt = std::find(dependencies.begin(), dependencies.end(), UnistyleDependency::DIMENSIONS);
|
282
314
|
|
283
315
|
if (dimensionsIt != dependencies.end()) {
|
284
|
-
|
316
|
+
auto rawWidth = this->_unistylesRuntime->getScreen().width;
|
317
|
+
auto width = registry.shouldUsePointsForBreakpoints
|
318
|
+
? rawWidth / this->_unistylesRuntime->getPixelRatio()
|
319
|
+
: rawWidth;
|
320
|
+
|
321
|
+
registry.getState(rt).computeCurrentBreakpoint(width);
|
285
322
|
}
|
286
323
|
|
287
324
|
// check if color scheme changed and then if Unistyles state depend on it (adaptive themes)
|
@@ -296,8 +333,6 @@ void HybridStyleSheet::onPlatformNativeDependenciesChange(std::vector<UnistyleDe
|
|
296
333
|
|
297
334
|
if (dependencyMap.empty()) {
|
298
335
|
this->notifyJSListeners(unistyleDependencies);
|
299
|
-
|
300
|
-
return;
|
301
336
|
}
|
302
337
|
|
303
338
|
// in a later step, we will rebuild only Unistyles with mounted StyleSheets
|
@@ -306,6 +341,13 @@ void HybridStyleSheet::onPlatformNativeDependenciesChange(std::vector<UnistyleDe
|
|
306
341
|
auto dependentStyleSheets = registry.getStyleSheetsToRefresh(rt, unistyleDependencies);
|
307
342
|
|
308
343
|
parser.rebuildUnistylesInDependencyMap(rt, dependencyMap, dependentStyleSheets, miniRuntime);
|
344
|
+
|
345
|
+
// we need to stop here if there is nothing to update at the moment,
|
346
|
+
// but we need to compute dependentStyleSheets
|
347
|
+
if (dependencyMap.empty()) {
|
348
|
+
return;
|
349
|
+
}
|
350
|
+
|
309
351
|
parser.rebuildShadowLeafUpdates(rt, dependencyMap);
|
310
352
|
|
311
353
|
this->notifyJSListeners(unistyleDependencies);
|
@@ -4,7 +4,7 @@
|
|
4
4
|
#include <jsi/jsi.h>
|
5
5
|
#include "HybridUnistylesRuntime.h"
|
6
6
|
#include "HybridUnistylesStyleSheetSpec.hpp"
|
7
|
-
#include "
|
7
|
+
#include "RNStyle.h"
|
8
8
|
#include "Helpers.h"
|
9
9
|
#include "Constants.h"
|
10
10
|
#include "Breakpoints.h"
|
@@ -73,6 +73,7 @@ private:
|
|
73
73
|
void onImeChange(UnistylesNativeMiniRuntime miniRuntime);
|
74
74
|
void notifyJSListeners(std::vector<UnistyleDependency>& dependencies);
|
75
75
|
|
76
|
+
bool isInitialized = false;
|
76
77
|
double __unid = -1;
|
77
78
|
std::vector<std::unique_ptr<const std::function<void(std::vector<UnistyleDependency>&)>>> _changeListeners{};
|
78
79
|
std::shared_ptr<HybridUnistylesRuntime> _unistylesRuntime;
|
@@ -4,7 +4,7 @@
|
|
4
4
|
using namespace margelo::nitro::unistyles;
|
5
5
|
|
6
6
|
ColorScheme HybridUnistylesRuntime::getColorScheme() {
|
7
|
-
auto colorScheme = this->_nativePlatform
|
7
|
+
auto colorScheme = this->_nativePlatform->getColorScheme();
|
8
8
|
|
9
9
|
return static_cast<ColorScheme>(colorScheme);
|
10
10
|
}
|
@@ -16,7 +16,7 @@ bool HybridUnistylesRuntime::getHasAdaptiveThemes() {
|
|
16
16
|
};
|
17
17
|
|
18
18
|
Dimensions HybridUnistylesRuntime::getScreen() {
|
19
|
-
return this->_nativePlatform
|
19
|
+
return this->_nativePlatform->getScreenDimensions();
|
20
20
|
};
|
21
21
|
|
22
22
|
std::optional<std::string> HybridUnistylesRuntime::getThemeName() {
|
@@ -26,7 +26,7 @@ std::optional<std::string> HybridUnistylesRuntime::getThemeName() {
|
|
26
26
|
};
|
27
27
|
|
28
28
|
std::string HybridUnistylesRuntime::getContentSizeCategory() {
|
29
|
-
return this->_nativePlatform
|
29
|
+
return this->_nativePlatform->getContentSizeCategory();
|
30
30
|
};
|
31
31
|
|
32
32
|
std::optional<std::string> HybridUnistylesRuntime::getBreakpoint() {
|
@@ -36,25 +36,25 @@ std::optional<std::string> HybridUnistylesRuntime::getBreakpoint() {
|
|
36
36
|
};
|
37
37
|
|
38
38
|
bool HybridUnistylesRuntime::getRtl() {
|
39
|
-
return this->_nativePlatform
|
39
|
+
return this->_nativePlatform->getPrefersRtlDirection();
|
40
40
|
}
|
41
41
|
|
42
42
|
Insets HybridUnistylesRuntime::getInsets() {
|
43
|
-
return this->_nativePlatform
|
43
|
+
return this->_nativePlatform->getInsets();
|
44
44
|
};
|
45
45
|
|
46
46
|
Orientation HybridUnistylesRuntime::getOrientation() {
|
47
|
-
auto orientation = this->_nativePlatform
|
47
|
+
auto orientation = this->_nativePlatform->getOrientation();
|
48
48
|
|
49
49
|
return static_cast<Orientation>(orientation);
|
50
50
|
};
|
51
51
|
|
52
52
|
double HybridUnistylesRuntime::getPixelRatio() {
|
53
|
-
return this->_nativePlatform
|
53
|
+
return this->_nativePlatform->getPixelRatio();
|
54
54
|
};
|
55
55
|
|
56
56
|
double HybridUnistylesRuntime::getFontScale() {
|
57
|
-
return this->_nativePlatform
|
57
|
+
return this->_nativePlatform->getFontScale();
|
58
58
|
};
|
59
59
|
|
60
60
|
std::unordered_map<std::string, double> HybridUnistylesRuntime::getBreakpoints() {
|
@@ -133,7 +133,7 @@ jsi::Value HybridUnistylesRuntime::getTheme(jsi::Runtime &rt, const jsi::Value &
|
|
133
133
|
if (args[0].isUndefined()) {
|
134
134
|
return state.getCurrentJSTheme();
|
135
135
|
}
|
136
|
-
|
136
|
+
|
137
137
|
helpers::assertThat(rt, args[0].isString(), "UnistylesRuntime.getTheme expected to be called with string.");
|
138
138
|
|
139
139
|
auto themeName = args[0].asString(rt).utf8(rt);
|
@@ -164,11 +164,11 @@ jsi::Value HybridUnistylesRuntime::updateTheme(jsi::Runtime &rt, const jsi::Valu
|
|
164
164
|
}
|
165
165
|
|
166
166
|
void HybridUnistylesRuntime::setImmersiveMode(bool isEnabled) {
|
167
|
-
this->_nativePlatform
|
167
|
+
this->_nativePlatform->setImmersiveMode(isEnabled);
|
168
168
|
};
|
169
169
|
|
170
170
|
void HybridUnistylesRuntime::setRootViewBackgroundColor(double color) {
|
171
|
-
this->_nativePlatform
|
171
|
+
this->_nativePlatform->setRootViewBackgroundColor(color);
|
172
172
|
}
|
173
173
|
|
174
174
|
jsi::Value HybridUnistylesRuntime::createHybridStatusBar(jsi::Runtime &rt, const jsi::Value &thisValue, const jsi::Value *args, size_t count) {
|
@@ -188,7 +188,7 @@ jsi::Value HybridUnistylesRuntime::createHybridNavigationBar(jsi::Runtime &rt, c
|
|
188
188
|
}
|
189
189
|
|
190
190
|
UnistylesCxxMiniRuntime HybridUnistylesRuntime::getMiniRuntime() {
|
191
|
-
UnistylesNativeMiniRuntime nativeMiniRuntime = this->_nativePlatform
|
191
|
+
UnistylesNativeMiniRuntime nativeMiniRuntime = this->_nativePlatform->getMiniRuntime();
|
192
192
|
UnistylesCxxMiniRuntime cxxMiniRuntime{
|
193
193
|
this->getThemeName(),
|
194
194
|
this->getBreakpoint(),
|
@@ -260,16 +260,16 @@ void HybridUnistylesRuntime::registerPlatformListener(const std::function<void (
|
|
260
260
|
}
|
261
261
|
|
262
262
|
void HybridUnistylesRuntime::registerNativePlatformListener(const std::function<void(std::vector<UnistyleDependency>, UnistylesNativeMiniRuntime)>& listener) {
|
263
|
-
this->_nativePlatform
|
263
|
+
this->_nativePlatform->registerPlatformListener(listener);
|
264
264
|
this->_onNativeDependenciesChange = listener;
|
265
265
|
}
|
266
266
|
|
267
267
|
void HybridUnistylesRuntime::registerImeListener(const std::function<void(UnistylesNativeMiniRuntime)>& listener) {
|
268
|
-
this->_nativePlatform
|
268
|
+
this->_nativePlatform->registerImeListener(listener);
|
269
269
|
}
|
270
270
|
|
271
271
|
void HybridUnistylesRuntime::unregisterNativePlatformListeners() {
|
272
|
-
this->_nativePlatform
|
272
|
+
this->_nativePlatform->unregisterPlatformListeners();
|
273
273
|
}
|
274
274
|
|
275
275
|
void HybridUnistylesRuntime::includeDependenciesForColorSchemeChange(std::vector<UnistyleDependency>& deps) {
|
@@ -13,7 +13,7 @@
|
|
13
13
|
namespace margelo::nitro::unistyles {
|
14
14
|
|
15
15
|
struct HybridUnistylesRuntime: public HybridUnistylesRuntimeSpec {
|
16
|
-
HybridUnistylesRuntime(
|
16
|
+
HybridUnistylesRuntime(std::shared_ptr<HybridNativePlatformSpec> nativePlatform, jsi::Runtime& rt, std::function<void(std::function<void(jsi::Runtime&)>&&)> runOnJSThread)
|
17
17
|
: HybridObject(TAG), _nativePlatform{nativePlatform}, _rt{&rt}, runOnJSThread(std::move(runOnJSThread)) {}
|
18
18
|
|
19
19
|
jsi::Value getTheme(jsi::Runtime& rt,
|
@@ -78,7 +78,7 @@ private:
|
|
78
78
|
jsi::Runtime* _rt;
|
79
79
|
std::shared_ptr<HybridNavigationBar> _navigationBar;
|
80
80
|
std::shared_ptr<HybridStatusBar> _statusBar;
|
81
|
-
|
81
|
+
std::shared_ptr<HybridNativePlatformSpec> _nativePlatform;
|
82
82
|
std::function<void(std::vector<UnistyleDependency>)> _onDependenciesChange;
|
83
83
|
std::function<void(std::vector<UnistyleDependency>, UnistylesNativeMiniRuntime)> _onNativeDependenciesChange;
|
84
84
|
};
|
package/cxx/parser/Parser.cpp
CHANGED
@@ -18,6 +18,7 @@ void parser::Parser::buildUnistyles(jsi::Runtime& rt, std::shared_ptr<StyleSheet
|
|
18
18
|
|
19
19
|
if (styleValue.isFunction(rt)) {
|
20
20
|
styleSheet->unistyles[styleKey] = std::make_shared<UnistyleDynamicFunction>(
|
21
|
+
helpers::HashGenerator::generateHash(styleKey),
|
21
22
|
UnistyleType::DynamicFunction,
|
22
23
|
styleKey,
|
23
24
|
styleValue,
|
@@ -28,6 +29,7 @@ void parser::Parser::buildUnistyles(jsi::Runtime& rt, std::shared_ptr<StyleSheet
|
|
28
29
|
}
|
29
30
|
|
30
31
|
styleSheet->unistyles[styleKey] = std::make_shared<Unistyle>(
|
32
|
+
helpers::HashGenerator::generateHash(styleKey),
|
31
33
|
UnistyleType::Object,
|
32
34
|
styleKey,
|
33
35
|
styleValue,
|
@@ -301,7 +303,7 @@ void parser::Parser::rebuildUnistylesInDependencyMap(jsi::Runtime& rt, Dependenc
|
|
301
303
|
);
|
302
304
|
} else {
|
303
305
|
unistyle->rawValue = parsedStyleSheetsWithDefaultTheme[unistyleStyleSheet].asObject(rt).getProperty(rt, unistyle->styleKey.c_str()).asObject(rt);
|
304
|
-
this->rebuildUnistyle(rt,
|
306
|
+
this->rebuildUnistyle(rt, unistyle, unistyleData->variants, unistyleData->dynamicFunctionMetadata);
|
305
307
|
unistyleData->parsedStyle = jsi::Value(rt, unistyle->parsedStyle.value()).asObject(rt);
|
306
308
|
}
|
307
309
|
|
@@ -317,13 +319,14 @@ void parser::Parser::rebuildUnistylesInDependencyMap(jsi::Runtime& rt, Dependenc
|
|
317
319
|
for (auto& [_, unistyle] : styleSheet->unistyles) {
|
318
320
|
if (!parsedUnistyles.contains(unistyle)) {
|
319
321
|
unistyle->rawValue = parsedStyleSheetsWithDefaultTheme[styleSheet].asObject(rt).getProperty(rt, unistyle->styleKey.c_str()).asObject(rt);
|
322
|
+
unistyle->isDirty = true;
|
320
323
|
}
|
321
324
|
}
|
322
325
|
}
|
323
326
|
}
|
324
327
|
|
325
328
|
// rebuild single unistyle
|
326
|
-
void parser::Parser::rebuildUnistyle(jsi::Runtime& rt,
|
329
|
+
void parser::Parser::rebuildUnistyle(jsi::Runtime& rt, Unistyle::Shared unistyle, const Variants& variants, std::optional<std::vector<folly::dynamic>> metadata) {
|
327
330
|
if (unistyle->type == core::UnistyleType::Object) {
|
328
331
|
auto result = this->parseFirstLevel(rt, unistyle, variants);
|
329
332
|
|
@@ -358,6 +361,10 @@ void parser::Parser::rebuildUnistyle(jsi::Runtime& rt, std::shared_ptr<StyleShee
|
|
358
361
|
unistyleFn->unprocessedValue = std::move(functionResult);
|
359
362
|
unistyleFn->parsedStyle = this->parseFirstLevel(rt, unistyleFn, variants);
|
360
363
|
}
|
364
|
+
|
365
|
+
if (unistyle->isDirty) {
|
366
|
+
unistyle->isDirty = false;
|
367
|
+
}
|
361
368
|
}
|
362
369
|
|
363
370
|
// convert dependency map to shadow tree updates
|
@@ -392,8 +399,10 @@ jsi::Object parser::Parser::parseFirstLevel(jsi::Runtime& rt, Unistyle::Shared u
|
|
392
399
|
|
393
400
|
helpers::enumerateJSIObject(rt, style, [&](const std::string& propertyName, jsi::Value& propertyValue){
|
394
401
|
// parse dependencies only once
|
395
|
-
if (propertyName == helpers::STYLE_DEPENDENCIES && unistyle->
|
396
|
-
|
402
|
+
if (propertyName == helpers::STYLE_DEPENDENCIES && !unistyle->isSealed()) {
|
403
|
+
auto newDeps = this->parseDependencies(rt, propertyValue.asObject(rt));
|
404
|
+
|
405
|
+
unistyle->dependencies.insert(unistyle->dependencies.end(), newDeps.begin(), newDeps.end());
|
397
406
|
|
398
407
|
return;
|
399
408
|
}
|
@@ -508,36 +517,22 @@ jsi::Function parser::Parser::createDynamicFunctionProxy(jsi::Runtime& rt, Unist
|
|
508
517
|
|
509
518
|
// memoize metadata to call it later
|
510
519
|
auto unistyleFn = std::dynamic_pointer_cast<UnistyleDynamicFunction>(unistyle);
|
511
|
-
auto& registry = core::UnistylesRegistry::get();
|
512
520
|
|
513
521
|
unistyleFn->unprocessedValue = jsi::Value(rt, result).asObject(rt);
|
514
522
|
|
515
|
-
jsi::Value rawVariants = thisObject.hasProperty(rt, helpers::
|
516
|
-
? thisObject.getProperty(rt, helpers::
|
517
|
-
: jsi::
|
518
|
-
|
519
|
-
|
520
|
-
: std::optional<Variants>(helpers::variantsToPairs(rt, rawVariants.asObject(rt)));
|
523
|
+
jsi::Value rawVariants = thisObject.hasProperty(rt, helpers::STYLESHEET_VARIANTS.c_str())
|
524
|
+
? thisObject.getProperty(rt, helpers::STYLESHEET_VARIANTS.c_str())
|
525
|
+
: jsi::Object(rt);
|
526
|
+
|
527
|
+
Variants variants = helpers::variantsToPairs(rt, rawVariants.asObject(rt));
|
521
528
|
|
522
529
|
unistyleFn->parsedStyle = this->parseFirstLevel(rt, unistyleFn, variants);
|
523
530
|
unistyleFn->seal();
|
524
531
|
|
525
|
-
|
526
|
-
|
527
|
-
// include dependencies for createUnistylesComponent
|
528
|
-
style.setProperty(rt, "__proto__", generateUnistylesPrototype(rt, unistylesRuntime, unistyle, variants, helpers::functionArgumentsToArray(rt, args, count)));
|
529
|
-
|
530
|
-
jsi::Object secrets = jsi::Object(rt);
|
531
|
-
|
532
|
-
secrets.setProperty(rt, helpers::ARGUMENTS.c_str(), helpers::functionArgumentsToArray(rt, args, count));
|
533
|
-
|
534
|
-
helpers::defineHiddenProperty(rt, style, helpers::SECRETS.c_str(), secrets);
|
535
|
-
|
536
|
-
auto wrappedUnistyle = std::make_shared<UnistyleWrapper>(unistyle);
|
537
|
-
|
538
|
-
style.setNativeState(rt, std::move(wrappedUnistyle));
|
532
|
+
// for compatibility purpose save last arguments to style instance. It will work ok, if user sees warning about multiple unistyles
|
533
|
+
helpers::defineHiddenProperty(rt, thisObject, helpers::ARGUMENTS.c_str() + std::string("_") + unistyleFn->styleKey, helpers::functionArgumentsToArray(rt, args, count));
|
539
534
|
|
540
|
-
return
|
535
|
+
return core::objectFromUnistyle(rt, unistylesRuntime, unistyle, variants, std::make_optional<jsi::Array>(helpers::functionArgumentsToArray(rt, args, count))).asObject(rt);
|
541
536
|
});
|
542
537
|
}
|
543
538
|
|
@@ -658,7 +653,11 @@ jsi::Value parser::Parser::getValueFromBreakpoints(jsi::Runtime& rt, Unistyle::S
|
|
658
653
|
auto sortedBreakpoints = state.getSortedBreakpointPairs();
|
659
654
|
auto hasBreakpoints = !sortedBreakpoints.empty();
|
660
655
|
auto currentBreakpoint = state.getCurrentBreakpointName();
|
661
|
-
auto
|
656
|
+
auto rawDimensions = this->_unistylesRuntime->getScreen();
|
657
|
+
auto pixelRatio = this->_unistylesRuntime->getPixelRatio();
|
658
|
+
auto dimensions = registry.shouldUsePointsForBreakpoints
|
659
|
+
? Dimensions(rawDimensions.width / pixelRatio, rawDimensions.height / pixelRatio)
|
660
|
+
: rawDimensions;
|
662
661
|
auto currentOrientation = dimensions.width > dimensions.height
|
663
662
|
? "landscape"
|
664
663
|
: "portrait";
|
package/cxx/parser/Parser.h
CHANGED
@@ -10,6 +10,7 @@
|
|
10
10
|
#include "HybridUnistylesRuntime.h"
|
11
11
|
#include "StyleSheet.h"
|
12
12
|
#include "ShadowLeafUpdate.h"
|
13
|
+
#include "HashGenerator.h"
|
13
14
|
|
14
15
|
namespace margelo::nitro::unistyles::parser {
|
15
16
|
|
@@ -27,7 +28,7 @@ struct Parser {
|
|
27
28
|
void rebuildUnistylesInDependencyMap(jsi::Runtime& rt, core::DependencyMap& dependencyMap, std::vector<std::shared_ptr<core::StyleSheet>>& styleSheets, std::optional<UnistylesNativeMiniRuntime> maybeMiniRuntime);
|
28
29
|
void rebuildShadowLeafUpdates(jsi::Runtime& rt, core::DependencyMap& dependencyMap);
|
29
30
|
folly::dynamic parseStylesToShadowTreeStyles(jsi::Runtime& rt, const std::vector<std::shared_ptr<UnistyleData>>& unistyles);
|
30
|
-
void rebuildUnistyle(jsi::Runtime& rt,
|
31
|
+
void rebuildUnistyle(jsi::Runtime& rt, Unistyle::Shared unistyle, const Variants& variants, std::optional<std::vector<folly::dynamic>>);
|
31
32
|
void rebuildUnistyleWithScopedTheme(jsi::Runtime& rt, jsi::Value& jsScopedTheme, std::shared_ptr<core::UnistyleData> unistyleData);
|
32
33
|
jsi::Value getParsedStyleSheetForScopedTheme(jsi::Runtime& rt, core::Unistyle::Shared unistyle, std::string& scopedTheme);
|
33
34
|
|
@@ -14,12 +14,10 @@ class NativeIOSPlatform: HybridNativePlatformSpec {
|
|
14
14
|
|
15
15
|
var dependencyListeners: Array<CxxDependencyListener> = []
|
16
16
|
var imeListeners: Array<CxxImeListener> = []
|
17
|
-
var hybridContext = margelo.nitro.HybridContext()
|
18
|
-
var memorySize: Int {
|
19
|
-
return getSizeOf(self)
|
20
|
-
}
|
21
17
|
|
22
|
-
init() {
|
18
|
+
override init() {
|
19
|
+
super.init()
|
20
|
+
|
23
21
|
self.miniRuntime = self.buildMiniRuntime()
|
24
22
|
|
25
23
|
setupPlatformListeners()
|
@@ -116,6 +114,12 @@ class NativeIOSPlatform: HybridNativePlatformSpec {
|
|
116
114
|
func getScreenDimensionsFn() -> Dimensions {
|
117
115
|
guard let presentedViewController = RCTPresentedViewController(),
|
118
116
|
let windowFrame = presentedViewController.view.window?.frame else {
|
117
|
+
|
118
|
+
// when user goes to background RCTPresentedViewController is not available, try to get last known value
|
119
|
+
if let cachedRuntime = self.miniRuntime, UIApplication.shared.applicationState == .background {
|
120
|
+
return cachedRuntime.screen;
|
121
|
+
}
|
122
|
+
|
119
123
|
// this should never happen, but it's better to return zeros
|
120
124
|
return Dimensions(width: 0, height: 0)
|
121
125
|
}
|
@@ -139,10 +143,10 @@ class NativeIOSPlatform: HybridNativePlatformSpec {
|
|
139
143
|
let screenDimensions = getScreenDimensions()
|
140
144
|
|
141
145
|
if (screenDimensions.width > screenDimensions.height) {
|
142
|
-
return Orientation.landscape
|
146
|
+
return Orientation.landscape
|
143
147
|
}
|
144
148
|
|
145
|
-
return Orientation.portrait
|
149
|
+
return Orientation.portrait
|
146
150
|
}
|
147
151
|
|
148
152
|
func getContentSizeCategory() -> String {
|
@@ -187,7 +191,7 @@ class NativeIOSPlatform: HybridNativePlatformSpec {
|
|
187
191
|
return getContentSizeCategoryFn()
|
188
192
|
}
|
189
193
|
}
|
190
|
-
|
194
|
+
|
191
195
|
func getMainWindow() -> UIWindow? {
|
192
196
|
guard let mainWindow = UIApplication.shared.connectedScenes
|
193
197
|
.compactMap({ $0 as? UIWindowScene })
|
@@ -195,7 +199,7 @@ class NativeIOSPlatform: HybridNativePlatformSpec {
|
|
195
199
|
.first(where: { $0.isKeyWindow }) else {
|
196
200
|
return nil
|
197
201
|
}
|
198
|
-
|
202
|
+
|
199
203
|
return mainWindow
|
200
204
|
}
|
201
205
|
|
@@ -270,8 +274,14 @@ class NativeIOSPlatform: HybridNativePlatformSpec {
|
|
270
274
|
func getPixelRatioFn() -> Double {
|
271
275
|
guard let presentedViewController = RCTPresentedViewController(),
|
272
276
|
let window = presentedViewController.view.window else {
|
277
|
+
|
278
|
+
// when user goes to background RCTPresentedViewController is not available, try to get last known value
|
279
|
+
if let cachedRuntime = self.miniRuntime, UIApplication.shared.applicationState == .background {
|
280
|
+
return cachedRuntime.pixelRatio;
|
281
|
+
}
|
282
|
+
|
273
283
|
// this should never happen, but it's better to return default
|
274
|
-
return 1
|
284
|
+
return 1
|
275
285
|
}
|
276
286
|
|
277
287
|
return window.screen.scale
|
@@ -299,7 +309,7 @@ class NativeIOSPlatform: HybridNativePlatformSpec {
|
|
299
309
|
}
|
300
310
|
|
301
311
|
func getNavigationBarDimensions() -> Dimensions {
|
302
|
-
return Dimensions(width: 0, height: 0)
|
312
|
+
return Dimensions(width: 0, height: 0)
|
303
313
|
}
|
304
314
|
|
305
315
|
func setStatusBarHidden(isHidden: Bool) throws {
|
package/ios/NativePlatform.swift
CHANGED
@@ -5,13 +5,13 @@ enum PlatformError: Error {
|
|
5
5
|
}
|
6
6
|
|
7
7
|
public class NativePlatform {
|
8
|
-
public static func create() ->
|
8
|
+
public static func create() -> HybridNativePlatformSpec_cxx {
|
9
9
|
#if os(iOS)
|
10
10
|
let nativePlatform = NativeIOSPlatform()
|
11
11
|
#else
|
12
12
|
throw PlatformError.UnsupportedPlatform
|
13
13
|
#endif
|
14
14
|
|
15
|
-
return
|
15
|
+
return HybridNativePlatformSpec_cxx(nativePlatform);
|
16
16
|
}
|
17
17
|
}
|
@@ -8,12 +8,12 @@
|
|
8
8
|
#import "TurboUnistyles/TurboUnistyles.h"
|
9
9
|
#import <React/RCTSurfacePresenter.h>
|
10
10
|
#import <React/RCTScheduler.h>
|
11
|
-
#import <React/
|
12
|
-
#import <
|
11
|
+
#import <React/RCTCallInvoker.h>
|
12
|
+
#import <React/RCTCallInvokerModule.h>
|
13
13
|
#import <ReactCommon/RCTTurboModuleWithJSIBindings.h>
|
14
14
|
|
15
|
-
@interface UnistylesModule: RCTEventEmitter<NativeTurboUnistylesSpec>
|
15
|
+
@interface UnistylesModule: RCTEventEmitter<NativeTurboUnistylesSpec, RCTCallInvokerModule>
|
16
16
|
@end
|
17
17
|
|
18
|
-
@interface UnistylesModule()<RCTTurboModuleWithJSIBindings
|
18
|
+
@interface UnistylesModule()<RCTTurboModuleWithJSIBindings>
|
19
19
|
@end
|
@@ -11,7 +11,7 @@ using namespace margelo::nitro;
|
|
11
11
|
RCT_EXPORT_MODULE(Unistyles)
|
12
12
|
|
13
13
|
__weak RCTSurfacePresenter* _surfacePresenter;
|
14
|
-
@synthesize
|
14
|
+
@synthesize callInvoker = _callInvoker;
|
15
15
|
|
16
16
|
+ (BOOL)requiresMainQueueSetup {
|
17
17
|
return YES;
|
@@ -36,14 +36,11 @@ __weak RCTSurfacePresenter* _surfacePresenter;
|
|
36
36
|
}
|
37
37
|
|
38
38
|
- (void)createHybrids:(jsi::Runtime&)rt {
|
39
|
-
auto runOnJSThread =
|
40
|
-
|
39
|
+
auto runOnJSThread = [callInvoker = _callInvoker.callInvoker](std::function<void(jsi::Runtime& rt)> &&callback){
|
40
|
+
callInvoker->invokeAsync(std::move(callback));
|
41
|
+
};
|
41
42
|
|
42
|
-
|
43
|
-
objcCallback(rt);
|
44
|
-
}];
|
45
|
-
});
|
46
|
-
auto nativePlatform = Unistyles::NativePlatform::create();
|
43
|
+
auto nativePlatform = Unistyles::NativePlatform::create().getCxxPart();
|
47
44
|
auto unistylesRuntime = std::make_shared<HybridUnistylesRuntime>(nativePlatform, rt, runOnJSThread);
|
48
45
|
auto uiManager = [_surfacePresenter scheduler].uiManager;
|
49
46
|
auto styleSheet = std::make_shared<HybridStyleSheet>(unistylesRuntime, uiManager);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_specs","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","Apply","name","UnistylesShadowRegistry","setScopedTheme","useLayoutEffect","ScopedTheme","children","previousScopedTheme","getScopedTheme","mappedChildren","jsx","Fragment","exports"],"sourceRoot":"../../../src","sources":["components/ScopedTheme.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAAkD,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAL,wBAAAK,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAAV,GAAA,IAAAU,CAAA,CAAAC,GAAA,IAAAP,MAAA,CAAAC,cAAA,CAAAJ,CAAA,EAAAM,CAAA,EAAAG,CAAA,IAAAT,CAAA,CAAAM,CAAA,IAAAd,CAAA,CAAAc,CAAA,YAAAN,CAAA,CAAAH,OAAA,GAAAL,CAAA,EAAAG,CAAA,IAAAA,CAAA,CAAAe,GAAA,CAAAlB,CAAA,EAAAQ,CAAA,GAAAA,CAAA;AAMlD,MAAMW,KAAK,GAAGA,CAAC;EAAEC;AAAuC,CAAC,KAAK;EAC1DC,8BAAuB,CAACC,cAAc,CAACF,IAAI,CAAC;EAE5C,IAAAG,sBAAe,EAAC,MAAM;IAClBF,8BAAuB,CAACC,cAAc,CAACF,IAAI,CAAC;EAChD,CAAC,CAAC;EAEF,OAAO,IAAI;AACf,CAAC;AAEM,MAAMI,WAAyE,GAAGA,CAAC;EAAEJ,IAAI;EAAEK;AAAS,CAAC,KAAK;EAC7G,MAAMC,mBAAmB,GAAGL,8BAAuB,CAACM,cAAc,CAAC,CAAC;EACpE,MAAMC,cAAc,GAAG,cACnB,IAAA9B,WAAA,CAAA+B,GAAA,EAACV,KAAK;IAAYC,IAAI,EAAEA;EAAK,GAAjBA,IAAmB,CAAC,EAChCK,QAAQ,eACR,IAAA3B,WAAA,CAAA+B,GAAA,EAACV,KAAK;IAAeC,IAAI,EAAEM;
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_specs","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","Apply","name","UnistylesShadowRegistry","setScopedTheme","useLayoutEffect","ScopedTheme","children","previousScopedTheme","getScopedTheme","mappedChildren","jsx","Fragment","exports"],"sourceRoot":"../../../src","sources":["components/ScopedTheme.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAAkD,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAL,wBAAAK,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAAV,GAAA,IAAAU,CAAA,CAAAC,GAAA,IAAAP,MAAA,CAAAC,cAAA,CAAAJ,CAAA,EAAAM,CAAA,EAAAG,CAAA,IAAAT,CAAA,CAAAM,CAAA,IAAAd,CAAA,CAAAc,CAAA,YAAAN,CAAA,CAAAH,OAAA,GAAAL,CAAA,EAAAG,CAAA,IAAAA,CAAA,CAAAe,GAAA,CAAAlB,CAAA,EAAAQ,CAAA,GAAAA,CAAA;AAMlD,MAAMW,KAAK,GAAGA,CAAC;EAAEC;AAAuC,CAAC,KAAK;EAC1DC,8BAAuB,CAACC,cAAc,CAACF,IAAI,CAAC;EAE5C,IAAAG,sBAAe,EAAC,MAAM;IAClBF,8BAAuB,CAACC,cAAc,CAACF,IAAI,CAAC;EAChD,CAAC,CAAC;EAEF,OAAO,IAAI;AACf,CAAC;AAEM,MAAMI,WAAyE,GAAGA,CAAC;EAAEJ,IAAI;EAAEK;AAAS,CAAC,KAAK;EAC7G,MAAMC,mBAAmB,GAAGL,8BAAuB,CAACM,cAAc,CAAC,CAAC;EACpE,MAAMC,cAAc,GAAG,cACnB,IAAA9B,WAAA,CAAA+B,GAAA,EAACV,KAAK;IAAYC,IAAI,EAAEA;EAAK,GAAjBA,IAAmB,CAAC,EAChCK,QAAQ,eACR,IAAA3B,WAAA,CAAA+B,GAAA,EAACV,KAAK;IAAeC,IAAI,EAAEM;EAAyD,GAAzE,SAA2E,CAAC,CAC1F;EAED,oBACI,IAAA5B,WAAA,CAAA+B,GAAA,EAACnC,MAAA,CAAAW,OAAK,CAACyB,QAAQ;IAAAL,QAAA,EACVG;EAAc,CACH,CAAC;AAEzB,CAAC;AAAAG,OAAA,CAAAP,WAAA,GAAAA,WAAA","ignoreList":[]}
|
@@ -21,14 +21,7 @@ Object.defineProperty(exports, "ScopedTheme", {
|
|
21
21
|
return _ScopedTheme.ScopedTheme;
|
22
22
|
}
|
23
23
|
});
|
24
|
-
Object.defineProperty(exports, "Variants", {
|
25
|
-
enumerable: true,
|
26
|
-
get: function () {
|
27
|
-
return _Variants.Variants;
|
28
|
-
}
|
29
|
-
});
|
30
24
|
var _Hide = require("./Hide");
|
31
25
|
var _Display = require("./Display");
|
32
|
-
var _Variants = require("./Variants");
|
33
26
|
var _ScopedTheme = require("./ScopedTheme");
|
34
27
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_Hide","require","_Display","
|
1
|
+
{"version":3,"names":["_Hide","require","_Display","_ScopedTheme"],"sourceRoot":"../../../src","sources":["components/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA","ignoreList":[]}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.Animated = void 0;
|
7
|
+
var _reactNative = require("react-native");
|
8
|
+
var _View = require("./View");
|
9
|
+
var _Text = require("./Text");
|
10
|
+
var _FlatList = require("./FlatList");
|
11
|
+
var _Image = require("./Image");
|
12
|
+
var _ScrollView = require("./ScrollView");
|
13
|
+
var _SectionList = require("./SectionList");
|
14
|
+
const Animated = exports.Animated = {
|
15
|
+
..._reactNative.Animated,
|
16
|
+
View: _reactNative.Animated.createAnimatedComponent(_View.View),
|
17
|
+
Text: _reactNative.Animated.createAnimatedComponent(_Text.Text),
|
18
|
+
FlatList: _reactNative.Animated.createAnimatedComponent(_FlatList.FlatList),
|
19
|
+
Image: _reactNative.Animated.createAnimatedComponent(_Image.Image),
|
20
|
+
ScrollView: _reactNative.Animated.createAnimatedComponent(_ScrollView.ScrollView),
|
21
|
+
SectionList: _reactNative.Animated.createAnimatedComponent(_SectionList.SectionList)
|
22
|
+
};
|
23
|
+
//# sourceMappingURL=Animated.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_View","_Text","_FlatList","_Image","_ScrollView","_SectionList","Animated","exports","RNAnimated","View","createAnimatedComponent","Text","FlatList","Image","ScrollView","SectionList"],"sourceRoot":"../../../../src","sources":["components/native/Animated.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AAEO,MAAMO,QAAQ,GAAAC,OAAA,CAAAD,QAAA,GAAG;EACpB,GAAGE,qBAAU;EACbC,IAAI,EAAED,qBAAU,CAACE,uBAAuB,CAACD,UAAI,CAAC;EAC9CE,IAAI,EAAEH,qBAAU,CAACE,uBAAuB,CAACC,UAAI,CAAC;EAC9CC,QAAQ,EAAEJ,qBAAU,CAACE,uBAAuB,CAACE,kBAAQ,CAAC;EACtDC,KAAK,EAAEL,qBAAU,CAACE,uBAAuB,CAACG,YAAK,CAAC;EAChDC,UAAU,EAAEN,qBAAU,CAACE,uBAAuB,CAACI,sBAAU,CAAC;EAC1DC,WAAW,EAAEP,qBAAU,CAACE,uBAAuB,CAACK,wBAAW;AAC/D,CAAC","ignoreList":[]}
|