@niibase/uniwind 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -0
- package/dist/common/components/index.js +314 -0
- package/dist/common/components/native/ActivityIndicator.js +21 -0
- package/dist/common/components/native/Button.js +18 -0
- package/dist/common/components/native/FlatList.js +30 -0
- package/dist/common/components/native/Image.js +21 -0
- package/dist/common/components/native/ImageBackground.js +23 -0
- package/dist/common/components/native/InputAccessoryView.js +21 -0
- package/dist/common/components/native/KeyboardAvoidingView.js +20 -0
- package/dist/common/components/native/Modal.js +21 -0
- package/dist/common/components/native/Pressable.js +29 -0
- package/dist/common/components/native/RefreshControl.js +27 -0
- package/dist/common/components/native/SafeAreaView.js +18 -0
- package/dist/common/components/native/ScrollView.js +23 -0
- package/dist/common/components/native/SectionList.js +27 -0
- package/dist/common/components/native/Switch.js +32 -0
- package/dist/common/components/native/Text.js +36 -0
- package/dist/common/components/native/TextInput.js +53 -0
- package/dist/common/components/native/TouchableHighlight.js +35 -0
- package/dist/common/components/native/TouchableNativeFeedback.js +32 -0
- package/dist/common/components/native/TouchableOpacity.js +32 -0
- package/dist/common/components/native/TouchableWithoutFeedback.js +32 -0
- package/dist/common/components/native/View.js +18 -0
- package/dist/common/components/native/VirtualizedList.js +27 -0
- package/dist/common/components/native/useStyle.js +29 -0
- package/dist/common/components/utils.js +18 -0
- package/dist/common/components/web/ActivityIndicator.js +20 -0
- package/dist/common/components/web/Button.js +18 -0
- package/dist/common/components/web/FlatList.js +22 -0
- package/dist/common/components/web/Image.js +20 -0
- package/dist/common/components/web/ImageBackground.js +21 -0
- package/dist/common/components/web/KeyboardAvoidingView.js +18 -0
- package/dist/common/components/web/Modal.js +17 -0
- package/dist/common/components/web/Pressable.js +17 -0
- package/dist/common/components/web/RefreshControl.js +17 -0
- package/dist/common/components/web/SafeAreaView.js +17 -0
- package/dist/common/components/web/ScrollView.js +18 -0
- package/dist/common/components/web/SectionList.js +20 -0
- package/dist/common/components/web/Switch.js +26 -0
- package/dist/common/components/web/Text.js +17 -0
- package/dist/common/components/web/TextInput.js +17 -0
- package/dist/common/components/web/TouchableHighlight.js +20 -0
- package/dist/common/components/web/TouchableNativeFeedback.js +13 -0
- package/dist/common/components/web/TouchableOpacity.js +17 -0
- package/dist/common/components/web/TouchableWithoutFeedback.js +17 -0
- package/dist/common/components/web/View.js +17 -0
- package/dist/common/components/web/VirtualizedList.js +20 -0
- package/dist/common/components/web/index.js +187 -0
- package/dist/common/components/web/metro-injected.js +1 -0
- package/dist/common/components/web/rnw.js +42 -0
- package/dist/common/core/config/config.common.js +80 -0
- package/dist/common/core/config/config.js +51 -0
- package/dist/common/core/config/config.native.js +67 -0
- package/dist/common/core/config/index.js +16 -0
- package/dist/common/core/index.js +16 -0
- package/dist/common/core/listener.js +51 -0
- package/dist/common/core/logger.js +18 -0
- package/dist/common/core/native/index.js +27 -0
- package/dist/common/core/native/native-utils.js +36 -0
- package/dist/common/core/native/parsers/boxShadow.js +10 -0
- package/dist/common/core/native/parsers/fontVariant.js +8 -0
- package/dist/common/core/native/parsers/gradient.js +31 -0
- package/dist/common/core/native/parsers/index.js +60 -0
- package/dist/common/core/native/parsers/textShadow.js +39 -0
- package/dist/common/core/native/parsers/transforms.js +44 -0
- package/dist/common/core/native/runtime.js +34 -0
- package/dist/common/core/native/store.js +181 -0
- package/dist/common/core/types.js +1 -0
- package/dist/common/core/web/cssListener.js +146 -0
- package/dist/common/core/web/formatColor.js +15 -0
- package/dist/common/core/web/getWebStyles.js +51 -0
- package/dist/common/core/web/index.js +49 -0
- package/dist/common/core/web/parseCSSValue.js +15 -0
- package/dist/common/css/index.js +26 -0
- package/dist/common/css/insets.js +64 -0
- package/dist/common/css/processFunctions.js +54 -0
- package/dist/common/css/themes.js +95 -0
- package/dist/common/css/variants.js +16 -0
- package/dist/common/hoc/index.js +16 -0
- package/dist/common/hoc/types.js +1 -0
- package/dist/common/hoc/withUniwind.js +95 -0
- package/dist/common/hoc/withUniwind.native.js +106 -0
- package/dist/common/hoc/withUniwindUtils.js +16 -0
- package/dist/common/hooks/index.js +49 -0
- package/dist/common/hooks/useCSSVariable/getVariableValue.js +19 -0
- package/dist/common/hooks/useCSSVariable/getVariableValue.native.js +9 -0
- package/dist/common/hooks/useCSSVariable/index.js +16 -0
- package/dist/common/hooks/useCSSVariable/useCSSVariable.js +58 -0
- package/dist/common/hooks/useResolveClassNames.js +22 -0
- package/dist/common/hooks/useResolveClassNames.native.js +29 -0
- package/dist/common/hooks/useUniwind.js +28 -0
- package/dist/common/hooks/useUniwindAccent.js +13 -0
- package/dist/common/hooks/useUniwindAccent.native.js +12 -0
- package/dist/common/index.js +38 -0
- package/dist/common/types.js +28 -0
- package/dist/common/utils/buildDtsFile.js +18 -0
- package/dist/common/utils/stringifyThemes.js +8 -0
- package/dist/common/vite/index.d.ts +9 -0
- package/dist/common/vite/index.js +16 -0
- package/dist/common/vite/vite.js +72 -0
- package/dist/metro/index.cjs +166 -0
- package/dist/metro/index.d.ts +15 -0
- package/dist/metro/index.mjs +158 -0
- package/dist/metro/metro-transformer.cjs +1565 -0
- package/dist/metro/metro-transformer.mjs +1558 -0
- package/dist/module/components/index.d.ts +0 -0
- package/dist/module/components/index.js +312 -0
- package/dist/module/components/native/ActivityIndicator.d.ts +3 -0
- package/dist/module/components/native/ActivityIndicator.js +18 -0
- package/dist/module/components/native/Button.d.ts +3 -0
- package/dist/module/components/native/Button.js +15 -0
- package/dist/module/components/native/FlatList.d.ts +3 -0
- package/dist/module/components/native/FlatList.js +27 -0
- package/dist/module/components/native/Image.d.ts +3 -0
- package/dist/module/components/native/Image.js +18 -0
- package/dist/module/components/native/ImageBackground.d.ts +3 -0
- package/dist/module/components/native/ImageBackground.js +20 -0
- package/dist/module/components/native/InputAccessoryView.d.ts +3 -0
- package/dist/module/components/native/InputAccessoryView.js +21 -0
- package/dist/module/components/native/KeyboardAvoidingView.d.ts +3 -0
- package/dist/module/components/native/KeyboardAvoidingView.js +17 -0
- package/dist/module/components/native/Modal.d.ts +3 -0
- package/dist/module/components/native/Modal.js +18 -0
- package/dist/module/components/native/Pressable.d.ts +3 -0
- package/dist/module/components/native/Pressable.js +29 -0
- package/dist/module/components/native/RefreshControl.d.ts +3 -0
- package/dist/module/components/native/RefreshControl.js +24 -0
- package/dist/module/components/native/SafeAreaView.d.ts +3 -0
- package/dist/module/components/native/SafeAreaView.js +15 -0
- package/dist/module/components/native/ScrollView.d.ts +3 -0
- package/dist/module/components/native/ScrollView.js +20 -0
- package/dist/module/components/native/SectionList.d.ts +3 -0
- package/dist/module/components/native/SectionList.js +24 -0
- package/dist/module/components/native/Switch.d.ts +3 -0
- package/dist/module/components/native/Switch.js +26 -0
- package/dist/module/components/native/Text.d.ts +3 -0
- package/dist/module/components/native/Text.js +33 -0
- package/dist/module/components/native/TextInput.d.ts +3 -0
- package/dist/module/components/native/TextInput.js +50 -0
- package/dist/module/components/native/TouchableHighlight.d.ts +3 -0
- package/dist/module/components/native/TouchableHighlight.js +32 -0
- package/dist/module/components/native/TouchableNativeFeedback.d.ts +3 -0
- package/dist/module/components/native/TouchableNativeFeedback.js +29 -0
- package/dist/module/components/native/TouchableOpacity.d.ts +3 -0
- package/dist/module/components/native/TouchableOpacity.js +29 -0
- package/dist/module/components/native/TouchableWithoutFeedback.d.ts +3 -0
- package/dist/module/components/native/TouchableWithoutFeedback.js +29 -0
- package/dist/module/components/native/View.d.ts +3 -0
- package/dist/module/components/native/View.js +15 -0
- package/dist/module/components/native/VirtualizedList.d.ts +3 -0
- package/dist/module/components/native/VirtualizedList.js +24 -0
- package/dist/module/components/native/useStyle.d.ts +2 -0
- package/dist/module/components/native/useStyle.js +22 -0
- package/dist/module/components/utils.d.ts +1 -0
- package/dist/module/components/utils.js +11 -0
- package/dist/module/components/web/ActivityIndicator.d.ts +3 -0
- package/dist/module/components/web/ActivityIndicator.js +17 -0
- package/dist/module/components/web/Button.d.ts +3 -0
- package/dist/module/components/web/Button.js +15 -0
- package/dist/module/components/web/FlatList.d.ts +3 -0
- package/dist/module/components/web/FlatList.js +19 -0
- package/dist/module/components/web/Image.d.ts +3 -0
- package/dist/module/components/web/Image.js +17 -0
- package/dist/module/components/web/ImageBackground.d.ts +3 -0
- package/dist/module/components/web/ImageBackground.js +18 -0
- package/dist/module/components/web/KeyboardAvoidingView.d.ts +3 -0
- package/dist/module/components/web/KeyboardAvoidingView.js +15 -0
- package/dist/module/components/web/Modal.d.ts +3 -0
- package/dist/module/components/web/Modal.js +14 -0
- package/dist/module/components/web/Pressable.d.ts +3 -0
- package/dist/module/components/web/Pressable.js +14 -0
- package/dist/module/components/web/RefreshControl.d.ts +3 -0
- package/dist/module/components/web/RefreshControl.js +14 -0
- package/dist/module/components/web/SafeAreaView.d.ts +3 -0
- package/dist/module/components/web/SafeAreaView.js +14 -0
- package/dist/module/components/web/ScrollView.d.ts +3 -0
- package/dist/module/components/web/ScrollView.js +15 -0
- package/dist/module/components/web/SectionList.d.ts +3 -0
- package/dist/module/components/web/SectionList.js +17 -0
- package/dist/module/components/web/Switch.d.ts +3 -0
- package/dist/module/components/web/Switch.js +20 -0
- package/dist/module/components/web/Text.d.ts +3 -0
- package/dist/module/components/web/Text.js +14 -0
- package/dist/module/components/web/TextInput.d.ts +3 -0
- package/dist/module/components/web/TextInput.js +14 -0
- package/dist/module/components/web/TouchableHighlight.d.ts +3 -0
- package/dist/module/components/web/TouchableHighlight.js +17 -0
- package/dist/module/components/web/TouchableNativeFeedback.d.ts +2 -0
- package/dist/module/components/web/TouchableNativeFeedback.js +2 -0
- package/dist/module/components/web/TouchableOpacity.d.ts +3 -0
- package/dist/module/components/web/TouchableOpacity.js +14 -0
- package/dist/module/components/web/TouchableWithoutFeedback.d.ts +3 -0
- package/dist/module/components/web/TouchableWithoutFeedback.js +14 -0
- package/dist/module/components/web/View.d.ts +3 -0
- package/dist/module/components/web/View.js +14 -0
- package/dist/module/components/web/VirtualizedList.d.ts +3 -0
- package/dist/module/components/web/VirtualizedList.js +17 -0
- package/dist/module/components/web/index.d.ts +22 -0
- package/dist/module/components/web/index.js +22 -0
- package/dist/module/components/web/metro-injected.d.ts +0 -0
- package/dist/module/components/web/metro-injected.js +0 -0
- package/dist/module/components/web/rnw.d.ts +2 -0
- package/dist/module/components/web/rnw.js +35 -0
- package/dist/module/core/config/config.common.d.ts +18 -0
- package/dist/module/core/config/config.common.js +74 -0
- package/dist/module/core/config/config.d.ts +11 -0
- package/dist/module/core/config/config.js +48 -0
- package/dist/module/core/config/config.native.d.ts +12 -0
- package/dist/module/core/config/config.native.js +61 -0
- package/dist/module/core/config/index.d.ts +1 -0
- package/dist/module/core/config/index.js +1 -0
- package/dist/module/core/index.d.ts +1 -0
- package/dist/module/core/index.js +1 -0
- package/dist/module/core/listener.d.ts +12 -0
- package/dist/module/core/listener.js +45 -0
- package/dist/module/core/logger.d.ts +5 -0
- package/dist/module/core/logger.js +11 -0
- package/dist/module/core/native/index.d.ts +2 -0
- package/dist/module/core/native/index.js +2 -0
- package/dist/module/core/native/native-utils.d.ts +4 -0
- package/dist/module/core/native/native-utils.js +27 -0
- package/dist/module/core/native/parsers/boxShadow.d.ts +1 -0
- package/dist/module/core/native/parsers/boxShadow.js +3 -0
- package/dist/module/core/native/parsers/fontVariant.d.ts +1 -0
- package/dist/module/core/native/parsers/fontVariant.js +1 -0
- package/dist/module/core/native/parsers/gradient.d.ts +8 -0
- package/dist/module/core/native/parsers/gradient.js +26 -0
- package/dist/module/core/native/parsers/index.d.ts +5 -0
- package/dist/module/core/native/parsers/index.js +5 -0
- package/dist/module/core/native/parsers/textShadow.d.ts +1 -0
- package/dist/module/core/native/parsers/textShadow.js +32 -0
- package/dist/module/core/native/parsers/transforms.d.ts +1 -0
- package/dist/module/core/native/parsers/transforms.js +48 -0
- package/dist/module/core/native/runtime.d.ts +2 -0
- package/dist/module/core/native/runtime.js +28 -0
- package/dist/module/core/native/store.d.ts +19 -0
- package/dist/module/core/native/store.js +172 -0
- package/dist/module/core/types.d.ts +73 -0
- package/dist/module/core/types.js +0 -0
- package/dist/module/core/web/cssListener.d.ts +19 -0
- package/dist/module/core/web/cssListener.js +137 -0
- package/dist/module/core/web/formatColor.d.ts +1 -0
- package/dist/module/core/web/formatColor.js +8 -0
- package/dist/module/core/web/getWebStyles.d.ts +2 -0
- package/dist/module/core/web/getWebStyles.js +49 -0
- package/dist/module/core/web/index.d.ts +4 -0
- package/dist/module/core/web/index.js +4 -0
- package/dist/module/core/web/parseCSSValue.d.ts +1 -0
- package/dist/module/core/web/parseCSSValue.js +8 -0
- package/dist/module/css/index.d.ts +1 -0
- package/dist/module/css/index.js +25 -0
- package/dist/module/css/insets.d.ts +1 -0
- package/dist/module/css/insets.js +63 -0
- package/dist/module/css/processFunctions.d.ts +2 -0
- package/dist/module/css/processFunctions.js +36 -0
- package/dist/module/css/themes.d.ts +1 -0
- package/dist/module/css/themes.js +97 -0
- package/dist/module/css/variants.d.ts +1 -0
- package/dist/module/css/variants.js +9 -0
- package/dist/module/hoc/index.d.ts +1 -0
- package/dist/module/hoc/index.js +1 -0
- package/dist/module/hoc/types.d.ts +27 -0
- package/dist/module/hoc/types.js +0 -0
- package/dist/module/hoc/withUniwind.d.ts +2 -0
- package/dist/module/hoc/withUniwind.js +76 -0
- package/dist/module/hoc/withUniwind.native.d.ts +2 -0
- package/dist/module/hoc/withUniwind.native.js +81 -0
- package/dist/module/hoc/withUniwindUtils.d.ts +5 -0
- package/dist/module/hoc/withUniwindUtils.js +5 -0
- package/dist/module/hooks/index.d.ts +4 -0
- package/dist/module/hooks/index.js +4 -0
- package/dist/module/hooks/useCSSVariable/getVariableValue.d.ts +1 -0
- package/dist/module/hooks/useCSSVariable/getVariableValue.js +12 -0
- package/dist/module/hooks/useCSSVariable/getVariableValue.native.d.ts +1 -0
- package/dist/module/hooks/useCSSVariable/getVariableValue.native.js +2 -0
- package/dist/module/hooks/useCSSVariable/index.d.ts +1 -0
- package/dist/module/hooks/useCSSVariable/index.js +1 -0
- package/dist/module/hooks/useCSSVariable/useCSSVariable.d.ts +13 -0
- package/dist/module/hooks/useCSSVariable/useCSSVariable.js +56 -0
- package/dist/module/hooks/useResolveClassNames.d.ts +2 -0
- package/dist/module/hooks/useResolveClassNames.js +18 -0
- package/dist/module/hooks/useResolveClassNames.native.d.ts +2 -0
- package/dist/module/hooks/useResolveClassNames.native.js +22 -0
- package/dist/module/hooks/useUniwind.d.ts +5 -0
- package/dist/module/hooks/useUniwind.js +21 -0
- package/dist/module/hooks/useUniwindAccent.d.ts +1 -0
- package/dist/module/hooks/useUniwindAccent.js +6 -0
- package/dist/module/hooks/useUniwindAccent.native.d.ts +2 -0
- package/dist/module/hooks/useUniwindAccent.native.js +5 -0
- package/dist/module/index.d.ts +5 -0
- package/dist/module/index.js +3 -0
- package/dist/module/types.d.ts +21 -0
- package/dist/module/types.js +22 -0
- package/dist/module/utils/buildDtsFile.d.ts +1 -0
- package/dist/module/utils/buildDtsFile.js +22 -0
- package/dist/module/utils/stringifyThemes.d.ts +1 -0
- package/dist/module/utils/stringifyThemes.js +1 -0
- package/dist/module/vite/index.d.ts +9 -0
- package/dist/module/vite/index.js +1 -0
- package/dist/module/vite/vite.d.ts +8 -0
- package/dist/module/vite/vite.js +73 -0
- package/dist/shared/uniwind.BZIuaszw.cjs +11 -0
- package/dist/shared/uniwind.BgZDHdUR.cjs +81 -0
- package/dist/shared/uniwind.Bt3kqZo6.mjs +290 -0
- package/dist/shared/uniwind.CyoRUwOj.mjs +9 -0
- package/dist/shared/uniwind.D3fvrgEG.mjs +68 -0
- package/dist/shared/uniwind.D_6s2EM-.cjs +301 -0
- package/dist/vite/index.cjs +80 -0
- package/dist/vite/index.d.ts +9 -0
- package/dist/vite/index.mjs +74 -0
- package/metro/package.json +3 -0
- package/package.json +106 -0
- package/readme.md +71 -0
- package/src/components/index.ts +313 -0
- package/src/components/native/ActivityIndicator.tsx +19 -0
- package/src/components/native/Button.tsx +16 -0
- package/src/components/native/FlatList.tsx +28 -0
- package/src/components/native/Image.tsx +19 -0
- package/src/components/native/ImageBackground.tsx +21 -0
- package/src/components/native/InputAccessoryView.tsx +23 -0
- package/src/components/native/KeyboardAvoidingView.tsx +18 -0
- package/src/components/native/Modal.tsx +19 -0
- package/src/components/native/Pressable.tsx +31 -0
- package/src/components/native/RefreshControl.tsx +25 -0
- package/src/components/native/SafeAreaView.tsx +16 -0
- package/src/components/native/ScrollView.tsx +21 -0
- package/src/components/native/SectionList.tsx +25 -0
- package/src/components/native/Switch.tsx +28 -0
- package/src/components/native/Text.tsx +39 -0
- package/src/components/native/TextInput.tsx +52 -0
- package/src/components/native/TouchableHighlight.tsx +34 -0
- package/src/components/native/TouchableNativeFeedback.tsx +31 -0
- package/src/components/native/TouchableOpacity.tsx +31 -0
- package/src/components/native/TouchableWithoutFeedback.tsx +31 -0
- package/src/components/native/View.tsx +16 -0
- package/src/components/native/VirtualizedList.tsx +25 -0
- package/src/components/native/useStyle.ts +33 -0
- package/src/components/utils.ts +16 -0
- package/src/components/web/ActivityIndicator.tsx +18 -0
- package/src/components/web/Button.tsx +16 -0
- package/src/components/web/FlatList.tsx +20 -0
- package/src/components/web/Image.tsx +18 -0
- package/src/components/web/ImageBackground.tsx +19 -0
- package/src/components/web/KeyboardAvoidingView.tsx +15 -0
- package/src/components/web/Modal.tsx +14 -0
- package/src/components/web/Pressable.tsx +14 -0
- package/src/components/web/RefreshControl.tsx +14 -0
- package/src/components/web/SafeAreaView.tsx +14 -0
- package/src/components/web/ScrollView.tsx +15 -0
- package/src/components/web/SectionList.tsx +17 -0
- package/src/components/web/Switch.tsx +21 -0
- package/src/components/web/Text.tsx +14 -0
- package/src/components/web/TextInput.tsx +14 -0
- package/src/components/web/TouchableHighlight.tsx +18 -0
- package/src/components/web/TouchableNativeFeedback.tsx +2 -0
- package/src/components/web/TouchableOpacity.tsx +14 -0
- package/src/components/web/TouchableWithoutFeedback.tsx +14 -0
- package/src/components/web/View.tsx +14 -0
- package/src/components/web/VirtualizedList.tsx +17 -0
- package/src/components/web/index.ts +22 -0
- package/src/components/web/metro-injected.ts +1 -0
- package/src/components/web/rnw.ts +52 -0
- package/src/core/config/config.common.ts +98 -0
- package/src/core/config/config.native.ts +79 -0
- package/src/core/config/config.ts +64 -0
- package/src/core/config/index.ts +1 -0
- package/src/core/index.ts +1 -0
- package/src/core/listener.ts +59 -0
- package/src/core/logger.ts +15 -0
- package/src/core/native/index.ts +2 -0
- package/src/core/native/native-utils.ts +41 -0
- package/src/core/native/parsers/boxShadow.ts +7 -0
- package/src/core/native/parsers/fontVariant.ts +3 -0
- package/src/core/native/parsers/gradient.ts +39 -0
- package/src/core/native/parsers/index.ts +5 -0
- package/src/core/native/parsers/textShadow.ts +37 -0
- package/src/core/native/parsers/transforms.ts +64 -0
- package/src/core/native/runtime.ts +32 -0
- package/src/core/native/store.ts +238 -0
- package/src/core/types.ts +92 -0
- package/src/core/web/cssListener.ts +185 -0
- package/src/core/web/formatColor.ts +13 -0
- package/src/core/web/getWebStyles.ts +76 -0
- package/src/core/web/index.ts +4 -0
- package/src/core/web/parseCSSValue.ts +10 -0
- package/src/css/index.ts +32 -0
- package/src/css/insets.ts +73 -0
- package/src/css/processFunctions.ts +39 -0
- package/src/css/themes.ts +130 -0
- package/src/css/variants.ts +11 -0
- package/src/hoc/index.ts +1 -0
- package/src/hoc/types.ts +45 -0
- package/src/hoc/withUniwind.native.tsx +118 -0
- package/src/hoc/withUniwind.tsx +115 -0
- package/src/hoc/withUniwindUtils.ts +10 -0
- package/src/hooks/index.ts +4 -0
- package/src/hooks/useCSSVariable/getVariableValue.native.ts +3 -0
- package/src/hooks/useCSSVariable/getVariableValue.ts +19 -0
- package/src/hooks/useCSSVariable/index.ts +1 -0
- package/src/hooks/useCSSVariable/useCSSVariable.ts +89 -0
- package/src/hooks/useResolveClassNames.native.ts +29 -0
- package/src/hooks/useResolveClassNames.ts +26 -0
- package/src/hooks/useUniwind.ts +26 -0
- package/src/hooks/useUniwindAccent.native.ts +8 -0
- package/src/hooks/useUniwindAccent.ts +10 -0
- package/src/index.ts +5 -0
- package/src/metro/addMetaToStylesTemplate.ts +152 -0
- package/src/metro/compileVirtual.ts +74 -0
- package/src/metro/index.d.ts +15 -0
- package/src/metro/index.ts +1 -0
- package/src/metro/injectThemes.ts +23 -0
- package/src/metro/logger.ts +44 -0
- package/src/metro/metro-css-patches.ts +57 -0
- package/src/metro/metro-transformer.ts +99 -0
- package/src/metro/polyfillWeb.ts +14 -0
- package/src/metro/processor/color.ts +76 -0
- package/src/metro/processor/css.ts +541 -0
- package/src/metro/processor/functions.ts +199 -0
- package/src/metro/processor/index.ts +1 -0
- package/src/metro/processor/mq.ts +82 -0
- package/src/metro/processor/processor.ts +249 -0
- package/src/metro/processor/rn.ts +277 -0
- package/src/metro/processor/units.ts +58 -0
- package/src/metro/processor/var.ts +18 -0
- package/src/metro/resolvers.ts +101 -0
- package/src/metro/types.ts +74 -0
- package/src/metro/utils/common.ts +103 -0
- package/src/metro/utils/index.ts +2 -0
- package/src/metro/utils/serialize.ts +116 -0
- package/src/metro/withUniwindConfig.ts +60 -0
- package/src/types.ts +24 -0
- package/src/utils/buildDtsFile.ts +27 -0
- package/src/utils/stringifyThemes.ts +1 -0
- package/src/vite/index.d.ts +9 -0
- package/src/vite/index.ts +1 -0
- package/src/vite/vite.ts +86 -0
- package/types.d.ts +109 -0
- package/uniwind.css +262 -0
- package/vite/package.json +3 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { Logger } from '../logger'
|
|
2
|
+
import { addMissingSpaces, isNumber, isValidJSValue, pipe, roundToPrecision, smartSplit } from './common'
|
|
3
|
+
|
|
4
|
+
const parseStringValue = (value: string) => {
|
|
5
|
+
if (isValidJSValue(value)) {
|
|
6
|
+
return value
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
if (value.startsWith('function')) {
|
|
10
|
+
return value
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const tokens = smartSplit(addMissingSpaces(value))
|
|
14
|
+
const parsedTokens = tokens.map(token => {
|
|
15
|
+
// String literals
|
|
16
|
+
if (token.startsWith('"')) {
|
|
17
|
+
return token.replace(/"/g, '')
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Plain words
|
|
21
|
+
if (/^[a-z]+$/i.test(token.replace(/,/g, ''))) {
|
|
22
|
+
return token
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Numbers
|
|
26
|
+
if (isNumber(token)) {
|
|
27
|
+
return token
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Expressions that need to be wrapped with ${}
|
|
31
|
+
const endsWithComma = token.endsWith(',')
|
|
32
|
+
|
|
33
|
+
return [
|
|
34
|
+
'${',
|
|
35
|
+
endsWithComma ? token.slice(0, -1) : token,
|
|
36
|
+
'}',
|
|
37
|
+
endsWithComma ? ',' : '',
|
|
38
|
+
].join('')
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
return [
|
|
42
|
+
'`',
|
|
43
|
+
parsedTokens.join(' '),
|
|
44
|
+
'`',
|
|
45
|
+
].join('')
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export const serialize = (value: any): string => {
|
|
49
|
+
const typeOfValue = typeof value
|
|
50
|
+
|
|
51
|
+
switch (typeOfValue) {
|
|
52
|
+
case 'string':
|
|
53
|
+
return parseStringValue(value)
|
|
54
|
+
case 'symbol':
|
|
55
|
+
return String(value)
|
|
56
|
+
case 'number':
|
|
57
|
+
case 'bigint':
|
|
58
|
+
return String(roundToPrecision(value, 2))
|
|
59
|
+
case 'boolean':
|
|
60
|
+
return value.toString()
|
|
61
|
+
case 'object':
|
|
62
|
+
if (value === null) {
|
|
63
|
+
return 'null'
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (Array.isArray(value)) {
|
|
67
|
+
return [
|
|
68
|
+
'[',
|
|
69
|
+
value.map(serialize).join(', '),
|
|
70
|
+
']',
|
|
71
|
+
].join('')
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return [
|
|
75
|
+
'{',
|
|
76
|
+
Object.entries(value).map(([key, val]) => {
|
|
77
|
+
const serializedKey = isNumber(key) ? key : `"${key}"`
|
|
78
|
+
|
|
79
|
+
return `${serializedKey}: ${serialize(val)}`
|
|
80
|
+
}).join(', '),
|
|
81
|
+
'}',
|
|
82
|
+
].join('')
|
|
83
|
+
case 'undefined':
|
|
84
|
+
return 'undefined'
|
|
85
|
+
case 'function':
|
|
86
|
+
return ''
|
|
87
|
+
default:
|
|
88
|
+
typeOfValue satisfies never
|
|
89
|
+
return ''
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export const serializeJSObject = (obj: Record<string, any>, serializer: (key: string, value: string) => string) => {
|
|
94
|
+
const serializedObject = pipe(obj)(
|
|
95
|
+
Object.entries,
|
|
96
|
+
entries => entries.map(([key, value]) => serializer(key, serialize(value))),
|
|
97
|
+
entries => entries.join(','),
|
|
98
|
+
result => {
|
|
99
|
+
if (result === '') {
|
|
100
|
+
return ''
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return `${result},`
|
|
104
|
+
},
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
try {
|
|
108
|
+
// eslint-disable-next-line @typescript-eslint/no-implied-eval, no-new-func
|
|
109
|
+
new Function(`function validateJS() { const obj = ({ ${serializedObject} }) }`)
|
|
110
|
+
} catch {
|
|
111
|
+
Logger.error('Failed to serialize javascript object')
|
|
112
|
+
return ''
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
return serializedObject
|
|
116
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { MetroConfig } from 'metro-config'
|
|
2
|
+
import { cacheStore, patchMetroGraphToSupportUncachedModules } from './metro-css-patches'
|
|
3
|
+
import { nativeResolver, webResolver } from './resolvers'
|
|
4
|
+
import { Platform, UniwindConfig } from './types'
|
|
5
|
+
import { uniq } from './utils'
|
|
6
|
+
|
|
7
|
+
export const withUniwindConfig = <T extends MetroConfig>(
|
|
8
|
+
config: T,
|
|
9
|
+
uniwindConfig: UniwindConfig,
|
|
10
|
+
): T => {
|
|
11
|
+
uniwindConfig.themes = uniq([
|
|
12
|
+
'light',
|
|
13
|
+
'dark',
|
|
14
|
+
...(uniwindConfig.extraThemes ?? []),
|
|
15
|
+
])
|
|
16
|
+
|
|
17
|
+
patchMetroGraphToSupportUncachedModules()
|
|
18
|
+
|
|
19
|
+
if (typeof uniwindConfig === 'undefined') {
|
|
20
|
+
throw new Error('Uniwind: You need to pass second parameter to withUniwindConfig')
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
if (typeof uniwindConfig.cssEntryFile === 'undefined') {
|
|
24
|
+
throw new Error(
|
|
25
|
+
'Uniwind: You need to pass css css entry file to withUniwindConfig, e.g. withUniwindConfig(config, { cssEntryFile: "./global.css" })',
|
|
26
|
+
)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return {
|
|
30
|
+
...config,
|
|
31
|
+
cacheStores: [cacheStore],
|
|
32
|
+
transformerPath: require.resolve('./metro-transformer.cjs'),
|
|
33
|
+
transformer: {
|
|
34
|
+
...config.transformer,
|
|
35
|
+
uniwind: uniwindConfig,
|
|
36
|
+
},
|
|
37
|
+
resolver: {
|
|
38
|
+
...config.resolver,
|
|
39
|
+
sourceExts: [
|
|
40
|
+
...config.resolver?.sourceExts ?? [],
|
|
41
|
+
'css',
|
|
42
|
+
],
|
|
43
|
+
assetExts: config.resolver?.assetExts?.filter(
|
|
44
|
+
ext => ext !== 'css',
|
|
45
|
+
),
|
|
46
|
+
resolveRequest: (context, moduleName, platform) => {
|
|
47
|
+
const resolver = config.resolver?.resolveRequest ?? context.resolveRequest
|
|
48
|
+
const platformResolver = platform === Platform.Web ? webResolver : nativeResolver
|
|
49
|
+
const resolved = platformResolver({
|
|
50
|
+
context,
|
|
51
|
+
moduleName,
|
|
52
|
+
platform,
|
|
53
|
+
resolver,
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
return resolved
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
}
|
|
60
|
+
}
|
package/src/types.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export enum StyleDependency {
|
|
2
|
+
ColorScheme = 1,
|
|
3
|
+
Theme = 2,
|
|
4
|
+
Dimensions = 3,
|
|
5
|
+
Orientation = 4,
|
|
6
|
+
Insets = 5,
|
|
7
|
+
FontScale = 6,
|
|
8
|
+
Rtl = 7,
|
|
9
|
+
AdaptiveThemes = 8,
|
|
10
|
+
Variables = 9,
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const enum Orientation {
|
|
14
|
+
Portrait = 'portrait',
|
|
15
|
+
Landscape = 'landscape',
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const enum ColorScheme {
|
|
19
|
+
Light = 'light',
|
|
20
|
+
Dark = 'dark',
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
24
|
+
export interface UniwindConfig {}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import fs from 'fs'
|
|
2
|
+
import { name } from '../../package.json'
|
|
3
|
+
|
|
4
|
+
export const buildDtsFile = (dtsPath: string, stringifiedThemes: string) => {
|
|
5
|
+
const oldDtsContent = fs.existsSync(dtsPath)
|
|
6
|
+
? fs.readFileSync(dtsPath, 'utf-8')
|
|
7
|
+
: ''
|
|
8
|
+
const dtsContent = [
|
|
9
|
+
`// NOTE: This file is generated by ${name} and it should not be edited manually.`,
|
|
10
|
+
`/// <reference types="${name}/types" />`,
|
|
11
|
+
'',
|
|
12
|
+
`declare module '${name}' {`,
|
|
13
|
+
` export interface UniwindConfig {`,
|
|
14
|
+
` themes: readonly ${stringifiedThemes}`,
|
|
15
|
+
` }`,
|
|
16
|
+
`}`,
|
|
17
|
+
'',
|
|
18
|
+
`export {}`,
|
|
19
|
+
'',
|
|
20
|
+
].join('\n')
|
|
21
|
+
|
|
22
|
+
if (oldDtsContent === dtsContent) {
|
|
23
|
+
return
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
fs.writeFileSync(dtsPath, dtsContent)
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const stringifyThemes = (themes: Array<string> = []) => `[${themes.map((theme) => `'${theme}'`).join(', ')}]`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './vite'
|
package/src/vite/vite.ts
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { normalizePath } from '@tailwindcss/node'
|
|
2
|
+
import path from 'path'
|
|
3
|
+
import type { Plugin } from 'vite'
|
|
4
|
+
import { name as UNIWIND_PACKAGE_NAME } from '../../package.json'
|
|
5
|
+
import { buildCSS } from '../css'
|
|
6
|
+
import { processFunctions } from '../css/processFunctions'
|
|
7
|
+
import { uniq } from '../metro/utils'
|
|
8
|
+
import { buildDtsFile } from '../utils/buildDtsFile'
|
|
9
|
+
import { stringifyThemes } from '../utils/stringifyThemes'
|
|
10
|
+
|
|
11
|
+
type UniwindConfig = {
|
|
12
|
+
cssEntryFile: string
|
|
13
|
+
extraThemes?: Array<string>
|
|
14
|
+
dtsFile?: string
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const dirname = typeof __dirname !== 'undefined' ? __dirname : import.meta.dirname
|
|
18
|
+
const componentPath = path.resolve(
|
|
19
|
+
dirname,
|
|
20
|
+
'../module/components/web/index.js',
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
export const uniwind = ({
|
|
24
|
+
cssEntryFile,
|
|
25
|
+
extraThemes,
|
|
26
|
+
dtsFile = 'uniwind-types.d.ts',
|
|
27
|
+
}: UniwindConfig): Plugin => {
|
|
28
|
+
const themes = uniq([
|
|
29
|
+
'light',
|
|
30
|
+
'dark',
|
|
31
|
+
...(extraThemes ?? []),
|
|
32
|
+
])
|
|
33
|
+
const stringifiedThemes = stringifyThemes(themes)
|
|
34
|
+
|
|
35
|
+
return {
|
|
36
|
+
name: 'uniwind',
|
|
37
|
+
config: () => ({
|
|
38
|
+
css: {
|
|
39
|
+
transformer: 'lightningcss',
|
|
40
|
+
lightningcss: {
|
|
41
|
+
visitor: {
|
|
42
|
+
Function: processFunctions,
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
optimizeDeps: {
|
|
47
|
+
exclude: [UNIWIND_PACKAGE_NAME, 'react-native'],
|
|
48
|
+
},
|
|
49
|
+
resolve: {
|
|
50
|
+
alias: [
|
|
51
|
+
{
|
|
52
|
+
find: /^react-native$/,
|
|
53
|
+
replacement: componentPath,
|
|
54
|
+
customResolver: {
|
|
55
|
+
resolveId(_, importer) {
|
|
56
|
+
// Check if import comes from uniwind
|
|
57
|
+
if (importer !== undefined && normalizePath(importer).includes(`${UNIWIND_PACKAGE_NAME}/dist`)) {
|
|
58
|
+
return this.resolve('react-native-web')
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return componentPath
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
},
|
|
67
|
+
}),
|
|
68
|
+
transform: (code, id) => {
|
|
69
|
+
const normalizedId = normalizePath(id)
|
|
70
|
+
|
|
71
|
+
if (normalizedId.includes(`${UNIWIND_PACKAGE_NAME}/dist`) && normalizedId.includes('config/config.js')) {
|
|
72
|
+
return {
|
|
73
|
+
code: `${code}Uniwind.__reinit(() => ({}), ${stringifiedThemes})`,
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
buildStart: async () => {
|
|
78
|
+
await buildCSS(themes, cssEntryFile)
|
|
79
|
+
buildDtsFile(dtsFile, stringifiedThemes)
|
|
80
|
+
},
|
|
81
|
+
generateBundle: async () => {
|
|
82
|
+
await buildCSS(themes, cssEntryFile)
|
|
83
|
+
buildDtsFile(dtsFile, stringifiedThemes)
|
|
84
|
+
},
|
|
85
|
+
}
|
|
86
|
+
}
|
package/types.d.ts
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ScrollViewProps,
|
|
3
|
+
ScrollViewPropsAndroid,
|
|
4
|
+
ScrollViewPropsIOS,
|
|
5
|
+
Touchable,
|
|
6
|
+
VirtualizedListProps,
|
|
7
|
+
} from 'react-native'
|
|
8
|
+
|
|
9
|
+
declare module '@react-native/virtualized-lists' {
|
|
10
|
+
export interface VirtualizedListWithoutRenderItemProps<ItemT> extends ScrollViewProps {
|
|
11
|
+
ListFooterComponentClassName?: string
|
|
12
|
+
ListHeaderComponentClassName?: string
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare module 'react-native' {
|
|
17
|
+
interface FlatListProps<ItemT> extends VirtualizedListProps<ItemT> {
|
|
18
|
+
columnWrapperClassName?: string
|
|
19
|
+
contentContainerClassName?: string
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface ImageBackgroundProps extends ImagePropsBase {
|
|
23
|
+
imageClassName?: string
|
|
24
|
+
tintColorClassName?: string
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
interface ImagePropsBase {
|
|
28
|
+
className?: string
|
|
29
|
+
tintColorClassName?: string
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
interface InputAccessoryViewProps {
|
|
33
|
+
className?: string
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
interface KeyboardAvoidingViewProps extends ViewProps {
|
|
37
|
+
contentContainerClassName?: string
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
interface ScrollViewProps extends ViewProps, ScrollViewPropsIOS, ScrollViewPropsAndroid, Touchable {
|
|
41
|
+
contentContainerClassName?: string
|
|
42
|
+
endFillColorClassName?: string
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
interface SectionListProps<ItemT> extends VirtualizedListProps<ItemT> {
|
|
46
|
+
contentContainerClassName?: string
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
interface SwitchProps {
|
|
50
|
+
className?: never
|
|
51
|
+
ios_backgroundColorClassName?: string
|
|
52
|
+
thumbColorClassName?: string
|
|
53
|
+
trackColorOnClassName?: string
|
|
54
|
+
trackColorOffClassName?: string
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
interface TextProps {
|
|
58
|
+
className?: string
|
|
59
|
+
selectionColorClassName?: string
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
interface TouchableWithoutFeedbackProps {
|
|
63
|
+
className?: string
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
interface ViewProps {
|
|
67
|
+
className?: string
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
interface PressableProps {
|
|
71
|
+
className?: string
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
interface TextInputProps {
|
|
75
|
+
className?: string
|
|
76
|
+
cursorColorClassName?: string
|
|
77
|
+
underlineColorAndroidClassName?: string
|
|
78
|
+
placeholderTextColorClassName?: string
|
|
79
|
+
selectionColorClassName?: string
|
|
80
|
+
selectionHandleColorClassName?: string
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
interface RefreshControlProps {
|
|
84
|
+
colorsClassName?: string
|
|
85
|
+
progressBackgroundColorClassName?: string
|
|
86
|
+
tintColorClassName?: string
|
|
87
|
+
titleColorClassName?: string
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
interface TouchableHighlightProps {
|
|
91
|
+
underlayColorClassName?: string
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
interface ActivityIndicatorProps {
|
|
95
|
+
colorClassName?: string
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
interface ModalBaseProps {
|
|
99
|
+
backdropColorClassName?: string
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
interface ButtonProps {
|
|
103
|
+
colorClassName?: string
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
interface InputAccessoryViewProps {
|
|
107
|
+
backgroundColorClassName?: string
|
|
108
|
+
}
|
|
109
|
+
}
|
package/uniwind.css
ADDED
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
@custom-variant ios (@media ios);
|
|
2
|
+
@custom-variant android (@media android);
|
|
3
|
+
@custom-variant web (html &);
|
|
4
|
+
@custom-variant native (@media native);
|
|
5
|
+
|
|
6
|
+
@utility h-screen-safe {
|
|
7
|
+
height: calc(100vh - (env(safe-area-inset-top) + env(safe-area-inset-bottom)));
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@utility m-safe {
|
|
11
|
+
margin-top: env(safe-area-inset-top);
|
|
12
|
+
margin-bottom: env(safe-area-inset-bottom);
|
|
13
|
+
margin-left: env(safe-area-inset-left);
|
|
14
|
+
margin-right: env(safe-area-inset-right);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@utility m-safe-or-* {
|
|
18
|
+
margin-top: max(env(safe-area-inset-top), --spacing(--value(integer)));
|
|
19
|
+
margin-top: max(env(safe-area-inset-top), --value([length]));
|
|
20
|
+
margin-bottom: max(env(safe-area-inset-bottom), --spacing(--value(integer)));
|
|
21
|
+
margin-bottom: max(env(safe-area-inset-bottom), --value([length]));
|
|
22
|
+
margin-left: max(env(safe-area-inset-left), --spacing(--value(integer)));
|
|
23
|
+
margin-left: max(env(safe-area-inset-left), --value([length]));
|
|
24
|
+
margin-right: max(env(safe-area-inset-right), --spacing(--value(integer)));
|
|
25
|
+
margin-right: max(env(safe-area-inset-right), --value([length]));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@utility m-safe-offset-* {
|
|
29
|
+
margin-top: calc(env(safe-area-inset-top) + --spacing(--value(integer)));
|
|
30
|
+
margin-top: calc(env(safe-area-inset-top) + --value([length]));
|
|
31
|
+
margin-bottom: calc(env(safe-area-inset-bottom) + --spacing(--value(integer)));
|
|
32
|
+
margin-bottom: calc(env(safe-area-inset-bottom) + --value([length]));
|
|
33
|
+
margin-left: calc(env(safe-area-inset-left) + --spacing(--value(integer)));
|
|
34
|
+
margin-left: calc(env(safe-area-inset-left) + --value([length]));
|
|
35
|
+
margin-right: calc(env(safe-area-inset-right) + --spacing(--value(integer)));
|
|
36
|
+
margin-right: calc(env(safe-area-inset-right) + --value([length]));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@utility mx-safe {
|
|
40
|
+
margin-left: env(safe-area-inset-left);
|
|
41
|
+
margin-right: env(safe-area-inset-right);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@utility mx-safe-or-* {
|
|
45
|
+
margin-left: max(env(safe-area-inset-left), --spacing(--value(integer)));
|
|
46
|
+
margin-left: max(env(safe-area-inset-left), --value([length]));
|
|
47
|
+
margin-right: max(env(safe-area-inset-right), --spacing(--value(integer)));
|
|
48
|
+
margin-right: max(env(safe-area-inset-right), --value([length]));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@utility mx-safe-offset-* {
|
|
52
|
+
margin-left: calc(env(safe-area-inset-left) + --spacing(--value(integer)));
|
|
53
|
+
margin-left: calc(env(safe-area-inset-left) + --value([length]));
|
|
54
|
+
margin-right: calc(env(safe-area-inset-right) + --spacing(--value(integer)));
|
|
55
|
+
margin-right: calc(env(safe-area-inset-right) + --value([length]));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@utility my-safe {
|
|
59
|
+
margin-top: env(safe-area-inset-top);
|
|
60
|
+
margin-bottom: env(safe-area-inset-bottom);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@utility my-safe-or-* {
|
|
64
|
+
margin-top: max(env(safe-area-inset-top), --spacing(--value(integer)));
|
|
65
|
+
margin-top: max(env(safe-area-inset-top), --value([length]));
|
|
66
|
+
margin-bottom: max(env(safe-area-inset-bottom), --spacing(--value(integer)));
|
|
67
|
+
margin-bottom: max(env(safe-area-inset-bottom), --value([length]));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@utility my-safe-offset-* {
|
|
71
|
+
margin-top: calc(env(safe-area-inset-top) + --spacing(--value(integer)));
|
|
72
|
+
margin-top: calc(env(safe-area-inset-top) + --value([length]));
|
|
73
|
+
margin-bottom: calc(env(safe-area-inset-bottom) + --spacing(--value(integer)));
|
|
74
|
+
margin-bottom: calc(env(safe-area-inset-bottom) + --value([length]));
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@utility mt-safe {
|
|
78
|
+
margin-top: env(safe-area-inset-top);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@utility mt-safe-or-* {
|
|
82
|
+
margin-top: max(env(safe-area-inset-top), --spacing(--value(integer)));
|
|
83
|
+
margin-top: max(env(safe-area-inset-top), --value([length]));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@utility mt-safe-offset-* {
|
|
87
|
+
margin-top: calc(env(safe-area-inset-top) + --spacing(--value(integer)));
|
|
88
|
+
margin-top: calc(env(safe-area-inset-top) + --value([length]));
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@utility mb-safe {
|
|
92
|
+
margin-bottom: env(safe-area-inset-bottom);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
@utility mb-safe-or-* {
|
|
96
|
+
margin-bottom: max(env(safe-area-inset-bottom), --spacing(--value(integer)));
|
|
97
|
+
margin-bottom: max(env(safe-area-inset-bottom), --value([length]));
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
@utility mb-safe-offset-* {
|
|
101
|
+
margin-bottom: calc(env(safe-area-inset-bottom) + --spacing(--value(integer)));
|
|
102
|
+
margin-bottom: calc(env(safe-area-inset-bottom) + --value([length]));
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
@utility ml-safe {
|
|
106
|
+
margin-left: env(safe-area-inset-left);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@utility ml-safe-or-* {
|
|
110
|
+
margin-left: max(env(safe-area-inset-left), --spacing(--value(integer)));
|
|
111
|
+
margin-left: max(env(safe-area-inset-left), --value([length]));
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@utility ml-safe-offset-* {
|
|
115
|
+
margin-left: calc(env(safe-area-inset-left) + --spacing(--value(integer)));
|
|
116
|
+
margin-left: calc(env(safe-area-inset-left) + --value([length]));
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
@utility mr-safe {
|
|
120
|
+
margin-right: env(safe-area-inset-right);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@utility mr-safe-or-* {
|
|
124
|
+
margin-right: max(env(safe-area-inset-right), --spacing(--value(integer)));
|
|
125
|
+
margin-right: max(env(safe-area-inset-right), --value([length]));
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
@utility mr-safe-offset-* {
|
|
129
|
+
margin-right: calc(env(safe-area-inset-right) + --spacing(--value(integer)));
|
|
130
|
+
margin-right: calc(env(safe-area-inset-right) + --value([length]));
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
@utility p-safe {
|
|
134
|
+
padding-top: env(safe-area-inset-top);
|
|
135
|
+
padding-bottom: env(safe-area-inset-bottom);
|
|
136
|
+
padding-left: env(safe-area-inset-left);
|
|
137
|
+
padding-right: env(safe-area-inset-right);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
@utility p-safe-or-* {
|
|
141
|
+
padding-top: max(env(safe-area-inset-top), --spacing(--value(integer)));
|
|
142
|
+
padding-top: max(env(safe-area-inset-top), --value([length]));
|
|
143
|
+
padding-bottom: max(env(safe-area-inset-bottom), --spacing(--value(integer)));
|
|
144
|
+
padding-bottom: max(env(safe-area-inset-bottom), --value([length]));
|
|
145
|
+
padding-left: max(env(safe-area-inset-left), --spacing(--value(integer)));
|
|
146
|
+
padding-left: max(env(safe-area-inset-left), --value([length]));
|
|
147
|
+
padding-right: max(env(safe-area-inset-right), --spacing(--value(integer)));
|
|
148
|
+
padding-right: max(env(safe-area-inset-right), --value([length]));
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
@utility p-safe-offset-* {
|
|
152
|
+
padding-top: calc(env(safe-area-inset-top) + --spacing(--value(integer)));
|
|
153
|
+
padding-top: calc(env(safe-area-inset-top) + --value([length]));
|
|
154
|
+
padding-bottom: calc(env(safe-area-inset-bottom) + --spacing(--value(integer)));
|
|
155
|
+
padding-bottom: calc(env(safe-area-inset-bottom) + --value([length]));
|
|
156
|
+
padding-left: calc(env(safe-area-inset-left) + --spacing(--value(integer)));
|
|
157
|
+
padding-left: calc(env(safe-area-inset-left) + --value([length]));
|
|
158
|
+
padding-right: calc(env(safe-area-inset-right) + --spacing(--value(integer)));
|
|
159
|
+
padding-right: calc(env(safe-area-inset-right) + --value([length]));
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
@utility px-safe {
|
|
163
|
+
padding-left: env(safe-area-inset-left);
|
|
164
|
+
padding-right: env(safe-area-inset-right);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
@utility px-safe-or-* {
|
|
168
|
+
padding-left: max(env(safe-area-inset-left), --spacing(--value(integer)));
|
|
169
|
+
padding-left: max(env(safe-area-inset-left), --value([length]));
|
|
170
|
+
padding-right: max(env(safe-area-inset-right), --spacing(--value(integer)));
|
|
171
|
+
padding-right: max(env(safe-area-inset-right), --value([length]));
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
@utility px-safe-offset-* {
|
|
175
|
+
padding-left: calc(env(safe-area-inset-left) + --spacing(--value(integer)));
|
|
176
|
+
padding-left: calc(env(safe-area-inset-left) + --value([length]));
|
|
177
|
+
padding-right: calc(env(safe-area-inset-right) + --spacing(--value(integer)));
|
|
178
|
+
padding-right: calc(env(safe-area-inset-right) + --value([length]));
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
@utility py-safe {
|
|
182
|
+
padding-top: env(safe-area-inset-top);
|
|
183
|
+
padding-bottom: env(safe-area-inset-bottom);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
@utility py-safe-or-* {
|
|
187
|
+
padding-top: max(env(safe-area-inset-top), --spacing(--value(integer)));
|
|
188
|
+
padding-top: max(env(safe-area-inset-top), --value([length]));
|
|
189
|
+
padding-bottom: max(env(safe-area-inset-bottom), --spacing(--value(integer)));
|
|
190
|
+
padding-bottom: max(env(safe-area-inset-bottom), --value([length]));
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
@utility py-safe-offset-* {
|
|
194
|
+
padding-top: calc(env(safe-area-inset-top) + --spacing(--value(integer)));
|
|
195
|
+
padding-top: calc(env(safe-area-inset-top) + --value([length]));
|
|
196
|
+
padding-bottom: calc(env(safe-area-inset-bottom) + --spacing(--value(integer)));
|
|
197
|
+
padding-bottom: calc(env(safe-area-inset-bottom) + --value([length]));
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
@utility pt-safe {
|
|
201
|
+
padding-top: env(safe-area-inset-top);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
@utility pt-safe-or-* {
|
|
205
|
+
padding-top: max(env(safe-area-inset-top), --spacing(--value(integer)));
|
|
206
|
+
padding-top: max(env(safe-area-inset-top), --value([length]));
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
@utility pt-safe-offset-* {
|
|
210
|
+
padding-top: calc(env(safe-area-inset-top) + --spacing(--value(integer)));
|
|
211
|
+
padding-top: calc(env(safe-area-inset-top) + --value([length]));
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
@utility pb-safe {
|
|
215
|
+
padding-bottom: env(safe-area-inset-bottom);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
@utility pb-safe-or-* {
|
|
219
|
+
padding-bottom: max(env(safe-area-inset-bottom), --spacing(--value(integer)));
|
|
220
|
+
padding-bottom: max(env(safe-area-inset-bottom), --value([length]));
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
@utility pb-safe-offset-* {
|
|
224
|
+
padding-bottom: calc(env(safe-area-inset-bottom) + --spacing(--value(integer)));
|
|
225
|
+
padding-bottom: calc(env(safe-area-inset-bottom) + --value([length]));
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
@utility pl-safe {
|
|
229
|
+
padding-left: env(safe-area-inset-left);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
@utility pl-safe-or-* {
|
|
233
|
+
padding-left: max(env(safe-area-inset-left), --spacing(--value(integer)));
|
|
234
|
+
padding-left: max(env(safe-area-inset-left), --value([length]));
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
@utility pl-safe-offset-* {
|
|
238
|
+
padding-left: calc(env(safe-area-inset-left) + --spacing(--value(integer)));
|
|
239
|
+
padding-left: calc(env(safe-area-inset-left) + --value([length]));
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
@utility pr-safe {
|
|
243
|
+
padding-right: env(safe-area-inset-right);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
@utility pr-safe-or-* {
|
|
247
|
+
padding-right: max(env(safe-area-inset-right), --spacing(--value(integer)));
|
|
248
|
+
padding-right: max(env(safe-area-inset-right), --value([length]));
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
@utility pr-safe-offset-* {
|
|
252
|
+
padding-right: calc(env(safe-area-inset-right) + --spacing(--value(integer)));
|
|
253
|
+
padding-right: calc(env(safe-area-inset-right) + --value([length]));
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
@custom-variant light (&:where(.light, .light *));
|
|
257
|
+
@custom-variant dark (&:where(.dark, .dark *));
|
|
258
|
+
@custom-variant premium (&:where(.premium, .premium *));
|
|
259
|
+
|
|
260
|
+
@theme {
|
|
261
|
+
--color-background: unset;
|
|
262
|
+
}
|