aport-tools 4.0.31 → 4.0.33
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.esm.js +3 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
/*! aport-tools v4.0.
|
1
|
+
/*! aport-tools v4.0.33 | ISC */
|
2
2
|
import React, { createContext, useState, useEffect, useContext, useMemo } from 'react';
|
3
3
|
import { Appearance, StyleSheet, View, Text, Switch, TouchableOpacity, Platform } from 'react-native';
|
4
4
|
import { useAsyncStorage } from '@react-native-async-storage/async-storage';
|
5
|
-
import
|
5
|
+
import Animated, { useSharedValue, useAnimatedStyle, withSpring } from 'react-native-reanimated';
|
6
6
|
|
7
7
|
function _arrayLikeToArray(r, a) {
|
8
8
|
(null == a || a > r.length) && (a = r.length);
|
@@ -769,7 +769,7 @@ var Card = function Card(_ref) {
|
|
769
769
|
onPressIn: handlePressIn,
|
770
770
|
onPressOut: handlePressOut,
|
771
771
|
style: cardStyles
|
772
|
-
}, /*#__PURE__*/React.createElement(
|
772
|
+
}, /*#__PURE__*/React.createElement(Animated.View, {
|
773
773
|
style: animatedStyle
|
774
774
|
}, children))) : (/*#__PURE__*/React.createElement(View, {
|
775
775
|
style: cardStyles
|
package/dist/index.esm.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../src/styles/colors.ts","../src/theme/ThemeContext.tsx","../src/theme/ThemeToggle.tsx","../src/components/Button.tsx","../src/cards/Card.tsx"],"sourcesContent":["// src/styles/colors.ts\n\nexport interface RGB {\n r: number;\n g: number;\n b: number;\n}\n\nexport interface Color {\n hex: string;\n rgb: RGB;\n}\n\nexport interface ThemeColors {\n primary: Color;\n secondary: Color;\n background: Color;\n text: Color;\n textButton: Color;\n // Add more categories as needed\n}\n\nexport const lightTheme: ThemeColors = {\n primary: {\n hex: '#1A73E8',\n rgb: { r: 26, g: 115, b: 232 },\n },\n secondary: {\n hex: '#F0F6FF',\n rgb: { r: 240, g: 246, b: 255 },\n },\n background: {\n hex: '#FFFFFF',\n rgb: { r: 255, g: 255, b: 255 },\n },\n text: {\n hex: '#000000',\n rgb: { r: 0, g: 0, b: 0 },\n },\n textButton: {\n hex: '#FFFFFF',\n rgb: { r: 255, g: 255, b: 255 },\n },\n};\n\nexport const darkTheme: ThemeColors = {\n primary: {\n hex: '#BB86FC',\n rgb: { r: 187, g: 134, b: 252 },\n },\n secondary: {\n hex: '#03DAC6',\n rgb: { r: 3, g: 218, b: 198 },\n },\n background: {\n hex: '#121212',\n rgb: { r: 18, g: 18, b: 18 },\n },\n text: {\n hex: '#FFFFFF',\n rgb: { r: 255, g: 255, b: 255 },\n },\n textButton: {\n hex: '#FFFFFF',\n rgb: { r: 255, g: 255, b: 255 },\n },\n // Add more categories as needed\n};\n","import React, { createContext, useState, useEffect, ReactNode } from 'react';\nimport { Appearance, ColorSchemeName } from 'react-native';\nimport { useAsyncStorage } from '@react-native-async-storage/async-storage'; // Import useAsyncStorage\nimport { lightTheme, darkTheme } from '../styles/colors';\nimport { Theme } from '../styles/theme';\n\n/**\n * Interface for the properties provided by ThemeContext.\n */\ninterface ThemeContextProps {\n /**\n * The current theme, containing color definitions.\n */\n theme: Theme;\n\n /**\n * Function to toggle between light and dark themes.\n */\n toggleTheme: () => void;\n}\n\n/**\n * React context for managing theme-related data and functions.\n */\nexport const ThemeContext = createContext<ThemeContextProps>({\n theme: { colors: lightTheme },\n toggleTheme: () => {},\n});\n\n/**\n * Props for the ThemeProvider component.\n */\ninterface ThemeProviderProps {\n /**\n * Child components that will have access to the theme context.\n */\n children: ReactNode;\n\n /**\n * Optional initial theme. Defaults to system preference if not provided.\n */\n initialTheme?: 'light' | 'dark';\n}\n\n/**\n * ThemeProvider component that manages and provides theme data to its children.\n *\n * @param children - The child components that will consume the theme context.\n * @param initialTheme - Optional prop to set the initial theme.\n */\n\nexport const ThemeProvider: React.FC<ThemeProviderProps> = ({ children, initialTheme }) => {\n const [colorScheme, setColorScheme] = useState<ColorSchemeName | null>(null);\n \n // Use useAsyncStorage hook for managing the theme storage\n const { getItem, setItem } = useAsyncStorage('theme');\n\n useEffect(() => {\n const loadTheme = async () => {\n try {\n // const storedTheme = await getItem();\n // if (storedTheme === 'dark' || storedTheme === 'light') {\n // setColorScheme(storedTheme);\n //} \n if (initialTheme) {\n setColorScheme(initialTheme);\n } else {\n const systemTheme = Appearance.getColorScheme();\n setColorScheme(systemTheme);\n }\n } catch (error) {\n console.error('Failed to load theme.', error);\n setColorScheme(Appearance.getColorScheme());\n }\n };\n\n loadTheme();\n\n const subscription = Appearance.addChangeListener(({ colorScheme }) => {\n if (!colorScheme) return; // Prevent setting null\n setColorScheme(colorScheme);\n });\n\n return () => subscription.remove();\n }, [initialTheme, getItem]);\n\n const toggleTheme = async () => {\n try {\n const newTheme = colorScheme === 'dark' ? 'light' : 'dark';\n setColorScheme(newTheme);\n await setItem(newTheme); // Use setItem from useAsyncStorage\n } catch (error) {\n console.error('Failed to toggle theme.', error);\n }\n };\n\n const theme: Theme = {\n colors: colorScheme === 'dark' ? darkTheme : lightTheme,\n };\n\n return (\n <ThemeContext.Provider value={{ theme, toggleTheme }}>\n {children}\n </ThemeContext.Provider>\n );\n};\n","import React, { useContext } from 'react';\nimport { Switch, View, Text, StyleSheet } from 'react-native';\nimport { ThemeContext } from './ThemeContext';\nimport { darkTheme, lightTheme } from '../styles/colors';\n\nconst ThemeToggle: React.FC = () => {\n const { theme, toggleTheme } = useContext(ThemeContext);\n const isDarkMode = theme.colors === darkTheme;\n\n return (\n <View style={styles.container}>\n <Text style={[styles.text, { color: theme.colors.text.hex }]}>Dark Mode</Text>\n <Switch\n value={isDarkMode}\n onValueChange={toggleTheme}\n trackColor={{ false: lightTheme.secondary.hex, true: darkTheme.primary.hex }}\n thumbColor={isDarkMode ? darkTheme.secondary.hex : lightTheme.primary.hex}\n />\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n marginTop: 20,\n flexDirection: 'row',\n alignItems: 'center',\n },\n text: {\n marginRight: 10,\n fontSize: 16,\n },\n});\n\nexport default ThemeToggle;\n","// src/components/Button.tsx\n\nimport React, { useMemo, useContext } from 'react';\nimport { Text, ViewStyle, StyleSheet, TouchableOpacity } from 'react-native';\nimport { ThemeContext } from '../theme/ThemeContext';\nimport { ThemeColors } from '../styles/colors';\n\n/**\n * Interface for the props that the Button component accepts.\n */\ninterface ButtonProps {\n /**\n * If true, the button is disabled and not pressable.\n */\n disabled?: boolean;\n\n /**\n * If true, the button expands to full width of its container.\n */\n isFullWidth?: boolean;\n\n /**\n * Text content of the button.\n */\n children?: string;\n\n /**\n * Function to call when the button is pressed.\n */\n onPress?: () => void;\n\n /**\n * If true, the button has rounded corners.\n */\n rounded?: boolean;\n\n /**\n * Custom border radius value. Overrides the `rounded` prop if provided.\n */\n borderRadius?: number;\n\n /**\n * Specifies the button type for styling. Can be 'submit', 'button', or 'cancel'.\n */\n type?: 'submit' | 'button' | 'cancel';\n}\n\n/**\n * Determines the styles based on the button type and whether it is disabled.\n *\n * @param type - The type of the button ('submit', 'button', 'cancel').\n * @param disabled - Whether the button is disabled.\n * @param themeColors - The theme colors.\n * @returns The computed style for the button.\n */\nfunction typeStyles(\n type?: string,\n disabled?: boolean,\n themeColors?: ThemeColors\n): ViewStyle {\n switch (type) {\n case 'submit':\n return {\n backgroundColor: `rgba(${themeColors?.primary.rgb.r}, ${themeColors?.primary.rgb.g}, ${themeColors?.primary.rgb.b}, ${\n disabled ? 0.5 : 1\n })`,\n borderWidth: 2,\n borderColor: themeColors?.primary.hex,\n };\n case 'button':\n return {\n backgroundColor: themeColors?.primary.hex,\n borderColor: themeColors?.secondary.hex,\n opacity: disabled ? 0.5 : 1,\n borderWidth: 2,\n };\n case 'cancel':\n return {\n backgroundColor: themeColors?.background.hex,\n borderWidth: 0,\n };\n default:\n return {};\n }\n}\n\n/**\n * Button component that adapts its styles based on the current theme.\n * Supports dynamic styling, full-width option, rounded corners, and different types.\n *\n * @param disabled - If true, the button is disabled and not pressable.\n * @param isFullWidth - If true, the button expands to full width of its container.\n * @param children - Text content of the button.\n * @param onPress - Function to call when the button is pressed.\n * @param rounded - If true, the button has rounded corners.\n * @param borderRadius - Custom border radius value. Overrides the `rounded` prop if provided.\n * @param type - Specifies the button type for styling ('submit', 'button', 'cancel').\n */\nexport const Button: React.FC<ButtonProps> = ({\n children,\n disabled = false,\n type = 'button',\n rounded = true,\n borderRadius = 30,\n isFullWidth = false,\n onPress,\n}) => {\n const { theme } = useContext(ThemeContext);\n const { colors } = theme;\n\n const computedStyles = useMemo(() => {\n return StyleSheet.flatten([\n styles.button,\n typeStyles(type, disabled, colors),\n rounded && { borderRadius },\n isFullWidth && { width: '100%' },\n disabled && styles.disabled,\n ]);\n }, [type, disabled, rounded, borderRadius, isFullWidth, colors]);\n\n const textColor = useMemo(() => {\n return { color: colors.textButton.hex };\n }, [type, colors]);\n\n return (\n <TouchableOpacity\n style={computedStyles as ViewStyle}\n disabled={disabled}\n onPress={onPress}\n activeOpacity={0.7}\n >\n <Text style={textColor}>\n {Array.isArray(children) ? children.join('').toUpperCase() : children?.toUpperCase()}\n </Text>\n </TouchableOpacity>\n );\n};\n\nconst styles = StyleSheet.create({\n button: {\n justifyContent: 'center',\n alignItems: 'center',\n paddingVertical: 10,\n paddingHorizontal: 20,\n },\n disabled: {\n opacity: 0.6,\n },\n});\n\n","// src/cards/Card.tsx\n\nimport React, { useContext } from 'react';\nimport {\n View,\n StyleSheet,\n StyleProp,\n ViewStyle,\n Platform,\n TouchableOpacity,\n GestureResponderEvent,\n} from 'react-native';\nimport { ThemeContext } from '../theme/ThemeContext';\nimport { useAnimated, useAnimatedStyle, useSharedValue, withSpring } from '../defaults/reanimatedWrapper';\n\n\n/**\n * Interface for the props that the Card component accepts.\n */\ninterface CardProps {\n /**\n * Content to be rendered inside the Card.\n */\n children: React.ReactNode;\n\n /**\n * Style to be applied to the Card container.\n */\n style?: StyleProp<ViewStyle>;\n\n /**\n * Function to call when the Card is pressed.\n */\n onPress?: (event: GestureResponderEvent) => void;\n\n /**\n * Whether the Card is pressable. Defaults to false.\n */\n pressable?: boolean;\n\n /**\n * Border radius of the Card. Defaults to 12.\n */\n borderRadius?: number;\n\n /**\n * Elevation of the Card (Android only).\n */\n elevation?: number;\n\n /**\n * Shadow properties for iOS.\n */\n shadowProps?: {\n shadowColor?: string;\n shadowOffset?: { width: number; height: number };\n shadowOpacity?: number;\n shadowRadius?: number;\n };\n}\n\n/**\n * Card component that adapts its styles based on the current theme.\n * Supports dynamic styling, shadows, and press animations.\n *\n * @param children - The content to be displayed inside the Card.\n * @param style - Additional styles to apply to the Card.\n * @param onPress - Function to execute when the Card is pressed.\n * @param pressable - Determines if the Card is pressable. Defaults to false.\n * @param borderRadius - Border radius of the Card. Defaults to 12.\n * @param elevation - Elevation for Android shadow. Overrides default.\n * @param shadowProps - Custom shadow properties for iOS. Overrides defaults.\n */\nexport const Card: React.FC<CardProps> = ({\n children,\n style,\n onPress,\n pressable = false,\n borderRadius = 12,\n elevation = 4,\n shadowProps = {},\n }) => {\n const { theme } = useContext(ThemeContext);\n const { colors } = theme;\n \n // Animation state for pressable effect\n const scale = useSharedValue(1);\n \n const animatedStyle = useAnimatedStyle(() => ({\n transform: [{ scale: scale.value }],\n }));\n \n const handlePressIn = () => {\n scale.value = withSpring(0.95);\n };\n \n const handlePressOut = () => {\n scale.value = withSpring(1);\n };\n \n // Default shadow styles (improved platform-specific handling)\n const defaultShadow = Platform.select({\n ios: {\n shadowColor: shadowProps?.shadowColor || colors.text.hex, // Defaulting to theme text color\n shadowOffset: shadowProps?.shadowOffset || { width: 0, height: 2 },\n shadowOpacity: shadowProps?.shadowOpacity || 0.1,\n shadowRadius: shadowProps?.shadowRadius || 4,\n },\n android: {\n elevation: elevation, // Only applies to Android\n },\n });\n \n const cardStyles = [\n styles.container,\n { borderRadius, backgroundColor: colors.background.hex },\n defaultShadow, // Dynamic shadows based on platform\n style, // External styles\n ];\n \n return pressable ? (\n <TouchableOpacity\n activeOpacity={0.8}\n onPress={onPress}\n onPressIn={handlePressIn}\n onPressOut={handlePressOut}\n style={cardStyles}\n >\n <useAnimated.View style={animatedStyle}>\n {children}\n </useAnimated.View>\n </TouchableOpacity>\n ) : (\n <View style={cardStyles}>\n {children}\n </View>\n );\n };\n \n const styles = StyleSheet.create({\n container: {\n padding: 16,\n borderRadius: 12,\n // Shadows handled dynamically with platform logic\n },\n });\n\n"],"names":["lightTheme","primary","hex","rgb","r","g","b","secondary","background","text","textButton","darkTheme","ThemeContext","createContext","theme","colors","toggleTheme","ThemeProvider","_ref","children","initialTheme","_useState","useState","_useState2","_slicedToArray","colorScheme","setColorScheme","_useAsyncStorage","useAsyncStorage","getItem","setItem","useEffect","loadTheme","_ref2","_asyncToGenerator","_regeneratorRuntime","mark","_callee","systemTheme","wrap","_callee$","_context","prev","next","Appearance","getColorScheme","error","console","stop","apply","arguments","subscription","addChangeListener","_ref3","remove","_ref4","_callee2","newTheme","_callee2$","_context2","t0","React","createElement","Provider","value","ThemeToggle","_useContext","useContext","isDarkMode","View","style","styles","container","Text","color","Switch","onValueChange","trackColor","thumbColor","StyleSheet","create","marginTop","flexDirection","alignItems","marginRight","fontSize","typeStyles","type","disabled","themeColors","backgroundColor","concat","borderWidth","borderColor","opacity","Button","_ref$disabled","_ref$type","_ref$rounded","rounded","_ref$borderRadius","borderRadius","_ref$isFullWidth","isFullWidth","onPress","computedStyles","useMemo","flatten","button","width","textColor","TouchableOpacity","activeOpacity","Array","isArray","join","toUpperCase","justifyContent","paddingVertical","paddingHorizontal","Card","_ref$pressable","pressable","_ref$elevation","elevation","_ref$shadowProps","shadowProps","scale","useSharedValue","animatedStyle","useAnimatedStyle","transform","handlePressIn","withSpring","handlePressOut","defaultShadow","Platform","select","ios","shadowColor","shadowOffset","height","shadowOpacity","shadowRadius","android","cardStyles","onPressIn","onPressOut","useAnimated","padding"],"mappings":";;;;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,EAAE,EAAE;AACXhD,IAAAA,YAAY,EAAE,EAAA;AACd;AACD,GAAA;AACF,CAAA,CAAC;;;;"}
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../src/styles/colors.ts","../src/theme/ThemeContext.tsx","../src/theme/ThemeToggle.tsx","../src/components/Button.tsx","../src/cards/Card.tsx"],"sourcesContent":["// src/styles/colors.ts\n\nexport interface RGB {\n r: number;\n g: number;\n b: number;\n}\n\nexport interface Color {\n hex: string;\n rgb: RGB;\n}\n\nexport interface ThemeColors {\n primary: Color;\n secondary: Color;\n background: Color;\n text: Color;\n textButton: Color;\n // Add more categories as needed\n}\n\nexport const lightTheme: ThemeColors = {\n primary: {\n hex: '#1A73E8',\n rgb: { r: 26, g: 115, b: 232 },\n },\n secondary: {\n hex: '#F0F6FF',\n rgb: { r: 240, g: 246, b: 255 },\n },\n background: {\n hex: '#FFFFFF',\n rgb: { r: 255, g: 255, b: 255 },\n },\n text: {\n hex: '#000000',\n rgb: { r: 0, g: 0, b: 0 },\n },\n textButton: {\n hex: '#FFFFFF',\n rgb: { r: 255, g: 255, b: 255 },\n },\n};\n\nexport const darkTheme: ThemeColors = {\n primary: {\n hex: '#BB86FC',\n rgb: { r: 187, g: 134, b: 252 },\n },\n secondary: {\n hex: '#03DAC6',\n rgb: { r: 3, g: 218, b: 198 },\n },\n background: {\n hex: '#121212',\n rgb: { r: 18, g: 18, b: 18 },\n },\n text: {\n hex: '#FFFFFF',\n rgb: { r: 255, g: 255, b: 255 },\n },\n textButton: {\n hex: '#FFFFFF',\n rgb: { r: 255, g: 255, b: 255 },\n },\n // Add more categories as needed\n};\n","import React, { createContext, useState, useEffect, ReactNode } from 'react';\nimport { Appearance, ColorSchemeName } from 'react-native';\nimport { useAsyncStorage } from '@react-native-async-storage/async-storage'; // Import useAsyncStorage\nimport { lightTheme, darkTheme } from '../styles/colors';\nimport { Theme } from '../styles/theme';\n\n/**\n * Interface for the properties provided by ThemeContext.\n */\ninterface ThemeContextProps {\n /**\n * The current theme, containing color definitions.\n */\n theme: Theme;\n\n /**\n * Function to toggle between light and dark themes.\n */\n toggleTheme: () => void;\n}\n\n/**\n * React context for managing theme-related data and functions.\n */\nexport const ThemeContext = createContext<ThemeContextProps>({\n theme: { colors: lightTheme },\n toggleTheme: () => {},\n});\n\n/**\n * Props for the ThemeProvider component.\n */\ninterface ThemeProviderProps {\n /**\n * Child components that will have access to the theme context.\n */\n children: ReactNode;\n\n /**\n * Optional initial theme. Defaults to system preference if not provided.\n */\n initialTheme?: 'light' | 'dark';\n}\n\n/**\n * ThemeProvider component that manages and provides theme data to its children.\n *\n * @param children - The child components that will consume the theme context.\n * @param initialTheme - Optional prop to set the initial theme.\n */\n\nexport const ThemeProvider: React.FC<ThemeProviderProps> = ({ children, initialTheme }) => {\n const [colorScheme, setColorScheme] = useState<ColorSchemeName | null>(null);\n \n // Use useAsyncStorage hook for managing the theme storage\n const { getItem, setItem } = useAsyncStorage('theme');\n\n useEffect(() => {\n const loadTheme = async () => {\n try {\n // const storedTheme = await getItem();\n // if (storedTheme === 'dark' || storedTheme === 'light') {\n // setColorScheme(storedTheme);\n //} \n if (initialTheme) {\n setColorScheme(initialTheme);\n } else {\n const systemTheme = Appearance.getColorScheme();\n setColorScheme(systemTheme);\n }\n } catch (error) {\n console.error('Failed to load theme.', error);\n setColorScheme(Appearance.getColorScheme());\n }\n };\n\n loadTheme();\n\n const subscription = Appearance.addChangeListener(({ colorScheme }) => {\n if (!colorScheme) return; // Prevent setting null\n setColorScheme(colorScheme);\n });\n\n return () => subscription.remove();\n }, [initialTheme, getItem]);\n\n const toggleTheme = async () => {\n try {\n const newTheme = colorScheme === 'dark' ? 'light' : 'dark';\n setColorScheme(newTheme);\n await setItem(newTheme); // Use setItem from useAsyncStorage\n } catch (error) {\n console.error('Failed to toggle theme.', error);\n }\n };\n\n const theme: Theme = {\n colors: colorScheme === 'dark' ? darkTheme : lightTheme,\n };\n\n return (\n <ThemeContext.Provider value={{ theme, toggleTheme }}>\n {children}\n </ThemeContext.Provider>\n );\n};\n","import React, { useContext } from 'react';\nimport { Switch, View, Text, StyleSheet } from 'react-native';\nimport { ThemeContext } from './ThemeContext';\nimport { darkTheme, lightTheme } from '../styles/colors';\n\nconst ThemeToggle: React.FC = () => {\n const { theme, toggleTheme } = useContext(ThemeContext);\n const isDarkMode = theme.colors === darkTheme;\n\n return (\n <View style={styles.container}>\n <Text style={[styles.text, { color: theme.colors.text.hex }]}>Dark Mode</Text>\n <Switch\n value={isDarkMode}\n onValueChange={toggleTheme}\n trackColor={{ false: lightTheme.secondary.hex, true: darkTheme.primary.hex }}\n thumbColor={isDarkMode ? darkTheme.secondary.hex : lightTheme.primary.hex}\n />\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n marginTop: 20,\n flexDirection: 'row',\n alignItems: 'center',\n },\n text: {\n marginRight: 10,\n fontSize: 16,\n },\n});\n\nexport default ThemeToggle;\n","// src/components/Button.tsx\n\nimport React, { useMemo, useContext } from 'react';\nimport { Text, ViewStyle, StyleSheet, TouchableOpacity } from 'react-native';\nimport { ThemeContext } from '../theme/ThemeContext';\nimport { ThemeColors } from '../styles/colors';\n\n/**\n * Interface for the props that the Button component accepts.\n */\ninterface ButtonProps {\n /**\n * If true, the button is disabled and not pressable.\n */\n disabled?: boolean;\n\n /**\n * If true, the button expands to full width of its container.\n */\n isFullWidth?: boolean;\n\n /**\n * Text content of the button.\n */\n children?: string;\n\n /**\n * Function to call when the button is pressed.\n */\n onPress?: () => void;\n\n /**\n * If true, the button has rounded corners.\n */\n rounded?: boolean;\n\n /**\n * Custom border radius value. Overrides the `rounded` prop if provided.\n */\n borderRadius?: number;\n\n /**\n * Specifies the button type for styling. Can be 'submit', 'button', or 'cancel'.\n */\n type?: 'submit' | 'button' | 'cancel';\n}\n\n/**\n * Determines the styles based on the button type and whether it is disabled.\n *\n * @param type - The type of the button ('submit', 'button', 'cancel').\n * @param disabled - Whether the button is disabled.\n * @param themeColors - The theme colors.\n * @returns The computed style for the button.\n */\nfunction typeStyles(\n type?: string,\n disabled?: boolean,\n themeColors?: ThemeColors\n): ViewStyle {\n switch (type) {\n case 'submit':\n return {\n backgroundColor: `rgba(${themeColors?.primary.rgb.r}, ${themeColors?.primary.rgb.g}, ${themeColors?.primary.rgb.b}, ${\n disabled ? 0.5 : 1\n })`,\n borderWidth: 2,\n borderColor: themeColors?.primary.hex,\n };\n case 'button':\n return {\n backgroundColor: themeColors?.primary.hex,\n borderColor: themeColors?.secondary.hex,\n opacity: disabled ? 0.5 : 1,\n borderWidth: 2,\n };\n case 'cancel':\n return {\n backgroundColor: themeColors?.background.hex,\n borderWidth: 0,\n };\n default:\n return {};\n }\n}\n\n/**\n * Button component that adapts its styles based on the current theme.\n * Supports dynamic styling, full-width option, rounded corners, and different types.\n *\n * @param disabled - If true, the button is disabled and not pressable.\n * @param isFullWidth - If true, the button expands to full width of its container.\n * @param children - Text content of the button.\n * @param onPress - Function to call when the button is pressed.\n * @param rounded - If true, the button has rounded corners.\n * @param borderRadius - Custom border radius value. Overrides the `rounded` prop if provided.\n * @param type - Specifies the button type for styling ('submit', 'button', 'cancel').\n */\nexport const Button: React.FC<ButtonProps> = ({\n children,\n disabled = false,\n type = 'button',\n rounded = true,\n borderRadius = 30,\n isFullWidth = false,\n onPress,\n}) => {\n const { theme } = useContext(ThemeContext);\n const { colors } = theme;\n\n const computedStyles = useMemo(() => {\n return StyleSheet.flatten([\n styles.button,\n typeStyles(type, disabled, colors),\n rounded && { borderRadius },\n isFullWidth && { width: '100%' },\n disabled && styles.disabled,\n ]);\n }, [type, disabled, rounded, borderRadius, isFullWidth, colors]);\n\n const textColor = useMemo(() => {\n return { color: colors.textButton.hex };\n }, [type, colors]);\n\n return (\n <TouchableOpacity\n style={computedStyles as ViewStyle}\n disabled={disabled}\n onPress={onPress}\n activeOpacity={0.7}\n >\n <Text style={textColor}>\n {Array.isArray(children) ? children.join('').toUpperCase() : children?.toUpperCase()}\n </Text>\n </TouchableOpacity>\n );\n};\n\nconst styles = StyleSheet.create({\n button: {\n justifyContent: 'center',\n alignItems: 'center',\n paddingVertical: 10,\n paddingHorizontal: 20,\n },\n disabled: {\n opacity: 0.6,\n },\n});\n\n","// src/cards/Card.tsx\n\nimport React, { useContext } from 'react';\nimport {\n View,\n StyleSheet,\n StyleProp,\n ViewStyle,\n Platform,\n TouchableOpacity,\n GestureResponderEvent,\n} from 'react-native';\nimport { ThemeContext } from '../theme/ThemeContext';\nimport { ThemeColors } from '../styles/colors';\nimport { default as Animated, useAnimatedStyle, useSharedValue, withSpring } from 'react-native-reanimated';\n\n/**\n * Interface for the props that the Card component accepts.\n */\ninterface CardProps {\n /**\n * Content to be rendered inside the Card.\n */\n children: React.ReactNode;\n\n /**\n * Style to be applied to the Card container.\n */\n style?: StyleProp<ViewStyle>;\n\n /**\n * Function to call when the Card is pressed.\n */\n onPress?: (event: GestureResponderEvent) => void;\n\n /**\n * Whether the Card is pressable. Defaults to false.\n */\n pressable?: boolean;\n\n /**\n * Border radius of the Card. Defaults to 12.\n */\n borderRadius?: number;\n\n /**\n * Elevation of the Card (Android only).\n */\n elevation?: number;\n\n /**\n * Shadow properties for iOS.\n */\n shadowProps?: {\n shadowColor?: string;\n shadowOffset?: { width: number; height: number };\n shadowOpacity?: number;\n shadowRadius?: number;\n };\n}\n\n/**\n * Card component that adapts its styles based on the current theme.\n * Supports dynamic styling, shadows, and press animations.\n *\n * @param children - The content to be displayed inside the Card.\n * @param style - Additional styles to apply to the Card.\n * @param onPress - Function to execute when the Card is pressed.\n * @param pressable - Determines if the Card is pressable. Defaults to false.\n * @param borderRadius - Border radius of the Card. Defaults to 12.\n * @param elevation - Elevation for Android shadow. Overrides default.\n * @param shadowProps - Custom shadow properties for iOS. Overrides defaults.\n */\nexport const Card: React.FC<CardProps> = ({\n children,\n style,\n onPress,\n pressable = false,\n borderRadius = 12,\n elevation = 4,\n shadowProps = {},\n }) => {\n const { theme } = useContext(ThemeContext);\n const { colors } = theme;\n \n // Animation state for pressable effect\n const scale = useSharedValue(1);\n \n const animatedStyle = useAnimatedStyle(() => ({\n transform: [{ scale: scale.value }],\n }));\n \n const handlePressIn = () => {\n scale.value = withSpring(0.95);\n };\n \n const handlePressOut = () => {\n scale.value = withSpring(1);\n };\n \n // Default shadow styles (improved platform-specific handling)\n const defaultShadow = Platform.select({\n ios: {\n shadowColor: shadowProps?.shadowColor || colors.text.hex, // Defaulting to theme text color\n shadowOffset: shadowProps?.shadowOffset || { width: 0, height: 2 },\n shadowOpacity: shadowProps?.shadowOpacity || 0.1,\n shadowRadius: shadowProps?.shadowRadius || 4,\n },\n android: {\n elevation: elevation, // Only applies to Android\n },\n });\n \n const cardStyles = [\n styles.container,\n { borderRadius, backgroundColor: colors.background.hex },\n defaultShadow, // Dynamic shadows based on platform\n style, // External styles\n ];\n \n return pressable ? (\n <TouchableOpacity\n activeOpacity={0.8}\n onPress={onPress}\n onPressIn={handlePressIn}\n onPressOut={handlePressOut}\n style={cardStyles}\n >\n <Animated.View style={animatedStyle}>\n {children}\n </Animated.View>\n </TouchableOpacity>\n ) : (\n <View style={cardStyles}>\n {children}\n </View>\n );\n };\n \n const styles = StyleSheet.create({\n container: {\n padding: 16,\n borderRadius: 12,\n // Shadows handled dynamically with platform logic\n },\n });\n\n"],"names":["lightTheme","primary","hex","rgb","r","g","b","secondary","background","text","textButton","darkTheme","ThemeContext","createContext","theme","colors","toggleTheme","ThemeProvider","_ref","children","initialTheme","_useState","useState","_useState2","_slicedToArray","colorScheme","setColorScheme","_useAsyncStorage","useAsyncStorage","getItem","setItem","useEffect","loadTheme","_ref2","_asyncToGenerator","_regeneratorRuntime","mark","_callee","systemTheme","wrap","_callee$","_context","prev","next","Appearance","getColorScheme","error","console","stop","apply","arguments","subscription","addChangeListener","_ref3","remove","_ref4","_callee2","newTheme","_callee2$","_context2","t0","React","createElement","Provider","value","ThemeToggle","_useContext","useContext","isDarkMode","View","style","styles","container","Text","color","Switch","onValueChange","trackColor","thumbColor","StyleSheet","create","marginTop","flexDirection","alignItems","marginRight","fontSize","typeStyles","type","disabled","themeColors","backgroundColor","concat","borderWidth","borderColor","opacity","Button","_ref$disabled","_ref$type","_ref$rounded","rounded","_ref$borderRadius","borderRadius","_ref$isFullWidth","isFullWidth","onPress","computedStyles","useMemo","flatten","button","width","textColor","TouchableOpacity","activeOpacity","Array","isArray","join","toUpperCase","justifyContent","paddingVertical","paddingHorizontal","Card","_ref$pressable","pressable","_ref$elevation","elevation","_ref$shadowProps","shadowProps","scale","useSharedValue","animatedStyle","useAnimatedStyle","transform","handlePressIn","withSpring","handlePressOut","defaultShadow","Platform","select","ios","shadowColor","shadowOffset","height","shadowOpacity","shadowRadius","android","cardStyles","onPressIn","onPressOut","Animated","padding"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAsBO,IAAMA,UAAU,GAAgB;AACrCC,EAAAA,OAAO,EAAE;AACPC,IAAAA,GAAG,EAAE,SAAS;AACdC,IAAAA,GAAG,EAAE;AAAEC,MAAAA,CAAC,EAAE,EAAE;AAAEC,MAAAA,CAAC,EAAE,GAAG;AAAEC,MAAAA,CAAC,EAAE,GAAA;AAAK,KAAA;GAC/B;AACDC,EAAAA,SAAS,EAAE;AACTL,IAAAA,GAAG,EAAE,SAAS;AACdC,IAAAA,GAAG,EAAE;AAAEC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AAS,EAAEd,aAAa;AACxBe,IAAAA,UAAU,EAAEb,cAAc;AAC1BhE,IAAAA,KAAK,EAAE2E,UAAAA;GAAU,eAEjBpF,KAAC,CAAAC,aAAA,CAAAsF,QAAQ,CAAC/E,IAAI,EAAC;AAAAC,IAAAA,KAAK,EAAE2D,aAAAA;GACnB,EAAA9G,QAAQ,CACK,CACC,kBAEnB0C,KAAC,CAAAC,aAAA,CAAAO,IAAI,EAAC;AAAAC,IAAAA,KAAK,EAAE2E,UAAAA;GACV,EAAA9H,QAAQ,CACJ,CACR,CAAA;AACH,EAAC;AAED,IAAMoD,MAAM,GAAGQ,UAAU,CAACC,MAAM,CAAC;AAC/BR,EAAAA,SAAS,EAAE;AACT6E,IAAAA,OAAO,EAAE,EAAE;AACXhD,IAAAA,YAAY,EAAE,EAAA;AACd;AACD,GAAA;AACF,CAAA,CAAC;;;;"}
|
package/dist/index.js
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
/*! aport-tools v4.0.
|
1
|
+
/*! aport-tools v4.0.33 | ISC */
|
2
2
|
'use strict';
|
3
3
|
|
4
4
|
var React = require('react');
|
5
5
|
var reactNative = require('react-native');
|
6
6
|
var asyncStorage = require('@react-native-async-storage/async-storage');
|
7
|
-
var
|
7
|
+
var Animated = require('react-native-reanimated');
|
8
8
|
|
9
9
|
function _arrayLikeToArray(r, a) {
|
10
10
|
(null == a || a > r.length) && (a = r.length);
|
@@ -728,8 +728,8 @@ var Card = function Card(_ref) {
|
|
728
728
|
theme = _useContext.theme;
|
729
729
|
var colors = theme.colors;
|
730
730
|
// Animation state for pressable effect
|
731
|
-
var scale =
|
732
|
-
var animatedStyle =
|
731
|
+
var scale = Animated.useSharedValue(1);
|
732
|
+
var animatedStyle = Animated.useAnimatedStyle(function () {
|
733
733
|
return {
|
734
734
|
transform: [{
|
735
735
|
scale: scale.value
|
@@ -737,10 +737,10 @@ var Card = function Card(_ref) {
|
|
737
737
|
};
|
738
738
|
});
|
739
739
|
var handlePressIn = function handlePressIn() {
|
740
|
-
scale.value =
|
740
|
+
scale.value = Animated.withSpring(0.95);
|
741
741
|
};
|
742
742
|
var handlePressOut = function handlePressOut() {
|
743
|
-
scale.value =
|
743
|
+
scale.value = Animated.withSpring(1);
|
744
744
|
};
|
745
745
|
// Default shadow styles (improved platform-specific handling)
|
746
746
|
var defaultShadow = reactNative.Platform.select({
|
@@ -771,7 +771,7 @@ var Card = function Card(_ref) {
|
|
771
771
|
onPressIn: handlePressIn,
|
772
772
|
onPressOut: handlePressOut,
|
773
773
|
style: cardStyles
|
774
|
-
}, /*#__PURE__*/React.createElement(
|
774
|
+
}, /*#__PURE__*/React.createElement(Animated.View, {
|
775
775
|
style: animatedStyle
|
776
776
|
}, children))) : (/*#__PURE__*/React.createElement(reactNative.View, {
|
777
777
|
style: cardStyles
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/styles/colors.ts","../src/theme/ThemeContext.tsx","../src/theme/ThemeToggle.tsx","../src/components/Button.tsx","../src/cards/Card.tsx"],"sourcesContent":["// src/styles/colors.ts\n\nexport interface RGB {\n r: number;\n g: number;\n b: number;\n}\n\nexport interface Color {\n hex: string;\n rgb: RGB;\n}\n\nexport interface ThemeColors {\n primary: Color;\n secondary: Color;\n background: Color;\n text: Color;\n textButton: Color;\n // Add more categories as needed\n}\n\nexport const lightTheme: ThemeColors = {\n primary: {\n hex: '#1A73E8',\n rgb: { r: 26, g: 115, b: 232 },\n },\n secondary: {\n hex: '#F0F6FF',\n rgb: { r: 240, g: 246, b: 255 },\n },\n background: {\n hex: '#FFFFFF',\n rgb: { r: 255, g: 255, b: 255 },\n },\n text: {\n hex: '#000000',\n rgb: { r: 0, g: 0, b: 0 },\n },\n textButton: {\n hex: '#FFFFFF',\n rgb: { r: 255, g: 255, b: 255 },\n },\n};\n\nexport const darkTheme: ThemeColors = {\n primary: {\n hex: '#BB86FC',\n rgb: { r: 187, g: 134, b: 252 },\n },\n secondary: {\n hex: '#03DAC6',\n rgb: { r: 3, g: 218, b: 198 },\n },\n background: {\n hex: '#121212',\n rgb: { r: 18, g: 18, b: 18 },\n },\n text: {\n hex: '#FFFFFF',\n rgb: { r: 255, g: 255, b: 255 },\n },\n textButton: {\n hex: '#FFFFFF',\n rgb: { r: 255, g: 255, b: 255 },\n },\n // Add more categories as needed\n};\n","import React, { createContext, useState, useEffect, ReactNode } from 'react';\nimport { Appearance, ColorSchemeName } from 'react-native';\nimport { useAsyncStorage } from '@react-native-async-storage/async-storage'; // Import useAsyncStorage\nimport { lightTheme, darkTheme } from '../styles/colors';\nimport { Theme } from '../styles/theme';\n\n/**\n * Interface for the properties provided by ThemeContext.\n */\ninterface ThemeContextProps {\n /**\n * The current theme, containing color definitions.\n */\n theme: Theme;\n\n /**\n * Function to toggle between light and dark themes.\n */\n toggleTheme: () => void;\n}\n\n/**\n * React context for managing theme-related data and functions.\n */\nexport const ThemeContext = createContext<ThemeContextProps>({\n theme: { colors: lightTheme },\n toggleTheme: () => {},\n});\n\n/**\n * Props for the ThemeProvider component.\n */\ninterface ThemeProviderProps {\n /**\n * Child components that will have access to the theme context.\n */\n children: ReactNode;\n\n /**\n * Optional initial theme. Defaults to system preference if not provided.\n */\n initialTheme?: 'light' | 'dark';\n}\n\n/**\n * ThemeProvider component that manages and provides theme data to its children.\n *\n * @param children - The child components that will consume the theme context.\n * @param initialTheme - Optional prop to set the initial theme.\n */\n\nexport const ThemeProvider: React.FC<ThemeProviderProps> = ({ children, initialTheme }) => {\n const [colorScheme, setColorScheme] = useState<ColorSchemeName | null>(null);\n \n // Use useAsyncStorage hook for managing the theme storage\n const { getItem, setItem } = useAsyncStorage('theme');\n\n useEffect(() => {\n const loadTheme = async () => {\n try {\n // const storedTheme = await getItem();\n // if (storedTheme === 'dark' || storedTheme === 'light') {\n // setColorScheme(storedTheme);\n //} \n if (initialTheme) {\n setColorScheme(initialTheme);\n } else {\n const systemTheme = Appearance.getColorScheme();\n setColorScheme(systemTheme);\n }\n } catch (error) {\n console.error('Failed to load theme.', error);\n setColorScheme(Appearance.getColorScheme());\n }\n };\n\n loadTheme();\n\n const subscription = Appearance.addChangeListener(({ colorScheme }) => {\n if (!colorScheme) return; // Prevent setting null\n setColorScheme(colorScheme);\n });\n\n return () => subscription.remove();\n }, [initialTheme, getItem]);\n\n const toggleTheme = async () => {\n try {\n const newTheme = colorScheme === 'dark' ? 'light' : 'dark';\n setColorScheme(newTheme);\n await setItem(newTheme); // Use setItem from useAsyncStorage\n } catch (error) {\n console.error('Failed to toggle theme.', error);\n }\n };\n\n const theme: Theme = {\n colors: colorScheme === 'dark' ? darkTheme : lightTheme,\n };\n\n return (\n <ThemeContext.Provider value={{ theme, toggleTheme }}>\n {children}\n </ThemeContext.Provider>\n );\n};\n","import React, { useContext } from 'react';\nimport { Switch, View, Text, StyleSheet } from 'react-native';\nimport { ThemeContext } from './ThemeContext';\nimport { darkTheme, lightTheme } from '../styles/colors';\n\nconst ThemeToggle: React.FC = () => {\n const { theme, toggleTheme } = useContext(ThemeContext);\n const isDarkMode = theme.colors === darkTheme;\n\n return (\n <View style={styles.container}>\n <Text style={[styles.text, { color: theme.colors.text.hex }]}>Dark Mode</Text>\n <Switch\n value={isDarkMode}\n onValueChange={toggleTheme}\n trackColor={{ false: lightTheme.secondary.hex, true: darkTheme.primary.hex }}\n thumbColor={isDarkMode ? darkTheme.secondary.hex : lightTheme.primary.hex}\n />\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n marginTop: 20,\n flexDirection: 'row',\n alignItems: 'center',\n },\n text: {\n marginRight: 10,\n fontSize: 16,\n },\n});\n\nexport default ThemeToggle;\n","// src/components/Button.tsx\n\nimport React, { useMemo, useContext } from 'react';\nimport { Text, ViewStyle, StyleSheet, TouchableOpacity } from 'react-native';\nimport { ThemeContext } from '../theme/ThemeContext';\nimport { ThemeColors } from '../styles/colors';\n\n/**\n * Interface for the props that the Button component accepts.\n */\ninterface ButtonProps {\n /**\n * If true, the button is disabled and not pressable.\n */\n disabled?: boolean;\n\n /**\n * If true, the button expands to full width of its container.\n */\n isFullWidth?: boolean;\n\n /**\n * Text content of the button.\n */\n children?: string;\n\n /**\n * Function to call when the button is pressed.\n */\n onPress?: () => void;\n\n /**\n * If true, the button has rounded corners.\n */\n rounded?: boolean;\n\n /**\n * Custom border radius value. Overrides the `rounded` prop if provided.\n */\n borderRadius?: number;\n\n /**\n * Specifies the button type for styling. Can be 'submit', 'button', or 'cancel'.\n */\n type?: 'submit' | 'button' | 'cancel';\n}\n\n/**\n * Determines the styles based on the button type and whether it is disabled.\n *\n * @param type - The type of the button ('submit', 'button', 'cancel').\n * @param disabled - Whether the button is disabled.\n * @param themeColors - The theme colors.\n * @returns The computed style for the button.\n */\nfunction typeStyles(\n type?: string,\n disabled?: boolean,\n themeColors?: ThemeColors\n): ViewStyle {\n switch (type) {\n case 'submit':\n return {\n backgroundColor: `rgba(${themeColors?.primary.rgb.r}, ${themeColors?.primary.rgb.g}, ${themeColors?.primary.rgb.b}, ${\n disabled ? 0.5 : 1\n })`,\n borderWidth: 2,\n borderColor: themeColors?.primary.hex,\n };\n case 'button':\n return {\n backgroundColor: themeColors?.primary.hex,\n borderColor: themeColors?.secondary.hex,\n opacity: disabled ? 0.5 : 1,\n borderWidth: 2,\n };\n case 'cancel':\n return {\n backgroundColor: themeColors?.background.hex,\n borderWidth: 0,\n };\n default:\n return {};\n }\n}\n\n/**\n * Button component that adapts its styles based on the current theme.\n * Supports dynamic styling, full-width option, rounded corners, and different types.\n *\n * @param disabled - If true, the button is disabled and not pressable.\n * @param isFullWidth - If true, the button expands to full width of its container.\n * @param children - Text content of the button.\n * @param onPress - Function to call when the button is pressed.\n * @param rounded - If true, the button has rounded corners.\n * @param borderRadius - Custom border radius value. Overrides the `rounded` prop if provided.\n * @param type - Specifies the button type for styling ('submit', 'button', 'cancel').\n */\nexport const Button: React.FC<ButtonProps> = ({\n children,\n disabled = false,\n type = 'button',\n rounded = true,\n borderRadius = 30,\n isFullWidth = false,\n onPress,\n}) => {\n const { theme } = useContext(ThemeContext);\n const { colors } = theme;\n\n const computedStyles = useMemo(() => {\n return StyleSheet.flatten([\n styles.button,\n typeStyles(type, disabled, colors),\n rounded && { borderRadius },\n isFullWidth && { width: '100%' },\n disabled && styles.disabled,\n ]);\n }, [type, disabled, rounded, borderRadius, isFullWidth, colors]);\n\n const textColor = useMemo(() => {\n return { color: colors.textButton.hex };\n }, [type, colors]);\n\n return (\n <TouchableOpacity\n style={computedStyles as ViewStyle}\n disabled={disabled}\n onPress={onPress}\n activeOpacity={0.7}\n >\n <Text style={textColor}>\n {Array.isArray(children) ? children.join('').toUpperCase() : children?.toUpperCase()}\n </Text>\n </TouchableOpacity>\n );\n};\n\nconst styles = StyleSheet.create({\n button: {\n justifyContent: 'center',\n alignItems: 'center',\n paddingVertical: 10,\n paddingHorizontal: 20,\n },\n disabled: {\n opacity: 0.6,\n },\n});\n\n","// src/cards/Card.tsx\n\nimport React, { useContext } from 'react';\nimport {\n View,\n StyleSheet,\n StyleProp,\n ViewStyle,\n Platform,\n TouchableOpacity,\n GestureResponderEvent,\n} from 'react-native';\nimport { ThemeContext } from '../theme/ThemeContext';\nimport { useAnimated, useAnimatedStyle, useSharedValue, withSpring } from '../defaults/reanimatedWrapper';\n\n\n/**\n * Interface for the props that the Card component accepts.\n */\ninterface CardProps {\n /**\n * Content to be rendered inside the Card.\n */\n children: React.ReactNode;\n\n /**\n * Style to be applied to the Card container.\n */\n style?: StyleProp<ViewStyle>;\n\n /**\n * Function to call when the Card is pressed.\n */\n onPress?: (event: GestureResponderEvent) => void;\n\n /**\n * Whether the Card is pressable. Defaults to false.\n */\n pressable?: boolean;\n\n /**\n * Border radius of the Card. Defaults to 12.\n */\n borderRadius?: number;\n\n /**\n * Elevation of the Card (Android only).\n */\n elevation?: number;\n\n /**\n * Shadow properties for iOS.\n */\n shadowProps?: {\n shadowColor?: string;\n shadowOffset?: { width: number; height: number };\n shadowOpacity?: number;\n shadowRadius?: number;\n };\n}\n\n/**\n * Card component that adapts its styles based on the current theme.\n * Supports dynamic styling, shadows, and press animations.\n *\n * @param children - The content to be displayed inside the Card.\n * @param style - Additional styles to apply to the Card.\n * @param onPress - Function to execute when the Card is pressed.\n * @param pressable - Determines if the Card is pressable. Defaults to false.\n * @param borderRadius - Border radius of the Card. Defaults to 12.\n * @param elevation - Elevation for Android shadow. Overrides default.\n * @param shadowProps - Custom shadow properties for iOS. Overrides defaults.\n */\nexport const Card: React.FC<CardProps> = ({\n children,\n style,\n onPress,\n pressable = false,\n borderRadius = 12,\n elevation = 4,\n shadowProps = {},\n }) => {\n const { theme } = useContext(ThemeContext);\n const { colors } = theme;\n \n // Animation state for pressable effect\n const scale = useSharedValue(1);\n \n const animatedStyle = useAnimatedStyle(() => ({\n transform: [{ scale: scale.value }],\n }));\n \n const handlePressIn = () => {\n scale.value = withSpring(0.95);\n };\n \n const handlePressOut = () => {\n scale.value = withSpring(1);\n };\n \n // Default shadow styles (improved platform-specific handling)\n const defaultShadow = Platform.select({\n ios: {\n shadowColor: shadowProps?.shadowColor || colors.text.hex, // Defaulting to theme text color\n shadowOffset: shadowProps?.shadowOffset || { width: 0, height: 2 },\n shadowOpacity: shadowProps?.shadowOpacity || 0.1,\n shadowRadius: shadowProps?.shadowRadius || 4,\n },\n android: {\n elevation: elevation, // Only applies to Android\n },\n });\n \n const cardStyles = [\n styles.container,\n { borderRadius, backgroundColor: colors.background.hex },\n defaultShadow, // Dynamic shadows based on platform\n style, // External styles\n ];\n \n return pressable ? (\n <TouchableOpacity\n activeOpacity={0.8}\n onPress={onPress}\n onPressIn={handlePressIn}\n onPressOut={handlePressOut}\n style={cardStyles}\n >\n <useAnimated.View style={animatedStyle}>\n {children}\n </useAnimated.View>\n </TouchableOpacity>\n ) : (\n <View style={cardStyles}>\n {children}\n </View>\n );\n };\n \n const styles = StyleSheet.create({\n container: {\n padding: 16,\n borderRadius: 12,\n // Shadows handled dynamically with platform logic\n },\n });\n\n"],"names":["lightTheme","primary","hex","rgb","r","g","b","secondary","background","text","textButton","darkTheme","ThemeContext","createContext","theme","colors","toggleTheme","ThemeProvider","_ref","children","initialTheme","_useState","useState","_useState2","_slicedToArray","colorScheme","setColorScheme","_useAsyncStorage","useAsyncStorage","getItem","setItem","useEffect","loadTheme","_ref2","_asyncToGenerator","_regeneratorRuntime","mark","_callee","systemTheme","wrap","_callee$","_context","prev","next","Appearance","getColorScheme","error","console","stop","apply","arguments","subscription","addChangeListener","_ref3","remove","_ref4","_callee2","newTheme","_callee2$","_context2","t0","React","createElement","Provider","value","ThemeToggle","_useContext","useContext","isDarkMode","View","style","styles","container","Text","color","Switch","onValueChange","trackColor","thumbColor","StyleSheet","create","marginTop","flexDirection","alignItems","marginRight","fontSize","typeStyles","type","disabled","themeColors","backgroundColor","concat","borderWidth","borderColor","opacity","Button","_ref$disabled","_ref$type","_ref$rounded","rounded","_ref$borderRadius","borderRadius","_ref$isFullWidth","isFullWidth","onPress","computedStyles","useMemo","flatten","button","width","textColor","TouchableOpacity","activeOpacity","Array","isArray","join","toUpperCase","justifyContent","paddingVertical","paddingHorizontal","Card","_ref$pressable","pressable","_ref$elevation","elevation","_ref$shadowProps","shadowProps","scale","useSharedValue","animatedStyle","useAnimatedStyle","transform","handlePressIn","withSpring","handlePressOut","defaultShadow","Platform","select","ios","shadowColor","shadowOffset","height","shadowOpacity","shadowRadius","android","cardStyles","onPressIn","onPressOut","useAnimated","padding"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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5C;AACDC,IAAAA,OAAO,EAAE;MACPpB,SAAS,EAAEA,SAAS;AACrB,KAAA;AACF,GAAA,CAAC,CAAA;AAEF,EAAA,IAAMqB,UAAU,GAAG,CACjB1E,MAAM,CAACC,SAAS,EAChB;AAAE6B,IAAAA,YAAY,EAAZA,YAAY;AAAEX,IAAAA,eAAe,EAAE3E,MAAM,CAACP,UAAU,CAACN,GAAAA;AAAK,GAAA,EACxDqI,aAAa;AAAE;AACfjE,EAAAA,KAAK;GACN,CAAA;AAED,EAAA,OAAOoD,SAAS,iBACd7D,KAAC,CAAAC,aAAA,CAAAiD,4BAAgB,EACf;AAAAC,IAAAA,aAAa,EAAE,GAAG;AAClBR,IAAAA,OAAO,EAAEA,OAAO;AAChB0C,IAAAA,SAAS,EAAEd,aAAa;AACxBe,IAAAA,UAAU,EAAEb,cAAc;AAC1BhE,IAAAA,KAAK,EAAE2E,UAAAA;GAAU,eAEjBpF,KAAC,CAAAC,aAAA,CAAAsF,WAAW,CAAC/E,IAAI,EAAC;AAAAC,IAAAA,KAAK,EAAE2D,aAAAA;GACtB,EAAA9G,QAAQ,CACQ,CACF,kBAEnB0C,KAAC,CAAAC,aAAA,CAAAO,gBAAI,EAAC;AAAAC,IAAAA,KAAK,EAAE2E,UAAAA;GACV,EAAA9H,QAAQ,CACJ,CACR,CAAA;AACH,EAAC;AAED,IAAMoD,MAAM,GAAGQ,sBAAU,CAACC,MAAM,CAAC;AAC/BR,EAAAA,SAAS,EAAE;AACT6E,IAAAA,OAAO,EAAE,EAAE;AACXhD,IAAAA,YAAY,EAAE,EAAA;AACd;AACD,GAAA;AACF,CAAA,CAAC;;;;;;;;"}
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/styles/colors.ts","../src/theme/ThemeContext.tsx","../src/theme/ThemeToggle.tsx","../src/components/Button.tsx","../src/cards/Card.tsx"],"sourcesContent":["// src/styles/colors.ts\n\nexport interface RGB {\n r: number;\n g: number;\n b: number;\n}\n\nexport interface Color {\n hex: string;\n rgb: RGB;\n}\n\nexport interface ThemeColors {\n primary: Color;\n secondary: Color;\n background: Color;\n text: Color;\n textButton: Color;\n // Add more categories as needed\n}\n\nexport const lightTheme: ThemeColors = {\n primary: {\n hex: '#1A73E8',\n rgb: { r: 26, g: 115, b: 232 },\n },\n secondary: {\n hex: '#F0F6FF',\n rgb: { r: 240, g: 246, b: 255 },\n },\n background: {\n hex: '#FFFFFF',\n rgb: { r: 255, g: 255, b: 255 },\n },\n text: {\n hex: '#000000',\n rgb: { r: 0, g: 0, b: 0 },\n },\n textButton: {\n hex: '#FFFFFF',\n rgb: { r: 255, g: 255, b: 255 },\n },\n};\n\nexport const darkTheme: ThemeColors = {\n primary: {\n hex: '#BB86FC',\n rgb: { r: 187, g: 134, b: 252 },\n },\n secondary: {\n hex: '#03DAC6',\n rgb: { r: 3, g: 218, b: 198 },\n },\n background: {\n hex: '#121212',\n rgb: { r: 18, g: 18, b: 18 },\n },\n text: {\n hex: '#FFFFFF',\n rgb: { r: 255, g: 255, b: 255 },\n },\n textButton: {\n hex: '#FFFFFF',\n rgb: { r: 255, g: 255, b: 255 },\n },\n // Add more categories as needed\n};\n","import React, { createContext, useState, useEffect, ReactNode } from 'react';\nimport { Appearance, ColorSchemeName } from 'react-native';\nimport { useAsyncStorage } from '@react-native-async-storage/async-storage'; // Import useAsyncStorage\nimport { lightTheme, darkTheme } from '../styles/colors';\nimport { Theme } from '../styles/theme';\n\n/**\n * Interface for the properties provided by ThemeContext.\n */\ninterface ThemeContextProps {\n /**\n * The current theme, containing color definitions.\n */\n theme: Theme;\n\n /**\n * Function to toggle between light and dark themes.\n */\n toggleTheme: () => void;\n}\n\n/**\n * React context for managing theme-related data and functions.\n */\nexport const ThemeContext = createContext<ThemeContextProps>({\n theme: { colors: lightTheme },\n toggleTheme: () => {},\n});\n\n/**\n * Props for the ThemeProvider component.\n */\ninterface ThemeProviderProps {\n /**\n * Child components that will have access to the theme context.\n */\n children: ReactNode;\n\n /**\n * Optional initial theme. Defaults to system preference if not provided.\n */\n initialTheme?: 'light' | 'dark';\n}\n\n/**\n * ThemeProvider component that manages and provides theme data to its children.\n *\n * @param children - The child components that will consume the theme context.\n * @param initialTheme - Optional prop to set the initial theme.\n */\n\nexport const ThemeProvider: React.FC<ThemeProviderProps> = ({ children, initialTheme }) => {\n const [colorScheme, setColorScheme] = useState<ColorSchemeName | null>(null);\n \n // Use useAsyncStorage hook for managing the theme storage\n const { getItem, setItem } = useAsyncStorage('theme');\n\n useEffect(() => {\n const loadTheme = async () => {\n try {\n // const storedTheme = await getItem();\n // if (storedTheme === 'dark' || storedTheme === 'light') {\n // setColorScheme(storedTheme);\n //} \n if (initialTheme) {\n setColorScheme(initialTheme);\n } else {\n const systemTheme = Appearance.getColorScheme();\n setColorScheme(systemTheme);\n }\n } catch (error) {\n console.error('Failed to load theme.', error);\n setColorScheme(Appearance.getColorScheme());\n }\n };\n\n loadTheme();\n\n const subscription = Appearance.addChangeListener(({ colorScheme }) => {\n if (!colorScheme) return; // Prevent setting null\n setColorScheme(colorScheme);\n });\n\n return () => subscription.remove();\n }, [initialTheme, getItem]);\n\n const toggleTheme = async () => {\n try {\n const newTheme = colorScheme === 'dark' ? 'light' : 'dark';\n setColorScheme(newTheme);\n await setItem(newTheme); // Use setItem from useAsyncStorage\n } catch (error) {\n console.error('Failed to toggle theme.', error);\n }\n };\n\n const theme: Theme = {\n colors: colorScheme === 'dark' ? darkTheme : lightTheme,\n };\n\n return (\n <ThemeContext.Provider value={{ theme, toggleTheme }}>\n {children}\n </ThemeContext.Provider>\n );\n};\n","import React, { useContext } from 'react';\nimport { Switch, View, Text, StyleSheet } from 'react-native';\nimport { ThemeContext } from './ThemeContext';\nimport { darkTheme, lightTheme } from '../styles/colors';\n\nconst ThemeToggle: React.FC = () => {\n const { theme, toggleTheme } = useContext(ThemeContext);\n const isDarkMode = theme.colors === darkTheme;\n\n return (\n <View style={styles.container}>\n <Text style={[styles.text, { color: theme.colors.text.hex }]}>Dark Mode</Text>\n <Switch\n value={isDarkMode}\n onValueChange={toggleTheme}\n trackColor={{ false: lightTheme.secondary.hex, true: darkTheme.primary.hex }}\n thumbColor={isDarkMode ? darkTheme.secondary.hex : lightTheme.primary.hex}\n />\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n marginTop: 20,\n flexDirection: 'row',\n alignItems: 'center',\n },\n text: {\n marginRight: 10,\n fontSize: 16,\n },\n});\n\nexport default ThemeToggle;\n","// src/components/Button.tsx\n\nimport React, { useMemo, useContext } from 'react';\nimport { Text, ViewStyle, StyleSheet, TouchableOpacity } from 'react-native';\nimport { ThemeContext } from '../theme/ThemeContext';\nimport { ThemeColors } from '../styles/colors';\n\n/**\n * Interface for the props that the Button component accepts.\n */\ninterface ButtonProps {\n /**\n * If true, the button is disabled and not pressable.\n */\n disabled?: boolean;\n\n /**\n * If true, the button expands to full width of its container.\n */\n isFullWidth?: boolean;\n\n /**\n * Text content of the button.\n */\n children?: string;\n\n /**\n * Function to call when the button is pressed.\n */\n onPress?: () => void;\n\n /**\n * If true, the button has rounded corners.\n */\n rounded?: boolean;\n\n /**\n * Custom border radius value. Overrides the `rounded` prop if provided.\n */\n borderRadius?: number;\n\n /**\n * Specifies the button type for styling. Can be 'submit', 'button', or 'cancel'.\n */\n type?: 'submit' | 'button' | 'cancel';\n}\n\n/**\n * Determines the styles based on the button type and whether it is disabled.\n *\n * @param type - The type of the button ('submit', 'button', 'cancel').\n * @param disabled - Whether the button is disabled.\n * @param themeColors - The theme colors.\n * @returns The computed style for the button.\n */\nfunction typeStyles(\n type?: string,\n disabled?: boolean,\n themeColors?: ThemeColors\n): ViewStyle {\n switch (type) {\n case 'submit':\n return {\n backgroundColor: `rgba(${themeColors?.primary.rgb.r}, ${themeColors?.primary.rgb.g}, ${themeColors?.primary.rgb.b}, ${\n disabled ? 0.5 : 1\n })`,\n borderWidth: 2,\n borderColor: themeColors?.primary.hex,\n };\n case 'button':\n return {\n backgroundColor: themeColors?.primary.hex,\n borderColor: themeColors?.secondary.hex,\n opacity: disabled ? 0.5 : 1,\n borderWidth: 2,\n };\n case 'cancel':\n return {\n backgroundColor: themeColors?.background.hex,\n borderWidth: 0,\n };\n default:\n return {};\n }\n}\n\n/**\n * Button component that adapts its styles based on the current theme.\n * Supports dynamic styling, full-width option, rounded corners, and different types.\n *\n * @param disabled - If true, the button is disabled and not pressable.\n * @param isFullWidth - If true, the button expands to full width of its container.\n * @param children - Text content of the button.\n * @param onPress - Function to call when the button is pressed.\n * @param rounded - If true, the button has rounded corners.\n * @param borderRadius - Custom border radius value. Overrides the `rounded` prop if provided.\n * @param type - Specifies the button type for styling ('submit', 'button', 'cancel').\n */\nexport const Button: React.FC<ButtonProps> = ({\n children,\n disabled = false,\n type = 'button',\n rounded = true,\n borderRadius = 30,\n isFullWidth = false,\n onPress,\n}) => {\n const { theme } = useContext(ThemeContext);\n const { colors } = theme;\n\n const computedStyles = useMemo(() => {\n return StyleSheet.flatten([\n styles.button,\n typeStyles(type, disabled, colors),\n rounded && { borderRadius },\n isFullWidth && { width: '100%' },\n disabled && styles.disabled,\n ]);\n }, [type, disabled, rounded, borderRadius, isFullWidth, colors]);\n\n const textColor = useMemo(() => {\n return { color: colors.textButton.hex };\n }, [type, colors]);\n\n return (\n <TouchableOpacity\n style={computedStyles as ViewStyle}\n disabled={disabled}\n onPress={onPress}\n activeOpacity={0.7}\n >\n <Text style={textColor}>\n {Array.isArray(children) ? children.join('').toUpperCase() : children?.toUpperCase()}\n </Text>\n </TouchableOpacity>\n );\n};\n\nconst styles = StyleSheet.create({\n button: {\n justifyContent: 'center',\n alignItems: 'center',\n paddingVertical: 10,\n paddingHorizontal: 20,\n },\n disabled: {\n opacity: 0.6,\n },\n});\n\n","// src/cards/Card.tsx\n\nimport React, { useContext } from 'react';\nimport {\n View,\n StyleSheet,\n StyleProp,\n ViewStyle,\n Platform,\n TouchableOpacity,\n GestureResponderEvent,\n} from 'react-native';\nimport { ThemeContext } from '../theme/ThemeContext';\nimport { ThemeColors } from '../styles/colors';\nimport { default as Animated, useAnimatedStyle, useSharedValue, withSpring } from 'react-native-reanimated';\n\n/**\n * Interface for the props that the Card component accepts.\n */\ninterface CardProps {\n /**\n * Content to be rendered inside the Card.\n */\n children: React.ReactNode;\n\n /**\n * Style to be applied to the Card container.\n */\n style?: StyleProp<ViewStyle>;\n\n /**\n * Function to call when the Card is pressed.\n */\n onPress?: (event: GestureResponderEvent) => void;\n\n /**\n * Whether the Card is pressable. Defaults to false.\n */\n pressable?: boolean;\n\n /**\n * Border radius of the Card. Defaults to 12.\n */\n borderRadius?: number;\n\n /**\n * Elevation of the Card (Android only).\n */\n elevation?: number;\n\n /**\n * Shadow properties for iOS.\n */\n shadowProps?: {\n shadowColor?: string;\n shadowOffset?: { width: number; height: number };\n shadowOpacity?: number;\n shadowRadius?: number;\n };\n}\n\n/**\n * Card component that adapts its styles based on the current theme.\n * Supports dynamic styling, shadows, and press animations.\n *\n * @param children - The content to be displayed inside the Card.\n * @param style - Additional styles to apply to the Card.\n * @param onPress - Function to execute when the Card is pressed.\n * @param pressable - Determines if the Card is pressable. Defaults to false.\n * @param borderRadius - Border radius of the Card. Defaults to 12.\n * @param elevation - Elevation for Android shadow. Overrides default.\n * @param shadowProps - Custom shadow properties for iOS. Overrides defaults.\n */\nexport const Card: React.FC<CardProps> = ({\n children,\n style,\n onPress,\n pressable = false,\n borderRadius = 12,\n elevation = 4,\n shadowProps = {},\n }) => {\n const { theme } = useContext(ThemeContext);\n const { colors } = theme;\n \n // Animation state for pressable effect\n const scale = useSharedValue(1);\n \n const animatedStyle = useAnimatedStyle(() => ({\n transform: [{ scale: scale.value }],\n }));\n \n const handlePressIn = () => {\n scale.value = withSpring(0.95);\n };\n \n const handlePressOut = () => {\n scale.value = withSpring(1);\n };\n \n // Default shadow styles (improved platform-specific handling)\n const defaultShadow = Platform.select({\n ios: {\n shadowColor: shadowProps?.shadowColor || colors.text.hex, // Defaulting to theme text color\n shadowOffset: shadowProps?.shadowOffset || { width: 0, height: 2 },\n shadowOpacity: shadowProps?.shadowOpacity || 0.1,\n shadowRadius: shadowProps?.shadowRadius || 4,\n },\n android: {\n elevation: elevation, // Only applies to Android\n },\n });\n \n const cardStyles = [\n styles.container,\n { borderRadius, backgroundColor: colors.background.hex },\n defaultShadow, // Dynamic shadows based on platform\n style, // External styles\n ];\n \n return pressable ? (\n <TouchableOpacity\n activeOpacity={0.8}\n onPress={onPress}\n onPressIn={handlePressIn}\n onPressOut={handlePressOut}\n style={cardStyles}\n >\n <Animated.View style={animatedStyle}>\n {children}\n </Animated.View>\n </TouchableOpacity>\n ) : (\n <View style={cardStyles}>\n {children}\n </View>\n );\n };\n \n const styles = StyleSheet.create({\n container: {\n padding: 16,\n borderRadius: 12,\n // Shadows handled dynamically with platform logic\n },\n });\n\n"],"names":["lightTheme","primary","hex","rgb","r","g","b","secondary","background","text","textButton","darkTheme","ThemeContext","createContext","theme","colors","toggleTheme","ThemeProvider","_ref","children","initialTheme","_useState","useState","_useState2","_slicedToArray","colorScheme","setColorScheme","_useAsyncStorage","useAsyncStorage","getItem","setItem","useEffect","loadTheme","_ref2","_asyncToGenerator","_regeneratorRuntime","mark","_callee","systemTheme","wrap","_callee$","_context","prev","next","Appearance","getColorScheme","error","console","stop","apply","arguments","subscription","addChangeListener","_ref3","remove","_ref4","_callee2","newTheme","_callee2$","_context2","t0","React","createElement","Provider","value","ThemeToggle","_useContext","useContext","isDarkMode","View","style","styles","container","Text","color","Switch","onValueChange","trackColor","thumbColor","StyleSheet","create","marginTop","flexDirection","alignItems","marginRight","fontSize","typeStyles","type","disabled","themeColors","backgroundColor","concat","borderWidth","borderColor","opacity","Button","_ref$disabled","_ref$type","_ref$rounded","rounded","_ref$borderRadius","borderRadius","_ref$isFullWidth","isFullWidth","onPress","computedStyles","useMemo","flatten","button","width","textColor","TouchableOpacity","activeOpacity","Array","isArray","join","toUpperCase","justifyContent","paddingVertical","paddingHorizontal","Card","_ref$pressable","pressable","_ref$elevation","elevation","_ref$shadowProps","shadowProps","scale","useSharedValue","animatedStyle","useAnimatedStyle","transform","handlePressIn","withSpring","handlePressOut","defaultShadow","Platform","select","ios","shadowColor","shadowOffset","height","shadowOpacity","shadowRadius","android","cardStyles","onPressIn","onPressOut","Animated","padding"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAsBO,IAAMA,UAAU,GAAgB;AACrCC,EAAAA,OAAO,EAAE;AACPC,IAAAA,GAAG,EAAE,SAAS;AACdC,IAAAA,GAAG,EAAE;AAAEC,MAAAA,CAAC,EAAE,EAAE;AAAEC,MAAAA,CAAC,EAAE,GAAG;AAAEC,MAAAA,CAAC,EAAE,GAAA;AAAK,KAAA;GAC/B;AACDC,EAAAA,SAAS,EAAE;AACTL,IAAAA,GAAG,EAAE,SAAS;AACdC,IAAAA,GAAG,EAAE;AAAEC,MAAAA,CAAC,EAAE,GAAG;AAAEC,MAAAA,CAAC,EAAE,GAAG;AAAEC,MAAAA,CAAC,EAAE,GAAA;AAAK,KAAA;GAChC;AACDE,EAAAA,UAAU,EAAE;AACVN,IAAAA,GAAG,EAAE,SAAS;AACdC,IAAAA,GAAG,EAAE;AAAEC,MAAAA,CAAC,EAAE,GAAG;AAAEC,MAAAA,CAAC,EAAE,GAAG;AAAEC,MAAAA,CAAC,EAAE,GAAA;AAAK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