react-native-unistyles 2.10.0 → 3.0.0-alpha.10
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -1
- package/{react-native-unistyles.podspec → Unistyles.podspec} +13 -5
- package/android/CMakeLists.txt +35 -17
- package/android/build.gradle +4 -2
- package/android/src/main/cxx/cpp-adapter.cpp +82 -65
- package/android/src/main/java/com/unistyles/UnistylesPackage.kt +19 -9
- package/cxx/common/Breakpoints.h +43 -0
- package/cxx/common/Constants.h +11 -0
- package/cxx/common/Helpers.h +185 -0
- package/cxx/core/HostStyle.cpp +63 -0
- package/cxx/core/HostStyle.h +28 -0
- package/cxx/core/MediaQueries.cpp +87 -0
- package/cxx/core/MediaQueries.h +47 -0
- package/cxx/core/StyleSheet.h +31 -0
- package/cxx/core/StyleSheetRegistry.cpp +42 -0
- package/cxx/core/StyleSheetRegistry.h +26 -0
- package/cxx/core/Unistyle.h +75 -0
- package/cxx/core/UnistyleData.h +23 -0
- package/cxx/core/UnistyleWrapper.cpp +5 -0
- package/cxx/core/UnistyleWrapper.h +50 -0
- package/cxx/core/UnistylesCommitHook.cpp +54 -0
- package/cxx/core/UnistylesCommitHook.h +32 -0
- package/cxx/core/UnistylesCommitShadowNode.h +39 -0
- package/cxx/core/UnistylesMountHook.cpp +40 -0
- package/cxx/core/UnistylesMountHook.h +30 -0
- package/cxx/core/UnistylesRegistry.cpp +162 -0
- package/cxx/core/UnistylesRegistry.h +61 -0
- package/cxx/core/UnistylesState.cpp +95 -0
- package/cxx/core/UnistylesState.h +50 -0
- package/cxx/hybridObjects/HybridNavigationBar.cpp +17 -0
- package/cxx/hybridObjects/HybridNavigationBar.h +19 -0
- package/cxx/hybridObjects/HybridShadowRegistry.cpp +33 -0
- package/cxx/hybridObjects/HybridShadowRegistry.h +33 -0
- package/cxx/hybridObjects/HybridStatusBar.cpp +17 -0
- package/cxx/hybridObjects/HybridStatusBar.h +19 -0
- package/cxx/hybridObjects/HybridStyleSheet.cpp +241 -0
- package/cxx/hybridObjects/HybridStyleSheet.h +64 -0
- package/cxx/hybridObjects/HybridUnistylesRuntime.cpp +218 -0
- package/cxx/hybridObjects/HybridUnistylesRuntime.h +72 -0
- package/cxx/parser/Parser.cpp +642 -0
- package/cxx/parser/Parser.h +49 -0
- package/cxx/shadowTree/ShadowLeafUpdate.h +13 -0
- package/cxx/shadowTree/ShadowTreeManager.cpp +124 -0
- package/cxx/shadowTree/ShadowTreeManager.h +23 -0
- package/ios/Equatable.swift +64 -0
- package/ios/Extensions.swift +11 -0
- package/ios/NativePlatform+ios.swift +291 -0
- package/ios/NativePlatform.swift +17 -0
- package/ios/NativePlatformListener+ios.swift +41 -0
- package/ios/Unistyles.h +3 -0
- package/ios/UnistylesModuleOnLoad.h +13 -0
- package/ios/UnistylesModuleOnLoad.mm +58 -0
- package/lib/commonjs/common.js +1 -58
- package/lib/commonjs/common.js.map +1 -1
- package/lib/commonjs/index.js +27 -66
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/{utils/mq.js → mq.js} +12 -2
- package/lib/commonjs/mq.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/specs/NativePlatform/NativePlatform.nitro.js +25 -0
- package/lib/commonjs/specs/NativePlatform/NativePlatform.nitro.js.map +1 -0
- package/lib/commonjs/specs/NativePlatform/index.js +13 -0
- package/lib/commonjs/specs/NativePlatform/index.js.map +1 -0
- package/lib/commonjs/specs/NavigtionBar/UnistylesNavigationBar.nitro.js +6 -0
- package/lib/commonjs/specs/NavigtionBar/UnistylesNavigationBar.nitro.js.map +1 -0
- package/lib/commonjs/specs/NavigtionBar/index.js +17 -0
- package/lib/commonjs/specs/NavigtionBar/index.js.map +1 -0
- package/lib/commonjs/{types/plugin.js → specs/ShadowRegistry/ShadowRegistry.nitro.js} +1 -1
- package/lib/commonjs/specs/ShadowRegistry/ShadowRegistry.nitro.js.map +1 -0
- package/lib/commonjs/specs/ShadowRegistry/index.js +30 -0
- package/lib/commonjs/specs/ShadowRegistry/index.js.map +1 -0
- package/lib/commonjs/specs/ShadowRegistry/types.js +2 -0
- package/lib/commonjs/specs/ShadowRegistry/types.js.map +1 -0
- package/lib/commonjs/{types/normalizer.js → specs/StatusBar/UnistylesStatusBar.nitro.js} +1 -1
- package/lib/commonjs/specs/StatusBar/UnistylesStatusBar.nitro.js.map +1 -0
- package/lib/commonjs/specs/StatusBar/index.js +33 -0
- package/lib/commonjs/specs/StatusBar/index.js.map +1 -0
- package/lib/commonjs/specs/StyleSheet/UnistylesStyleSheet.nitro.js +6 -0
- package/lib/commonjs/specs/StyleSheet/UnistylesStyleSheet.nitro.js.map +1 -0
- package/lib/commonjs/specs/StyleSheet/index.js +18 -0
- package/lib/commonjs/specs/StyleSheet/index.js.map +1 -0
- package/lib/commonjs/specs/TurboUnistyles/NativeTurboUnistyles.js +8 -0
- package/lib/commonjs/specs/TurboUnistyles/NativeTurboUnistyles.js.map +1 -0
- package/lib/commonjs/specs/TurboUnistyles/index.js +4 -0
- package/lib/commonjs/specs/TurboUnistyles/index.js.map +1 -0
- package/lib/commonjs/{types/unistyles.js → specs/UnistylesRuntime/UnistylesRuntime.nitro.js} +1 -1
- package/lib/commonjs/specs/UnistylesRuntime/UnistylesRuntime.nitro.js.map +1 -0
- package/lib/commonjs/specs/UnistylesRuntime/index.js +26 -0
- package/lib/commonjs/specs/UnistylesRuntime/index.js.map +1 -0
- package/lib/commonjs/specs/index.js +47 -0
- package/lib/commonjs/specs/index.js.map +1 -0
- package/lib/commonjs/specs/index.web.js +24 -0
- package/lib/commonjs/specs/index.web.js.map +1 -0
- package/lib/commonjs/specs/types.js +24 -0
- package/lib/commonjs/specs/types.js.map +1 -0
- package/lib/commonjs/types/accessibility.js +37 -0
- package/lib/commonjs/types/accessibility.js.map +1 -0
- package/lib/commonjs/types/index.js +16 -30
- package/lib/commonjs/types/index.js.map +1 -1
- package/lib/commonjs/types/stylesheet.js +3 -0
- package/lib/commonjs/types/stylesheet.js.map +1 -1
- package/lib/commonjs/types/variants.js +4 -0
- package/lib/commonjs/web/convert/boxShadow.js +77 -0
- package/lib/commonjs/web/convert/boxShadow.js.map +1 -0
- package/lib/commonjs/web/convert/breakpoint.js +25 -0
- package/lib/commonjs/web/convert/breakpoint.js.map +1 -0
- package/lib/commonjs/web/convert/index.js +76 -0
- package/lib/commonjs/web/convert/index.js.map +1 -0
- package/lib/commonjs/web/convert/module.d.js.map +1 -0
- package/lib/commonjs/web/convert/shadow.js +68 -0
- package/lib/commonjs/web/convert/shadow.js.map +1 -0
- package/lib/commonjs/web/convert/style.js +89 -0
- package/lib/commonjs/web/convert/style.js.map +1 -0
- package/lib/commonjs/web/convert/textShadow.js +73 -0
- package/lib/commonjs/web/convert/textShadow.js.map +1 -0
- package/lib/commonjs/web/convert/transform.js +72 -0
- package/lib/commonjs/web/convert/transform.js.map +1 -0
- package/lib/commonjs/web/convert/types.js +9 -0
- package/lib/commonjs/web/convert/types.js.map +1 -0
- package/lib/commonjs/web/convert/utils.js +55 -0
- package/lib/commonjs/web/convert/utils.js.map +1 -0
- package/lib/commonjs/web/create.js +89 -0
- package/lib/commonjs/web/create.js.map +1 -0
- package/lib/commonjs/web/index.js +51 -0
- package/lib/commonjs/web/index.js.map +1 -0
- package/lib/commonjs/web/listener/index.js +13 -0
- package/lib/commonjs/web/listener/index.js.map +1 -0
- package/lib/commonjs/web/listener/listener.js +36 -0
- package/lib/commonjs/web/listener/listener.js.map +1 -0
- package/lib/commonjs/web/mock.js +37 -0
- package/lib/commonjs/web/mock.js.map +1 -0
- package/lib/commonjs/web/mq.js +23 -0
- package/lib/commonjs/web/mq.js.map +1 -0
- package/lib/commonjs/web/pseudo.js +11 -0
- package/lib/commonjs/web/pseudo.js.map +1 -0
- package/lib/commonjs/web/registry.js +37 -0
- package/lib/commonjs/web/registry.js.map +1 -0
- package/lib/commonjs/web/runtime.js +164 -0
- package/lib/commonjs/web/runtime.js.map +1 -0
- package/lib/commonjs/web/state.js +121 -0
- package/lib/commonjs/web/state.js.map +1 -0
- package/lib/commonjs/web/utils.js +78 -0
- package/lib/commonjs/web/utils.js.map +1 -0
- package/lib/commonjs/web/variants/getVariants.js +39 -0
- package/lib/commonjs/web/variants/getVariants.js.map +1 -0
- package/lib/commonjs/web/variants/index.js +28 -0
- package/lib/commonjs/web/variants/index.js.map +1 -0
- package/lib/commonjs/web/variants/useVariants.js +75 -0
- package/lib/commonjs/web/variants/useVariants.js.map +1 -0
- package/lib/module/common.js +2 -56
- package/lib/module/common.js.map +1 -1
- package/lib/module/global.js +1 -1
- package/lib/module/index.js +12 -29
- package/lib/module/index.js.map +1 -1
- package/lib/module/{utils/mq.js → mq.js} +14 -2
- package/lib/module/mq.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/specs/NativePlatform/NativePlatform.nitro.js +23 -0
- package/lib/module/specs/NativePlatform/NativePlatform.nitro.js.map +1 -0
- package/lib/module/specs/NativePlatform/index.js +4 -0
- package/lib/module/specs/NativePlatform/index.js.map +1 -0
- package/lib/module/specs/NavigtionBar/UnistylesNavigationBar.nitro.js +4 -0
- package/lib/module/specs/NavigtionBar/UnistylesNavigationBar.nitro.js.map +1 -0
- package/lib/module/specs/NavigtionBar/index.js +12 -0
- package/lib/module/specs/NavigtionBar/index.js.map +1 -0
- package/lib/module/specs/ShadowRegistry/ShadowRegistry.nitro.js +4 -0
- package/lib/module/specs/ShadowRegistry/ShadowRegistry.nitro.js.map +1 -0
- package/lib/module/specs/ShadowRegistry/index.js +26 -0
- package/lib/module/specs/ShadowRegistry/index.js.map +1 -0
- package/lib/module/specs/ShadowRegistry/types.js +2 -0
- package/lib/module/specs/ShadowRegistry/types.js.map +1 -0
- package/lib/module/specs/StatusBar/UnistylesStatusBar.nitro.js +4 -0
- package/lib/module/specs/StatusBar/UnistylesStatusBar.nitro.js.map +1 -0
- package/lib/module/specs/StatusBar/index.js +28 -0
- package/lib/module/specs/StatusBar/index.js.map +1 -0
- package/lib/module/specs/StyleSheet/UnistylesStyleSheet.nitro.js +4 -0
- package/lib/module/specs/StyleSheet/UnistylesStyleSheet.nitro.js.map +1 -0
- package/lib/module/specs/StyleSheet/index.js +14 -0
- package/lib/module/specs/StyleSheet/index.js.map +1 -0
- package/lib/module/specs/TurboUnistyles/NativeTurboUnistyles.js +9 -0
- package/lib/module/specs/TurboUnistyles/NativeTurboUnistyles.js.map +1 -0
- package/lib/module/specs/TurboUnistyles/index.js +4 -0
- package/lib/module/specs/TurboUnistyles/index.js.map +1 -0
- package/lib/module/specs/UnistylesRuntime/UnistylesRuntime.nitro.js +4 -0
- package/lib/module/specs/UnistylesRuntime/UnistylesRuntime.nitro.js.map +1 -0
- package/lib/module/specs/UnistylesRuntime/index.js +22 -0
- package/lib/module/specs/UnistylesRuntime/index.js.map +1 -0
- package/lib/module/specs/index.js +10 -0
- package/lib/module/specs/index.js.map +1 -0
- package/lib/module/specs/index.web.js +5 -0
- package/lib/module/specs/index.web.js.map +1 -0
- package/lib/module/specs/types.js +20 -0
- package/lib/module/specs/types.js.map +1 -0
- package/lib/module/types/accessibility.js +33 -0
- package/lib/module/types/accessibility.js.map +1 -0
- package/lib/module/types/breakpoints.js +2 -0
- package/lib/module/types/common.js +1 -1
- package/lib/module/types/core.js +2 -0
- package/lib/module/types/index.js +3 -3
- package/lib/module/types/index.js.map +1 -1
- package/lib/module/types/stylesheet.js +5 -0
- package/lib/module/types/stylesheet.js.map +1 -1
- package/lib/module/types/variants.js +2 -0
- package/lib/module/web/convert/boxShadow.js +72 -0
- package/lib/module/web/convert/boxShadow.js.map +1 -0
- package/lib/module/web/convert/breakpoint.js +20 -0
- package/lib/module/web/convert/breakpoint.js.map +1 -0
- package/lib/module/web/convert/index.js +71 -0
- package/lib/module/web/convert/index.js.map +1 -0
- package/lib/module/web/convert/module.d.js +2 -0
- package/lib/module/web/convert/module.d.js.map +1 -0
- package/lib/module/web/convert/shadow.js +63 -0
- package/lib/module/web/convert/shadow.js.map +1 -0
- package/lib/module/web/convert/style.js +84 -0
- package/lib/module/web/convert/style.js.map +1 -0
- package/lib/module/web/convert/textShadow.js +68 -0
- package/lib/module/web/convert/textShadow.js.map +1 -0
- package/lib/module/web/convert/transform.js +67 -0
- package/lib/module/web/convert/transform.js.map +1 -0
- package/lib/module/web/convert/types.js +5 -0
- package/lib/module/web/convert/types.js.map +1 -0
- package/lib/module/web/convert/utils.js +43 -0
- package/lib/module/web/convert/utils.js.map +1 -0
- package/lib/module/web/create.js +84 -0
- package/lib/module/web/create.js.map +1 -0
- package/lib/module/web/index.js +24 -0
- package/lib/module/web/index.js.map +1 -0
- package/lib/module/web/listener/index.js +4 -0
- package/lib/module/web/listener/index.js.map +1 -0
- package/lib/module/web/listener/listener.js +31 -0
- package/lib/module/web/listener/listener.js.map +1 -0
- package/lib/module/web/mock.js +33 -0
- package/lib/module/web/mock.js.map +1 -0
- package/lib/module/web/mq.js +17 -0
- package/lib/module/web/mq.js.map +1 -0
- package/lib/module/web/pseudo.js +6 -0
- package/lib/module/web/pseudo.js.map +1 -0
- package/lib/module/web/registry.js +33 -0
- package/lib/module/web/registry.js.map +1 -0
- package/lib/module/web/runtime.js +160 -0
- package/lib/module/web/runtime.js.map +1 -0
- package/lib/module/web/state.js +117 -0
- package/lib/module/web/state.js.map +1 -0
- package/lib/module/web/utils.js +65 -0
- package/lib/module/web/utils.js.map +1 -0
- package/lib/module/web/variants/getVariants.js +34 -0
- package/lib/module/web/variants/getVariants.js.map +1 -0
- package/lib/module/web/variants/index.js +5 -0
- package/lib/module/web/variants/index.js.map +1 -0
- package/lib/module/web/variants/useVariants.js +70 -0
- package/lib/module/web/variants/useVariants.js.map +1 -0
- package/lib/typescript/example/App.d.ts +4 -0
- package/lib/typescript/example/App.d.ts.map +1 -0
- package/lib/typescript/example/Typography.d.ts +12 -0
- package/lib/typescript/example/Typography.d.ts.map +1 -0
- package/lib/typescript/example/unistyles.d.ts +63 -0
- package/lib/typescript/example/unistyles.d.ts.map +1 -0
- package/lib/typescript/expo-example/App.d.ts +4 -0
- package/lib/typescript/expo-example/App.d.ts.map +1 -0
- package/lib/typescript/expo-example/unistyles.d.ts +63 -0
- package/lib/typescript/expo-example/unistyles.d.ts.map +1 -0
- package/lib/typescript/src/common.d.ts +0 -50
- package/lib/typescript/src/common.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +3 -76
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/{utils/mq.d.ts → mq.d.ts} +2 -2
- package/lib/typescript/src/mq.d.ts.map +1 -0
- package/lib/typescript/src/specs/NativePlatform/NativePlatform.nitro.d.ts +57 -0
- package/lib/typescript/src/specs/NativePlatform/NativePlatform.nitro.d.ts.map +1 -0
- package/lib/typescript/src/specs/NativePlatform/index.d.ts +3 -0
- package/lib/typescript/src/specs/NativePlatform/index.d.ts.map +1 -0
- package/lib/typescript/src/specs/NavigtionBar/UnistylesNavigationBar.nitro.d.ts +11 -0
- package/lib/typescript/src/specs/NavigtionBar/UnistylesNavigationBar.nitro.d.ts.map +1 -0
- package/lib/typescript/src/specs/NavigtionBar/index.d.ts +11 -0
- package/lib/typescript/src/specs/NavigtionBar/index.d.ts.map +1 -0
- package/lib/typescript/src/specs/ShadowRegistry/ShadowRegistry.nitro.d.ts +7 -0
- package/lib/typescript/src/specs/ShadowRegistry/ShadowRegistry.nitro.d.ts.map +1 -0
- package/lib/typescript/src/specs/ShadowRegistry/index.d.ts +12 -0
- package/lib/typescript/src/specs/ShadowRegistry/index.d.ts.map +1 -0
- package/lib/typescript/src/specs/ShadowRegistry/types.d.ts +27 -0
- package/lib/typescript/src/specs/ShadowRegistry/types.d.ts.map +1 -0
- package/lib/typescript/src/specs/StatusBar/UnistylesStatusBar.nitro.d.ts +11 -0
- package/lib/typescript/src/specs/StatusBar/UnistylesStatusBar.nitro.d.ts.map +1 -0
- package/lib/typescript/src/specs/StatusBar/index.d.ts +15 -0
- package/lib/typescript/src/specs/StatusBar/index.d.ts.map +1 -0
- package/lib/typescript/src/specs/StyleSheet/UnistylesStyleSheet.nitro.d.ts +9 -0
- package/lib/typescript/src/specs/StyleSheet/UnistylesStyleSheet.nitro.d.ts.map +1 -0
- package/lib/typescript/src/specs/StyleSheet/index.d.ts +29 -0
- package/lib/typescript/src/specs/StyleSheet/index.d.ts.map +1 -0
- package/lib/typescript/src/specs/TurboUnistyles/NativeTurboUnistyles.d.ts +2 -0
- package/lib/typescript/src/specs/TurboUnistyles/NativeTurboUnistyles.d.ts.map +1 -0
- package/lib/typescript/src/specs/TurboUnistyles/index.d.ts +2 -0
- package/lib/typescript/src/specs/TurboUnistyles/index.d.ts.map +1 -0
- package/lib/typescript/src/specs/UnistylesRuntime/UnistylesRuntime.nitro.d.ts +41 -0
- package/lib/typescript/src/specs/UnistylesRuntime/UnistylesRuntime.nitro.d.ts.map +1 -0
- package/lib/typescript/src/specs/UnistylesRuntime/index.d.ts +25 -0
- package/lib/typescript/src/specs/UnistylesRuntime/index.d.ts.map +1 -0
- package/lib/typescript/src/specs/index.d.ts +10 -0
- package/lib/typescript/src/specs/index.d.ts.map +1 -0
- package/lib/typescript/src/specs/index.web.d.ts +4 -0
- package/lib/typescript/src/specs/index.web.d.ts.map +1 -0
- package/lib/typescript/src/specs/types.d.ts +32 -0
- package/lib/typescript/src/specs/types.d.ts.map +1 -0
- package/lib/typescript/src/types/accessibility.d.ts +28 -0
- package/lib/typescript/src/types/accessibility.d.ts.map +1 -0
- package/lib/typescript/src/types/breakpoints.d.ts +12 -5
- package/lib/typescript/src/types/breakpoints.d.ts.map +1 -1
- package/lib/typescript/src/types/common.d.ts +1 -0
- package/lib/typescript/src/types/common.d.ts.map +1 -1
- package/lib/typescript/src/types/index.d.ts +2 -5
- package/lib/typescript/src/types/index.d.ts.map +1 -1
- package/lib/typescript/src/types/stylesheet.d.ts +31 -9
- package/lib/typescript/src/types/stylesheet.d.ts.map +1 -1
- package/lib/typescript/src/types/variants.d.ts +5 -8
- package/lib/typescript/src/types/variants.d.ts.map +1 -1
- package/lib/typescript/src/web/convert/boxShadow.d.ts +3 -0
- package/lib/typescript/src/web/convert/boxShadow.d.ts.map +1 -0
- package/lib/typescript/src/web/convert/breakpoint.d.ts +3 -0
- package/lib/typescript/src/web/convert/breakpoint.d.ts.map +1 -0
- package/lib/typescript/src/web/convert/index.d.ts +4 -0
- package/lib/typescript/src/web/convert/index.d.ts.map +1 -0
- package/lib/typescript/src/web/convert/shadow.d.ts +2 -0
- package/lib/typescript/src/web/convert/shadow.d.ts.map +1 -0
- package/lib/typescript/src/web/convert/style.d.ts +3 -0
- package/lib/typescript/src/web/convert/style.d.ts.map +1 -0
- package/lib/typescript/src/web/convert/textShadow.d.ts +3 -0
- package/lib/typescript/src/web/convert/textShadow.d.ts.map +1 -0
- package/lib/typescript/src/web/convert/transform.d.ts +5 -0
- package/lib/typescript/src/web/convert/transform.d.ts.map +1 -0
- package/lib/typescript/src/web/convert/types.d.ts +13 -0
- package/lib/typescript/src/web/convert/types.d.ts.map +1 -0
- package/lib/typescript/src/web/convert/utils.d.ts +8 -0
- package/lib/typescript/src/web/convert/utils.d.ts.map +1 -0
- package/lib/typescript/src/web/create.d.ts +2449 -0
- package/lib/typescript/src/web/create.d.ts.map +1 -0
- package/lib/typescript/src/web/index.d.ts +2464 -0
- package/lib/typescript/src/web/index.d.ts.map +1 -0
- package/lib/typescript/src/web/listener/index.d.ts +2 -0
- package/lib/typescript/src/web/listener/index.d.ts.map +1 -0
- package/lib/typescript/src/web/listener/listener.d.ts +10 -0
- package/lib/typescript/src/web/listener/listener.d.ts.map +1 -0
- package/lib/typescript/src/web/mock.d.ts +14 -0
- package/lib/typescript/src/web/mock.d.ts.map +1 -0
- package/lib/typescript/src/web/mq.d.ts +4 -0
- package/lib/typescript/src/web/mq.d.ts.map +1 -0
- package/lib/typescript/src/web/pseudo.d.ts +4 -0
- package/lib/typescript/src/web/pseudo.d.ts.map +1 -0
- package/lib/typescript/src/web/registry.d.ts +12 -0
- package/lib/typescript/src/web/registry.d.ts.map +1 -0
- package/lib/typescript/src/web/runtime.d.ts +42 -0
- package/lib/typescript/src/web/runtime.d.ts.map +1 -0
- package/lib/typescript/src/web/state.d.ts +24 -0
- package/lib/typescript/src/web/state.d.ts.map +1 -0
- package/lib/typescript/src/web/utils.d.ts +20 -0
- package/lib/typescript/src/web/utils.d.ts.map +1 -0
- package/lib/typescript/src/web/variants/getVariants.d.ts +3 -0
- package/lib/typescript/src/web/variants/getVariants.d.ts.map +1 -0
- package/lib/typescript/src/web/variants/index.d.ts +3 -0
- package/lib/typescript/src/web/variants/index.d.ts.map +1 -0
- package/lib/typescript/src/web/variants/useVariants.d.ts +3 -0
- package/lib/typescript/src/web/variants/useVariants.d.ts.map +1 -0
- package/nitrogen/generated/android/UnistylesOnLoad.cpp +34 -0
- package/nitrogen/generated/android/UnistylesOnLoad.hpp +25 -0
- package/nitrogen/generated/android/UnistylesOnLoad.kt +1 -0
- package/nitrogen/generated/android/c++/JColorScheme.hpp +61 -0
- package/nitrogen/generated/android/c++/JDimensions.hpp +56 -0
- package/nitrogen/generated/android/c++/JFunc_void_std__vector_UnistyleDependency_.hpp +60 -0
- package/nitrogen/generated/android/c++/JHybridNativePlatformSpec.cpp +145 -0
- package/nitrogen/generated/android/c++/JHybridNativePlatformSpec.hpp +70 -0
- package/nitrogen/generated/android/c++/JInsets.hpp +68 -0
- package/nitrogen/generated/android/c++/JOrientation.hpp +58 -0
- package/nitrogen/generated/android/c++/JUnistyleDependency.hpp +94 -0
- package/nitrogen/generated/android/c++/JUnistylesNativeMiniRuntime.hpp +96 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/ColorScheme.kt +22 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/Dimensions.kt +21 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/Func_void_std__vector_UnistyleDependency_.kt +45 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/HybridNativePlatformSpec.kt +134 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/Insets.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/Orientation.kt +21 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/UnistyleDependency.kt +33 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/UnistylesNativeMiniRuntime.kt +29 -0
- package/nitrogen/generated/android/unistyles+autolinking.cmake +52 -0
- package/nitrogen/generated/android/unistyles+autolinking.gradle +25 -0
- package/nitrogen/generated/ios/Unistyles+autolinking.rb +56 -0
- package/nitrogen/generated/ios/Unistyles-Swift-Cxx-Bridge.cpp +8 -0
- package/nitrogen/generated/ios/Unistyles-Swift-Cxx-Bridge.hpp +86 -0
- package/nitrogen/generated/ios/Unistyles-Swift-Cxx-Umbrella.hpp +88 -0
- package/nitrogen/generated/ios/c++/HybridNativePlatformSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridNativePlatformSpecSwift.hpp +151 -0
- package/nitrogen/generated/ios/swift/ColorScheme.swift +44 -0
- package/nitrogen/generated/ios/swift/Dimensions.swift +46 -0
- package/nitrogen/generated/ios/swift/HybridNativePlatformSpec.swift +65 -0
- package/nitrogen/generated/ios/swift/HybridNativePlatformSpecCxx.swift +273 -0
- package/nitrogen/generated/ios/swift/Insets.swift +79 -0
- package/nitrogen/generated/ios/swift/Orientation.swift +40 -0
- package/nitrogen/generated/ios/swift/UnistyleDependency.swift +88 -0
- package/nitrogen/generated/ios/swift/UnistylesNativeMiniRuntime.swift +134 -0
- package/nitrogen/generated/shared/c++/ColorScheme.hpp +82 -0
- package/nitrogen/generated/shared/c++/Dimensions.hpp +72 -0
- package/nitrogen/generated/shared/c++/HybridNativePlatformSpec.cpp +38 -0
- package/nitrogen/generated/shared/c++/HybridNativePlatformSpec.hpp +95 -0
- package/nitrogen/generated/shared/c++/HybridUnistylesNavigationBarSpec.cpp +24 -0
- package/nitrogen/generated/shared/c++/HybridUnistylesNavigationBarSpec.hpp +61 -0
- package/nitrogen/generated/shared/c++/HybridUnistylesRuntimeSpec.cpp +36 -0
- package/nitrogen/generated/shared/c++/HybridUnistylesRuntimeSpec.hpp +88 -0
- package/nitrogen/generated/shared/c++/HybridUnistylesShadowRegistrySpec.cpp +21 -0
- package/nitrogen/generated/shared/c++/HybridUnistylesShadowRegistrySpec.hpp +59 -0
- package/nitrogen/generated/shared/c++/HybridUnistylesStatusBarSpec.cpp +24 -0
- package/nitrogen/generated/shared/c++/HybridUnistylesStatusBarSpec.hpp +61 -0
- package/nitrogen/generated/shared/c++/HybridUnistylesStyleSheetSpec.cpp +22 -0
- package/nitrogen/generated/shared/c++/HybridUnistylesStyleSheetSpec.hpp +60 -0
- package/nitrogen/generated/shared/c++/Insets.hpp +84 -0
- package/nitrogen/generated/shared/c++/Orientation.hpp +78 -0
- package/nitrogen/generated/shared/c++/UnistyleDependency.hpp +76 -0
- package/nitrogen/generated/shared/c++/UnistylesCxxMiniRuntime.hpp +128 -0
- package/nitrogen/generated/shared/c++/UnistylesNativeMiniRuntime.hpp +115 -0
- package/package.json +34 -59
- package/plugin/__tests__/dependencies.spec.js +438 -0
- package/plugin/__tests__/ref.spec.js +1170 -0
- package/plugin/__tests__/stylesheet.spec.js +489 -0
- package/plugin/common.js +119 -0
- package/plugin/import.js +8 -0
- package/plugin/index.js +132 -0
- package/plugin/ref.js +211 -0
- package/plugin/style.js +47 -0
- package/plugin/stylesheet.js +190 -0
- package/plugin/variants.js +33 -0
- package/src/common.ts +0 -58
- package/src/index.ts +11 -52
- package/src/{utils/mq.ts → mq.ts} +13 -4
- package/src/specs/NativePlatform/NativePlatform.nitro.ts +61 -0
- package/src/specs/NativePlatform/index.ts +2 -0
- package/src/specs/NavigtionBar/UnistylesNavigationBar.nitro.ts +10 -0
- package/src/specs/NavigtionBar/index.ts +25 -0
- package/src/specs/ShadowRegistry/ShadowRegistry.nitro.ts +3 -0
- package/src/specs/ShadowRegistry/index.ts +51 -0
- package/src/specs/ShadowRegistry/types.ts +29 -0
- package/src/specs/StatusBar/UnistylesStatusBar.nitro.ts +10 -0
- package/src/specs/StatusBar/index.ts +48 -0
- package/src/specs/StyleSheet/UnistylesStyleSheet.nitro.ts +6 -0
- package/src/specs/StyleSheet/index.ts +46 -0
- package/src/specs/TurboUnistyles/NativeTurboUnistyles.ts +8 -0
- package/src/specs/TurboUnistyles/index.ts +1 -0
- package/src/specs/UnistylesRuntime/UnistylesRuntime.nitro.ts +47 -0
- package/src/specs/UnistylesRuntime/index.ts +64 -0
- package/src/specs/index.ts +23 -0
- package/src/specs/index.web.ts +5 -0
- package/src/specs/types.ts +38 -0
- package/src/types/accessibility.ts +29 -0
- package/src/types/breakpoints.ts +21 -14
- package/src/types/common.ts +1 -0
- package/src/types/index.ts +2 -5
- package/src/types/stylesheet.ts +41 -9
- package/src/types/variants.ts +7 -11
- package/src/web/convert/boxShadow.ts +72 -0
- package/src/web/convert/breakpoint.ts +21 -0
- package/src/web/convert/index.ts +78 -0
- package/src/web/convert/shadow.ts +68 -0
- package/src/web/convert/style.ts +94 -0
- package/src/web/convert/textShadow.ts +69 -0
- package/src/web/convert/transform.ts +89 -0
- package/src/web/convert/types.ts +16 -0
- package/src/web/convert/utils.ts +54 -0
- package/src/web/create.ts +105 -0
- package/src/web/index.ts +24 -0
- package/src/web/listener/index.ts +1 -0
- package/src/web/listener/listener.ts +33 -0
- package/src/web/mock.ts +35 -0
- package/src/web/mq.ts +19 -0
- package/src/web/pseudo.ts +11 -0
- package/src/web/registry.ts +41 -0
- package/src/web/runtime.ts +198 -0
- package/src/web/state.ts +148 -0
- package/src/web/utils.ts +95 -0
- package/src/web/variants/getVariants.ts +42 -0
- package/src/web/variants/index.ts +2 -0
- package/src/web/variants/useVariants.ts +79 -0
- package/android/src/main/java/com/unistyles/Models.kt +0 -27
- package/android/src/main/java/com/unistyles/Platform.kt +0 -324
- package/android/src/main/java/com/unistyles/UnistylesModule.kt +0 -217
- package/cxx/Macros.h +0 -11
- package/cxx/UnistylesImpl.cpp +0 -310
- package/cxx/UnistylesModel.cpp +0 -230
- package/cxx/UnistylesModel.h +0 -143
- package/cxx/UnistylesRuntime.cpp +0 -36
- package/cxx/UnistylesRuntime.h +0 -81
- package/ios/UnistylesModule.h +0 -28
- package/ios/UnistylesModule.mm +0 -77
- package/ios/platform/Platform_Shared.h +0 -8
- package/ios/platform/Platform_Shared.mm +0 -160
- package/ios/platform/Platform_iOS.h +0 -20
- package/ios/platform/Platform_iOS.mm +0 -193
- package/ios/platform/Platform_macOS.h +0 -19
- package/ios/platform/Platform_macOS.mm +0 -117
- package/ios/platform/Platform_tvOS.h +0 -16
- package/ios/platform/Platform_tvOS.mm +0 -92
- package/ios/platform/Platform_visionOS.h +0 -19
- package/ios/platform/Platform_visionOS.mm +0 -116
- package/lib/commonjs/core/UnistyleRegistry.js +0 -110
- package/lib/commonjs/core/UnistyleRegistry.js.map +0 -1
- package/lib/commonjs/core/Unistyles.js +0 -39
- package/lib/commonjs/core/Unistyles.js.map +0 -1
- package/lib/commonjs/core/UnistylesModule.js +0 -268
- package/lib/commonjs/core/UnistylesModule.js.map +0 -1
- package/lib/commonjs/core/UnistylesModule.native.js +0 -9
- package/lib/commonjs/core/UnistylesModule.native.js.map +0 -1
- package/lib/commonjs/core/UnistylesModule.windows.js +0 -11
- package/lib/commonjs/core/UnistylesModule.windows.js.map +0 -1
- package/lib/commonjs/core/UnistylesRuntime.js +0 -284
- package/lib/commonjs/core/UnistylesRuntime.js.map +0 -1
- package/lib/commonjs/core/index.js +0 -13
- package/lib/commonjs/core/index.js.map +0 -1
- package/lib/commonjs/core/mocks/UnistylesMockedBridge.js +0 -36
- package/lib/commonjs/core/mocks/UnistylesMockedBridge.js.map +0 -1
- package/lib/commonjs/core/mocks/UnistylesMockedRegistry.js +0 -46
- package/lib/commonjs/core/mocks/UnistylesMockedRegistry.js.map +0 -1
- package/lib/commonjs/core/mocks/UnistylesMockedRuntime.js +0 -122
- package/lib/commonjs/core/mocks/UnistylesMockedRuntime.js.map +0 -1
- package/lib/commonjs/core/mocks/index.js +0 -27
- package/lib/commonjs/core/mocks/index.js.map +0 -1
- package/lib/commonjs/createStyleSheet.js +0 -14
- package/lib/commonjs/createStyleSheet.js.map +0 -1
- package/lib/commonjs/hooks/index.js +0 -34
- package/lib/commonjs/hooks/index.js.map +0 -1
- package/lib/commonjs/hooks/useCSS.js +0 -44
- package/lib/commonjs/hooks/useCSS.js.map +0 -1
- package/lib/commonjs/hooks/useCSS.native.js +0 -9
- package/lib/commonjs/hooks/useCSS.native.js.map +0 -1
- package/lib/commonjs/hooks/useInitialTheme.js +0 -17
- package/lib/commonjs/hooks/useInitialTheme.js.map +0 -1
- package/lib/commonjs/hooks/useUnistyles.js +0 -74
- package/lib/commonjs/hooks/useUnistyles.js.map +0 -1
- package/lib/commonjs/hooks/useVariants.js +0 -14
- package/lib/commonjs/hooks/useVariants.js.map +0 -1
- package/lib/commonjs/normalizer/index.js +0 -32
- package/lib/commonjs/normalizer/index.js.map +0 -1
- package/lib/commonjs/normalizer/module.d.js.map +0 -1
- package/lib/commonjs/normalizer/normalizeStyle.js +0 -59
- package/lib/commonjs/normalizer/normalizeStyle.js.map +0 -1
- package/lib/commonjs/normalizer/normalizer.js +0 -88
- package/lib/commonjs/normalizer/normalizer.js.map +0 -1
- package/lib/commonjs/normalizer/normalizer.macos.js +0 -3
- package/lib/commonjs/normalizer/normalizer.macos.js.map +0 -1
- package/lib/commonjs/plugins/cssMediaQueriesPlugin.js +0 -14
- package/lib/commonjs/plugins/cssMediaQueriesPlugin.js.map +0 -1
- package/lib/commonjs/plugins/index.js +0 -20
- package/lib/commonjs/plugins/index.js.map +0 -1
- package/lib/commonjs/plugins/normalizeWebStylesPlugin.js +0 -12
- package/lib/commonjs/plugins/normalizeWebStylesPlugin.js.map +0 -1
- package/lib/commonjs/types/color.js +0 -2
- package/lib/commonjs/types/color.js.map +0 -1
- package/lib/commonjs/types/normalizer.js.map +0 -1
- package/lib/commonjs/types/plugin.js.map +0 -1
- package/lib/commonjs/types/unistyles.js.map +0 -1
- package/lib/commonjs/useStyles.js +0 -47
- package/lib/commonjs/useStyles.js.map +0 -1
- package/lib/commonjs/utils/breakpoints.js +0 -33
- package/lib/commonjs/utils/breakpoints.js.map +0 -1
- package/lib/commonjs/utils/cssMediaQuery.js +0 -244
- package/lib/commonjs/utils/cssMediaQuery.js.map +0 -1
- package/lib/commonjs/utils/generateId.js +0 -15
- package/lib/commonjs/utils/generateId.js.map +0 -1
- package/lib/commonjs/utils/hash32.js +0 -43
- package/lib/commonjs/utils/hash32.js.map +0 -1
- package/lib/commonjs/utils/index.js +0 -91
- package/lib/commonjs/utils/index.js.map +0 -1
- package/lib/commonjs/utils/mq.js.map +0 -1
- package/lib/commonjs/utils/mqParser.js +0 -89
- package/lib/commonjs/utils/mqParser.js.map +0 -1
- package/lib/commonjs/utils/parseColor.js +0 -35
- package/lib/commonjs/utils/parseColor.js.map +0 -1
- package/lib/commonjs/utils/styles.js +0 -73
- package/lib/commonjs/utils/styles.js.map +0 -1
- package/lib/commonjs/utils/withPlugins.js +0 -15
- package/lib/commonjs/utils/withPlugins.js.map +0 -1
- package/lib/module/core/UnistyleRegistry.js +0 -103
- package/lib/module/core/UnistyleRegistry.js.map +0 -1
- package/lib/module/core/Unistyles.js +0 -33
- package/lib/module/core/Unistyles.js.map +0 -1
- package/lib/module/core/UnistylesModule.js +0 -261
- package/lib/module/core/UnistylesModule.js.map +0 -1
- package/lib/module/core/UnistylesModule.native.js +0 -3
- package/lib/module/core/UnistylesModule.native.js.map +0 -1
- package/lib/module/core/UnistylesModule.windows.js +0 -5
- package/lib/module/core/UnistylesModule.windows.js.map +0 -1
- package/lib/module/core/UnistylesRuntime.js +0 -278
- package/lib/module/core/UnistylesRuntime.js.map +0 -1
- package/lib/module/core/index.js +0 -3
- package/lib/module/core/index.js.map +0 -1
- package/lib/module/core/mocks/UnistylesMockedBridge.js +0 -29
- package/lib/module/core/mocks/UnistylesMockedBridge.js.map +0 -1
- package/lib/module/core/mocks/UnistylesMockedRegistry.js +0 -39
- package/lib/module/core/mocks/UnistylesMockedRegistry.js.map +0 -1
- package/lib/module/core/mocks/UnistylesMockedRuntime.js +0 -114
- package/lib/module/core/mocks/UnistylesMockedRuntime.js.map +0 -1
- package/lib/module/core/mocks/index.js +0 -4
- package/lib/module/core/mocks/index.js.map +0 -1
- package/lib/module/createStyleSheet.js +0 -7
- package/lib/module/createStyleSheet.js.map +0 -1
- package/lib/module/hooks/index.js +0 -5
- package/lib/module/hooks/index.js.map +0 -1
- package/lib/module/hooks/useCSS.js +0 -37
- package/lib/module/hooks/useCSS.js.map +0 -1
- package/lib/module/hooks/useCSS.native.js +0 -2
- package/lib/module/hooks/useCSS.native.js.map +0 -1
- package/lib/module/hooks/useInitialTheme.js +0 -10
- package/lib/module/hooks/useInitialTheme.js.map +0 -1
- package/lib/module/hooks/useUnistyles.js +0 -67
- package/lib/module/hooks/useUnistyles.js.map +0 -1
- package/lib/module/hooks/useVariants.js +0 -7
- package/lib/module/hooks/useVariants.js.map +0 -1
- package/lib/module/normalizer/index.js +0 -3
- package/lib/module/normalizer/index.js.map +0 -1
- package/lib/module/normalizer/module.d.js +0 -2
- package/lib/module/normalizer/module.d.js.map +0 -1
- package/lib/module/normalizer/normalizeStyle.js +0 -52
- package/lib/module/normalizer/normalizeStyle.js.map +0 -1
- package/lib/module/normalizer/normalizer.js +0 -78
- package/lib/module/normalizer/normalizer.js.map +0 -1
- package/lib/module/normalizer/normalizer.macos.js +0 -2
- package/lib/module/normalizer/normalizer.macos.js.map +0 -1
- package/lib/module/plugins/cssMediaQueriesPlugin.js +0 -7
- package/lib/module/plugins/cssMediaQueriesPlugin.js.map +0 -1
- package/lib/module/plugins/index.js +0 -3
- package/lib/module/plugins/index.js.map +0 -1
- package/lib/module/plugins/normalizeWebStylesPlugin.js +0 -6
- package/lib/module/plugins/normalizeWebStylesPlugin.js.map +0 -1
- package/lib/module/types/color.js +0 -2
- package/lib/module/types/color.js.map +0 -1
- package/lib/module/types/normalizer.js +0 -2
- package/lib/module/types/normalizer.js.map +0 -1
- package/lib/module/types/plugin.js +0 -2
- package/lib/module/types/plugin.js.map +0 -1
- package/lib/module/types/unistyles.js +0 -2
- package/lib/module/types/unistyles.js.map +0 -1
- package/lib/module/useStyles.js +0 -40
- package/lib/module/useStyles.js.map +0 -1
- package/lib/module/utils/breakpoints.js +0 -26
- package/lib/module/utils/breakpoints.js.map +0 -1
- package/lib/module/utils/cssMediaQuery.js +0 -237
- package/lib/module/utils/cssMediaQuery.js.map +0 -1
- package/lib/module/utils/generateId.js +0 -7
- package/lib/module/utils/generateId.js.map +0 -1
- package/lib/module/utils/hash32.js +0 -36
- package/lib/module/utils/hash32.js.map +0 -1
- package/lib/module/utils/index.js +0 -8
- package/lib/module/utils/index.js.map +0 -1
- package/lib/module/utils/mq.js.map +0 -1
- package/lib/module/utils/mqParser.js +0 -78
- package/lib/module/utils/mqParser.js.map +0 -1
- package/lib/module/utils/parseColor.js +0 -28
- package/lib/module/utils/parseColor.js.map +0 -1
- package/lib/module/utils/styles.js +0 -64
- package/lib/module/utils/styles.js.map +0 -1
- package/lib/module/utils/withPlugins.js +0 -8
- package/lib/module/utils/withPlugins.js.map +0 -1
- package/lib/typescript/src/core/UnistyleRegistry.d.ts +0 -57
- package/lib/typescript/src/core/UnistyleRegistry.d.ts.map +0 -1
- package/lib/typescript/src/core/Unistyles.d.ts +0 -13
- package/lib/typescript/src/core/Unistyles.d.ts.map +0 -1
- package/lib/typescript/src/core/UnistylesModule.d.ts +0 -21
- package/lib/typescript/src/core/UnistylesModule.d.ts.map +0 -1
- package/lib/typescript/src/core/UnistylesModule.native.d.ts +0 -6
- package/lib/typescript/src/core/UnistylesModule.native.d.ts.map +0 -1
- package/lib/typescript/src/core/UnistylesModule.windows.d.ts +0 -6
- package/lib/typescript/src/core/UnistylesModule.windows.d.ts.map +0 -1
- package/lib/typescript/src/core/UnistylesRuntime.d.ts +0 -179
- package/lib/typescript/src/core/UnistylesRuntime.d.ts.map +0 -1
- package/lib/typescript/src/core/index.d.ts +0 -5
- package/lib/typescript/src/core/index.d.ts.map +0 -1
- package/lib/typescript/src/core/mocks/UnistylesMockedBridge.d.ts +0 -28
- package/lib/typescript/src/core/mocks/UnistylesMockedBridge.d.ts.map +0 -1
- package/lib/typescript/src/core/mocks/UnistylesMockedRegistry.d.ts +0 -21
- package/lib/typescript/src/core/mocks/UnistylesMockedRegistry.d.ts.map +0 -1
- package/lib/typescript/src/core/mocks/UnistylesMockedRuntime.d.ts +0 -79
- package/lib/typescript/src/core/mocks/UnistylesMockedRuntime.d.ts.map +0 -1
- package/lib/typescript/src/core/mocks/index.d.ts +0 -4
- package/lib/typescript/src/core/mocks/index.d.ts.map +0 -1
- package/lib/typescript/src/createStyleSheet.d.ts +0 -8
- package/lib/typescript/src/createStyleSheet.d.ts.map +0 -1
- package/lib/typescript/src/hooks/index.d.ts +0 -5
- package/lib/typescript/src/hooks/index.d.ts.map +0 -1
- package/lib/typescript/src/hooks/useCSS.d.ts +0 -3
- package/lib/typescript/src/hooks/useCSS.d.ts.map +0 -1
- package/lib/typescript/src/hooks/useCSS.native.d.ts +0 -3
- package/lib/typescript/src/hooks/useCSS.native.d.ts.map +0 -1
- package/lib/typescript/src/hooks/useInitialTheme.d.ts +0 -3
- package/lib/typescript/src/hooks/useInitialTheme.d.ts.map +0 -1
- package/lib/typescript/src/hooks/useUnistyles.d.ts +0 -27
- package/lib/typescript/src/hooks/useUnistyles.d.ts.map +0 -1
- package/lib/typescript/src/hooks/useVariants.d.ts +0 -3
- package/lib/typescript/src/hooks/useVariants.d.ts.map +0 -1
- package/lib/typescript/src/normalizer/index.d.ts +0 -3
- package/lib/typescript/src/normalizer/index.d.ts.map +0 -1
- package/lib/typescript/src/normalizer/normalizeStyle.d.ts +0 -3
- package/lib/typescript/src/normalizer/normalizeStyle.d.ts.map +0 -1
- package/lib/typescript/src/normalizer/normalizer.d.ts +0 -11
- package/lib/typescript/src/normalizer/normalizer.d.ts.map +0 -1
- package/lib/typescript/src/normalizer/normalizer.macos.d.ts +0 -1
- package/lib/typescript/src/normalizer/normalizer.macos.d.ts.map +0 -1
- package/lib/typescript/src/plugins/cssMediaQueriesPlugin.d.ts +0 -3
- package/lib/typescript/src/plugins/cssMediaQueriesPlugin.d.ts.map +0 -1
- package/lib/typescript/src/plugins/index.d.ts +0 -3
- package/lib/typescript/src/plugins/index.d.ts.map +0 -1
- package/lib/typescript/src/plugins/normalizeWebStylesPlugin.d.ts +0 -3
- package/lib/typescript/src/plugins/normalizeWebStylesPlugin.d.ts.map +0 -1
- package/lib/typescript/src/types/color.d.ts +0 -4
- package/lib/typescript/src/types/color.d.ts.map +0 -1
- package/lib/typescript/src/types/normalizer.d.ts +0 -20
- package/lib/typescript/src/types/normalizer.d.ts.map +0 -1
- package/lib/typescript/src/types/plugin.d.ts +0 -7
- package/lib/typescript/src/types/plugin.d.ts.map +0 -1
- package/lib/typescript/src/types/unistyles.d.ts +0 -81
- package/lib/typescript/src/types/unistyles.d.ts.map +0 -1
- package/lib/typescript/src/useStyles.d.ts +0 -16
- package/lib/typescript/src/useStyles.d.ts.map +0 -1
- package/lib/typescript/src/utils/breakpoints.d.ts +0 -3
- package/lib/typescript/src/utils/breakpoints.d.ts.map +0 -1
- package/lib/typescript/src/utils/cssMediaQuery.d.ts +0 -4
- package/lib/typescript/src/utils/cssMediaQuery.d.ts.map +0 -1
- package/lib/typescript/src/utils/generateId.d.ts +0 -2
- package/lib/typescript/src/utils/generateId.d.ts.map +0 -1
- package/lib/typescript/src/utils/hash32.d.ts +0 -2
- package/lib/typescript/src/utils/hash32.d.ts.map +0 -1
- package/lib/typescript/src/utils/index.d.ts +0 -9
- package/lib/typescript/src/utils/index.d.ts.map +0 -1
- package/lib/typescript/src/utils/mq.d.ts.map +0 -1
- package/lib/typescript/src/utils/mqParser.d.ts +0 -16
- package/lib/typescript/src/utils/mqParser.d.ts.map +0 -1
- package/lib/typescript/src/utils/parseColor.d.ts +0 -3
- package/lib/typescript/src/utils/parseColor.d.ts.map +0 -1
- package/lib/typescript/src/utils/styles.d.ts +0 -5
- package/lib/typescript/src/utils/styles.d.ts.map +0 -1
- package/lib/typescript/src/utils/withPlugins.d.ts +0 -3
- package/lib/typescript/src/utils/withPlugins.d.ts.map +0 -1
- package/react-native.config.js +0 -11
- package/src/__tests__/mocks.ts +0 -24
- package/src/core/UnistyleRegistry.ts +0 -130
- package/src/core/Unistyles.ts +0 -44
- package/src/core/UnistylesModule.native.ts +0 -7
- package/src/core/UnistylesModule.ts +0 -305
- package/src/core/UnistylesModule.windows.ts +0 -9
- package/src/core/UnistylesRuntime.ts +0 -284
- package/src/core/index.ts +0 -8
- package/src/core/mocks/UnistylesMockedBridge.ts +0 -30
- package/src/core/mocks/UnistylesMockedRegistry.ts +0 -47
- package/src/core/mocks/UnistylesMockedRuntime.ts +0 -144
- package/src/core/mocks/index.ts +0 -3
- package/src/createStyleSheet.ts +0 -8
- package/src/hooks/index.ts +0 -4
- package/src/hooks/useCSS.native.ts +0 -3
- package/src/hooks/useCSS.ts +0 -51
- package/src/hooks/useInitialTheme.ts +0 -11
- package/src/hooks/useUnistyles.ts +0 -74
- package/src/hooks/useVariants.ts +0 -10
- package/src/normalizer/index.ts +0 -2
- package/src/normalizer/normalizeStyle.ts +0 -82
- package/src/normalizer/normalizer.macos.ts +0 -1
- package/src/normalizer/normalizer.ts +0 -100
- package/src/plugins/cssMediaQueriesPlugin.ts +0 -8
- package/src/plugins/index.ts +0 -2
- package/src/plugins/normalizeWebStylesPlugin.ts +0 -7
- package/src/types/color.ts +0 -26
- package/src/types/normalizer.ts +0 -29
- package/src/types/plugin.ts +0 -7
- package/src/types/unistyles.ts +0 -98
- package/src/useStyles.ts +0 -60
- package/src/utils/breakpoints.ts +0 -44
- package/src/utils/cssMediaQuery.ts +0 -268
- package/src/utils/generateId.ts +0 -10
- package/src/utils/hash32.ts +0 -53
- package/src/utils/index.ts +0 -8
- package/src/utils/mqParser.ts +0 -99
- package/src/utils/parseColor.ts +0 -33
- package/src/utils/styles.ts +0 -90
- package/src/utils/withPlugins.ts +0 -13
- package/windows/ExperimentalFeatures.props +0 -40
- package/windows/NuGet.Config +0 -13
- package/windows/ReactNativeUnistyles/PropertySheet.props +0 -16
- package/windows/ReactNativeUnistyles/ReactNativeUnistyles.def +0 -3
- package/windows/ReactNativeUnistyles/ReactNativeUnistyles.h +0 -149
- package/windows/ReactNativeUnistyles/ReactNativeUnistyles.vcxproj +0 -162
- package/windows/ReactNativeUnistyles/ReactNativeUnistyles.vcxproj.filters +0 -25
- package/windows/ReactNativeUnistyles/ReactPackageProvider.cpp +0 -19
- package/windows/ReactNativeUnistyles/ReactPackageProvider.h +0 -21
- package/windows/ReactNativeUnistyles/ReactPackageProvider.idl +0 -9
- package/windows/ReactNativeUnistyles/packages.lock.json +0 -133
- package/windows/ReactNativeUnistyles/pch.cpp +0 -1
- package/windows/ReactNativeUnistyles/pch.h +0 -21
- package/windows/ReactNativeUnistyles.sln +0 -156
- /package/lib/commonjs/{normalizer → web/convert}/module.d.js +0 -0
- /package/src/{normalizer → web/convert}/module.d.ts +0 -0
@@ -1,46 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.UnistylesMockedRegistry = void 0;
|
7
|
-
// @ts-nocheck
|
8
|
-
|
9
|
-
class UnistylesMockedRegistry {
|
10
|
-
config = {};
|
11
|
-
breakpoints = {};
|
12
|
-
sortedBreakpointPairs = [];
|
13
|
-
plugins = [];
|
14
|
-
themes = {};
|
15
|
-
themeNames = [];
|
16
|
-
constructor(unistylesBridge) {
|
17
|
-
this.unistylesBridge = unistylesBridge;
|
18
|
-
}
|
19
|
-
addThemes = themes => {
|
20
|
-
this.themes = themes;
|
21
|
-
this.themeNames = Object.keys(themes);
|
22
|
-
return this;
|
23
|
-
};
|
24
|
-
addBreakpoints = breakpoints => {
|
25
|
-
this.breakpoints = breakpoints;
|
26
|
-
this.sortedBreakpointPairs = Object.entries(breakpoints).sort((breakpoint1, breakpoint2) => {
|
27
|
-
const [, value1] = breakpoint1;
|
28
|
-
const [, value2] = breakpoint2;
|
29
|
-
return value1 - value2;
|
30
|
-
});
|
31
|
-
return this;
|
32
|
-
};
|
33
|
-
addConfig = config => {};
|
34
|
-
getTheme = forName => {
|
35
|
-
if (this.themeNames.length === 0) {
|
36
|
-
return {};
|
37
|
-
}
|
38
|
-
return this.themes[forName];
|
39
|
-
};
|
40
|
-
addPlugin = (plugin, notify = true) => {};
|
41
|
-
removePlugin = plugin => {};
|
42
|
-
updateTheme = (name, theme) => {};
|
43
|
-
hasTheme = name => true;
|
44
|
-
}
|
45
|
-
exports.UnistylesMockedRegistry = UnistylesMockedRegistry;
|
46
|
-
//# sourceMappingURL=UnistylesMockedRegistry.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["UnistylesMockedRegistry","config","breakpoints","sortedBreakpointPairs","plugins","themes","themeNames","constructor","unistylesBridge","addThemes","Object","keys","addBreakpoints","entries","sort","breakpoint1","breakpoint2","value1","value2","addConfig","getTheme","forName","length","addPlugin","plugin","notify","removePlugin","updateTheme","name","theme","hasTheme","exports"],"sourceRoot":"../../../../src","sources":["core/mocks/UnistylesMockedRegistry.ts"],"mappings":";;;;;;AAAA;;AAIO,MAAMA,uBAAuB,CAAC;EAC1BC,MAAM,GAAoB,CAAC,CAAC;EAC5BC,WAAW,GAAyB,CAAC,CAAC;EACtCC,qBAAqB,GAA0F,EAAE;EACjHC,OAAO,GAA2B,EAAE;EACpCC,MAAM,GAAoB,CAAC,CAAC;EAC5BC,UAAU,GAAiC,EAAE;EAEpDC,WAAWA,CAASC,eAAgC,EAAE;IAAA,KAAlCA,eAAgC,GAAhCA,eAAgC;EAAG;EAEhDC,SAAS,GAAIJ,MAAuB,IAAK;IAC5C,IAAI,CAACA,MAAM,GAAGA,MAAM;IACpB,IAAI,CAACC,UAAU,GAAGI,MAAM,CAACC,IAAI,CAACN,MAAM,CAAiC;IAErE,OAAO,IAAI;EACf,CAAC;EACMO,cAAc,GAAIV,WAAiC,IAAK;IAC3D,IAAI,CAACA,WAAW,GAAGA,WAAW;IAC9B,IAAI,CAACC,qBAAqB,GAAGO,MAAM,CAC9BG,OAAO,CAACX,WAAW,CAAC,CACpBY,IAAI,CAAC,CAACC,WAAW,EAAEC,WAAW,KAAK;MAChC,MAAM,GAAGC,MAAM,CAAC,GAAGF,WAAW;MAC9B,MAAM,GAAGG,MAAM,CAAC,GAAGF,WAAW;MAE9B,OAAOC,MAAM,GAAGC,MAAM;IAC1B,CAAC,CAA0F;IAE/F,OAAO,IAAI;EACf,CAAC;EACMC,SAAS,GAAIlB,MAAuB,IAAK,CAAC,CAAC;EAC3CmB,QAAQ,GAAIC,OAA8B,IAAK;IAClD,IAAI,IAAI,CAACf,UAAU,CAACgB,MAAM,KAAK,CAAC,EAAE;MAC9B,OAAO,CAAC,CAAC;IACb;IAEA,OAAO,IAAI,CAACjB,MAAM,CAACgB,OAAO,CAAC;EAC/B,CAAC;EAEME,SAAS,GAAGA,CAACC,MAAuB,EAAEC,MAAe,GAAG,IAAI,KAAK,CAAC,CAAC;EACnEC,YAAY,GAAIF,MAAuB,IAAK,CAAC,CAAC;EAC9CG,WAAW,GAAGA,CAACC,IAA2B,EAAEC,KAA6C,KAAK,CAAC,CAAC;EAChGC,QAAQ,GAAIF,IAA2B,IAAK,IAAI;AAC3D;AAACG,OAAA,CAAA/B,uBAAA,GAAAA,uBAAA","ignoreList":[]}
|
@@ -1,122 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.UnistylesMockedRuntime = void 0;
|
7
|
-
var _common = require("../../common");
|
8
|
-
// @ts-nocheck
|
9
|
-
|
10
|
-
class UnistylesMockedRuntime {
|
11
|
-
constructor(unistylesBridge, unistylesRegistry) {
|
12
|
-
this.unistylesBridge = unistylesBridge;
|
13
|
-
this.unistylesRegistry = unistylesRegistry;
|
14
|
-
this.unistylesRegistry = unistylesRegistry;
|
15
|
-
}
|
16
|
-
get miniRuntime() {
|
17
|
-
return {
|
18
|
-
contentSizeCategory: this.contentSizeCategory,
|
19
|
-
breakpoint: this.breakpoint,
|
20
|
-
screen: this.screen,
|
21
|
-
insets: this.insets,
|
22
|
-
statusBar: {
|
23
|
-
width: this.statusBar.width,
|
24
|
-
height: this.statusBar.height
|
25
|
-
},
|
26
|
-
navigationBar: {
|
27
|
-
width: this.navigationBar.width,
|
28
|
-
height: this.navigationBar.height
|
29
|
-
},
|
30
|
-
orientation: this.orientation,
|
31
|
-
pixelRatio: this.pixelRatio,
|
32
|
-
fontScale: this.fontScale,
|
33
|
-
hairlineWidth: this.hairlineWidth,
|
34
|
-
rtl: this.rtl
|
35
|
-
};
|
36
|
-
}
|
37
|
-
get colorScheme() {
|
38
|
-
return 'dark';
|
39
|
-
}
|
40
|
-
get hasAdaptiveThemes() {
|
41
|
-
return true;
|
42
|
-
}
|
43
|
-
get themeName() {
|
44
|
-
return this.unistylesRegistry.themeNames.length > 0 ? this.unistylesRegistry.themeNames.at(0) : undefined;
|
45
|
-
}
|
46
|
-
get contentSizeCategory() {
|
47
|
-
return 'unspecified';
|
48
|
-
}
|
49
|
-
get breakpoint() {
|
50
|
-
if (this.unistylesRegistry.sortedBreakpointPairs.length === 0) {
|
51
|
-
return undefined;
|
52
|
-
}
|
53
|
-
const firstBreakpoint = this.unistylesRegistry.sortedBreakpointPairs.at(0);
|
54
|
-
return firstBreakpoint ? firstBreakpoint.at(0) : undefined;
|
55
|
-
}
|
56
|
-
get rtl() {
|
57
|
-
return false;
|
58
|
-
}
|
59
|
-
get breakpoints() {
|
60
|
-
return this.unistylesRegistry.breakpoints;
|
61
|
-
}
|
62
|
-
get enabledPlugins() {
|
63
|
-
return this.unistylesRegistry.plugins;
|
64
|
-
}
|
65
|
-
get screen() {
|
66
|
-
return {
|
67
|
-
width: 360,
|
68
|
-
height: 800
|
69
|
-
};
|
70
|
-
}
|
71
|
-
get insets() {
|
72
|
-
return {
|
73
|
-
top: 0,
|
74
|
-
right: 0,
|
75
|
-
bottom: 0,
|
76
|
-
left: 0
|
77
|
-
};
|
78
|
-
}
|
79
|
-
get pixelRatio() {
|
80
|
-
return 1.0;
|
81
|
-
}
|
82
|
-
get hairlineWidth() {
|
83
|
-
return 0.333333;
|
84
|
-
}
|
85
|
-
get fontScale() {
|
86
|
-
return 1.0;
|
87
|
-
}
|
88
|
-
get statusBar() {
|
89
|
-
return {
|
90
|
-
height: 24,
|
91
|
-
width: 800,
|
92
|
-
setColor: () => {},
|
93
|
-
setHidden: () => {}
|
94
|
-
};
|
95
|
-
}
|
96
|
-
get navigationBar() {
|
97
|
-
return {
|
98
|
-
height: 0,
|
99
|
-
width: 0,
|
100
|
-
setColor: () => {},
|
101
|
-
setHidden: () => {}
|
102
|
-
};
|
103
|
-
}
|
104
|
-
get orientation() {
|
105
|
-
return _common.ScreenOrientation.Portrait;
|
106
|
-
}
|
107
|
-
getTheme = themeName => {
|
108
|
-
if (!themeName) {
|
109
|
-
return this.unistylesRegistry.getTheme(this.themeName);
|
110
|
-
}
|
111
|
-
return this.unistylesRegistry.getTheme(themeName);
|
112
|
-
};
|
113
|
-
setTheme = name => true;
|
114
|
-
updateTheme = (name, theme) => {};
|
115
|
-
setAdaptiveThemes = enabled => {};
|
116
|
-
addPlugin = plugin => {};
|
117
|
-
removePlugin = plugin => {};
|
118
|
-
setRootViewBackgroundColor = color => {};
|
119
|
-
setImmersiveMode = isEnabled => {};
|
120
|
-
}
|
121
|
-
exports.UnistylesMockedRuntime = UnistylesMockedRuntime;
|
122
|
-
//# sourceMappingURL=UnistylesMockedRuntime.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["_common","require","UnistylesMockedRuntime","constructor","unistylesBridge","unistylesRegistry","miniRuntime","contentSizeCategory","breakpoint","screen","insets","statusBar","width","height","navigationBar","orientation","pixelRatio","fontScale","hairlineWidth","rtl","colorScheme","hasAdaptiveThemes","themeName","themeNames","length","at","undefined","sortedBreakpointPairs","firstBreakpoint","breakpoints","enabledPlugins","plugins","top","right","bottom","left","setColor","setHidden","ScreenOrientation","Portrait","getTheme","setTheme","name","updateTheme","theme","setAdaptiveThemes","enabled","addPlugin","plugin","removePlugin","setRootViewBackgroundColor","color","setImmersiveMode","isEnabled","exports"],"sourceRoot":"../../../../src","sources":["core/mocks/UnistylesMockedRuntime.ts"],"mappings":"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","ignoreList":[]}
|
@@ -1,27 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
Object.defineProperty(exports, "UnistylesMockedBridge", {
|
7
|
-
enumerable: true,
|
8
|
-
get: function () {
|
9
|
-
return _UnistylesMockedBridge.UnistylesMockedBridge;
|
10
|
-
}
|
11
|
-
});
|
12
|
-
Object.defineProperty(exports, "UnistylesMockedRegistry", {
|
13
|
-
enumerable: true,
|
14
|
-
get: function () {
|
15
|
-
return _UnistylesMockedRegistry.UnistylesMockedRegistry;
|
16
|
-
}
|
17
|
-
});
|
18
|
-
Object.defineProperty(exports, "UnistylesMockedRuntime", {
|
19
|
-
enumerable: true,
|
20
|
-
get: function () {
|
21
|
-
return _UnistylesMockedRuntime.UnistylesMockedRuntime;
|
22
|
-
}
|
23
|
-
});
|
24
|
-
var _UnistylesMockedBridge = require("./UnistylesMockedBridge");
|
25
|
-
var _UnistylesMockedRegistry = require("./UnistylesMockedRegistry");
|
26
|
-
var _UnistylesMockedRuntime = require("./UnistylesMockedRuntime");
|
27
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["_UnistylesMockedBridge","require","_UnistylesMockedRegistry","_UnistylesMockedRuntime"],"sourceRoot":"../../../../src","sources":["core/mocks/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AACA,IAAAC,wBAAA,GAAAD,OAAA;AACA,IAAAE,uBAAA,GAAAF,OAAA","ignoreList":[]}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.createStyleSheet = void 0;
|
7
|
-
/**
|
8
|
-
* Utility to create a stylesheet with superpowers
|
9
|
-
* Compatible with React Native StyleSheet.create
|
10
|
-
* @param stylesheet - The stylesheet with superpowers to be used
|
11
|
-
*/
|
12
|
-
const createStyleSheet = stylesheet => stylesheet;
|
13
|
-
exports.createStyleSheet = createStyleSheet;
|
14
|
-
//# sourceMappingURL=createStyleSheet.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["createStyleSheet","stylesheet","exports"],"sourceRoot":"../../src","sources":["createStyleSheet.ts"],"mappings":";;;;;;AAEA;AACA;AACA;AACA;AACA;AACO,MAAMA,gBAAgB,GAAyCC,UAAa,IAAQA,UAAU;AAAAC,OAAA,CAAAF,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
@@ -1,34 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
Object.defineProperty(exports, "useCSS", {
|
7
|
-
enumerable: true,
|
8
|
-
get: function () {
|
9
|
-
return _useCSS.useCSS;
|
10
|
-
}
|
11
|
-
});
|
12
|
-
Object.defineProperty(exports, "useInitialTheme", {
|
13
|
-
enumerable: true,
|
14
|
-
get: function () {
|
15
|
-
return _useInitialTheme.useInitialTheme;
|
16
|
-
}
|
17
|
-
});
|
18
|
-
Object.defineProperty(exports, "useUnistyles", {
|
19
|
-
enumerable: true,
|
20
|
-
get: function () {
|
21
|
-
return _useUnistyles.useUnistyles;
|
22
|
-
}
|
23
|
-
});
|
24
|
-
Object.defineProperty(exports, "useVariants", {
|
25
|
-
enumerable: true,
|
26
|
-
get: function () {
|
27
|
-
return _useVariants.useVariants;
|
28
|
-
}
|
29
|
-
});
|
30
|
-
var _useInitialTheme = require("./useInitialTheme");
|
31
|
-
var _useUnistyles = require("./useUnistyles");
|
32
|
-
var _useVariants = require("./useVariants");
|
33
|
-
var _useCSS = require("./useCSS");
|
34
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["_useInitialTheme","require","_useUnistyles","_useVariants","_useCSS"],"sourceRoot":"../../../src","sources":["hooks/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA","ignoreList":[]}
|
@@ -1,44 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.useCSS = void 0;
|
7
|
-
var _react = require("react");
|
8
|
-
var _core = require("../core");
|
9
|
-
var _utils = require("../utils");
|
10
|
-
const useCSS = stylesheet => {
|
11
|
-
const insertedIds = (0, _react.useRef)([]);
|
12
|
-
(0, _react.useInsertionEffect)(() => {
|
13
|
-
if (!_core.unistyles.registry.config.experimentalCSSMediaQueries) {
|
14
|
-
return;
|
15
|
-
}
|
16
|
-
Object.entries(stylesheet).forEach(([_key, value]) => {
|
17
|
-
Object.entries(value).forEach(([prop, val]) => {
|
18
|
-
if (!val.toString().includes('@media')) {
|
19
|
-
return;
|
20
|
-
}
|
21
|
-
const id = (0, _utils.generateReactNativeWebId)(prop, '""');
|
22
|
-
if (insertedIds.current.includes(id)) {
|
23
|
-
return;
|
24
|
-
}
|
25
|
-
const style = document.createElement('style');
|
26
|
-
style.id = id;
|
27
|
-
style.innerHTML = val;
|
28
|
-
document.head.appendChild(style);
|
29
|
-
insertedIds.current = [...insertedIds.current, id];
|
30
|
-
});
|
31
|
-
});
|
32
|
-
return () => {
|
33
|
-
insertedIds.current.forEach(id => {
|
34
|
-
const style = document.getElementById(id);
|
35
|
-
if (style) {
|
36
|
-
style.remove();
|
37
|
-
}
|
38
|
-
});
|
39
|
-
insertedIds.current = [];
|
40
|
-
};
|
41
|
-
}, [stylesheet]);
|
42
|
-
};
|
43
|
-
exports.useCSS = useCSS;
|
44
|
-
//# sourceMappingURL=useCSS.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["_react","require","_core","_utils","useCSS","stylesheet","insertedIds","useRef","useInsertionEffect","unistyles","registry","config","experimentalCSSMediaQueries","Object","entries","forEach","_key","value","prop","val","toString","includes","id","generateReactNativeWebId","current","style","document","createElement","innerHTML","head","appendChild","getElementById","remove","exports"],"sourceRoot":"../../../src","sources":["hooks/useCSS.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAEO,MAAMG,MAAM,GAAOC,UAAoC,IAAK;EAC/D,MAAMC,WAAW,GAAG,IAAAC,aAAM,EAAgB,EAAE,CAAC;EAE7C,IAAAC,yBAAkB,EAAC,MAAM;IACrB,IAAI,CAACC,eAAS,CAACC,QAAQ,CAACC,MAAM,CAACC,2BAA2B,EAAE;MACxD;IACJ;IAEAC,MAAM,CACDC,OAAO,CAACT,UAAU,CAAC,CACnBU,OAAO,CAAC,CAAC,CAACC,IAAI,EAAEC,KAAK,CAAC,KAAK;MACxBJ,MAAM,CAACC,OAAO,CAACG,KAAM,CAAC,CACjBF,OAAO,CAAC,CAAC,CAACG,IAAI,EAAEC,GAAG,CAAC,KAAK;QACtB,IAAI,CAACA,GAAG,CAACC,QAAQ,CAAC,CAAC,CAACC,QAAQ,CAAC,QAAQ,CAAC,EAAE;UACpC;QACJ;QAEA,MAAMC,EAAE,GAAG,IAAAC,+BAAwB,EAACL,IAAI,EAAE,IAAI,CAAC;QAE/C,IAAIZ,WAAW,CAACkB,OAAO,CAACH,QAAQ,CAACC,EAAE,CAAC,EAAE;UAClC;QACJ;QAEA,MAAMG,KAAK,GAAGC,QAAQ,CAACC,aAAa,CAAC,OAAO,CAAC;QAE7CF,KAAK,CAACH,EAAE,GAAGA,EAAE;QACbG,KAAK,CAACG,SAAS,GAAGT,GAAG;QAErBO,QAAQ,CAACG,IAAI,CAACC,WAAW,CAACL,KAAK,CAAC;QAChCnB,WAAW,CAACkB,OAAO,GAAG,CAAC,GAAGlB,WAAW,CAACkB,OAAO,EAAEF,EAAE,CAAC;MACtD,CAAC,CAAC;IACV,CAAC,CAAC;IAEN,OAAO,MAAM;MACThB,WAAW,CAACkB,OAAO,CAACT,OAAO,CAACO,EAAE,IAAI;QAC9B,MAAMG,KAAK,GAAGC,QAAQ,CAACK,cAAc,CAACT,EAAE,CAAC;QAEzC,IAAIG,KAAK,EAAE;UACPA,KAAK,CAACO,MAAM,CAAC,CAAC;QAClB;MACJ,CAAC,CAAC;MAEF1B,WAAW,CAACkB,OAAO,GAAG,EAAE;IAC5B,CAAC;EACL,CAAC,EAAE,CAACnB,UAAU,CAAC,CAAC;AACpB,CAAC;AAAA4B,OAAA,CAAA7B,MAAA,GAAAA,MAAA","ignoreList":[]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["useCSS","_stylesheet","exports"],"sourceRoot":"../../../src","sources":["hooks/useCSS.native.ts"],"mappings":";;;;;;AAEO,MAAMA,MAAM,GAAOC,WAAqC,IAAW,CAAC,CAAC;AAAAC,OAAA,CAAAF,MAAA,GAAAA,MAAA","ignoreList":[]}
|
@@ -1,17 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.useInitialTheme = void 0;
|
7
|
-
var _react = require("react");
|
8
|
-
var _core = require("../core");
|
9
|
-
const useInitialTheme = forName => {
|
10
|
-
(0, _react.useMemo)(() => {
|
11
|
-
if (!_core.unistyles.runtime.themeName) {
|
12
|
-
_core.unistyles.runtime.setTheme(forName);
|
13
|
-
}
|
14
|
-
}, []);
|
15
|
-
};
|
16
|
-
exports.useInitialTheme = useInitialTheme;
|
17
|
-
//# sourceMappingURL=useInitialTheme.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["_react","require","_core","useInitialTheme","forName","useMemo","unistyles","runtime","themeName","setTheme","exports"],"sourceRoot":"../../../src","sources":["hooks/useInitialTheme.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAGO,MAAME,eAAe,GAAIC,OAA8B,IAAK;EAC/D,IAAAC,cAAO,EAAC,MAAM;IACV,IAAI,CAACC,eAAS,CAACC,OAAO,CAACC,SAAS,EAAE;MAC9BF,eAAS,CAACC,OAAO,CAACE,QAAQ,CAACL,OAAO,CAAC;IACvC;EACJ,CAAC,EAAE,EAAE,CAAC;AACV,CAAC;AAAAM,OAAA,CAAAP,eAAA,GAAAA,eAAA","ignoreList":[]}
|
@@ -1,74 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.useUnistyles = void 0;
|
7
|
-
var _reactNative = require("react-native");
|
8
|
-
var _react = require("react");
|
9
|
-
var _core = require("../core");
|
10
|
-
var _common = require("../common");
|
11
|
-
const unistylesEvents = new _reactNative.NativeEventEmitter(_reactNative.NativeModules.Unistyles);
|
12
|
-
const useUnistyles = () => {
|
13
|
-
const [plugins, setPlugins] = (0, _react.useState)(_core.unistyles.runtime.enabledPlugins);
|
14
|
-
const [theme, setTheme] = (0, _react.useState)(_core.unistyles.registry.getTheme(_core.unistyles.runtime.themeName));
|
15
|
-
const [layout, setLayout] = (0, _react.useState)({
|
16
|
-
breakpoint: _core.unistyles.runtime.breakpoint,
|
17
|
-
orientation: _core.unistyles.runtime.orientation,
|
18
|
-
screen: {
|
19
|
-
width: _core.unistyles.runtime.screen.width,
|
20
|
-
height: _core.unistyles.runtime.screen.height
|
21
|
-
},
|
22
|
-
statusBar: {
|
23
|
-
width: _core.unistyles.runtime.statusBar.width,
|
24
|
-
height: _core.unistyles.runtime.statusBar.height
|
25
|
-
},
|
26
|
-
navigationBar: {
|
27
|
-
width: _core.unistyles.runtime.navigationBar.width,
|
28
|
-
height: _core.unistyles.runtime.navigationBar.height
|
29
|
-
},
|
30
|
-
insets: {
|
31
|
-
top: _core.unistyles.runtime.insets.top,
|
32
|
-
bottom: _core.unistyles.runtime.insets.bottom,
|
33
|
-
left: _core.unistyles.runtime.insets.left,
|
34
|
-
right: _core.unistyles.runtime.insets.right
|
35
|
-
}
|
36
|
-
});
|
37
|
-
(0, _react.useEffect)(() => {
|
38
|
-
const subscription = unistylesEvents.addListener('__unistylesOnChange', event => {
|
39
|
-
switch (event.type) {
|
40
|
-
case _common.UnistylesEventType.Theme:
|
41
|
-
{
|
42
|
-
const themeEvent = event;
|
43
|
-
return setTheme(_core.unistyles.registry.getTheme(themeEvent.payload.themeName));
|
44
|
-
}
|
45
|
-
case _common.UnistylesEventType.Layout:
|
46
|
-
{
|
47
|
-
const layoutEvent = event;
|
48
|
-
return setLayout({
|
49
|
-
breakpoint: layoutEvent.payload.breakpoint,
|
50
|
-
orientation: layoutEvent.payload.orientation,
|
51
|
-
screen: layoutEvent.payload.screen,
|
52
|
-
statusBar: layoutEvent.payload.statusBar,
|
53
|
-
insets: layoutEvent.payload.insets,
|
54
|
-
navigationBar: layoutEvent.payload.navigationBar
|
55
|
-
});
|
56
|
-
}
|
57
|
-
case _common.UnistylesEventType.Plugin:
|
58
|
-
{
|
59
|
-
return setPlugins(_core.unistyles.runtime.enabledPlugins);
|
60
|
-
}
|
61
|
-
default:
|
62
|
-
return;
|
63
|
-
}
|
64
|
-
});
|
65
|
-
return subscription.remove;
|
66
|
-
}, []);
|
67
|
-
return {
|
68
|
-
plugins,
|
69
|
-
theme,
|
70
|
-
layout
|
71
|
-
};
|
72
|
-
};
|
73
|
-
exports.useUnistyles = useUnistyles;
|
74
|
-
//# sourceMappingURL=useUnistyles.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_react","_core","_common","unistylesEvents","NativeEventEmitter","NativeModules","Unistyles","useUnistyles","plugins","setPlugins","useState","unistyles","runtime","enabledPlugins","theme","setTheme","registry","getTheme","themeName","layout","setLayout","breakpoint","orientation","screen","width","height","statusBar","navigationBar","insets","top","bottom","left","right","useEffect","subscription","addListener","event","type","UnistylesEventType","Theme","themeEvent","payload","Layout","layoutEvent","Plugin","remove","exports"],"sourceRoot":"../../../src","sources":["hooks/useUnistyles.ts"],"mappings":"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","ignoreList":[]}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.useVariants = void 0;
|
7
|
-
var _react = require("react");
|
8
|
-
const useVariants = variantsMap => {
|
9
|
-
const variantsRef = (0, _react.useRef)(variantsMap);
|
10
|
-
variantsRef.current = variantsMap;
|
11
|
-
return variantsRef.current;
|
12
|
-
};
|
13
|
-
exports.useVariants = useVariants;
|
14
|
-
//# sourceMappingURL=useVariants.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["_react","require","useVariants","variantsMap","variantsRef","useRef","current","exports"],"sourceRoot":"../../../src","sources":["hooks/useVariants.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAGO,MAAMC,WAAW,GAAIC,WAA8C,IAAK;EAC3E,MAAMC,WAAW,GAAG,IAAAC,aAAM,EAA6CF,WAAW,CAAC;EAEnFC,WAAW,CAACE,OAAO,GAAGH,WAAW;EAEjC,OAAOC,WAAW,CAACE,OAAO;AAC9B,CAAC;AAAAC,OAAA,CAAAL,WAAA,GAAAA,WAAA","ignoreList":[]}
|
@@ -1,32 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
Object.defineProperty(exports, "normalizeColor", {
|
7
|
-
enumerable: true,
|
8
|
-
get: function () {
|
9
|
-
return _normalizer.normalizeColor;
|
10
|
-
}
|
11
|
-
});
|
12
|
-
Object.defineProperty(exports, "normalizeNumericValue", {
|
13
|
-
enumerable: true,
|
14
|
-
get: function () {
|
15
|
-
return _normalizer.normalizeNumericValue;
|
16
|
-
}
|
17
|
-
});
|
18
|
-
Object.defineProperty(exports, "normalizeStyle", {
|
19
|
-
enumerable: true,
|
20
|
-
get: function () {
|
21
|
-
return _normalizeStyle.normalizeStyle;
|
22
|
-
}
|
23
|
-
});
|
24
|
-
Object.defineProperty(exports, "preprocessor", {
|
25
|
-
enumerable: true,
|
26
|
-
get: function () {
|
27
|
-
return _normalizer.preprocessor;
|
28
|
-
}
|
29
|
-
});
|
30
|
-
var _normalizeStyle = require("./normalizeStyle");
|
31
|
-
var _normalizer = require("./normalizer");
|
32
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["_normalizeStyle","require","_normalizer"],"sourceRoot":"../../../src","sources":["normalizer/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,eAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA","ignoreList":[]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["normalizer/module.d.ts"],"mappings":"","ignoreList":[]}
|
@@ -1,59 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.normalizeStyle = void 0;
|
7
|
-
var _normalizer = require("./normalizer");
|
8
|
-
var _common = require("../common");
|
9
|
-
const normalizeBoxShadow = style => {
|
10
|
-
const requiredBoxShadowProperties = ['shadowColor', 'shadowOffset', 'shadowOpacity', 'shadowRadius'];
|
11
|
-
if (!requiredBoxShadowProperties.every(prop => prop in style)) {
|
12
|
-
(0, _common.warn)(`can't apply box shadow as you miss at least one of these properties: ${requiredBoxShadowProperties.join(', ')}`);
|
13
|
-
return {
|
14
|
-
shadowColor: undefined,
|
15
|
-
shadowOffset: undefined,
|
16
|
-
shadowOpacity: undefined,
|
17
|
-
shadowRadius: undefined
|
18
|
-
};
|
19
|
-
}
|
20
|
-
return {
|
21
|
-
boxShadow: _normalizer.preprocessor.createBoxShadowValue(style),
|
22
|
-
shadowColor: undefined,
|
23
|
-
shadowOffset: undefined,
|
24
|
-
shadowOpacity: undefined,
|
25
|
-
shadowRadius: undefined
|
26
|
-
};
|
27
|
-
};
|
28
|
-
const normalizeTextShadow = style => {
|
29
|
-
const requiredTextShadowProperties = ['textShadowColor', 'textShadowOffset', 'textShadowRadius'];
|
30
|
-
if (!requiredTextShadowProperties.every(prop => prop in style)) {
|
31
|
-
(0, _common.warn)(`can't apply text shadow as you miss at least one of these properties: ${requiredTextShadowProperties.join(', ')}`);
|
32
|
-
return {
|
33
|
-
textShadowColor: undefined,
|
34
|
-
textShadowOffset: undefined,
|
35
|
-
textShadowRadius: undefined
|
36
|
-
};
|
37
|
-
}
|
38
|
-
return {
|
39
|
-
textShadow: _normalizer.preprocessor.createTextShadowValue(style),
|
40
|
-
textShadowColor: undefined,
|
41
|
-
textShadowOffset: undefined,
|
42
|
-
textShadowRadius: undefined
|
43
|
-
};
|
44
|
-
};
|
45
|
-
const normalizeStyle = style => {
|
46
|
-
const normalizedTransform = 'transform' in style && Array.isArray(style.transform) ? {
|
47
|
-
transform: _normalizer.preprocessor.createTransformValue(style.transform)
|
48
|
-
} : {};
|
49
|
-
const normalizedBoxShadow = 'shadowColor' in style || 'shadowOffset' in style || 'shadowOpacity' in style || 'shadowRadius' in style ? normalizeBoxShadow(style) : {};
|
50
|
-
const normalizedTextShadow = 'textShadowColor' in style || 'textShadowOffset' in style || 'textShadowRadius' in style ? normalizeTextShadow(style) : {};
|
51
|
-
return {
|
52
|
-
...style,
|
53
|
-
...normalizedTransform,
|
54
|
-
...normalizedBoxShadow,
|
55
|
-
...normalizedTextShadow
|
56
|
-
};
|
57
|
-
};
|
58
|
-
exports.normalizeStyle = normalizeStyle;
|
59
|
-
//# sourceMappingURL=normalizeStyle.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["_normalizer","require","_common","normalizeBoxShadow","style","requiredBoxShadowProperties","every","prop","warn","join","shadowColor","undefined","shadowOffset","shadowOpacity","shadowRadius","boxShadow","preprocessor","createBoxShadowValue","normalizeTextShadow","requiredTextShadowProperties","textShadowColor","textShadowOffset","textShadowRadius","textShadow","createTextShadowValue","normalizeStyle","normalizedTransform","Array","isArray","transform","createTransformValue","normalizedBoxShadow","normalizedTextShadow","exports"],"sourceRoot":"../../../src","sources":["normalizer/normalizeStyle.ts"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAGA,MAAME,kBAAkB,GAAyBC,KAAQ,IAA0B;EAC/E,MAAMC,2BAA2B,GAAG,CAChC,aAAa,EACb,cAAc,EACd,eAAe,EACf,cAAc,CACjB;EAED,IAAI,CAACA,2BAA2B,CAACC,KAAK,CAACC,IAAI,IAAIA,IAAI,IAAIH,KAAK,CAAC,EAAE;IAC3D,IAAAI,YAAI,EAAC,wEAAwEH,2BAA2B,CAACI,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;IAEtH,OAAO;MACHC,WAAW,EAAEC,SAAS;MACtBC,YAAY,EAAED,SAAS;MACvBE,aAAa,EAAEF,SAAS;MACxBG,YAAY,EAAEH;IAClB,CAAC;EACL;EAEA,OAAO;IACHI,SAAS,EAAEC,wBAAY,CAACC,oBAAoB,CAACb,KAAK,CAAC;IACnDM,WAAW,EAAEC,SAAS;IACtBC,YAAY,EAAED,SAAS;IACvBE,aAAa,EAAEF,SAAS;IACxBG,YAAY,EAAEH;EAClB,CAAC;AACL,CAAC;AAED,MAAMO,mBAAmB,GAA0Bd,KAAQ,IAA2B;EAClF,MAAMe,4BAA4B,GAAG,CACjC,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,CACrB;EAED,IAAI,CAACA,4BAA4B,CAACb,KAAK,CAACC,IAAI,IAAIA,IAAI,IAAIH,KAAK,CAAC,EAAE;IAC5D,IAAAI,YAAI,EAAC,yEAAyEW,4BAA4B,CAACV,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;IAExH,OAAO;MACHW,eAAe,EAAET,SAAS;MAC1BU,gBAAgB,EAAEV,SAAS;MAC3BW,gBAAgB,EAAEX;IACtB,CAAC;EACL;EAEA,OAAO;IACHY,UAAU,EAAEP,wBAAY,CAACQ,qBAAqB,CAACpB,KAAK,CAAC;IACrDgB,eAAe,EAAET,SAAS;IAC1BU,gBAAgB,EAAEV,SAAS;IAC3BW,gBAAgB,EAAEX;EACtB,CAAC;AACL,CAAC;AAEM,MAAMc,cAAc,GAAuBrB,KAAQ,IAAQ;EAC9D,MAAMsB,mBAAmB,GAAI,WAAW,IAAItB,KAAK,IAAIuB,KAAK,CAACC,OAAO,CAACxB,KAAK,CAACyB,SAAS,CAAC,GAC7E;IAAEA,SAAS,EAAEb,wBAAY,CAACc,oBAAoB,CAAC1B,KAAK,CAACyB,SAAS;EAAE,CAAC,GACjE,CAAC,CAAC;EAER,MAAME,mBAAmB,GACrB,aAAa,IAAI3B,KAAK,IACtB,cAAc,IAAIA,KAAK,IACvB,eAAe,IAAIA,KAAK,IACxB,cAAc,IAAIA,KAAK,GACvBD,kBAAkB,CAACC,KAAkB,CAAC,GAAG,CAAC,CAAC;EAE/C,MAAM4B,oBAAoB,GACtB,iBAAiB,IAAI5B,KAAK,IAC1B,kBAAkB,IAAIA,KAAK,IAC3B,kBAAkB,IAAIA,KAAK,GAC3Bc,mBAAmB,CAACd,KAAmB,CAAC,GAAG,CAAC,CAAC;EAEjD,OAAO;IACH,GAAGA,KAAK;IACR,GAAGsB,mBAAmB;IACtB,GAAGK,mBAAmB;IACtB,GAAGC;EACP,CAAC;AACL,CAAC;AAAAC,OAAA,CAAAR,cAAA,GAAAA,cAAA","ignoreList":[]}
|
@@ -1,88 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.preprocessor = exports.normalizeNumericValue = exports.normalizeColor = void 0;
|
7
|
-
var _normalizeColors = _interopRequireDefault(require("@react-native/normalize-colors"));
|
8
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
9
|
-
// based on react-native-web normalizer
|
10
|
-
// https://github.com/necolas/react-native-web
|
11
|
-
|
12
|
-
const normalizeColor = (color, opacity = 1) => {
|
13
|
-
// If the opacity is 1 there's no need to normalize the color
|
14
|
-
if (opacity === 1) {
|
15
|
-
return color;
|
16
|
-
}
|
17
|
-
const integer = (0, _normalizeColors.default)(color);
|
18
|
-
|
19
|
-
// If the color is an unknown format, the return value is null
|
20
|
-
if (integer === null) {
|
21
|
-
return color;
|
22
|
-
}
|
23
|
-
const hex = integer.toString(16).padStart(8, '0');
|
24
|
-
if (hex.length === 8) {
|
25
|
-
const [r = 0, g = 0, b = 0, a = 1] = hex.split(/(?=(?:..)*$)/).map(x => parseInt(x, 16)).filter(num => !isNaN(num));
|
26
|
-
return `rgba(${r},${g},${b},${a / 255 * opacity})`;
|
27
|
-
}
|
28
|
-
return color;
|
29
|
-
};
|
30
|
-
exports.normalizeColor = normalizeColor;
|
31
|
-
const normalizeNumericValue = value => value ? `${value}px` : value;
|
32
|
-
exports.normalizeNumericValue = normalizeNumericValue;
|
33
|
-
const normalizeTransform = (key, value) => {
|
34
|
-
if (key.includes('scale')) {
|
35
|
-
return value;
|
36
|
-
}
|
37
|
-
if (typeof value === 'number') {
|
38
|
-
return normalizeNumericValue(value);
|
39
|
-
}
|
40
|
-
return value;
|
41
|
-
};
|
42
|
-
const createTextShadowValue = style => {
|
43
|
-
// at this point every prop is present
|
44
|
-
const {
|
45
|
-
textShadowColor,
|
46
|
-
textShadowOffset,
|
47
|
-
textShadowRadius
|
48
|
-
} = style;
|
49
|
-
const offsetX = normalizeNumericValue(textShadowOffset.width);
|
50
|
-
const offsetY = normalizeNumericValue(textShadowOffset.height);
|
51
|
-
const radius = normalizeNumericValue(textShadowRadius);
|
52
|
-
const color = normalizeColor(textShadowColor);
|
53
|
-
return `${offsetX} ${offsetY} ${radius} ${color}`;
|
54
|
-
};
|
55
|
-
const createBoxShadowValue = style => {
|
56
|
-
// at this point every prop is present
|
57
|
-
const {
|
58
|
-
shadowColor,
|
59
|
-
shadowOffset,
|
60
|
-
shadowOpacity,
|
61
|
-
shadowRadius
|
62
|
-
} = style;
|
63
|
-
const offsetX = normalizeNumericValue(shadowOffset.width);
|
64
|
-
const offsetY = normalizeNumericValue(shadowOffset.height);
|
65
|
-
const radius = normalizeNumericValue(shadowRadius);
|
66
|
-
const color = normalizeColor(shadowColor, shadowOpacity);
|
67
|
-
return `${offsetX} ${offsetY} ${radius} ${color}`;
|
68
|
-
};
|
69
|
-
const createTransformValue = transforms => transforms.map(transform => {
|
70
|
-
const [key] = Object.keys(transform);
|
71
|
-
if (!key) {
|
72
|
-
return undefined;
|
73
|
-
}
|
74
|
-
const value = transform[key];
|
75
|
-
switch (key) {
|
76
|
-
case 'matrix':
|
77
|
-
case 'matrix3d':
|
78
|
-
return `${key}(${value.join(',')})`;
|
79
|
-
default:
|
80
|
-
return `${key}(${normalizeTransform(key, value)})`;
|
81
|
-
}
|
82
|
-
}).filter(Boolean).join(' ');
|
83
|
-
const preprocessor = exports.preprocessor = {
|
84
|
-
createTextShadowValue,
|
85
|
-
createBoxShadowValue,
|
86
|
-
createTransformValue
|
87
|
-
};
|
88
|
-
//# sourceMappingURL=normalizer.js.map
|