react-native-unistyles 3.0.0-alpha.4 → 3.0.0-alpha.41
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +7 -0
- package/Unistyles.podspec +1 -1
- package/android/CMakeLists.txt +22 -45
- package/android/build.gradle +16 -5
- package/android/src/main/cxx/NativeUnistylesModule.cpp +71 -0
- package/android/src/main/cxx/NativeUnistylesModule.h +42 -0
- package/android/src/main/cxx/cpp-adapter.cpp +8 -86
- package/android/src/main/java/com/unistyles/Equatable.kt +61 -0
- package/android/src/main/java/com/unistyles/NativePlatform+android.kt +294 -0
- package/android/src/main/java/com/unistyles/NativePlatform+insets.kt +152 -0
- package/android/src/main/java/com/unistyles/NativePlatform+listener.kt +59 -0
- package/android/src/main/java/com/unistyles/UnistylesModule.kt +51 -0
- package/android/src/main/java/com/unistyles/UnistylesPackage.kt +16 -14
- package/cxx/NativePlatform.h +11 -0
- package/cxx/common/Constants.h +4 -0
- package/cxx/common/Helpers.h +140 -5
- package/cxx/core/HostStyle.cpp +10 -6
- package/cxx/core/HostStyle.h +4 -0
- package/cxx/core/StyleSheet.h +0 -2
- package/cxx/core/StyleSheetRegistry.cpp +9 -17
- package/cxx/core/StyleSheetRegistry.h +3 -4
- package/cxx/core/Unistyle.h +8 -11
- package/cxx/core/UnistyleData.h +24 -0
- package/cxx/core/UnistyleWrapper.h +108 -13
- package/cxx/core/UnistylesCommitHook.cpp +14 -15
- package/cxx/core/UnistylesCommitHook.h +6 -11
- package/cxx/core/UnistylesCommitShadowNode.h +13 -0
- package/cxx/core/UnistylesMountHook.cpp +28 -0
- package/cxx/core/UnistylesMountHook.h +27 -0
- package/cxx/core/UnistylesRegistry.cpp +123 -83
- package/cxx/core/UnistylesRegistry.h +16 -14
- package/cxx/core/UnistylesState.cpp +29 -8
- package/cxx/core/UnistylesState.h +5 -2
- package/cxx/hybridObjects/HybridNavigationBar.cpp +0 -4
- package/cxx/hybridObjects/HybridNavigationBar.h +3 -4
- package/cxx/hybridObjects/HybridShadowRegistry.cpp +19 -11
- package/cxx/hybridObjects/HybridStatusBar.cpp +0 -4
- package/cxx/hybridObjects/HybridStatusBar.h +3 -4
- package/cxx/hybridObjects/HybridStyleSheet.cpp +154 -23
- package/cxx/hybridObjects/HybridStyleSheet.h +27 -5
- package/cxx/hybridObjects/HybridUnistylesRuntime.cpp +96 -14
- package/cxx/hybridObjects/HybridUnistylesRuntime.h +19 -3
- package/cxx/parser/Parser.cpp +249 -177
- package/cxx/parser/Parser.h +12 -15
- package/cxx/shadowTree/ShadowLeafUpdate.h +3 -1
- package/cxx/shadowTree/ShadowTrafficController.h +71 -0
- package/cxx/shadowTree/ShadowTreeManager.cpp +28 -19
- package/cxx/shadowTree/ShadowTreeManager.h +3 -2
- package/ios/Equatable.swift +2 -1
- package/ios/Extensions.swift +3 -1
- package/ios/NativePlatform+ios.swift +34 -9
- package/ios/NativePlatform+keyboard.swift +83 -0
- package/ios/NativePlatformListener+ios.swift +36 -24
- package/ios/Unistyles.h +1 -0
- package/ios/UnistylesModuleOnLoad.h +8 -2
- package/ios/UnistylesModuleOnLoad.mm +9 -1
- package/lib/commonjs/components/Display.js +18 -0
- package/lib/commonjs/components/Display.js.map +1 -0
- package/lib/commonjs/components/Hide.js +18 -0
- package/lib/commonjs/components/Hide.js.map +1 -0
- package/lib/commonjs/components/index.js +20 -0
- package/lib/commonjs/components/index.js.map +1 -0
- package/lib/commonjs/components/useMedia.js +59 -0
- package/lib/commonjs/components/useMedia.js.map +1 -0
- package/lib/commonjs/components/useMedia.web.js +43 -0
- package/lib/commonjs/components/useMedia.web.js.map +1 -0
- package/lib/commonjs/core/createUnistylesComponent.js +79 -0
- package/lib/commonjs/core/createUnistylesComponent.js.map +1 -0
- package/lib/commonjs/core/createUnistylesComponent.native.js +82 -0
- package/lib/commonjs/core/createUnistylesComponent.native.js.map +1 -0
- package/lib/commonjs/core/index.js +13 -0
- package/lib/commonjs/core/index.js.map +1 -0
- package/lib/commonjs/index.js +21 -11
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/mq.js +25 -12
- package/lib/commonjs/mq.js.map +1 -1
- 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/NavigtionBar/index.js +0 -15
- package/lib/commonjs/specs/NavigtionBar/index.js.map +1 -1
- package/lib/commonjs/specs/ShadowRegistry/index.js +10 -6
- package/lib/commonjs/specs/ShadowRegistry/index.js.map +1 -1
- package/lib/commonjs/specs/StatusBar/index.js +0 -5
- package/lib/commonjs/specs/StatusBar/index.js.map +1 -1
- package/lib/commonjs/specs/StyleSheet/index.js +1 -0
- package/lib/commonjs/specs/StyleSheet/index.js.map +1 -1
- package/lib/commonjs/specs/UnistylesRuntime/index.js +1 -3
- package/lib/commonjs/specs/UnistylesRuntime/index.js.map +1 -1
- package/lib/commonjs/specs/index.js +7 -0
- package/lib/commonjs/specs/index.js.map +1 -1
- package/lib/commonjs/specs/index.web.js +1 -1
- package/lib/commonjs/types/stylesheet.js.map +1 -1
- package/lib/commonjs/utils.js +26 -0
- package/lib/commonjs/utils.js.map +1 -0
- package/lib/commonjs/web/convert/index.js +79 -0
- package/lib/commonjs/web/convert/index.js.map +1 -0
- package/lib/commonjs/web/convert/module.d.js +2 -0
- package/lib/commonjs/web/convert/module.d.js.map +1 -0
- package/lib/commonjs/web/convert/object/boxShadow.js +59 -0
- package/lib/commonjs/web/convert/object/boxShadow.js.map +1 -0
- package/lib/commonjs/web/convert/object/filter.js +42 -0
- package/lib/commonjs/web/convert/object/filter.js.map +1 -0
- package/lib/commonjs/web/convert/object/index.js +39 -0
- package/lib/commonjs/web/convert/object/index.js.map +1 -0
- package/lib/commonjs/web/convert/object/objectStyle.js +56 -0
- package/lib/commonjs/web/convert/object/objectStyle.js.map +1 -0
- package/lib/commonjs/web/convert/object/transform.js +27 -0
- package/lib/commonjs/web/convert/object/transform.js.map +1 -0
- package/lib/commonjs/web/convert/pseudo.js +10 -0
- package/lib/commonjs/web/convert/pseudo.js.map +1 -0
- package/lib/commonjs/web/convert/shadow/boxShadow.js +62 -0
- package/lib/commonjs/web/convert/shadow/boxShadow.js.map +1 -0
- package/lib/commonjs/web/convert/shadow/getShadowBreakpoints.js +38 -0
- package/lib/commonjs/web/convert/shadow/getShadowBreakpoints.js.map +1 -0
- package/lib/commonjs/web/convert/shadow/index.js +28 -0
- package/lib/commonjs/web/convert/shadow/index.js.map +1 -0
- package/lib/commonjs/web/convert/shadow/textShadow.js +59 -0
- package/lib/commonjs/web/convert/shadow/textShadow.js.map +1 -0
- package/lib/commonjs/web/convert/style.js +93 -0
- package/lib/commonjs/web/convert/style.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 +59 -0
- package/lib/commonjs/web/convert/utils.js.map +1 -0
- package/lib/commonjs/web/create.js +49 -0
- package/lib/commonjs/web/create.js.map +1 -0
- package/lib/commonjs/web/index.js +60 -0
- package/lib/commonjs/web/index.js.map +1 -0
- package/lib/commonjs/web/listener.js +61 -0
- package/lib/commonjs/web/listener.js.map +1 -0
- package/lib/commonjs/web/mock.js +27 -0
- package/lib/commonjs/web/mock.js.map +1 -0
- package/lib/commonjs/web/registry.js +172 -0
- package/lib/commonjs/web/registry.js.map +1 -0
- package/lib/commonjs/web/runtime.js +173 -0
- package/lib/commonjs/web/runtime.js.map +1 -0
- package/lib/commonjs/web/shadowRegistry.js +142 -0
- package/lib/commonjs/web/shadowRegistry.js.map +1 -0
- package/lib/commonjs/web/state.js +73 -0
- package/lib/commonjs/web/state.js.map +1 -0
- package/lib/commonjs/web/utils/common.js +39 -0
- package/lib/commonjs/web/utils/common.js.map +1 -0
- package/lib/commonjs/web/utils/index.js +28 -0
- package/lib/commonjs/web/utils/index.js.map +1 -0
- package/lib/commonjs/web/utils/unistyle.js +85 -0
- package/lib/commonjs/web/utils/unistyle.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 +59 -0
- package/lib/commonjs/web/variants/useVariants.js.map +1 -0
- package/lib/module/components/Display.js +13 -0
- package/lib/module/components/Display.js.map +1 -0
- package/lib/module/components/Hide.js +13 -0
- package/lib/module/components/Hide.js.map +1 -0
- package/lib/module/components/index.js +5 -0
- package/lib/module/components/index.js.map +1 -0
- package/lib/module/components/useMedia.js +54 -0
- package/lib/module/components/useMedia.js.map +1 -0
- package/lib/module/components/useMedia.web.js +38 -0
- package/lib/module/components/useMedia.web.js.map +1 -0
- package/lib/module/core/createUnistylesComponent.js +72 -0
- package/lib/module/core/createUnistylesComponent.js.map +1 -0
- package/lib/module/core/createUnistylesComponent.native.js +75 -0
- package/lib/module/core/createUnistylesComponent.native.js.map +1 -0
- package/lib/module/core/index.js +4 -0
- package/lib/module/core/index.js.map +1 -0
- package/lib/module/index.js +2 -9
- package/lib/module/index.js.map +1 -1
- package/lib/module/mq.js +21 -11
- package/lib/module/mq.js.map +1 -1
- 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/NavigtionBar/index.js +0 -10
- package/lib/module/specs/NavigtionBar/index.js.map +1 -1
- package/lib/module/specs/ShadowRegistry/index.js +10 -6
- package/lib/module/specs/ShadowRegistry/index.js.map +1 -1
- package/lib/module/specs/StatusBar/index.js +1 -6
- package/lib/module/specs/StatusBar/index.js.map +1 -1
- package/lib/module/specs/StyleSheet/index.js +1 -0
- package/lib/module/specs/StyleSheet/index.js.map +1 -1
- package/lib/module/specs/UnistylesRuntime/index.js +1 -3
- package/lib/module/specs/UnistylesRuntime/index.js.map +1 -1
- package/lib/module/specs/index.js +2 -1
- package/lib/module/specs/index.js.map +1 -1
- package/lib/module/specs/index.web.js +1 -1
- package/lib/module/specs/index.web.js.map +1 -1
- package/lib/module/types/stylesheet.js.map +1 -1
- package/lib/module/utils.js +21 -0
- package/lib/module/utils.js.map +1 -0
- package/lib/module/web/convert/index.js +74 -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/object/boxShadow.js +54 -0
- package/lib/module/web/convert/object/boxShadow.js.map +1 -0
- package/lib/module/web/convert/object/filter.js +37 -0
- package/lib/module/web/convert/object/filter.js.map +1 -0
- package/lib/module/web/convert/object/index.js +6 -0
- package/lib/module/web/convert/object/index.js.map +1 -0
- package/lib/module/web/convert/object/objectStyle.js +51 -0
- package/lib/module/web/convert/object/objectStyle.js.map +1 -0
- package/lib/module/web/convert/object/transform.js +22 -0
- package/lib/module/web/convert/object/transform.js.map +1 -0
- package/lib/module/web/convert/pseudo.js +5 -0
- package/lib/module/web/convert/pseudo.js.map +1 -0
- package/lib/module/web/convert/shadow/boxShadow.js +57 -0
- package/lib/module/web/convert/shadow/boxShadow.js.map +1 -0
- package/lib/module/web/convert/shadow/getShadowBreakpoints.js +33 -0
- package/lib/module/web/convert/shadow/getShadowBreakpoints.js.map +1 -0
- package/lib/module/web/convert/shadow/index.js +5 -0
- package/lib/module/web/convert/shadow/index.js.map +1 -0
- package/lib/module/web/convert/shadow/textShadow.js +54 -0
- package/lib/module/web/convert/shadow/textShadow.js.map +1 -0
- package/lib/module/web/convert/style.js +88 -0
- package/lib/module/web/convert/style.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 +45 -0
- package/lib/module/web/convert/utils.js.map +1 -0
- package/lib/module/web/create.js +44 -0
- package/lib/module/web/create.js.map +1 -0
- package/lib/module/web/index.js +26 -0
- package/lib/module/web/index.js.map +1 -0
- package/lib/module/web/listener.js +57 -0
- package/lib/module/web/listener.js.map +1 -0
- package/lib/module/web/mock.js +23 -0
- package/lib/module/web/mock.js.map +1 -0
- package/lib/module/web/registry.js +168 -0
- package/lib/module/web/registry.js.map +1 -0
- package/lib/module/web/runtime.js +169 -0
- package/lib/module/web/runtime.js.map +1 -0
- package/lib/module/web/shadowRegistry.js +138 -0
- package/lib/module/web/shadowRegistry.js.map +1 -0
- package/lib/module/web/state.js +69 -0
- package/lib/module/web/state.js.map +1 -0
- package/lib/module/web/utils/common.js +28 -0
- package/lib/module/web/utils/common.js.map +1 -0
- package/lib/module/web/utils/index.js +5 -0
- package/lib/module/web/utils/index.js.map +1 -0
- package/lib/module/web/utils/unistyle.js +72 -0
- package/lib/module/web/utils/unistyle.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 +54 -0
- package/lib/module/web/variants/useVariants.js.map +1 -0
- package/lib/typescript/src/components/Display.d.ts +7 -0
- package/lib/typescript/src/components/Display.d.ts.map +1 -0
- package/lib/typescript/src/components/Hide.d.ts +7 -0
- package/lib/typescript/src/components/Hide.d.ts.map +1 -0
- package/lib/typescript/src/components/index.d.ts +3 -0
- package/lib/typescript/src/components/index.d.ts.map +1 -0
- package/lib/typescript/src/components/useMedia.d.ts +6 -0
- package/lib/typescript/src/components/useMedia.d.ts.map +1 -0
- package/lib/typescript/src/components/useMedia.web.d.ts +6 -0
- package/lib/typescript/src/components/useMedia.web.d.ts.map +1 -0
- package/lib/typescript/src/core/createUnistylesComponent.d.ts +8 -0
- package/lib/typescript/src/core/createUnistylesComponent.d.ts.map +1 -0
- package/lib/typescript/src/core/createUnistylesComponent.native.d.ts +8 -0
- package/lib/typescript/src/core/createUnistylesComponent.native.d.ts.map +1 -0
- package/lib/typescript/src/core/index.d.ts +2 -0
- package/lib/typescript/src/core/index.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +3 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/mq.d.ts +8 -0
- package/lib/typescript/src/mq.d.ts.map +1 -1
- package/lib/typescript/src/specs/NativePlatform/NativePlatform.nitro.d.ts +7 -5
- package/lib/typescript/src/specs/NativePlatform/NativePlatform.nitro.d.ts.map +1 -1
- package/lib/typescript/src/specs/NavigtionBar/UnistylesNavigationBar.nitro.d.ts +0 -1
- package/lib/typescript/src/specs/NavigtionBar/UnistylesNavigationBar.nitro.d.ts.map +1 -1
- package/lib/typescript/src/specs/NavigtionBar/index.d.ts +1 -10
- package/lib/typescript/src/specs/NavigtionBar/index.d.ts.map +1 -1
- package/lib/typescript/src/specs/ShadowRegistry/index.d.ts +4 -4
- package/lib/typescript/src/specs/ShadowRegistry/index.d.ts.map +1 -1
- package/lib/typescript/src/specs/ShadowRegistry/types.d.ts +3 -0
- package/lib/typescript/src/specs/ShadowRegistry/types.d.ts.map +1 -1
- package/lib/typescript/src/specs/StatusBar/UnistylesStatusBar.nitro.d.ts +0 -1
- package/lib/typescript/src/specs/StatusBar/UnistylesStatusBar.nitro.d.ts.map +1 -1
- package/lib/typescript/src/specs/StatusBar/index.d.ts +2 -4
- package/lib/typescript/src/specs/StatusBar/index.d.ts.map +1 -1
- package/lib/typescript/src/specs/StyleSheet/UnistylesStyleSheet.nitro.d.ts +3 -1
- package/lib/typescript/src/specs/StyleSheet/UnistylesStyleSheet.nitro.d.ts.map +1 -1
- package/lib/typescript/src/specs/StyleSheet/index.d.ts +3 -1
- package/lib/typescript/src/specs/StyleSheet/index.d.ts.map +1 -1
- package/lib/typescript/src/specs/UnistylesRuntime/UnistylesRuntime.nitro.d.ts +1 -1
- package/lib/typescript/src/specs/UnistylesRuntime/UnistylesRuntime.nitro.d.ts.map +1 -1
- package/lib/typescript/src/specs/UnistylesRuntime/index.d.ts +3 -1
- package/lib/typescript/src/specs/UnistylesRuntime/index.d.ts.map +1 -1
- package/lib/typescript/src/specs/index.d.ts +4 -2
- package/lib/typescript/src/specs/index.d.ts.map +1 -1
- package/lib/typescript/src/specs/index.web.d.ts +1 -1
- package/lib/typescript/src/specs/index.web.d.ts.map +1 -1
- package/lib/typescript/src/types/breakpoints.d.ts +11 -11
- 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 +1 -1
- package/lib/typescript/src/types/index.d.ts.map +1 -1
- package/lib/typescript/src/types/stylesheet.d.ts +6 -4
- package/lib/typescript/src/types/stylesheet.d.ts.map +1 -1
- package/lib/typescript/src/types/variants.d.ts +4 -1
- package/lib/typescript/src/types/variants.d.ts.map +1 -1
- package/lib/typescript/src/utils.d.ts +2 -0
- package/lib/typescript/src/utils.d.ts.map +1 -0
- package/lib/typescript/src/web/convert/index.d.ts +3 -0
- package/lib/typescript/src/web/convert/index.d.ts.map +1 -0
- package/lib/typescript/src/web/convert/object/boxShadow.d.ts +9 -0
- package/lib/typescript/src/web/convert/object/boxShadow.d.ts.map +1 -0
- package/lib/typescript/src/web/convert/object/filter.d.ts +3 -0
- package/lib/typescript/src/web/convert/object/filter.d.ts.map +1 -0
- package/lib/typescript/src/web/convert/object/index.d.ts +4 -0
- package/lib/typescript/src/web/convert/object/index.d.ts.map +1 -0
- package/lib/typescript/src/web/convert/object/objectStyle.d.ts +5 -0
- package/lib/typescript/src/web/convert/object/objectStyle.d.ts.map +1 -0
- package/lib/typescript/src/web/convert/object/transform.d.ts +3 -0
- package/lib/typescript/src/web/convert/object/transform.d.ts.map +1 -0
- package/lib/typescript/src/web/convert/pseudo.d.ts +6 -0
- package/lib/typescript/src/web/convert/pseudo.d.ts.map +1 -0
- package/lib/typescript/src/web/convert/shadow/boxShadow.d.ts +8 -0
- package/lib/typescript/src/web/convert/shadow/boxShadow.d.ts.map +1 -0
- package/lib/typescript/src/web/convert/shadow/getShadowBreakpoints.d.ts +2 -0
- package/lib/typescript/src/web/convert/shadow/getShadowBreakpoints.d.ts.map +1 -0
- package/lib/typescript/src/web/convert/shadow/index.d.ts +3 -0
- package/lib/typescript/src/web/convert/shadow/index.d.ts.map +1 -0
- package/lib/typescript/src/web/convert/shadow/textShadow.d.ts +8 -0
- package/lib/typescript/src/web/convert/shadow/textShadow.d.ts.map +1 -0
- package/lib/typescript/src/web/convert/style.d.ts +2 -0
- package/lib/typescript/src/web/convert/style.d.ts.map +1 -0
- package/lib/typescript/{web → src/web}/convert/types.d.ts +8 -2
- package/lib/typescript/src/web/convert/types.d.ts.map +1 -0
- package/lib/typescript/src/web/convert/utils.d.ts +12 -0
- package/lib/typescript/src/web/convert/utils.d.ts.map +1 -0
- package/lib/typescript/src/web/create.d.ts +1443 -0
- package/lib/typescript/{web → src/web}/create.d.ts.map +1 -1
- package/lib/typescript/src/web/index.d.ts +1459 -0
- package/lib/typescript/{web → src/web}/index.d.ts.map +1 -1
- package/lib/typescript/{web/listener → src/web}/listener.d.ts +5 -2
- package/lib/typescript/src/web/listener.d.ts.map +1 -0
- package/lib/typescript/src/web/mock.d.ts +5 -0
- package/lib/typescript/src/web/mock.d.ts.map +1 -0
- package/lib/typescript/src/web/registry.d.ts +24 -0
- package/lib/typescript/src/web/registry.d.ts.map +1 -0
- package/lib/typescript/{web → src/web}/runtime.d.ts +11 -10
- package/lib/typescript/src/web/runtime.d.ts.map +1 -0
- package/lib/typescript/src/web/shadowRegistry.d.ts +17 -0
- package/lib/typescript/src/web/shadowRegistry.d.ts.map +1 -0
- package/lib/typescript/src/web/state.d.ts +18 -0
- package/lib/typescript/src/web/state.d.ts.map +1 -0
- package/lib/typescript/src/web/utils/common.d.ts +8 -0
- package/lib/typescript/src/web/utils/common.d.ts.map +1 -0
- package/lib/typescript/src/web/utils/index.d.ts +3 -0
- package/lib/typescript/src/web/utils/index.d.ts.map +1 -0
- package/lib/typescript/src/web/utils/unistyle.d.ts +20 -0
- package/lib/typescript/src/web/utils/unistyle.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/c++/JColorScheme.hpp +1 -1
- package/nitrogen/generated/android/c++/JFunc_void_UnistylesNativeMiniRuntime.hpp +57 -0
- package/nitrogen/generated/android/c++/JFunc_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime.hpp +69 -0
- package/nitrogen/generated/android/c++/JHybridNativePlatformSpec.cpp +35 -34
- package/nitrogen/generated/android/c++/JHybridNativePlatformSpec.hpp +15 -6
- package/nitrogen/generated/android/c++/JOrientation.hpp +1 -1
- package/nitrogen/generated/android/c++/JUnistyleDependency.hpp +4 -1
- package/nitrogen/generated/android/c++/JUnistylesNativeMiniRuntime.hpp +9 -7
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/Dimensions.kt +1 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/{Func_void_std__vector_UnistyleDependency_.kt → Func_void_UnistylesNativeMiniRuntime.kt} +6 -5
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/Func_void_std__vector_UnistyleDependency__UnistylesNativeMiniRuntime.kt +46 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/HybridNativePlatformSpec.kt +25 -13
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/Insets.kt +1 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/UnistyleDependency.kt +2 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/unistyles/UnistylesNativeMiniRuntime.kt +3 -1
- package/nitrogen/generated/android/unistyles+autolinking.cmake +13 -1
- package/nitrogen/generated/android/unistyles+autolinking.gradle +2 -0
- package/nitrogen/generated/android/{UnistylesOnLoad.cpp → unistylesOnLoad.cpp} +6 -4
- package/nitrogen/generated/android/{UnistylesOnLoad.hpp → unistylesOnLoad.hpp} +1 -1
- package/nitrogen/generated/ios/Unistyles+autolinking.rb +6 -4
- package/nitrogen/generated/ios/Unistyles-Swift-Cxx-Bridge.cpp +25 -0
- package/nitrogen/generated/ios/Unistyles-Swift-Cxx-Bridge.hpp +73 -38
- package/nitrogen/generated/ios/Unistyles-Swift-Cxx-Umbrella.hpp +1 -30
- package/nitrogen/generated/ios/c++/HybridNativePlatformSpecSwift.hpp +8 -8
- package/nitrogen/generated/ios/swift/HybridNativePlatformSpec.swift +4 -16
- package/nitrogen/generated/ios/swift/HybridNativePlatformSpecCxx.swift +156 -115
- package/nitrogen/generated/ios/swift/UnistyleDependency.swift +4 -0
- package/nitrogen/generated/ios/swift/UnistylesNativeMiniRuntime.swift +16 -5
- package/nitrogen/generated/shared/c++/ColorScheme.hpp +2 -2
- package/nitrogen/generated/shared/c++/HybridNativePlatformSpec.cpp +2 -2
- package/nitrogen/generated/shared/c++/HybridNativePlatformSpec.hpp +6 -3
- package/nitrogen/generated/shared/c++/HybridUnistylesNavigationBarSpec.cpp +0 -1
- package/nitrogen/generated/shared/c++/HybridUnistylesNavigationBarSpec.hpp +3 -1
- package/nitrogen/generated/shared/c++/HybridUnistylesRuntimeSpec.cpp +1 -0
- package/nitrogen/generated/shared/c++/HybridUnistylesRuntimeSpec.hpp +5 -0
- package/nitrogen/generated/shared/c++/HybridUnistylesShadowRegistrySpec.hpp +3 -0
- package/nitrogen/generated/shared/c++/HybridUnistylesStatusBarSpec.cpp +0 -1
- package/nitrogen/generated/shared/c++/HybridUnistylesStatusBarSpec.hpp +3 -1
- package/nitrogen/generated/shared/c++/HybridUnistylesStyleSheetSpec.cpp +2 -1
- package/nitrogen/generated/shared/c++/HybridUnistylesStyleSheetSpec.hpp +10 -4
- package/nitrogen/generated/shared/c++/Orientation.hpp +2 -2
- package/nitrogen/generated/shared/c++/UnistyleDependency.hpp +2 -1
- package/nitrogen/generated/shared/c++/UnistylesCxxMiniRuntime.hpp +10 -9
- package/nitrogen/generated/shared/c++/UnistylesNativeMiniRuntime.hpp +9 -8
- package/package.json +20 -30
- package/plugin/common.js +31 -3
- package/plugin/index.js +107 -18
- package/plugin/ref.js +140 -14
- package/plugin/style.js +208 -22
- package/plugin/stylesheet.js +53 -3
- package/plugin/variants.js +33 -0
- package/src/components/Display.tsx +12 -0
- package/src/components/Hide.tsx +12 -0
- package/src/components/index.ts +2 -0
- package/src/components/useMedia.ts +64 -0
- package/src/components/useMedia.web.ts +47 -0
- package/src/core/createUnistylesComponent.native.tsx +83 -0
- package/src/core/createUnistylesComponent.tsx +84 -0
- package/src/core/index.ts +1 -0
- package/src/index.ts +3 -12
- package/src/mq.ts +27 -9
- package/src/specs/NativePlatform/NativePlatform.nitro.ts +7 -5
- package/src/specs/NavigtionBar/UnistylesNavigationBar.nitro.ts +0 -1
- package/src/specs/NavigtionBar/index.ts +1 -25
- package/src/specs/ShadowRegistry/index.ts +16 -10
- package/src/specs/ShadowRegistry/types.ts +4 -1
- package/src/specs/StatusBar/UnistylesStatusBar.nitro.ts +0 -1
- package/src/specs/StatusBar/index.ts +2 -12
- package/src/specs/StyleSheet/UnistylesStyleSheet.nitro.ts +4 -1
- package/src/specs/StyleSheet/index.ts +6 -1
- package/src/specs/UnistylesRuntime/UnistylesRuntime.nitro.ts +1 -1
- package/src/specs/UnistylesRuntime/index.ts +5 -4
- package/src/specs/index.ts +6 -2
- package/src/specs/index.web.ts +1 -1
- package/src/types/breakpoints.ts +25 -13
- package/src/types/common.ts +1 -0
- package/src/types/index.ts +1 -1
- package/src/types/stylesheet.ts +7 -5
- package/src/types/variants.ts +7 -1
- package/src/utils.ts +22 -0
- package/{web → src/web}/convert/index.ts +25 -25
- package/src/web/convert/object/boxShadow.ts +55 -0
- package/src/web/convert/object/filter.ts +39 -0
- package/src/web/convert/object/index.ts +3 -0
- package/src/web/convert/object/objectStyle.ts +69 -0
- package/src/web/convert/object/transform.ts +24 -0
- package/src/web/convert/pseudo.ts +137 -0
- package/src/web/convert/shadow/boxShadow.ts +50 -0
- package/src/web/convert/shadow/getShadowBreakpoints.ts +34 -0
- package/src/web/convert/shadow/index.ts +2 -0
- package/src/web/convert/shadow/textShadow.ts +48 -0
- package/{web → src/web}/convert/style.ts +61 -10
- package/{web → src/web}/convert/types.ts +9 -2
- package/{web → src/web}/convert/utils.ts +11 -5
- package/src/web/create.ts +48 -0
- package/{web → src/web}/index.ts +4 -3
- package/src/web/listener.ts +63 -0
- package/{web → src/web}/mock.ts +3 -14
- package/src/web/registry.ts +215 -0
- package/{web → src/web}/runtime.ts +32 -21
- package/src/web/shadowRegistry.ts +145 -0
- package/src/web/state.ts +94 -0
- package/src/web/utils/common.ts +45 -0
- package/src/web/utils/index.ts +2 -0
- package/src/web/utils/unistyle.ts +108 -0
- package/src/web/variants/getVariants.ts +42 -0
- package/src/web/variants/index.ts +2 -0
- package/src/web/variants/useVariants.ts +65 -0
- package/android/src/main/cxx/helpers.cpp +0 -105
- package/android/src/main/cxx/helpers.h +0 -16
- package/android/src/main/cxx/platform.cpp +0 -170
- package/android/src/main/cxx/platform.h +0 -20
- package/lib/typescript/example/App.d.ts +0 -4
- package/lib/typescript/example/App.d.ts.map +0 -1
- package/lib/typescript/example/unistyles.d.ts +0 -63
- package/lib/typescript/example/unistyles.d.ts.map +0 -1
- package/lib/typescript/expo-example/App.d.ts +0 -4
- package/lib/typescript/expo-example/App.d.ts.map +0 -1
- package/lib/typescript/expo-example/unistyles.d.ts +0 -63
- package/lib/typescript/expo-example/unistyles.d.ts.map +0 -1
- package/lib/typescript/web/convert/boxShadow.d.ts +0 -3
- package/lib/typescript/web/convert/boxShadow.d.ts.map +0 -1
- package/lib/typescript/web/convert/breakpoint.d.ts +0 -3
- package/lib/typescript/web/convert/breakpoint.d.ts.map +0 -1
- package/lib/typescript/web/convert/index.d.ts +0 -4
- package/lib/typescript/web/convert/index.d.ts.map +0 -1
- package/lib/typescript/web/convert/shadow.d.ts +0 -2
- package/lib/typescript/web/convert/shadow.d.ts.map +0 -1
- package/lib/typescript/web/convert/style.d.ts +0 -3
- package/lib/typescript/web/convert/style.d.ts.map +0 -1
- package/lib/typescript/web/convert/textShadow.d.ts +0 -3
- package/lib/typescript/web/convert/textShadow.d.ts.map +0 -1
- package/lib/typescript/web/convert/transform.d.ts +0 -5
- package/lib/typescript/web/convert/transform.d.ts.map +0 -1
- package/lib/typescript/web/convert/types.d.ts.map +0 -1
- package/lib/typescript/web/convert/utils.d.ts +0 -8
- package/lib/typescript/web/convert/utils.d.ts.map +0 -1
- package/lib/typescript/web/create.d.ts +0 -2449
- package/lib/typescript/web/index.d.ts +0 -2464
- package/lib/typescript/web/listener/index.d.ts +0 -2
- package/lib/typescript/web/listener/index.d.ts.map +0 -1
- package/lib/typescript/web/listener/listener.d.ts.map +0 -1
- package/lib/typescript/web/mock.d.ts +0 -14
- package/lib/typescript/web/mock.d.ts.map +0 -1
- package/lib/typescript/web/mq.d.ts +0 -4
- package/lib/typescript/web/mq.d.ts.map +0 -1
- package/lib/typescript/web/pseudo.d.ts +0 -4
- package/lib/typescript/web/pseudo.d.ts.map +0 -1
- package/lib/typescript/web/registry.d.ts +0 -12
- package/lib/typescript/web/registry.d.ts.map +0 -1
- package/lib/typescript/web/runtime.d.ts.map +0 -1
- package/lib/typescript/web/state.d.ts +0 -24
- package/lib/typescript/web/state.d.ts.map +0 -1
- package/lib/typescript/web/useVariants.d.ts +0 -3
- package/lib/typescript/web/useVariants.d.ts.map +0 -1
- package/lib/typescript/web/utils.d.ts +0 -18
- package/lib/typescript/web/utils.d.ts.map +0 -1
- package/nitrogen/generated/android/c++/JFunc_void_std__vector_UnistyleDependency_.hpp +0 -60
- package/plugin/__tests__/dependencies.spec.js +0 -360
- package/plugin/__tests__/ref.spec.js +0 -991
- package/plugin/__tests__/stylesheet.spec.js +0 -396
- package/web/convert/boxShadow.ts +0 -72
- package/web/convert/breakpoint.ts +0 -21
- package/web/convert/shadow.ts +0 -68
- package/web/convert/textShadow.ts +0 -69
- package/web/convert/transform.ts +0 -89
- package/web/create.ts +0 -102
- package/web/listener/index.ts +0 -1
- package/web/listener/listener.ts +0 -33
- package/web/mq.ts +0 -19
- package/web/pseudo.ts +0 -11
- package/web/registry.ts +0 -41
- package/web/state.ts +0 -148
- package/web/useVariants.ts +0 -99
- package/web/utils.ts +0 -95
- /package/nitrogen/generated/android/{UnistylesOnLoad.kt → unistylesOnLoad.kt} +0 -0
- /package/{web → src/web}/convert/module.d.ts +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_reactNativeNitroModules","_StatusBar","
|
1
|
+
{"version":3,"names":["_reactNative","require","_reactNativeNitroModules","_StatusBar","_common","HybridUnistylesRuntime","NitroModules","createHybridObject","statusBar","createHybridStatusBar","navigationBar","createHybridNavigationBar","_setRootViewBackgroundColor","setRootViewBackgroundColor","color","parsedColor","processColor","isIOS","setImmersiveMode","isEnabled","setHidden","attachStatusBarJSMethods","Runtime","exports"],"sourceRoot":"../../../../src","sources":["specs/UnistylesRuntime/index.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,wBAAA,GAAAD,OAAA;AAGA,IAAAE,UAAA,GAAAF,OAAA;AAGA,IAAAG,OAAA,GAAAH,OAAA;AAkCA,MAAMI,sBAAsB,GAAGC,qCAAY,CACtCC,kBAAkB,CAA0B,kBAAkB,CAAC;AAEpEF,sBAAsB,CAACG,SAAS,GAAGH,sBAAsB,CAACI,qBAAqB,CAAC,CAAC;AACjFJ,sBAAsB,CAACK,aAAa,GAAGL,sBAAsB,CAACM,yBAAyB,CAAC,CAAC;AACzFN,sBAAsB,CAACO,2BAA2B,GAAGP,sBAAsB,CAACQ,0BAA0B;AAEtGR,sBAAsB,CAACQ,0BAA0B,GAAIC,KAAc,IAAK;EACpE,MAAMC,WAAW,GAAG,IAAAC,yBAAY,EAACF,KAAK,CAAC,IAAI,CAAC;EAE5CT,sBAAsB,CAACO,2BAA2B,CAACG,WAAqB,CAAC;AAC7E,CAAC;AAED,IAAIE,aAAK,EAAE;EACPZ,sBAAsB,CAACa,gBAAgB,GAAIC,SAAkB,IAAKd,sBAAsB,CAACG,SAAS,CAACY,SAAS,CAACD,SAAS,EAAE,MAAM,CAAC;AACnI;AAEA,IAAAE,mCAAwB,EAAChB,sBAAsB,CAACG,SAAS,CAAC;AAEnD,MAAMc,OAAO,GAAAC,OAAA,CAAAD,OAAA,GAAGjB,sBAA0C","ignoreList":[]}
|
@@ -27,6 +27,12 @@ Object.defineProperty(exports, "StyleSheet", {
|
|
27
27
|
return _StyleSheet.StyleSheet;
|
28
28
|
}
|
29
29
|
});
|
30
|
+
Object.defineProperty(exports, "UnistyleDependency", {
|
31
|
+
enumerable: true,
|
32
|
+
get: function () {
|
33
|
+
return _NativePlatform.UnistyleDependency;
|
34
|
+
}
|
35
|
+
});
|
30
36
|
Object.defineProperty(exports, "UnistylesRuntime", {
|
31
37
|
enumerable: true,
|
32
38
|
get: function () {
|
@@ -44,4 +50,5 @@ var _UnistylesRuntime = require("./UnistylesRuntime");
|
|
44
50
|
var _StyleSheet = require("./StyleSheet");
|
45
51
|
var _ShadowRegistry = require("./ShadowRegistry");
|
46
52
|
var _types = require("./types");
|
53
|
+
var _NativePlatform = require("./NativePlatform");
|
47
54
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["require","_UnistylesRuntime","_StyleSheet","_ShadowRegistry","_types"],"sourceRoot":"../../../src","sources":["specs/index.ts"],"mappings":"
|
1
|
+
{"version":3,"names":["require","_UnistylesRuntime","_StyleSheet","_ShadowRegistry","_types","_NativePlatform"],"sourceRoot":"../../../src","sources":["specs/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAAA,OAAA;AAEA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAEA,IAAAG,eAAA,GAAAH,OAAA;AAEA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,eAAA,GAAAL,OAAA","ignoreList":[]}
|
@@ -7,7 +7,7 @@ var _exportNames = {
|
|
7
7
|
getSSRUnistyles: true
|
8
8
|
};
|
9
9
|
exports.getSSRUnistyles = void 0;
|
10
|
-
var _web = require("
|
10
|
+
var _web = require("../web");
|
11
11
|
Object.keys(_web).forEach(function (key) {
|
12
12
|
if (key === "default" || key === "__esModule") return;
|
13
13
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["create","stylesheet"],"sourceRoot":"../../../src","sources":["types/stylesheet.ts"],"mappings":";;;;;AASA;;
|
1
|
+
{"version":3,"names":["create","stylesheet"],"sourceRoot":"../../../src","sources":["types/stylesheet.ts"],"mappings":";;;;;AASA;;AAwEA,MAAMA,MAAM,GAA0BC,UAAwC,IAAoEA,UAA2E","ignoreList":[]}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.deepMergeObjects = void 0;
|
7
|
+
const deepMergeObjects = (...sources) => {
|
8
|
+
const target = {};
|
9
|
+
sources.forEach(source => {
|
10
|
+
Object.keys(source).forEach(key => {
|
11
|
+
const sourceValue = source[key];
|
12
|
+
const targetValue = target[key];
|
13
|
+
if (Object(sourceValue) == sourceValue && Object(targetValue) === targetValue) {
|
14
|
+
// @ts-expect-error - can't assign to generic
|
15
|
+
target[key] = deepMergeObjects(targetValue, sourceValue);
|
16
|
+
return;
|
17
|
+
}
|
18
|
+
|
19
|
+
// @ts-expect-error - can't assign to generic
|
20
|
+
target[key] = sourceValue;
|
21
|
+
});
|
22
|
+
});
|
23
|
+
return target;
|
24
|
+
};
|
25
|
+
exports.deepMergeObjects = deepMergeObjects;
|
26
|
+
//# sourceMappingURL=utils.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["deepMergeObjects","sources","target","forEach","source","Object","keys","key","sourceValue","targetValue","exports"],"sourceRoot":"../../src","sources":["utils.ts"],"mappings":";;;;;;AAAO,MAAMA,gBAAgB,GAAGA,CAAqC,GAAGC,OAAiB,KAAK;EAC1F,MAAMC,MAAM,GAAG,CAAC,CAAM;EAEtBD,OAAO,CAACE,OAAO,CAACC,MAAM,IAAI;IACtBC,MAAM,CAACC,IAAI,CAACF,MAAM,CAAC,CAACD,OAAO,CAACI,GAAG,IAAI;MAC/B,MAAMC,WAAW,GAAGJ,MAAM,CAACG,GAAG,CAAC;MAC/B,MAAME,WAAW,GAAGP,MAAM,CAACK,GAAG,CAAC;MAE/B,IAAIF,MAAM,CAACG,WAAW,CAAC,IAAIA,WAAW,IAAIH,MAAM,CAACI,WAAW,CAAC,KAAKA,WAAW,EAAE;QAC3E;QACAP,MAAM,CAACK,GAAG,CAAC,GAAGP,gBAAgB,CAACS,WAAW,EAAED,WAAW,CAAC;QAExD;MACJ;;MAEA;MACAN,MAAM,CAACK,GAAG,CAAC,GAAGC,WAAW;IAC7B,CAAC,CAAC;EACN,CAAC,CAAC;EAEF,OAAON,MAAM;AACjB,CAAC;AAAAQ,OAAA,CAAAV,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
@@ -0,0 +1,79 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.convertUnistyles = void 0;
|
7
|
+
var _pseudo = require("./pseudo");
|
8
|
+
var _style = require("./style");
|
9
|
+
var _utils = require("../../utils");
|
10
|
+
var _object = require("./object");
|
11
|
+
var _utils2 = require("./utils");
|
12
|
+
var _shadow = require("./shadow");
|
13
|
+
const convertUnistyles = value => {
|
14
|
+
// Flag to mark if textShadow is already created
|
15
|
+
let hasTextShadow = false;
|
16
|
+
// Flag to mark if boxShadow is already created
|
17
|
+
let hasShadow = false;
|
18
|
+
const stylesArray = Object.entries({
|
19
|
+
...value,
|
20
|
+
...value._web
|
21
|
+
}).flatMap(([unistylesKey, unistylesValue]) => {
|
22
|
+
// Keys to omit
|
23
|
+
if (['_classNames', '_web', 'variants', 'compoundVariants', 'uni__dependencies', '__unistyles-secrets__'].includes(unistylesKey) || unistylesKey.startsWith('variant-')) {
|
24
|
+
return [];
|
25
|
+
}
|
26
|
+
|
27
|
+
// Pseudo classes :hover, :before etc.
|
28
|
+
if ((0, _pseudo.isPseudo)(unistylesKey)) {
|
29
|
+
const flattenValues = convertUnistyles(unistylesValue);
|
30
|
+
return {
|
31
|
+
[unistylesKey]: flattenValues
|
32
|
+
};
|
33
|
+
}
|
34
|
+
|
35
|
+
// Text shadow
|
36
|
+
if ((0, _utils2.isTextShadow)(unistylesKey)) {
|
37
|
+
if (hasTextShadow) {
|
38
|
+
return [];
|
39
|
+
}
|
40
|
+
hasTextShadow = true;
|
41
|
+
return (0, _shadow.getTextShadowStyle)(value);
|
42
|
+
}
|
43
|
+
|
44
|
+
// RN shadows
|
45
|
+
if ((0, _utils2.isShadow)(unistylesKey)) {
|
46
|
+
if (hasShadow) {
|
47
|
+
return [];
|
48
|
+
}
|
49
|
+
hasShadow = true;
|
50
|
+
return (0, _shadow.getBoxShadowStyle)(value);
|
51
|
+
}
|
52
|
+
if ((0, _utils2.isFilter)(unistylesKey, unistylesValue)) {
|
53
|
+
return (0, _object.getFilterStyle)(unistylesValue);
|
54
|
+
}
|
55
|
+
if ((0, _utils2.isBoxShadow)(unistylesKey, unistylesValue)) {
|
56
|
+
return (0, _object.getBoxShadow)(unistylesValue);
|
57
|
+
}
|
58
|
+
|
59
|
+
// Transforms
|
60
|
+
if ((0, _utils2.isTransform)(unistylesKey, unistylesValue)) {
|
61
|
+
return (0, _object.getTransformStyle)(unistylesValue);
|
62
|
+
}
|
63
|
+
|
64
|
+
// Breakpoints
|
65
|
+
if (typeof unistylesValue === 'object' && unistylesValue !== null) {
|
66
|
+
return Object.entries(unistylesValue).map(([breakpointKey, breakpointValue]) => {
|
67
|
+
return {
|
68
|
+
[breakpointKey]: (0, _style.getStyle)(unistylesKey, breakpointValue)
|
69
|
+
};
|
70
|
+
});
|
71
|
+
}
|
72
|
+
|
73
|
+
// Regular styles
|
74
|
+
return (0, _style.getStyle)(unistylesKey, unistylesValue);
|
75
|
+
});
|
76
|
+
return (0, _utils.deepMergeObjects)(...stylesArray);
|
77
|
+
};
|
78
|
+
exports.convertUnistyles = convertUnistyles;
|
79
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["_pseudo","require","_style","_utils","_object","_utils2","_shadow","convertUnistyles","value","hasTextShadow","hasShadow","stylesArray","Object","entries","_web","flatMap","unistylesKey","unistylesValue","includes","startsWith","isPseudo","flattenValues","isTextShadow","getTextShadowStyle","isShadow","getBoxShadowStyle","isFilter","getFilterStyle","isBoxShadow","getBoxShadow","isTransform","getTransformStyle","map","breakpointKey","breakpointValue","getStyle","deepMergeObjects","exports"],"sourceRoot":"../../../../src","sources":["web/convert/index.ts"],"mappings":";;;;;;AACA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AAEO,MAAMM,gBAAgB,GAAIC,KAAsB,IAAK;EACxD;EACA,IAAIC,aAAa,GAAG,KAAK;EACzB;EACA,IAAIC,SAAS,GAAG,KAAK;EAErB,MAAMC,WAAW,GAAGC,MAAM,CAACC,OAAO,CAAC;IAC/B,GAAGL,KAAK;IACR,GAAGA,KAAK,CAACM;EACb,CAAC,CAAC,CAACC,OAAO,CAAC,CAAC,CAACC,YAAY,EAAEC,cAAc,CAAC,KAAK;IAC3C;IACA,IAAI,C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AC,CAACC,aAAa,EAAEC,eAAe,CAAC,KAAK;QAC5E,OAAO;UAAE,CAACD,aAAa,GAAG,IAAAE,eAAQ,EAACnB,YAAY,EAAEkB,eAAe;QAAE,CAAC;MACvE,CAAC,CAAC;IACN;;IAEA;IACA,OAAO,IAAAC,eAAQ,EAACnB,YAAY,EAAEC,cAAc,CAAC;EACjD,CAAC,CAA+B;EAEhC,OAAO,IAAAmB,uBAAgB,EAAC,GAAGzB,WAAW,CAAC;AAC3C,CAAC;AAAA0B,OAAA,CAAA9B,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["web/convert/module.d.ts"],"mappings":"","ignoreList":[]}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.getBoxShadow = void 0;
|
7
|
+
var _utils = require("../utils");
|
8
|
+
var _utils2 = require("../../utils");
|
9
|
+
var _utils3 = require("../../../utils");
|
10
|
+
const createBoxShadowValue = style => {
|
11
|
+
const {
|
12
|
+
offsetX,
|
13
|
+
offsetY,
|
14
|
+
blurRadius = 0,
|
15
|
+
spreadDistance = 0,
|
16
|
+
color = '#000',
|
17
|
+
inset
|
18
|
+
} = style;
|
19
|
+
return `${inset ? 'inset ' : ''}${(0, _utils.normalizeNumericValue)(offsetX)} ${(0, _utils.normalizeNumericValue)(offsetY)} ${(0, _utils.normalizeNumericValue)(blurRadius)} ${(0, _utils.normalizeNumericValue)(spreadDistance)} ${color}`;
|
20
|
+
};
|
21
|
+
const getBoxShadow = boxShadow => {
|
22
|
+
const breakpoints = new Set();
|
23
|
+
boxShadow.forEach(shadow => {
|
24
|
+
const [key] = Object.keys(shadow);
|
25
|
+
const value = shadow[key];
|
26
|
+
|
27
|
+
// Breakpoints
|
28
|
+
if (typeof value === 'object') {
|
29
|
+
Object.keys(value).forEach(breakpoint => breakpoints.add(breakpoint));
|
30
|
+
}
|
31
|
+
});
|
32
|
+
if (breakpoints.size === 0) {
|
33
|
+
const boxShadowStyle = Object.fromEntries(boxShadow.map(shadow => {
|
34
|
+
const [key] = Object.keys(shadow);
|
35
|
+
return [key, shadow[key]];
|
36
|
+
}));
|
37
|
+
return {
|
38
|
+
boxShadow: createBoxShadowValue(boxShadowStyle)
|
39
|
+
};
|
40
|
+
}
|
41
|
+
const breakpointStyles = Array.from(breakpoints).map(breakpoint => {
|
42
|
+
const styles = Object.fromEntries(boxShadow.map(shadow => {
|
43
|
+
const [key] = Object.keys(shadow);
|
44
|
+
const value = shadow[key];
|
45
|
+
if (typeof value === 'object' && (0, _utils2.keyInObject)(value, breakpoint)) {
|
46
|
+
return [key, value[breakpoint]];
|
47
|
+
}
|
48
|
+
return [key, value];
|
49
|
+
}));
|
50
|
+
return {
|
51
|
+
[breakpoint]: {
|
52
|
+
boxShadow: createBoxShadowValue(styles)
|
53
|
+
}
|
54
|
+
};
|
55
|
+
});
|
56
|
+
return (0, _utils3.deepMergeObjects)(...breakpointStyles);
|
57
|
+
};
|
58
|
+
exports.getBoxShadow = getBoxShadow;
|
59
|
+
//# sourceMappingURL=boxShadow.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["_utils","require","_utils2","_utils3","createBoxShadowValue","style","offsetX","offsetY","blurRadius","spreadDistance","color","inset","normalizeNumericValue","getBoxShadow","boxShadow","breakpoints","Set","forEach","shadow","key","Object","keys","value","breakpoint","add","size","boxShadowStyle","fromEntries","map","breakpointStyles","Array","from","styles","keyInObject","deepMergeObjects","exports"],"sourceRoot":"../../../../../src","sources":["web/convert/object/boxShadow.ts"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAEA,MAAMG,oBAAoB,GAAIC,KAAqB,IAAK;EACpD,MAAM;IA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,CAACC,IAAI,CAAChB,WAAW,CAAC,CAACa,GAAG,CAACL,UAAU,IAAI;IAC/D,MAAMS,MAAM,GAAGZ,MAAM,CAACO,WAAW,CAACb,SAAS,CAACc,GAAG,CAACV,MAAM,IAAI;MACtD,MAAM,CAACC,GAAG,CAAC,GAAGC,MAAM,CAACC,IAAI,CAACH,MAAM,CAAC;MACjC,MAAMI,KAAK,GAAGJ,MAAM,CAACC,GAAG,CAAyB;MAEjD,IAAI,OAAOG,KAAK,KAAK,QAAQ,IAAI,IAAAW,mBAAW,EAACX,KAAK,EAAEC,UAAU,CAAC,EAAE;QAC7D,OAAO,CAACJ,GAAG,EAAEG,KAAK,CAACC,UAAU,CAAC,CAAC;MACnC;MAEA,OAAO,CAACJ,GAAG,EAAEG,KAAK,CAAC;IACvB,CAAC,CAAC,CAAC;IAEH,OAAO;MACH,CAACC,UAAU,GAAG;QACVT,SAAS,EAAEV,oBAAoB,CAAC4B,MAAM;MAC1C;IACJ,CAAC;EACL,CAAC,CAAC;EAEF,OAAO,IAAAE,wBAAgB,EAAC,GAAGL,gBAAgB,CAAC;AAChD,CAAC;AAAAM,OAAA,CAAAtB,YAAA,GAAAA,YAAA","ignoreList":[]}
|
@@ -0,0 +1,42 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.getFilterStyle = void 0;
|
7
|
+
var _utils = require("../../utils");
|
8
|
+
var _objectStyle = require("./objectStyle");
|
9
|
+
var _utils2 = require("../utils");
|
10
|
+
var _runtime = require("../../runtime");
|
11
|
+
var _mq = require("../../../mq");
|
12
|
+
const getDropShadowStyle = dropShadow => {
|
13
|
+
const {
|
14
|
+
offsetX = 0,
|
15
|
+
offsetY = 0,
|
16
|
+
standardDeviation = 0,
|
17
|
+
color = '#000'
|
18
|
+
} = dropShadow;
|
19
|
+
return `${(0, _utils2.normalizeColor)(String(color))} ${(0, _utils2.normalizeNumericValue)(offsetX)} ${(0, _utils2.normalizeNumericValue)(offsetY)} ${(0, _utils2.normalizeNumericValue)(standardDeviation)}`;
|
20
|
+
};
|
21
|
+
const getFilterStyle = filters => {
|
22
|
+
const restFilters = filters.filter(filter => Object.keys(filter)[0] !== 'dropShadow');
|
23
|
+
const dropShadow = (() => {
|
24
|
+
const dropShadowValue = filters.find(filter => Object.keys(filter)[0] === 'dropShadow')?.dropShadow;
|
25
|
+
if (typeof dropShadowValue !== 'object') {
|
26
|
+
return [];
|
27
|
+
}
|
28
|
+
const breakpoints = Object.keys(dropShadowValue).filter(key => Object.keys(_runtime.UnistylesRuntime.breakpoints).includes(key) || (0, _mq.isUnistylesMq)(key));
|
29
|
+
const breakpointsDropShadow = Object.fromEntries(breakpoints.map(breakpoint => [breakpoint, getDropShadowStyle(dropShadowValue[breakpoint])]));
|
30
|
+
if (breakpoints.length === 0) {
|
31
|
+
return [{
|
32
|
+
dropShadow: getDropShadowStyle(dropShadowValue)
|
33
|
+
}];
|
34
|
+
}
|
35
|
+
return [{
|
36
|
+
dropShadow: breakpointsDropShadow
|
37
|
+
}];
|
38
|
+
})();
|
39
|
+
return (0, _objectStyle.getObjectStyle)([...restFilters, ...dropShadow], 'filter', (key, value) => `${(0, _utils.hyphenate)(key)}(${(0, _utils2.normalizeNumericValue)(value)})`);
|
40
|
+
};
|
41
|
+
exports.getFilterStyle = getFilterStyle;
|
42
|
+
//# sourceMappingURL=filter.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["_utils","require","_objectStyle","_utils2","_runtime","_mq","getDropShadowStyle","dropShadow","offsetX","offsetY","standardDeviation","color","normalizeColor","String","normalizeNumericValue","getFilterStyle","filters","restFilters","filter","Object","keys","dropShadowValue","find","breakpoints","key","UnistylesRuntime","includes","isUnistylesMq","breakpointsDropShadow","fromEntries","map","breakpoint","length","getObjectStyle","value","hyphenate","exports"],"sourceRoot":"../../../../../src","sources":["web/convert/object/filter.ts"],"mappings":";;;;;;AACA,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,CAACU,WAAW,CAACN,WAAW,CAACO,GAAG,CAACC,UAAU,IAAI,CAACA,UAAU,EAAEzB,kBAAkB,CAACe,eAAe,CAACU,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;IAE9I,IAAIR,WAAW,CAACS,MAAM,KAAK,CAAC,EAAE;MAC1B,OAAO,CAAC;QACJzB,UAAU,EAAED,kBAAkB,CAACe,eAAkC;MACrE,CAAC,CAAC;IACN;IAEA,OAAO,CAAC;MACJd,UAAU,EAAEqB;IAChB,CAAC,CAAC;EACN,CAAC,EAAE,CAAC;EAEJ,OAAO,IAAAK,2BAAc,EAAC,CAAC,GAAGhB,WAAW,EAAE,GAAGV,UAAU,CAAC,EAAE,QAAQ,EAAE,CAACiB,GAAG,EAAEU,KAAK,KAAK,GAAG,IAAAC,gBAAS,EAACX,GAAG,CAAC,IAAI,IAAAV,6BAAqB,EAACoB,KAAwB,CAAC,GAAG,CAAC;AAC7J,CAAC;AAAAE,OAAA,CAAArB,cAAA,GAAAA,cAAA","ignoreList":[]}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
var _transform = require("./transform");
|
7
|
+
Object.keys(_transform).forEach(function (key) {
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
9
|
+
if (key in exports && exports[key] === _transform[key]) return;
|
10
|
+
Object.defineProperty(exports, key, {
|
11
|
+
enumerable: true,
|
12
|
+
get: function () {
|
13
|
+
return _transform[key];
|
14
|
+
}
|
15
|
+
});
|
16
|
+
});
|
17
|
+
var _boxShadow = require("./boxShadow");
|
18
|
+
Object.keys(_boxShadow).forEach(function (key) {
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
20
|
+
if (key in exports && exports[key] === _boxShadow[key]) return;
|
21
|
+
Object.defineProperty(exports, key, {
|
22
|
+
enumerable: true,
|
23
|
+
get: function () {
|
24
|
+
return _boxShadow[key];
|
25
|
+
}
|
26
|
+
});
|
27
|
+
});
|
28
|
+
var _filter = require("./filter");
|
29
|
+
Object.keys(_filter).forEach(function (key) {
|
30
|
+
if (key === "default" || key === "__esModule") return;
|
31
|
+
if (key in exports && exports[key] === _filter[key]) return;
|
32
|
+
Object.defineProperty(exports, key, {
|
33
|
+
enumerable: true,
|
34
|
+
get: function () {
|
35
|
+
return _filter[key];
|
36
|
+
}
|
37
|
+
});
|
38
|
+
});
|
39
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["_transform","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_boxShadow","_filter"],"sourceRoot":"../../../../../src","sources":["web/convert/object/index.ts"],"mappings":";;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,UAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,UAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,UAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,UAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,UAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,UAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,UAAA,CAAAL,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,OAAA,GAAAV,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAQ,OAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAM,OAAA,CAAAN,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAE,OAAA,CAAAN,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
@@ -0,0 +1,56 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.getObjectStyle = void 0;
|
7
|
+
var _utils = require("../../../utils");
|
8
|
+
var _utils2 = require("../../utils");
|
9
|
+
const createStylesValue = (styles, normalize) => styles.map(style => {
|
10
|
+
const [key] = Object.keys(style);
|
11
|
+
if (!key) {
|
12
|
+
return undefined;
|
13
|
+
}
|
14
|
+
return normalize(key, style[key]);
|
15
|
+
}).filter(Boolean).join(' ');
|
16
|
+
const getObjectStyle = (styles, styleKey, normalize) => {
|
17
|
+
const breakpoints = new Set();
|
18
|
+
const normalStyles = [];
|
19
|
+
styles.forEach(style => {
|
20
|
+
const [property] = Object.keys(style);
|
21
|
+
if (!property) {
|
22
|
+
return;
|
23
|
+
}
|
24
|
+
const value = style[property];
|
25
|
+
if (typeof value === 'object' && !Array.isArray(value)) {
|
26
|
+
Object.keys(value ?? {}).forEach(breakpoint => breakpoints.add(breakpoint));
|
27
|
+
return;
|
28
|
+
}
|
29
|
+
normalStyles.push(style);
|
30
|
+
});
|
31
|
+
const breakpointStyles = Array.from(breakpoints).flatMap(breakpoint => {
|
32
|
+
const stylesPerBreakpoint = styles.flatMap(style => {
|
33
|
+
const [property] = Object.keys(style);
|
34
|
+
if (!property) {
|
35
|
+
return [];
|
36
|
+
}
|
37
|
+
const value = style[property];
|
38
|
+
if (typeof value === 'object' && !Array.isArray(value)) {
|
39
|
+
return (0, _utils2.keyInObject)(value, breakpoint) ? [{
|
40
|
+
[property]: value[breakpoint]
|
41
|
+
}] : [];
|
42
|
+
}
|
43
|
+
return [];
|
44
|
+
});
|
45
|
+
return [{
|
46
|
+
[breakpoint]: {
|
47
|
+
[styleKey]: createStylesValue(stylesPerBreakpoint, normalize)
|
48
|
+
}
|
49
|
+
}];
|
50
|
+
});
|
51
|
+
return (0, _utils.deepMergeObjects)({
|
52
|
+
[styleKey]: createStylesValue(normalStyles, normalize)
|
53
|
+
}, ...breakpointStyles);
|
54
|
+
};
|
55
|
+
exports.getObjectStyle = getObjectStyle;
|
56
|
+
//# sourceMappingURL=objectStyle.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["_utils","require","_utils2","createStylesValue","styles","normalize","map","style","key","Object","keys","undefined","filter","Boolean","join","getObjectStyle","styleKey","breakpoints","Set","normalStyles","forEach","property","value","Array","isArray","breakpoint","add","push","breakpointStyles","from","flatMap","stylesPerBreakpoint","keyInObject","deepMergeObjects","exports"],"sourceRoot":"../../../../../src","sources":["web/convert/object/objectStyle.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAKA,MAAME,iBAAiB,GAAGA,CAAyBC,MAAsB,EAAEC,SAA6B,KAAKD,MAAM,CAC9GE,GAAG,CAACC,KAAK,IAAI;EACV,MAAM,CAACC,GAAG,CAAC,GAAGC,MAAM,CAACC,IAAI,CAACH,KAAK,CAAC;EAEhC,IAAI,CAACC,GAAG,EAAE;IACN,OAAOG,SAAS;EACpB;EAEA,OAAON,SAAS,CAACG,GAAG,EAAED,KAAK,CAACC,GAAG,CAAC,CAAC;AACrC,CAAC,CAAC,CACDI,MAAM,CAACC,OAAO,CAAC,CACfC,IAAI,CAAC,GAAG,CAAC;AAEP,MAAMC,cAAc,GAAGA,CAAyBX,MAAsB,EAAEY,QAAgB,EAAEX,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ACb,CAAC,CAAmB;IAEpB,OAAO,CAAC;MACJ,CAACA,UAAU,GAAG;QACV,CAACT,QAAQ,GAAGb,iBAAiB,CAAC4B,mBAAmB,EAAE1B,SAAS;MAChE;IACJ,CAAC,CAAC;EACN,CAAC,CAAC;EAEF,OAAO,IAAA4B,uBAAgB,EAAsB;IACzC,CAACjB,QAAQ,GAAGb,iBAAiB,CAACgB,YAAY,EAAEd,SAAS;EACzD,CAAC,EAAE,GAAGuB,gBAAgB,CAAC;AAC3B,CAAC;AAAAM,OAAA,CAAAnB,cAAA,GAAAA,cAAA","ignoreList":[]}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.getTransformStyle = void 0;
|
7
|
+
var _objectStyle = require("./objectStyle");
|
8
|
+
var _utils = require("../utils");
|
9
|
+
const normalizeTransform = (key, value) => {
|
10
|
+
if (key.includes('scale')) {
|
11
|
+
return value;
|
12
|
+
}
|
13
|
+
if (typeof value === 'number') {
|
14
|
+
return (0, _utils.normalizeNumericValue)(value);
|
15
|
+
}
|
16
|
+
return value;
|
17
|
+
};
|
18
|
+
const getTransformStyle = transforms => (0, _objectStyle.getObjectStyle)(transforms, 'transform', (key, value) => {
|
19
|
+
switch (key) {
|
20
|
+
case 'matrix':
|
21
|
+
return `${key}(${value.join(',')})`;
|
22
|
+
default:
|
23
|
+
return `${key}(${normalizeTransform(key, value)})`;
|
24
|
+
}
|
25
|
+
});
|
26
|
+
exports.getTransformStyle = getTransformStyle;
|
27
|
+
//# sourceMappingURL=transform.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["_objectStyle","require","_utils","normalizeTransform","key","value","includes","normalizeNumericValue","getTransformStyle","transforms","getObjectStyle","join","exports"],"sourceRoot":"../../../../../src","sources":["web/convert/object/transform.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAGA,MAAME,kBAAkB,GAAGA,CAACC,GAAW,EAAEC,KAAU,KAAK;EACpD,IAAID,GAAG,CAACE,QAAQ,CAAC,OAAO,CAAC,EAAE;IACvB,OAAOD,KAAK;EAChB;EAEA,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;IAC3B,OAAO,IAAAE,4BAAqB,EAACF,KAAK,CAAC;EACvC;EAEA,OAAOA,KAAK;AAChB,CAAC;AAEM,MAAMG,iBAAiB,GAAIC,UAAkC,IAAK,IAAAC,2BAAc,EAACD,UAAU,EAAE,WAAW,EAAE,CAACL,GAAG,EAAEC,KAAK,KAAK;EAC7H,QAAOD,GAAG;IACN,KAAK,QAAQ;MACT,OAAO,GAAGA,GAAG,IAAKC,KAAK,CAAmBM,IAAI,CAAC,GAAG,CAAC,GAAG;IAC1D;MACI,OAAO,GAAGP,GAAG,IAAID,kBAAkB,CAACC,GAAG,EAAEC,KAAK,CAAC,GAAG;EAC1D;AACJ,CAAC,CAAC;AAAAO,OAAA,CAAAJ,iBAAA,GAAAA,iBAAA","ignoreList":[]}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.pseudos = exports.isPseudo = void 0;
|
7
|
+
const pseudos = exports.pseudos = ['_-moz-broken', '_-moz-drag-over', '_-moz-first-node', '_-moz-handler-blocked', '_-moz-handler-crashed', '_-moz-handler-disabled', '_-moz-last-node', '_-moz-loading', '_-moz-locale-dir(ltr)', '_-moz-locale-dir(rtl)', '_-moz-only-whitespace', '_-moz-submit-invalid', '_-moz-suppressed', '_-moz-user-disabled', '_-moz-window-inactive', '_active', '_any-link', '_autofill', '_blank', '_buffering', '_checked', '_current', '_default', '_defined', '_dir(', '_disabled', '_empty', '_enabled', '_first', '_first-child', '_first-of-type', '_focus', '_focus-visible', '_focus-within', '_fullscreen', '_future', '_has(', '_host', '_host-context(', '_host(', '_hover', '_in-range', '_indeterminate', '_invalid', '_is(', '_lang(', '_last-child', '_last-of-type', '_left', '_link', '_local-link', '_modal', '_muted', '_not(', '_nth-child(', '_nth-last-child(', '_nth-last-of-type(', '_nth-of-type(', '_only-child', '_only-of-type', '_optional', '_out-of-range', '_past', '_paused', '_picture-in-picture', '_placeholder-shown', '_playing', '_popover-open', '_read-only', '_read-write', '_required', '_right', '_scope', '_seeking', '_stalled', '_state(', '_target', '_target-within', '_user-invalid', '_user-valid', '_valid', '_visited', '_volume-locked', '_where(', '_-moz-color-swatch', '_-moz-focus-inner', '_-moz-list-bullet', '_-moz-list-number', '_-moz-meter-bar', '_-moz-progress-bar', '_-moz-range-progress', '_-moz-range-thumb', '_-moz-range-track', '_-webkit-inner-spin-button', '_-webkit-meter-barDeprecated', '_-webkit-meter-even-less-good-value', '_-webkit-meter-inner-element', '_-webkit-meter-optimum-value', '_-webkit-meter-suboptimum-value', '_-webkit-progress-bar', '_-webkit-progress-inner-element', '_-webkit-progress-value', '_-webkit-scrollbar', '_-webkit-search-cancel-button', '_-webkit-search-results-button', '_-webkit-slider-runnable-track', '_-webkit-slider-thumb', '_after', '_backdrop', '_before', '_cue', '_file-selector-button', '_first-letter', '_first-line', '_grammar-error', '_highlight(', '_marker', '_part(', '_placeholder', '_selection', '_slotted(', '_spelling-error', '_target-text', '_view-transition', '_view-transition-group', '_view-transition-image-pair', '_view-transition-new', '_view-transition-old'];
|
8
|
+
const isPseudo = selector => pseudos.some(pseudo => selector.startsWith(pseudo));
|
9
|
+
exports.isPseudo = isPseudo;
|
10
|
+
//# sourceMappingURL=pseudo.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["pseudos","exports","isPseudo","selector","some","pseudo","startsWith"],"sourceRoot":"../../../../src","sources":["web/convert/pseudo.ts"],"mappings":";;;;;;AAAO,MAAMA,OAAO,GAAAC,OAAA,CAAAD,OAAA,GAAG,CACnB,cAAc,EACd,iBA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CAAiC,EACjC,yBAAyB,EACzB,oBAAoB,EACpB,+BAA+B,EAC/B,gCAAgC,EAChC,gCAAgC,EAChC,uBAAuB,EACvB,QAAQ,EACR,WAAW,EACX,SAAS,EACT,MAAM,EACN,uBAAuB,EACvB,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,SAAS,EACT,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,wBAAwB,EACxB,6BAA6B,EAC7B,sBAAsB,EACtB,sBAAsB,CAChB;AAEH,MAAME,QAAQ,GAAIC,QAAgB,IAAKH,OAAO,CAACI,IAAI,CAACC,MAAM,IAAIF,QAAQ,CAACG,UAAU,CAACD,MAAM,CAAC,CAAC;AAAAJ,OAAA,CAAAC,QAAA,GAAAA,QAAA","ignoreList":[]}
|
@@ -0,0 +1,62 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.getBoxShadowStyle = void 0;
|
7
|
+
var _utils = require("../../../utils");
|
8
|
+
var _types = require("../types");
|
9
|
+
var _utils2 = require("../utils");
|
10
|
+
var _getShadowBreakpoints = require("./getShadowBreakpoints");
|
11
|
+
const createBoxShadowValue = style => {
|
12
|
+
const {
|
13
|
+
shadowColor,
|
14
|
+
shadowOffset,
|
15
|
+
shadowOpacity,
|
16
|
+
shadowRadius
|
17
|
+
} = style;
|
18
|
+
const offsetX = (0, _utils2.normalizeNumericValue)(shadowOffset?.width ?? 0);
|
19
|
+
const offsetY = (0, _utils2.normalizeNumericValue)(shadowOffset?.height ?? 0);
|
20
|
+
const radius = (0, _utils2.normalizeNumericValue)(shadowRadius ?? 0);
|
21
|
+
const color = (0, _utils2.normalizeColor)(shadowColor ?? '#000000', shadowOpacity ?? 1);
|
22
|
+
return `${offsetX} ${offsetY} ${radius} ${color}`;
|
23
|
+
};
|
24
|
+
const getBoxShadowStyle = styles => {
|
25
|
+
const breakpoints = (0, _getShadowBreakpoints.getShadowBreakpoints)(_types.BOX_SHADOW_STYLES, styles);
|
26
|
+
|
27
|
+
// If no breakpoints were used return styles without media queries
|
28
|
+
if (breakpoints.length === 0) {
|
29
|
+
return {
|
30
|
+
boxShadow: createBoxShadowValue(styles)
|
31
|
+
};
|
32
|
+
}
|
33
|
+
|
34
|
+
// Create boxShadow for each breakpoint
|
35
|
+
const breakpointStyles = breakpoints.map(breakpoint => {
|
36
|
+
const color = (0, _utils2.extractShadowValue)('shadowColor', breakpoint, styles);
|
37
|
+
const {
|
38
|
+
width,
|
39
|
+
height
|
40
|
+
} = (0, _utils2.extractShadowValue)('shadowOffset', breakpoint, styles);
|
41
|
+
const radius = (0, _utils2.extractShadowValue)('shadowRadius', breakpoint, styles);
|
42
|
+
const opacity = (0, _utils2.extractShadowValue)('shadowOpacity', breakpoint, styles);
|
43
|
+
return {
|
44
|
+
[breakpoint]: {
|
45
|
+
boxShadow: createBoxShadowValue({
|
46
|
+
shadowColor: color,
|
47
|
+
shadowOffset: {
|
48
|
+
width,
|
49
|
+
height
|
50
|
+
},
|
51
|
+
shadowRadius: radius,
|
52
|
+
shadowOpacity: opacity
|
53
|
+
})
|
54
|
+
}
|
55
|
+
};
|
56
|
+
});
|
57
|
+
|
58
|
+
// Merge all breakpoints styles into one
|
59
|
+
return (0, _utils.deepMergeObjects)(...breakpointStyles);
|
60
|
+
};
|
61
|
+
exports.getBoxShadowStyle = getBoxShadowStyle;
|
62
|
+
//# sourceMappingURL=boxShadow.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["_utils","require","_types","_utils2","_getShadowBreakpoints","createBoxShadowValue","style","shadowColor","shadowOffset","shadowOpacity","shadowRadius","offsetX","normalizeNumericValue","width","offsetY","height","radius","color","normalizeColor","getBoxShadowStyle","styles","breakpoints","getShadowBreakpoints","BOX_SHADOW_STYLES","length","boxShadow","breakpointStyles","map","breakpoint","extractShad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AAC,cAAc,EAAED,UAAU,EAAER,MAAM,CAAC;IAChF,MAAMJ,MAAM,GAAG,IAAAa,0BAAkB,EAAC,cAAc,EAAED,UAAU,EAAER,MAAM,CAAC;IACrE,MAAMU,OAAO,GAAG,IAAAD,0BAAkB,EAAC,eAAe,EAAED,UAAU,EAAER,MAAM,CAAC;IAEvE,OAAO;MACH,CAACQ,UAAU,GAAG;QACVH,SAAS,EAAEpB,oBAAoB,CAAC;UAC5BE,WAAW,EAAEU,KAAK;UAClBT,YAAY,EAAE;YACVK,KAAK;YACLE;UACJ,CAAC;UACDL,YAAY,EAAEM,MAAM;UACpBP,aAAa,EAAEqB;QACnB,CAAC;MACL;IACJ,CAAC;EACL,CAAC,CAAC;;EAEF;EACA,OAAO,IAAAC,uBAAgB,EAAC,GAAGL,gBAAgB,CAAC;AAChD,CAAC;AAAAM,OAAA,CAAAb,iBAAA,GAAAA,iBAAA","ignoreList":[]}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.getShadowBreakpoints = void 0;
|
7
|
+
const getShadowBreakpoints = (shadowProperties, styles) => {
|
8
|
+
const breakpoints = new Set();
|
9
|
+
shadowProperties.forEach(key => {
|
10
|
+
const value = styles[key];
|
11
|
+
if (typeof value !== 'object') {
|
12
|
+
return;
|
13
|
+
}
|
14
|
+
if (key === 'shadowOffset' || key === 'textShadowOffset') {
|
15
|
+
const {
|
16
|
+
width,
|
17
|
+
height
|
18
|
+
} = value;
|
19
|
+
|
20
|
+
// If shadowOffset.width has breakpoints
|
21
|
+
if (typeof width === 'object') {
|
22
|
+
Object.keys(width).forEach(breakpoint => breakpoints.add(breakpoint));
|
23
|
+
}
|
24
|
+
|
25
|
+
// If shadowOffset.height has breakpoints
|
26
|
+
if (typeof height === 'object') {
|
27
|
+
Object.keys(height).forEach(breakpoint => breakpoints.add(breakpoint));
|
28
|
+
}
|
29
|
+
return;
|
30
|
+
}
|
31
|
+
|
32
|
+
// Collect regular breakpoints
|
33
|
+
Object.keys(value).forEach(breakpoint => breakpoints.add(breakpoint));
|
34
|
+
});
|
35
|
+
return Array.from(breakpoints);
|
36
|
+
};
|
37
|
+
exports.getShadowBreakpoints = getShadowBreakpoints;
|
38
|
+
//# sourceMappingURL=getShadowBreakpoints.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["getShadowBreakpoints","shadowProperties","styles","breakpoints","Set","forEach","key","value","width","height","Object","keys","breakpoint","add","Array","from","exports"],"sourceRoot":"../../../../../src","sources":["web/convert/shadow/getShadowBreakpoints.ts"],"mappings":";;;;;;AAEO,MAAMA,oBAAoB,GAAGA,CAACC,gBAAuC,EAAEC,MAA2B,KAAK;EAC1G,MAAMC,WAAW,GAAG,IAAIC,GAAG,CAAS,CAAC;EAErCH,gBAAgB,CAACI,OAAO,CAACC,GAAG,IAAI;IAC5B,MAAMC,KAAK,GAAGL,MAAM,CAACI,GAAG,CAAC;IAEzB,IAAI,OAAOC,KAAK,KAAK,QAAQ,EAAE;MAC3B;IACJ;IAEA,IAAID,GAAG,KAAK,cAAc,IAAIA,GAAG,KAAK,kBAAkB,EAAE;MACtD,MAAM;QAAEE,KAAK;QAAEC;MAAO,CAAC,GAAGF,KAAqB;;MAE/C;MACA,IAAI,OAAOC,KAAK,KAAK,QAAQ,EAAE;QAC3BE,MAAM,CAACC,IAAI,CAACH,KAAK,CAAC,CAACH,OAAO,CAACO,UAAU,IAAIT,WAAW,CAACU,GAAG,CAACD,UAAU,CAAC,CAAC;MACzE;;MAEA;MACA,IAAI,OAAOH,MAAM,KAAK,QAAQ,EAAE;QAC5BC,MAAM,CAACC,IAAI,CAACF,MAAM,CAAC,CAACJ,OAAO,CAACO,UAAU,IAAIT,WAAW,CAACU,GAAG,CAACD,UAAU,CAAC,CAAC;MAC1E;MAEA;IACJ;;IAEA;IACAF,MAAM,CAACC,IAAI,CAACJ,KAAK,CAAC,CAACF,OAAO,CAACO,UAAU,IAAIT,WAAW,CAACU,GAAG,CAACD,UAAU,CAAC,CAAC;EACzE,CAAC,CAAC;EAEF,OAAOE,KAAK,CAACC,IAAI,CAACZ,WAAW,CAAC;AAClC,CAAC;AAAAa,OAAA,CAAAhB,oBAAA,GAAAA,oBAAA","ignoreList":[]}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
var _boxShadow = require("./boxShadow");
|
7
|
+
Object.keys(_boxShadow).forEach(function (key) {
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
9
|
+
if (key in exports && exports[key] === _boxShadow[key]) return;
|
10
|
+
Object.defineProperty(exports, key, {
|
11
|
+
enumerable: true,
|
12
|
+
get: function () {
|
13
|
+
return _boxShadow[key];
|
14
|
+
}
|
15
|
+
});
|
16
|
+
});
|
17
|
+
var _textShadow = require("./textShadow");
|
18
|
+
Object.keys(_textShadow).forEach(function (key) {
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
20
|
+
if (key in exports && exports[key] === _textShadow[key]) return;
|
21
|
+
Object.defineProperty(exports, key, {
|
22
|
+
enumerable: true,
|
23
|
+
get: function () {
|
24
|
+
return _textShadow[key];
|
25
|
+
}
|
26
|
+
});
|
27
|
+
});
|
28
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["_boxShadow","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_textShadow"],"sourceRoot":"../../../../../src","sources":["web/convert/shadow/index.ts"],"mappings":";;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,UAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,UAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,UAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,WAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,WAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,WAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,WAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|