react-native-unistyles 3.0.0-beta.8 → 3.0.0-experimental-2025051402
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 +32 -26
- package/Unistyles.podspec +1 -0
- package/android/src/main/cxx/NativeUnistylesModule.cpp +3 -7
- package/android/src/main/cxx/NativeUnistylesModule.h +0 -4
- package/android/src/main/java/com/unistyles/NativePlatform+android.kt +5 -1
- package/android/src/main/java/com/unistyles/NativePlatform+insets.kt +2 -3
- package/android/src/main/java/com/unistyles/NativePlatform+listener.kt +1 -1
- package/android/src/main/java/com/unistyles/UnistylesModule.kt +1 -7
- package/components/native/ActivityIndicator/package.json +1 -0
- package/components/native/Animated/package.json +1 -0
- package/components/native/FlatList/package.json +1 -0
- package/components/native/Image/package.json +2 -1
- package/components/native/ImageBackground/package.json +1 -0
- package/components/native/KeyboardAvoidingView/package.json +1 -0
- package/components/native/NativeText/package.json +1 -0
- package/components/native/NativeView/package.json +1 -0
- package/components/native/Pressable/package.json +1 -0
- package/components/native/RefreshControl/package.json +1 -0
- package/components/native/ScrollView/package.json +1 -0
- package/components/native/SectionList/package.json +1 -0
- package/components/native/Switch/package.json +1 -0
- package/components/native/Text/package.json +1 -0
- package/components/native/TextInput/package.json +1 -0
- package/components/native/TouchableHighlight/package.json +1 -0
- package/components/native/TouchableOpacity/package.json +1 -0
- package/components/native/View/package.json +1 -0
- package/components/native/VirtualizedList/package.json +1 -0
- package/cxx/common/Helpers.h +4 -0
- package/cxx/core/HostUnistyle.cpp +14 -5
- package/cxx/core/StyleSheet.h +1 -1
- package/cxx/core/UnistyleWrapper.h +1 -1
- package/cxx/core/UnistylesCommitShadowNode.h +0 -21
- package/cxx/core/UnistylesRegistry.cpp +67 -64
- package/cxx/core/UnistylesRegistry.h +1 -1
- package/cxx/hybridObjects/HybridStyleSheet.cpp +10 -19
- package/cxx/hybridObjects/HybridStyleSheet.h +3 -8
- package/cxx/parser/Parser.cpp +161 -115
- package/cxx/parser/Parser.h +1 -1
- package/cxx/shadowTree/ShadowTrafficController.h +7 -9
- package/cxx/shadowTree/ShadowTreeManager.cpp +36 -33
- package/cxx/shadowTree/ShadowTreeManager.h +0 -1
- package/ios/NativePlatform+ios.swift +1 -1
- package/ios/NativePlatformListener+ios.swift +12 -7
- package/ios/UnistylesModuleOnLoad.h +1 -5
- package/ios/UnistylesModuleOnLoad.mm +5 -13
- package/lib/commonjs/components/native/Image.js +27 -1
- package/lib/commonjs/components/native/Image.js.map +1 -1
- package/lib/commonjs/components/native/Image.native.js +10 -0
- package/lib/commonjs/components/native/Image.native.js.map +1 -0
- package/lib/commonjs/components/native/ImageBackground.js +17 -28
- package/lib/commonjs/components/native/ImageBackground.js.map +1 -1
- package/lib/commonjs/components/native/Pressable.native.js +7 -4
- package/lib/commonjs/components/native/Pressable.native.js.map +1 -1
- package/lib/commonjs/core/createUnistylesElement.js +17 -21
- package/lib/commonjs/core/createUnistylesElement.js.map +1 -1
- package/lib/commonjs/core/createUnistylesElement.native.js +6 -4
- package/lib/commonjs/core/createUnistylesElement.native.js.map +1 -1
- package/lib/commonjs/core/createUnistylesImageBackground.js +7 -5
- package/lib/commonjs/core/createUnistylesImageBackground.js.map +1 -1
- package/lib/commonjs/core/getClassname.js +11 -5
- package/lib/commonjs/core/getClassname.js.map +1 -1
- package/lib/commonjs/core/passForwardRef.js +3 -5
- package/lib/commonjs/core/passForwardRef.js.map +1 -1
- package/lib/commonjs/core/useProxifiedUnistyles/listener.js +5 -3
- package/lib/commonjs/core/useProxifiedUnistyles/listener.js.map +1 -1
- package/lib/commonjs/core/useProxifiedUnistyles/useProxifiedUnistyles.js +14 -1
- package/lib/commonjs/core/useProxifiedUnistyles/useProxifiedUnistyles.js.map +1 -1
- package/lib/commonjs/core/withUnistyles/withUnistyles.js +14 -5
- package/lib/commonjs/core/withUnistyles/withUnistyles.js.map +1 -1
- package/lib/commonjs/core/withUnistyles/withUnistyles.native.js +1 -1
- package/lib/commonjs/core/withUnistyles/withUnistyles.native.js.map +1 -1
- package/lib/commonjs/hooks/useMedia.js +4 -4
- package/lib/commonjs/hooks/useMedia.js.map +1 -1
- package/lib/commonjs/hooks/useMedia.native.js +4 -4
- package/lib/commonjs/hooks/useMedia.native.js.map +1 -1
- package/lib/commonjs/mocks.js +203 -0
- package/lib/commonjs/mocks.js.map +1 -0
- package/lib/commonjs/mq.js +1 -23
- package/lib/commonjs/mq.js.map +1 -1
- package/lib/commonjs/reanimated/index.js +13 -0
- package/lib/commonjs/reanimated/index.js.map +1 -0
- package/lib/commonjs/reanimated/useAnimatedTheme.js +22 -0
- package/lib/commonjs/reanimated/useAnimatedTheme.js.map +1 -0
- package/lib/commonjs/reanimated/useAnimatedTheme.native.js +24 -0
- package/lib/commonjs/reanimated/useAnimatedTheme.native.js.map +1 -0
- package/lib/commonjs/server/getServerUnistyles.js +9 -4
- package/lib/commonjs/server/getServerUnistyles.js.map +1 -1
- package/lib/commonjs/server/hydrateServerUnistyles.js +4 -2
- package/lib/commonjs/server/hydrateServerUnistyles.js.map +1 -1
- package/lib/commonjs/server/resetServerUnistyles.js +4 -2
- package/lib/commonjs/server/resetServerUnistyles.js.map +1 -1
- package/lib/commonjs/server/serialize.js +24 -0
- package/lib/commonjs/server/serialize.js.map +1 -0
- package/lib/commonjs/specs/NativePlatform/NativePlatform.nitro.js +1 -0
- package/lib/commonjs/specs/NativePlatform/NativePlatform.nitro.js.map +1 -1
- package/lib/commonjs/specs/ShadowRegistry/index.js +2 -2
- package/lib/commonjs/specs/ShadowRegistry/index.js.map +1 -1
- package/lib/commonjs/utils.js +23 -1
- package/lib/commonjs/utils.js.map +1 -1
- package/lib/commonjs/web/convert/index.js +4 -7
- package/lib/commonjs/web/convert/index.js.map +1 -1
- package/lib/commonjs/web/convert/object/filter.js +7 -8
- package/lib/commonjs/web/convert/object/filter.js.map +1 -1
- package/lib/commonjs/web/create.js +10 -2
- package/lib/commonjs/web/create.js.map +1 -1
- package/lib/commonjs/web/css/core.js +2 -2
- package/lib/commonjs/web/css/core.js.map +1 -1
- package/lib/commonjs/web/css/state.js +6 -3
- package/lib/commonjs/web/css/state.js.map +1 -1
- package/lib/commonjs/web/index.js +7 -12
- package/lib/commonjs/web/index.js.map +1 -1
- package/lib/commonjs/web/registry.js +11 -9
- package/lib/commonjs/web/registry.js.map +1 -1
- package/lib/commonjs/web/runtime.js +5 -1
- package/lib/commonjs/web/runtime.js.map +1 -1
- package/lib/commonjs/web/services.js +7 -2
- package/lib/commonjs/web/services.js.map +1 -1
- package/lib/commonjs/web/shadowRegistry.js +27 -10
- package/lib/commonjs/web/shadowRegistry.js.map +1 -1
- package/lib/commonjs/web/state.js +11 -2
- package/lib/commonjs/web/state.js.map +1 -1
- package/lib/commonjs/web/types.js +2 -0
- package/lib/commonjs/web/types.js.map +1 -1
- package/lib/commonjs/web/utils/createUnistylesRef.js +31 -0
- package/lib/commonjs/web/utils/createUnistylesRef.js.map +1 -0
- package/lib/commonjs/web/utils/unistyle.js +40 -14
- package/lib/commonjs/web/utils/unistyle.js.map +1 -1
- package/lib/commonjs/web-only/getWebProps.js +19 -0
- package/lib/commonjs/web-only/getWebProps.js.map +1 -0
- package/lib/commonjs/web-only/index.js +13 -0
- package/lib/commonjs/web-only/index.js.map +1 -0
- package/lib/module/components/native/Image.js +26 -2
- package/lib/module/components/native/Image.js.map +1 -1
- package/lib/module/components/native/Image.native.js +6 -0
- package/lib/module/components/native/Image.native.js.map +1 -0
- package/lib/module/components/native/ImageBackground.js +18 -29
- package/lib/module/components/native/ImageBackground.js.map +1 -1
- package/lib/module/components/native/Pressable.native.js +7 -4
- package/lib/module/components/native/Pressable.native.js.map +1 -1
- package/lib/module/core/createUnistylesElement.js +17 -21
- package/lib/module/core/createUnistylesElement.js.map +1 -1
- package/lib/module/core/createUnistylesElement.native.js +6 -4
- package/lib/module/core/createUnistylesElement.native.js.map +1 -1
- package/lib/module/core/createUnistylesImageBackground.js +7 -5
- package/lib/module/core/createUnistylesImageBackground.js.map +1 -1
- package/lib/module/core/getClassname.js +9 -5
- package/lib/module/core/getClassname.js.map +1 -1
- package/lib/module/core/passForwardRef.js +3 -5
- package/lib/module/core/passForwardRef.js.map +1 -1
- package/lib/module/core/useProxifiedUnistyles/listener.js +3 -3
- package/lib/module/core/useProxifiedUnistyles/listener.js.map +1 -1
- package/lib/module/core/useProxifiedUnistyles/useProxifiedUnistyles.js +14 -1
- package/lib/module/core/useProxifiedUnistyles/useProxifiedUnistyles.js.map +1 -1
- package/lib/module/core/withUnistyles/withUnistyles.js +14 -5
- package/lib/module/core/withUnistyles/withUnistyles.js.map +1 -1
- package/lib/module/core/withUnistyles/withUnistyles.native.js +1 -1
- package/lib/module/core/withUnistyles/withUnistyles.native.js.map +1 -1
- package/lib/module/hooks/useMedia.js +1 -1
- package/lib/module/hooks/useMedia.js.map +1 -1
- package/lib/module/hooks/useMedia.native.js +1 -1
- package/lib/module/hooks/useMedia.native.js.map +1 -1
- package/lib/module/mocks.js +201 -0
- package/lib/module/mocks.js.map +1 -0
- package/lib/module/mq.js +0 -19
- package/lib/module/mq.js.map +1 -1
- package/lib/module/reanimated/index.js +4 -0
- package/lib/module/reanimated/index.js.map +1 -0
- package/lib/module/reanimated/useAnimatedTheme.js +17 -0
- package/lib/module/reanimated/useAnimatedTheme.js.map +1 -0
- package/lib/module/reanimated/useAnimatedTheme.native.js +19 -0
- package/lib/module/reanimated/useAnimatedTheme.native.js.map +1 -0
- package/lib/module/server/getServerUnistyles.js +7 -4
- package/lib/module/server/getServerUnistyles.js.map +1 -1
- package/lib/module/server/hydrateServerUnistyles.js +2 -2
- package/lib/module/server/hydrateServerUnistyles.js.map +1 -1
- package/lib/module/server/resetServerUnistyles.js +2 -2
- package/lib/module/server/resetServerUnistyles.js.map +1 -1
- package/lib/module/server/serialize.js +19 -0
- package/lib/module/server/serialize.js.map +1 -0
- package/lib/module/specs/NativePlatform/NativePlatform.nitro.js +1 -0
- package/lib/module/specs/NativePlatform/NativePlatform.nitro.js.map +1 -1
- package/lib/module/specs/ShadowRegistry/index.js +2 -2
- package/lib/module/specs/ShadowRegistry/index.js.map +1 -1
- package/lib/module/utils.js +19 -0
- package/lib/module/utils.js.map +1 -1
- package/lib/module/web/convert/index.js +4 -7
- package/lib/module/web/convert/index.js.map +1 -1
- package/lib/module/web/convert/object/filter.js +3 -4
- package/lib/module/web/convert/object/filter.js.map +1 -1
- package/lib/module/web/create.js +9 -3
- package/lib/module/web/create.js.map +1 -1
- package/lib/module/web/css/core.js +2 -2
- package/lib/module/web/css/core.js.map +1 -1
- package/lib/module/web/css/state.js +6 -3
- package/lib/module/web/css/state.js.map +1 -1
- package/lib/module/web/index.js +4 -10
- package/lib/module/web/index.js.map +1 -1
- package/lib/module/web/registry.js +11 -9
- package/lib/module/web/registry.js.map +1 -1
- package/lib/module/web/runtime.js +5 -1
- package/lib/module/web/runtime.js.map +1 -1
- package/lib/module/web/services.js +7 -1
- package/lib/module/web/services.js.map +1 -1
- package/lib/module/web/shadowRegistry.js +27 -10
- package/lib/module/web/shadowRegistry.js.map +1 -1
- package/lib/module/web/state.js +11 -2
- package/lib/module/web/state.js.map +1 -1
- package/lib/module/web/types.js +1 -1
- package/lib/module/web/types.js.map +1 -1
- package/lib/module/web/utils/createUnistylesRef.js +24 -0
- package/lib/module/web/utils/createUnistylesRef.js.map +1 -0
- package/lib/module/web/utils/unistyle.js +32 -10
- package/lib/module/web/utils/unistyle.js.map +1 -1
- package/lib/module/web-only/getWebProps.js +14 -0
- package/lib/module/web-only/getWebProps.js.map +1 -0
- package/lib/module/web-only/index.js +4 -0
- package/lib/module/web-only/index.js.map +1 -0
- package/lib/typescript/src/components/native/Animated.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 +2 -0
- package/lib/typescript/src/components/native/Image.native.d.ts.map +1 -0
- package/lib/typescript/src/components/native/ImageBackground.d.ts.map +1 -1
- package/lib/typescript/src/components/native/Pressable.native.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 +5 -5
- package/lib/typescript/src/core/getClassname.d.ts.map +1 -1
- package/lib/typescript/src/core/passForwardRef.d.ts +1 -1
- package/lib/typescript/src/core/passForwardRef.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.map +1 -1
- package/lib/typescript/src/core/useProxifiedUnistyles/useProxifiedUnistyles.d.ts.map +1 -1
- package/lib/typescript/src/core/warn.d.ts.map +1 -1
- package/lib/typescript/src/core/withUnistyles/withUnistyles.d.ts +1 -1
- package/lib/typescript/src/core/withUnistyles/withUnistyles.d.ts.map +1 -1
- package/lib/typescript/src/core/withUnistyles/withUnistyles.native.d.ts +1 -3
- package/lib/typescript/src/core/withUnistyles/withUnistyles.native.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/mocks.d.ts +2 -0
- package/lib/typescript/src/mocks.d.ts.map +1 -0
- package/lib/typescript/src/mq.d.ts +0 -8
- package/lib/typescript/src/mq.d.ts.map +1 -1
- package/lib/typescript/src/reanimated/index.d.ts +2 -0
- package/lib/typescript/src/reanimated/index.d.ts.map +1 -0
- package/lib/typescript/src/reanimated/useAnimatedTheme.d.ts +4 -0
- package/lib/typescript/src/reanimated/useAnimatedTheme.d.ts.map +1 -0
- package/lib/typescript/src/reanimated/useAnimatedTheme.native.d.ts +4 -0
- package/lib/typescript/src/reanimated/useAnimatedTheme.native.d.ts.map +1 -0
- package/lib/typescript/src/server/getServerUnistyles.d.ts.map +1 -1
- package/lib/typescript/src/server/hydrateServerUnistyles.d.ts +0 -1
- package/lib/typescript/src/server/hydrateServerUnistyles.d.ts.map +1 -1
- package/lib/typescript/src/server/resetServerUnistyles.d.ts.map +1 -1
- package/lib/typescript/src/server/serialize.d.ts +2 -0
- package/lib/typescript/src/server/serialize.d.ts.map +1 -0
- package/lib/typescript/src/server/useServerUnistyles.d.ts.map +1 -1
- package/lib/typescript/src/specs/NativePlatform/NativePlatform.nitro.d.ts +2 -1
- package/lib/typescript/src/specs/NativePlatform/NativePlatform.nitro.d.ts.map +1 -1
- package/lib/typescript/src/specs/ShadowRegistry/index.d.ts.map +1 -1
- package/lib/typescript/src/specs/StatusBar/index.d.ts.map +1 -1
- package/lib/typescript/src/types/common.d.ts +0 -1
- package/lib/typescript/src/types/common.d.ts.map +1 -1
- package/lib/typescript/src/types/stylesheet.d.ts.map +1 -1
- package/lib/typescript/src/utils.d.ts +8 -0
- package/lib/typescript/src/utils.d.ts.map +1 -1
- package/lib/typescript/src/web/convert/index.d.ts +2 -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 +2 -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/shadow/boxShadow.d.ts.map +1 -1
- package/lib/typescript/src/web/convert/shadow/getShadowBreakpoints.d.ts.map +1 -1
- package/lib/typescript/src/web/convert/shadow/textShadow.d.ts.map +1 -1
- package/lib/typescript/src/web/convert/style.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.map +1 -1
- package/lib/typescript/src/web/css/core.d.ts.map +1 -1
- package/lib/typescript/src/web/css/state.d.ts +4 -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 +0 -5
- package/lib/typescript/src/web/index.d.ts.map +1 -1
- package/lib/typescript/src/web/listener.d.ts.map +1 -1
- package/lib/typescript/src/web/registry.d.ts +2 -2
- package/lib/typescript/src/web/registry.d.ts.map +1 -1
- package/lib/typescript/src/web/runtime.d.ts.map +1 -1
- package/lib/typescript/src/web/services.d.ts +6 -1
- package/lib/typescript/src/web/services.d.ts.map +1 -1
- package/lib/typescript/src/web/shadowRegistry.d.ts +2 -2
- package/lib/typescript/src/web/shadowRegistry.d.ts.map +1 -1
- package/lib/typescript/src/web/state.d.ts +2 -0
- package/lib/typescript/src/web/state.d.ts.map +1 -1
- package/lib/typescript/src/web/types.d.ts +3 -0
- 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 +11 -0
- package/lib/typescript/src/web/utils/createUnistylesRef.d.ts.map +1 -0
- package/lib/typescript/src/web/utils/unistyle.d.ts +5 -2
- 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 +7 -0
- package/lib/typescript/src/web-only/getWebProps.d.ts.map +1 -0
- package/lib/typescript/src/web-only/index.d.ts +2 -0
- package/lib/typescript/src/web-only/index.d.ts.map +1 -0
- package/nitrogen/generated/android/c++/JUnistyleDependency.hpp +3 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/UnistyleDependency.kt +2 -1
- package/nitrogen/generated/ios/swift/UnistyleDependency.swift +4 -0
- package/nitrogen/generated/shared/c++/UnistyleDependency.hpp +2 -1
- package/package.json +66 -32
- package/plugin/index.js +155 -67
- package/reanimated/package.json +6 -0
- package/server/package.json +6 -0
- package/src/components/native/Image.native.tsx +4 -0
- package/src/components/native/Image.tsx +36 -3
- package/src/components/native/ImageBackground.tsx +18 -33
- package/src/components/native/Pressable.native.tsx +12 -4
- package/src/core/createUnistylesElement.native.tsx +12 -6
- package/src/core/createUnistylesElement.tsx +26 -27
- package/src/core/createUnistylesImageBackground.tsx +16 -10
- package/src/core/getClassname.ts +16 -5
- package/src/core/passForwardRef.ts +5 -5
- package/src/core/useProxifiedUnistyles/listener.ts +3 -3
- package/src/core/useProxifiedUnistyles/useProxifiedUnistyles.ts +17 -0
- package/src/core/withUnistyles/withUnistyles.native.tsx +3 -4
- package/src/core/withUnistyles/withUnistyles.tsx +23 -6
- package/src/hooks/useMedia.native.ts +1 -1
- package/src/hooks/useMedia.ts +1 -1
- package/src/mocks.ts +217 -0
- package/src/mq.ts +0 -24
- package/src/reanimated/index.ts +1 -0
- package/src/reanimated/useAnimatedTheme.native.ts +21 -0
- package/src/reanimated/useAnimatedTheme.ts +19 -0
- package/src/server/getServerUnistyles.tsx +15 -10
- package/src/server/hydrateServerUnistyles.ts +3 -2
- package/src/server/resetServerUnistyles.ts +4 -3
- package/src/server/serialize.ts +20 -0
- package/src/specs/NativePlatform/NativePlatform.nitro.ts +2 -1
- package/src/specs/ShadowRegistry/index.ts +1 -2
- package/src/types/common.ts +0 -1
- package/src/utils.ts +25 -0
- package/src/web/convert/index.ts +5 -7
- package/src/web/convert/object/filter.ts +4 -4
- package/src/web/create.ts +10 -3
- package/src/web/css/core.ts +2 -2
- package/src/web/css/state.ts +5 -3
- package/src/web/index.ts +4 -16
- package/src/web/registry.ts +20 -11
- package/src/web/runtime.ts +6 -2
- package/src/web/services.ts +14 -1
- package/src/web/shadowRegistry.ts +35 -13
- package/src/web/state.ts +14 -2
- package/src/web/types.ts +9 -4
- package/src/web/utils/createUnistylesRef.ts +33 -0
- package/src/web/utils/unistyle.ts +55 -23
- package/src/web-only/getWebProps.ts +18 -0
- package/src/web-only/index.ts +2 -0
- package/web/package.json +6 -0
- package/cxx/core/UnistylesCommitHook.cpp +0 -52
- package/cxx/core/UnistylesCommitHook.h +0 -27
- package/cxx/core/UnistylesMountHook.cpp +0 -28
- package/cxx/core/UnistylesMountHook.h +0 -24
- package/lib/module/package.json +0 -1
- /package/cxx/common/{Constants.h → UnistylesConstants.h} +0 -0
@@ -10,18 +10,11 @@ using namespace margelo::nitro;
|
|
10
10
|
|
11
11
|
RCT_EXPORT_MODULE(Unistyles)
|
12
12
|
|
13
|
-
__weak RCTSurfacePresenter* _surfacePresenter;
|
14
|
-
@synthesize callInvoker = _callInvoker;
|
15
|
-
|
16
13
|
+ (BOOL)requiresMainQueueSetup {
|
17
14
|
return YES;
|
18
15
|
}
|
19
16
|
|
20
|
-
- (void)
|
21
|
-
_surfacePresenter = surfacePresenter;
|
22
|
-
}
|
23
|
-
|
24
|
-
- (void)installJSIBindingsWithRuntime:(jsi::Runtime&)rt {
|
17
|
+
- (void)installJSIBindingsWithRuntime:(jsi::Runtime&)rt callInvoker:(const std::shared_ptr<facebook::react::CallInvoker> &)callInvoker {
|
25
18
|
// function is called on: first init and every live reload
|
26
19
|
// check if this is live reload, if so let's replace UnistylesRuntime with new runtime
|
27
20
|
auto hasUnistylesRuntime = HybridObjectRegistry::hasHybridObject("UnistylesRuntime");
|
@@ -32,18 +25,17 @@ __weak RCTSurfacePresenter* _surfacePresenter;
|
|
32
25
|
HybridObjectRegistry::unregisterHybridObjectConstructor("UnistylesShadowRegistry");
|
33
26
|
}
|
34
27
|
|
35
|
-
[self createHybrids:rt];
|
28
|
+
[self createHybrids:rt callInvoker:callInvoker];
|
36
29
|
}
|
37
30
|
|
38
|
-
- (void)createHybrids:(jsi::Runtime&)rt {
|
39
|
-
auto runOnJSThread = [callInvoker
|
31
|
+
- (void)createHybrids:(jsi::Runtime&)rt callInvoker:(const std::shared_ptr<facebook::react::CallInvoker> &)callInvoker {
|
32
|
+
auto runOnJSThread = [callInvoker](std::function<void(jsi::Runtime& rt)> &&callback){
|
40
33
|
callInvoker->invokeAsync(std::move(callback));
|
41
34
|
};
|
42
35
|
|
43
36
|
auto nativePlatform = Unistyles::NativePlatform::create().getCxxPart();
|
44
37
|
auto unistylesRuntime = std::make_shared<HybridUnistylesRuntime>(nativePlatform, rt, runOnJSThread);
|
45
|
-
auto
|
46
|
-
auto styleSheet = std::make_shared<HybridStyleSheet>(unistylesRuntime, uiManager);
|
38
|
+
auto styleSheet = std::make_shared<HybridStyleSheet>(unistylesRuntime);
|
47
39
|
|
48
40
|
HybridObjectRegistry::registerHybridObjectConstructor("UnistylesRuntime", [unistylesRuntime]() -> std::shared_ptr<HybridObject>{
|
49
41
|
return unistylesRuntime;
|
@@ -4,7 +4,33 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.Image = void 0;
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
7
8
|
var _reactNative = require("react-native");
|
8
9
|
var _core = require("../../core");
|
9
|
-
|
10
|
+
var _warn = require("../../core/warn");
|
11
|
+
var _utils = require("../../utils");
|
12
|
+
var _utils2 = require("../../web/utils");
|
13
|
+
var _createUnistylesRef = require("../../web/utils/createUnistylesRef");
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
15
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
16
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
17
|
+
const UnistylesImage = /*#__PURE__*/(0, _react.forwardRef)((props, forwardedRef) => {
|
18
|
+
const classNames = (0, _core.getClassName)(props.style);
|
19
|
+
const ref = (0, _createUnistylesRef.createUnistylesRef)(classNames, forwardedRef);
|
20
|
+
const hasWidthStyle = (0, _utils2.checkForProp)(props.style, 'width');
|
21
|
+
const hasHeightStyle = (0, _utils2.checkForProp)(props.style, 'height');
|
22
|
+
(0, _warn.maybeWarnAboutMultipleUnistyles)(props.style, 'Image');
|
23
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
|
24
|
+
...props,
|
25
|
+
style: [classNames,
|
26
|
+
// Clear inline width and height extracted from source
|
27
|
+
hasWidthStyle && {
|
28
|
+
width: ''
|
29
|
+
}, hasHeightStyle && {
|
30
|
+
height: ''
|
31
|
+
}],
|
32
|
+
ref: ref
|
33
|
+
});
|
34
|
+
});
|
35
|
+
const Image = exports.Image = (0, _utils.copyComponentProperties)(_reactNative.Image, UnistylesImage);
|
10
36
|
//# sourceMappingURL=Image.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_core","_warn","_utils","_utils2","_createUnistylesRef","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","UnistylesImage","forwardRef","props","forwardedRef","classNames","getClassName","style","ref","createUnistylesRef","hasWidthStyle","checkForProp","hasHeightStyle","maybeWarnAboutMultipleUnistyles","jsx","Image","width","height","exports","copyComponentProperties","NativeImage"],"sourceRoot":"../../../../src","sources":["components/native/Image.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAEA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAA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GAAG,IAAAC,kBAAY,EAACH,KAAK,CAACI,KAAK,CAAC;EAC5C,MAAMC,GAAG,GAAG,IAAAC,sCAAkB,EAACJ,UAAU,EAAED,YAAY,CAAC;EACxD,MAAMM,aAAa,GAAG,IAAAC,oBAAY,EAACR,KAAK,CAACI,KAAK,EAAE,OAAO,CAAC;EACxD,MAAMK,cAAc,GAAG,IAAAD,oBAAY,EAACR,KAAK,CAACI,KAAK,EAAE,QAAQ,CAAC;EAE1D,IAAAM,qCAA+B,EAACV,KAAK,CAACI,KAAK,EAAe,OAAO,CAAC;EAElE,oBACI,IAAA3B,WAAA,CAAAkC,GAAA,EAACxC,YAAA,CAAAyC,KAAW;IAAA,GACJZ,KAAK;IACTI,KAAK,EAAE,CACHF,UAAU;IACV;IACAK,aAAa,IAAI;MAAEM,KAAK,EAAE;IAAG,CAAC,EAC9BJ,cAAc,IAAI;MAAEK,MAAM,EAAE;IAAG,CAAC,CACT;IAC3BT,GAAG,EAAEA;EAAI,CACZ,CAAC;AAEV,CAAC,CAAC;AAEK,MAAMO,KAAK,GAAAG,OAAA,CAAAH,KAAA,GAAG,IAAAI,8BAAuB,EAACC,kBAAW,EAAEnB,cAAc,CAAC","ignoreList":[]}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.Image = void 0;
|
7
|
+
var _reactNative = require("react-native");
|
8
|
+
var _core = require("../../core");
|
9
|
+
const Image = exports.Image = (0, _core.createUnistylesElement)(_reactNative.Image);
|
10
|
+
//# sourceMappingURL=Image.native.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_core","Image","exports","createUnistylesElement","NativeImage"],"sourceRoot":"../../../../src","sources":["components/native/Image.native.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAEO,MAAME,KAAK,GAAAC,OAAA,CAAAD,KAAA,GAAG,IAAAE,4BAAsB,EAACC,kBAAW,CAAC","ignoreList":[]}
|
@@ -7,45 +7,34 @@ exports.ImageBackground = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
8
8
|
var _reactNative = require("react-native");
|
9
9
|
var _core = require("../../core");
|
10
|
+
var _warn = require("../../core/warn");
|
10
11
|
var _utils = require("../../utils");
|
11
|
-
var _web = require("../../web");
|
12
12
|
var _utils2 = require("../../web/utils");
|
13
|
+
var _createUnistylesRef = require("../../web/utils/createUnistylesRef");
|
13
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
14
15
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
15
16
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
16
17
|
const UnistylesImageBackground = /*#__PURE__*/(0, _react.forwardRef)((props, forwardedRef) => {
|
17
|
-
let storedRef = null;
|
18
|
-
let storedImageRef = null;
|
19
18
|
const styleClassNames = (0, _core.getClassName)(props.style);
|
20
19
|
const imageClassNames = (0, _core.getClassName)(props.imageStyle);
|
20
|
+
const ref = (0, _createUnistylesRef.createUnistylesRef)(styleClassNames, forwardedRef);
|
21
|
+
const imageRef = (0, _createUnistylesRef.createUnistylesRef)(imageClassNames);
|
22
|
+
const hasWidthStyle = typeof props.imageStyle === 'object' && (0, _utils2.keyInObject)(props.imageStyle, 'width');
|
23
|
+
const hasHeightStyle = typeof props.imageStyle === 'object' && (0, _utils2.keyInObject)(props.imageStyle, 'height');
|
24
|
+
(0, _warn.maybeWarnAboutMultipleUnistyles)(props.style, 'ImageBackground');
|
25
|
+
(0, _warn.maybeWarnAboutMultipleUnistyles)(props.imageStyle, 'ImageBackground');
|
21
26
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ImageBackground, {
|
22
27
|
...props,
|
23
28
|
style: styleClassNames,
|
24
|
-
imageStyle: imageClassNames,
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
if (typeof forwardedRef === 'function') {
|
34
|
-
return forwardedRef(ref);
|
35
|
-
}
|
36
|
-
if (forwardedRef) {
|
37
|
-
forwardedRef.current = ref;
|
38
|
-
}
|
39
|
-
},
|
40
|
-
imageRef: (0, _utils2.isServer)() ? undefined : ref => {
|
41
|
-
if (!ref) {
|
42
|
-
// @ts-expect-error hidden from TS
|
43
|
-
_web.UnistylesShadowRegistry.remove(storedImageRef, imageClassNames?.hash);
|
44
|
-
}
|
45
|
-
storedImageRef = ref;
|
46
|
-
// @ts-expect-error hidden from TS
|
47
|
-
_web.UnistylesShadowRegistry.add(ref, imageClassNames?.hash);
|
48
|
-
}
|
29
|
+
imageStyle: [imageClassNames,
|
30
|
+
// Clear inline width and height extracted from source
|
31
|
+
hasWidthStyle && {
|
32
|
+
width: ''
|
33
|
+
}, hasHeightStyle && {
|
34
|
+
height: ''
|
35
|
+
}],
|
36
|
+
ref: ref,
|
37
|
+
imageRef: imageRef
|
49
38
|
});
|
50
39
|
});
|
51
40
|
const ImageBackground = exports.ImageBackground = (0, _utils.copyComponentProperties)(_reactNative.ImageBackground, UnistylesImageBackground);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_core","
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_core","_warn","_utils","_utils2","_createUnistylesRef","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","UnistylesImageBackground","forwardRef","props","forwardedRef","styleClassNames","getClassName","style","imageClassNames","imageStyle","ref","createUnistylesRef","imageRef","hasWidthStyle","keyInObject","hasHeightStyle","maybeWarnAboutMultipleUnistyles","jsx","ImageBackground","width","height","exports","copyComponentProperties","NativeImageBackground"],"sourceRoot":"../../../../src","sources":["components/native/ImageBackground.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAEA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,mBAAA,GAAAN,OAAA;AAAuE,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAQ,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,SAAAV,wBAAAU,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,w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AC;EAEjF,oBACI,IAAA7B,WAAA,CAAAqC,GAAA,EAAC3C,YAAA,CAAA4C,eAAqB;IAAA,GACdf,KAAK;IACTI,KAAK,EAAEF,eAAwC;IAC/CI,UAAU,EAAE,CACRD,eAAe;IACf;IACAK,aAAa,IAAI;MAAEM,KAAK,EAAE;IAAG,CAAC,EAC9BJ,cAAc,IAAI;MAAEK,MAAM,EAAE;IAAG,CAAC,CACT;IAC3BV,GAAG,EAAEA,GAAI;IACTE,QAAQ,EAAEA;EAAS,CACtB,CAAC;AAEV,CAAC,CAAC;AAEK,MAAMM,eAAe,GAAAG,OAAA,CAAAH,eAAA,GAAG,IAAAI,8BAAuB,EAACC,4BAAqB,EAAEtB,wBAAwB,CAAC","ignoreList":[]}
|
@@ -47,10 +47,13 @@ const Pressable = exports.Pressable = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
47
47
|
if (ref) {
|
48
48
|
storedRef.current = ref;
|
49
49
|
}
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
50
|
+
return (0, _core.passForwardedRef)(ref, forwardedRef, () => {
|
51
|
+
// @ts-expect-error - this is hidden from TS
|
52
|
+
_specs.UnistylesShadowRegistry.add(ref, unistyles);
|
53
|
+
}, () => {
|
54
|
+
// @ts-expect-error - this is hidden from TS
|
55
|
+
_specs.UnistylesShadowRegistry.remove(ref);
|
56
|
+
});
|
54
57
|
},
|
55
58
|
style: state => {
|
56
59
|
const isPropStyleAFunction = typeof style === 'function';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_core","_specs","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","getStyles","styleProps","unistyleKey","keys","find","key","startsWith","uni__getStyles","Pressable","exports","forwardRef","variants","style","props","forwardedRef","storedRef","useRef","scopedTheme","UnistylesShadowRegistry","getScopedTheme","useLayoutEffect","current","remove","jsx","ref","isPropStyleAFunction","unistyles","pressed","
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_core","_specs","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","getStyles","styleProps","unistyleKey","keys","find","key","startsWith","uni__getStyles","Pressable","exports","forwardRef","variants","style","props","forwardedRef","storedRef","useRef","scopedTheme","UnistylesShadowRegistry","getScopedTheme","useLayoutEffect","current","remove","jsx","ref","isPropStyleAFunction","unistyles","pressed","passForwardedRef","add","state","previousScopedTheme","setScopedTheme"],"sourceRoot":"../../../../src","sources":["components/native/Pressable.native.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAAqD,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAK,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,SAAAP,wBAAAO,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,CAA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CAACW,GAAG,CAACd,SAAS,CAACM,OAAO,EAAEK,SAAS,CAAC;MAEzDR,8BAAuB,CAACc,cAAc,CAACD,mBAAmB,CAAC;MAE3D,OAAOL,SAAS;IACpB;EAAE,CACL,CAAC;AAEV,CAAC,CAAC","ignoreList":[]}
|
@@ -6,36 +6,32 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
exports.createUnistylesElement = void 0;
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
8
8
|
var _utils = require("../utils");
|
9
|
-
var _web = require("../web");
|
10
9
|
var _utils2 = require("../web/utils");
|
10
|
+
var _createUnistylesRef = require("../web/utils/createUnistylesRef");
|
11
11
|
var _getClassname = require("./getClassname");
|
12
12
|
var _warn = require("./warn");
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
14
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
15
|
+
const STYLE_PROPS = ['style', 'contentContainerStyle', 'columnWrapperStyle'];
|
16
|
+
const buildUnistylesProps = (Component, props, forwardedRef) => {
|
17
|
+
const componentStyleProps = STYLE_PROPS.filter(styleProp => styleProp in props);
|
18
|
+
const classNames = Object.fromEntries(componentStyleProps.map(styleProp => [styleProp, (0, _getClassname.getClassName)(props[styleProp])]));
|
19
|
+
const refs = componentStyleProps.map(styleProp => {
|
20
|
+
return (0, _createUnistylesRef.createUnistylesRef)(classNames[styleProp], styleProp === 'style' ? forwardedRef : undefined);
|
21
|
+
});
|
22
|
+
componentStyleProps.forEach(styleProp => {
|
23
|
+
(0, _warn.maybeWarnAboutMultipleUnistyles)(props[styleProp], Component.displayName);
|
24
|
+
});
|
25
|
+
return {
|
26
|
+
...classNames,
|
27
|
+
ref: (0, _utils2.isServer)() ? undefined : componentRef => refs.forEach(ref => ref?.(componentRef))
|
28
|
+
};
|
29
|
+
};
|
15
30
|
const createUnistylesElement = Component => {
|
16
31
|
const UnistylesComponent = /*#__PURE__*/_react.default.forwardRef((props, forwardedRef) => {
|
17
|
-
let storedRef = null;
|
18
|
-
const classNames = (0, _getClassname.getClassName)(props.style);
|
19
32
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
|
20
33
|
...props,
|
21
|
-
|
22
|
-
ref: (0, _utils2.isServer)() ? undefined : ref => {
|
23
|
-
// @ts-ignore we don't know the type of the component
|
24
|
-
(0, _warn.maybeWarnAboutMultipleUnistyles)(props.style, Component.displayName);
|
25
|
-
if (!ref) {
|
26
|
-
// @ts-expect-error hidden from TS
|
27
|
-
_web.UnistylesShadowRegistry.remove(storedRef, classNames?.hash);
|
28
|
-
}
|
29
|
-
storedRef = ref;
|
30
|
-
// @ts-expect-error hidden from TS
|
31
|
-
_web.UnistylesShadowRegistry.add(ref, classNames?.hash);
|
32
|
-
if (typeof forwardedRef === 'function') {
|
33
|
-
return forwardedRef(ref);
|
34
|
-
}
|
35
|
-
if (forwardedRef) {
|
36
|
-
forwardedRef.current = ref;
|
37
|
-
}
|
38
|
-
}
|
34
|
+
...buildUnistylesProps(Component, props, forwardedRef)
|
39
35
|
});
|
40
36
|
});
|
41
37
|
return (0, _utils.copyComponentProperties)(Component, UnistylesComponent);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_utils","
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_utils","_utils2","_createUnistylesRef","_getClassname","_warn","_jsxRuntime","e","__esModule","default","STYLE_PROPS","buildUnistylesProps","Component","props","forwardedRef","componentStyleProps","filter","styleProp","classNames","Object","fromEntries","map","getClassName","refs","createUnistylesRef","undefined","forEach","maybeWarnAboutMultipleUnistyles","displayName","ref","isServer","componentRef","createUnistylesElement","UnistylesComponent","React","forwardRef","jsx","copyComponentProperties","exports"],"sourceRoot":"../../../src","sources":["core/createUnistylesElement.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAGA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAA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AIpB,SAAc,IAAK;EACtD,MAAMqB,kBAAkB,gBAAGC,cAAK,CAACC,UAAU,CAA0B,CAACtB,KAAK,EAAEC,YAAY,KAAK;IAC1F,oBACI,IAAAR,WAAA,CAAA8B,GAAA,EAACxB,SAAS;MAAA,GACFC,KAAK;MAAA,GACLF,mBAAmB,CAACC,SAAS,EAAEC,KAAK,EAAEC,YAAY;IAAC,CAC1D,CAAC;EAEV,CAAC,CAAC;EAEF,OAAO,IAAAuB,8BAAuB,EAACzB,SAAS,EAAEqB,kBAAkB,CAAC;AACjE,CAAC;AAAAK,OAAA,CAAAN,sBAAA,GAAAA,sBAAA","ignoreList":[]}
|
@@ -41,14 +41,16 @@ const createUnistylesElement = Component => {
|
|
41
41
|
if (ref) {
|
42
42
|
storedRef.current = getNativeRef(Component, ref);
|
43
43
|
}
|
44
|
-
(0, _passForwardRef.passForwardedRef)(props, ref, forwardedRef);
|
45
44
|
|
46
45
|
// @ts-ignore we don't know the type of the component
|
47
46
|
(0, _warn.maybeWarnAboutMultipleUnistyles)(props.style, Component.displayName);
|
48
|
-
return () => {
|
49
|
-
// @ts-ignore
|
47
|
+
return (0, _passForwardRef.passForwardedRef)(ref, forwardedRef, () => {
|
48
|
+
// @ts-ignore this is hidden from TS
|
49
|
+
_specs.UnistylesShadowRegistry.add(ref, props.style);
|
50
|
+
}, () => {
|
51
|
+
// @ts-ignore this is hidden from TS
|
50
52
|
_specs.UnistylesShadowRegistry.remove(ref);
|
51
|
-
};
|
53
|
+
});
|
52
54
|
}
|
53
55
|
});
|
54
56
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_specs","_utils","_passForwardRef","_warn","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","getNativeRef","Component","ref","name","viewRef","current","getNativeScrollRef","getScrollRef","createUnistylesElement","UnistylesComponent","React","forwardRef","props","forwardedRef","storedRef","useRef","useLayoutEffect","UnistylesShadowRegistry","remove","jsx","
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_specs","_utils","_passForwardRef","_warn","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","getNativeRef","Component","ref","name","viewRef","current","getNativeScrollRef","getScrollRef","createUnistylesElement","UnistylesComponent","React","forwardRef","props","forwardedRef","storedRef","useRef","useLayoutEffect","UnistylesShadowRegistry","remove","jsx","maybeWarnAboutMultipleUnistyles","style","displayName","passForwardedRef","add","copyComponentProperties","exports"],"sourceRoot":"../../../src","sources":["core/createUnistylesElement.native.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,eAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AAAwD,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAM,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,SAAAR,wBAAAQ,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,C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AC,EAAE,EAAE,CAAC;IAEN,oBACI,IAAA1B,WAAA,CAAAwC,GAAA,EAAClB,SAAS;MAAA,GACFW,KAAK;MACTV,GAAG,EAAGA,GAAY,IAAK;QACnB,IAAIA,GAAG,EAAE;UACLY,SAAS,CAACT,OAAO,GAAGL,YAAY,CAACC,SAAS,EAAEC,GAAG,CAAC;QACpD;;QAEA;QACA,IAAAkB,qCAA+B,EAACR,KAAK,CAACS,KAAK,EAAEpB,SAAS,CAACqB,WAAW,CAAC;QAEnE,OAAO,IAAAC,gCAAgB,EACnBrB,GAAG,EACHW,YAAY,EACZ,MAAM;UACF;UACAI,8BAAuB,CAACO,GAAG,CAACtB,GAAG,EAAEU,KAAK,CAACS,KAAK,CAAC;QACjD,CAAC,EACD,MAAM;UACF;UACAJ,8BAAuB,CAACC,MAAM,CAAChB,GAAG,CAAC;QACvC,CACJ,CAAC;MACL;IAAE,CACL,CAAC;EAEV,CAAC,CAAC;EAEF,OAAO,IAAAuB,8BAAuB,EAACxB,SAAS,EAAEQ,kBAAkB,CAAC;AACjE,CAAC;AAAAiB,OAAA,CAAAlB,sBAAA,GAAAA,sBAAA","ignoreList":[]}
|
@@ -31,15 +31,17 @@ const createUnistylesImageBackground = Component => {
|
|
31
31
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
|
32
32
|
...props,
|
33
33
|
ref: ref => {
|
34
|
-
(0, _passForwardRef.passForwardedRef)(
|
35
|
-
|
36
|
-
|
34
|
+
return (0, _passForwardRef.passForwardedRef)(ref, forwardedRef, () => {
|
35
|
+
// @ts-expect-error - this is hidden from TS
|
36
|
+
_specs.UnistylesShadowRegistry.add(ref, props.style);
|
37
|
+
}, () => {
|
38
|
+
// @ts-expect-error - this is hidden from TS
|
37
39
|
_specs.UnistylesShadowRegistry.remove(ref);
|
38
40
|
if (storedImageRef.current) {
|
39
|
-
// @ts-
|
41
|
+
// @ts-expect-error - this is hidden from TS
|
40
42
|
_specs.UnistylesShadowRegistry.remove(storedImageRef.current);
|
41
43
|
}
|
42
|
-
};
|
44
|
+
});
|
43
45
|
},
|
44
46
|
imageRef: ref => {
|
45
47
|
if (ref) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_specs","_utils","_passForwardRef","_warn","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","createUnistylesImageBackground","Component","UnistylesImageBackground","React","forwardRef","props","forwardedRef","storedImageRef","useRef","useLayoutEffect","current","UnistylesShadowRegistry","remove","maybeWarnAboutMultipleUnistyles","style","imageStyle","jsx","ref","passForwardedRef","
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_specs","_utils","_passForwardRef","_warn","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","createUnistylesImageBackground","Component","UnistylesImageBackground","React","forwardRef","props","forwardedRef","storedImageRef","useRef","useLayoutEffect","current","UnistylesShadowRegistry","remove","maybeWarnAboutMultipleUnistyles","style","imageStyle","jsx","ref","passForwardedRef","add","imageRef","copyComponentProperties","exports"],"sourceRoot":"../../../src","sources":["core/createUnistylesImageBackground.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,eAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AAAwD,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAM,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,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AC;QAC1D;MACJ,CAAC;IACL,CAAC,EAAE,EAAE,CAAC;;IAEN;IACA,IAAAG,qCAA+B,EAACR,KAAK,CAACS,KAAK,EAAE,iBAAiB,CAAC;IAC/D;IACA,IAAAD,qCAA+B,EAACR,KAAK,CAACU,UAAU,EAAE,iBAAiB,CAAC;IAEpE,oBACI,IAAApC,WAAA,CAAAqC,GAAA,EAACf,SAAS;MAAA,GACFI,KAAK;MACTY,GAAG,EAAEA,GAAG,IAAI;QACR,OAAO,IAAAC,gCAAgB,EACnBD,GAAG,EACHX,YAAY,EACZ,MAAM;UACF;UACAK,8BAAuB,CAACQ,GAAG,CAACF,GAAG,EAAEZ,KAAK,CAACS,KAAK,CAAC;QACjD,CAAC,EACD,MAAM;UACF;UACAH,8BAAuB,CAACC,MAAM,CAACK,GAAG,CAAC;UAEnC,IAAIV,cAAc,CAACG,OAAO,EAAE;YACxB;YACAC,8BAAuB,CAACC,MAAM,CAACL,cAAc,CAACG,OAAO,CAAC;UAC1D;QACJ,CACJ,CAAC;MACL,CAAE;MACFU,QAAQ,EAAEH,GAAG,IAAI;QACb,IAAIA,GAAG,EAAE;UACLV,cAAc,CAACG,OAAO,GAAGO,GAAG;QAChC;;QAEA;QACAN,8BAAuB,CAACQ,GAAG,CAACF,GAAG,EAAEZ,KAAK,CAACU,UAAU,CAAC;MACtD;IAAE,CACL,CAAC;EAEV,CAAC,CAAC;EAEF,OAAO,IAAAM,8BAAuB,EAACpB,SAAS,EAAEC,wBAAwB,CAAC;AACvE,CAAC;AAAAoB,OAAA,CAAAtB,8BAAA,GAAAA,8BAAA","ignoreList":[]}
|
@@ -4,20 +4,26 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.getClassName = void 0;
|
7
|
-
var
|
8
|
-
|
7
|
+
var unistyles = _interopRequireWildcard(require("../web/services"));
|
8
|
+
var _utils = require("../web/utils");
|
9
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
10
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
11
|
+
const getClassName = (unistyle, forChild) => {
|
9
12
|
if (!unistyle) {
|
10
13
|
return undefined;
|
11
14
|
}
|
15
|
+
const flattenedStyles = Array.isArray(unistyle) ? unistyle.flat(Number.POSITIVE_INFINITY) : [unistyle];
|
16
|
+
const animatedStyles = flattenedStyles.filter(_utils.checkForAnimated);
|
17
|
+
const regularStyles = flattenedStyles.filter(style => !(0, _utils.checkForAnimated)(style));
|
12
18
|
const {
|
13
19
|
hash,
|
14
20
|
injectedClassName
|
15
|
-
} =
|
16
|
-
return hash ? {
|
21
|
+
} = unistyles.services.shadowRegistry.addStyles(regularStyles, forChild);
|
22
|
+
return hash ? [{
|
17
23
|
$$css: true,
|
18
24
|
hash,
|
19
25
|
injectedClassName
|
20
|
-
} : undefined;
|
26
|
+
}, animatedStyles] : undefined;
|
21
27
|
};
|
22
28
|
exports.getClassName = getClassName;
|
23
29
|
//# sourceMappingURL=getClassname.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["
|
1
|
+
{"version":3,"names":["unistyles","_interopRequireWildcard","require","_utils","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","getClassName","unistyle","forChild","undefined","flattenedStyles","Array","isArray","flat","Number","POSITIVE_INFINITY","animatedStyles","filter","checkForAnimated","regularStyles","style","hash","injectedClassName","services","shadowRegistry","addStyles","$$css","exports"],"sourceRoot":"../../../src","sources":["core/getClassname.ts"],"mappings":";;;;;;AACA,IAAAA,SAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAA+C,SAAAE,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,SAAAJ,wBAAAI,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;AAExC,MAAMW,YAAY,GAAGA,CAACC,QAA8D,EAAEC,QAAkB,KAAK;EAChH,IAAI,CAACD,QAAQ,EAAE;IACX,OAAOE,SAAS;EACpB;EAEA,MAAMC,eAAe,GAAGC,KAAK,CAACC,OAAO,CAACL,QAAQ,CAAC,GAAGA,QAAQ,CAACM,IAAI,CAACC,MAAM,CAACC,iBAAiB,CAAC,GAAG,CAACR,QAAQ,CAAC;EACtG,MAAMS,cAAc,GAAGN,eAAe,CAACO,MAAM,CAACC,uBAAgB,CAAC;EAC/D,MAAMC,aAAa,GAAGT,eAAe,CAACO,MAAM,CAACG,KAAK,IAAI,CAAC,IAAAF,uBAAgB,EAACE,KAAK,CAAC,CAAC;EAE/E,MAAM;IAAEC,IAAI;IAAEC;EAAkB,CAAC,GAAGxC,SAAS,CAACyC,QAAQ,CAACC,cAAc,CAACC,SAAS,CAC3EN,aAAa,EACbX,QACJ,CAAC;EAED,OAAOa,IAAI,GACL,CACE;IAAEK,KAAK,EAAE,IAAI;IAAEL,IAAI;IAAEC;EAAkB,CAAC,EACxCN,cAAc,CACjB,GACCP,SAAS;AACnB,CAAC;AAAAkB,OAAA,CAAArB,YAAA,GAAAA,YAAA","ignoreList":[]}
|
@@ -4,8 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.passForwardedRef = void 0;
|
7
|
-
|
8
|
-
const passForwardedRef = (props, ref, forwardedRef) => {
|
7
|
+
const passForwardedRef = (ref, forwardedRef, onMount, onUnmount) => {
|
9
8
|
const passForwardedRef = () => {
|
10
9
|
if (typeof forwardedRef === 'function') {
|
11
10
|
return forwardedRef(ref);
|
@@ -16,11 +15,10 @@ const passForwardedRef = (props, ref, forwardedRef) => {
|
|
16
15
|
return () => {};
|
17
16
|
};
|
18
17
|
const forwardedRefReturnFn = passForwardedRef();
|
19
|
-
|
20
|
-
// @ts-expect-error hidden from TS
|
21
|
-
_specs.UnistylesShadowRegistry.add(ref, props.style);
|
18
|
+
onMount?.();
|
22
19
|
return () => {
|
23
20
|
forwardedRefReturnFn?.();
|
21
|
+
onUnmount?.();
|
24
22
|
};
|
25
23
|
};
|
26
24
|
exports.passForwardedRef = passForwardedRef;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["
|
1
|
+
{"version":3,"names":["passForwardedRef","ref","forwardedRef","onMount","onUnmount","current","forwardedRefReturnFn","exports"],"sourceRoot":"../../../src","sources":["core/passForwardRef.ts"],"mappings":";;;;;;AAEO,MAAMA,gBAAgB,GAAGA,CAC5BC,GAAM,EACNC,YAAmC,EACnCC,OAAoB,EACpBC,SAAsB,KACrB;EACD,MAAMJ,gBAAgB,GAAGA,CAAA,KAAM;IAC3B,IAAI,OAAOE,YAAY,KAAK,UAAU,EAAE;MACpC,OAAOA,YAAY,CAACD,GAAG,CAAC;IAC5B;IAEA,IAAIC,YAAY,EAAE;MACdA,YAAY,CAACG,OAAO,GAAGJ,GAAG;IAC9B;IAEA,OAAO,MAAM,CAAC,CAAC;EACnB,CAAC;EACD,MAAMK,oBAAoB,GAAGN,gBAAgB,CAAC,CAAC;EAE/CG,OAAO,GAAG,CAAC;EAEX,OAAO,MAAM;IACTG,oBAAoB,GAAG,CAAC;IACxBF,SAAS,GAAG,CAAC;EACjB,CAAC;AACL,CAAC;AAAAG,OAAA,CAAAP,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
@@ -5,14 +5,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.listener = void 0;
|
7
7
|
var _specs = require("../../specs");
|
8
|
-
var
|
8
|
+
var unistyles = _interopRequireWildcard(require("../../web/services"));
|
9
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
10
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
9
11
|
const listener = ({
|
10
12
|
dependencies,
|
11
13
|
updateTheme,
|
12
14
|
updateRuntime
|
13
15
|
}) => {
|
14
|
-
const disposeTheme =
|
15
|
-
const disposeRuntime =
|
16
|
+
const disposeTheme = unistyles.services.listener.addListeners(dependencies.filter(dependency => dependency === _specs.UnistyleDependency.Theme), updateTheme);
|
17
|
+
const disposeRuntime = unistyles.services.listener.addListeners(dependencies.filter(dependency => dependency !== _specs.UnistyleDependency.Theme), updateRuntime);
|
16
18
|
return () => {
|
17
19
|
disposeTheme();
|
18
20
|
disposeRuntime();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_specs","require","
|
1
|
+
{"version":3,"names":["_specs","require","unistyles","_interopRequireWildcard","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","listener","dependencies","updateTheme","updateRuntime","disposeTheme","services","addListeners","filter","dependency","UnistyleDependency","Theme","disposeRuntime","exports"],"sourceRoot":"../../../../src","sources":["core/useProxifiedUnistyles/listener.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAC,uBAAA,CAAAF,OAAA;AAA+C,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD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AAQ,CAACM,YAAY,CAACL,YAAY,CAACM,MAAM,CAACC,UAAU,IAAIA,UAAU,KAAKC,yBAAkB,CAACC,KAAK,CAAC,EAAEP,aAAa,CAAC;EAE1J,OAAO,MAAM;IACTC,YAAY,CAAC,CAAC;IACdO,cAAc,CAAC,CAAC;EACpB,CAAC;AACL,CAAC;AAAAC,OAAA,CAAAZ,QAAA,GAAAA,QAAA","ignoreList":[]}
|
@@ -27,7 +27,8 @@ const RTDependencyMap = {
|
|
27
27
|
screen: _NativePlatform.UnistyleDependency.Dimensions,
|
28
28
|
statusBar: _NativePlatform.UnistyleDependency.StatusBar,
|
29
29
|
pixelRatio: _NativePlatform.UnistyleDependency.PixelRatio,
|
30
|
-
themeName: _NativePlatform.UnistyleDependency.ThemeName
|
30
|
+
themeName: _NativePlatform.UnistyleDependency.ThemeName,
|
31
|
+
rtl: _NativePlatform.UnistyleDependency.Rtl
|
31
32
|
};
|
32
33
|
const useProxifiedUnistyles = forcedTheme => {
|
33
34
|
const scopedTheme = forcedTheme ?? _specs.UnistylesShadowRegistry.getScopedTheme();
|
@@ -60,6 +61,18 @@ const useProxifiedUnistyles = forcedTheme => {
|
|
60
61
|
});
|
61
62
|
const proxifiedRuntime = new Proxy(getMiniRuntime(), {
|
62
63
|
get: (target, prop) => {
|
64
|
+
if (prop === 'insets') {
|
65
|
+
return new Proxy(target.insets, {
|
66
|
+
get: (target, prop) => {
|
67
|
+
if (prop === 'ime') {
|
68
|
+
dependencies.add(_NativePlatform.UnistyleDependency.Ime);
|
69
|
+
return target[prop];
|
70
|
+
}
|
71
|
+
dependencies.add(_NativePlatform.UnistyleDependency.Insets);
|
72
|
+
return target[prop];
|
73
|
+
}
|
74
|
+
});
|
75
|
+
}
|
63
76
|
if (prop in RTDependencyMap) {
|
64
77
|
dependencies.add(RTDependencyMap[prop]);
|
65
78
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_react","require","_specs","_NativePlatform","_listener","getMiniRuntime","UnistylesRuntime","miniRuntime","RTDependencyMap","breakpoint","UnistyleDependency","Breakpoints","colorScheme","ColorScheme","contentSizeCategory","ContentSizeCategory","hasAdaptiveThemes","AdaptiveThemes","insets","Insets","fontScale","FontScale","isLandscape","Orientation","isPortrait","navigationBar","NavigationBar","screen","Dimensions","statusBar","StatusBar","pixelRatio","PixelRatio","themeName","ThemeName","useProxifiedUnistyles","forcedTheme","scopedTheme","UnistylesShadowRegistry","getScopedTheme","dependencies","useState","Set","theme","setTheme","getTheme","_","runtimeChanged","useReducer","disposeRef","useRef","undefined","reinitListener","current","listener","Array","from","updateTheme","updateRuntime","useEffect","size","proxifiedTheme","Proxy","get","target","prop","add","Theme","proxifiedRuntime","addDependencies","newDependencies","dependenciesSize","forEach","dependency","exports"],"sourceRoot":"../../../../src","sources":["core/useProxifiedUnistyles/useProxifiedUnistyles.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAEA,IAAAE,eAAA,GAAAF,OAAA;AAEA,IAAAG,SAAA,GAAAH,OAAA;AAHA;;AAKA,MAAMI,cAAc,GAAGA,CAAA,KAA4B;EAC/C;EACA,OAAOC,uBAAgB,CAACC,WAAW;AACvC,CAAC;AAED,MAAMC,eAAe,GAAG;EACpBC,UAAU,EAAEC,kCAAkB,CAACC,WAAW;EAC1CC,WAAW,EAAEF,kCAAkB,CAACG,WAAW;EAC3CC,mBAAmB,EAAEJ,kCAAkB,CAACK,mBAAmB;EAC3DC,iBAAiB,EAAEN,kCAAkB,CAACO,cAAc;EACpDC,MAAM,EAAER,kCAAkB,CAACS,MAAM;EACjCC,SAAS,EAAEV,kCAAkB,CAACW,SAAS;EACvCC,WAAW,EAAEZ,kCAAkB,CAACa,WAAW;EAC3CC,UAAU,EAAEd,kCAAkB,CAACa,WAAW;EAC1CE,aAAa,EAAEf,kCAAkB,CAACgB,aAAa;EAC/CC,MAAM,EAAEjB,kCAAkB,CAACkB,UAAU;EACrCC,SAAS,EAAEnB,kCAAkB,CAACoB,SAAS;EACvCC,UAAU,EAAErB,kCAAkB,CAACsB,UAAU;EACzCC,SAAS,EAAEvB,kCAAkB,CAACwB;
|
1
|
+
{"version":3,"names":["_react","require","_specs","_NativePlatform","_listener","getMiniRuntime","UnistylesRuntime","miniRuntime","RTDependencyMap","breakpoint","UnistyleDependency","Breakpoints","colorScheme","ColorScheme","contentSizeCategory","ContentSizeCategory","hasAdaptiveThemes","AdaptiveThemes","insets","Insets","fontScale","FontScale","isLandscape","Orientation","isPortrait","navigationBar","NavigationBar","screen","Dimensions","statusBar","StatusBar","pixelRatio","PixelRatio","themeName","ThemeName","rtl","Rtl","useProxifiedUnistyles","forcedTheme","scopedTheme","UnistylesShadowRegistry","getScopedTheme","dependencies","useState","Set","theme","setTheme","getTheme","_","runtimeChanged","useReducer","disposeRef","useRef","undefined","reinitListener","current","listener","Array","from","updateTheme","updateRuntime","useEffect","size","proxifiedTheme","Proxy","get","target","prop","add","Theme","proxifiedRuntime","Ime","addDependencies","newDependencies","dependenciesSize","forEach","dependency","exports"],"sourceRoot":"../../../../src","sources":["core/useProxifiedUnistyles/useProxifiedUnistyles.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAEA,IAAAE,eAAA,GAAAF,OAAA;AAEA,IAAAG,SAAA,GAAAH,OAAA;AAHA;;AAKA,MAAMI,cAAc,GAAGA,CAAA,KAA4B;EAC/C;EACA,OAAOC,uBAAgB,CAACC,WAAW;AACvC,CAAC;AAED,MAAMC,eAAe,GAAG;EACpBC,UAAU,EAAEC,kCAAkB,CAACC,WAAW;EAC1CC,WAAW,EAAEF,kCAAkB,CAACG,WAAW;EAC3CC,mBAAmB,EAAEJ,kCAAkB,CAACK,mBAAmB;EAC3DC,iBAAiB,EAAEN,kCAAkB,CAACO,cAAc;EACpDC,MAAM,EAAER,kCAAkB,CAACS,MAAM;EACjCC,SAAS,EAAEV,kCA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