@hoddy-ui/next 2.5.72 → 2.5.74
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/dist/index.d.mts +149 -1
- package/dist/index.d.ts +149 -1
- package/dist/index.js +548 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +584 -9
- package/dist/index.mjs.map +1 -1
- package/index.ts +3 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -714,8 +714,156 @@ declare const useNavScreenOptions: (type: "stack" | "tab" | "drawer") => any;
|
|
|
714
714
|
declare const UIThemeContext: React.Context<ThemeContext>;
|
|
715
715
|
declare const UIThemeProvider: ({ children }: ThemeProviderProps) => React.JSX.Element;
|
|
716
716
|
|
|
717
|
+
declare const useAppState: () => {
|
|
718
|
+
isActive: boolean;
|
|
719
|
+
};
|
|
720
|
+
|
|
721
|
+
interface UseBlinkAnimationProps {
|
|
722
|
+
delay?: number;
|
|
723
|
+
blinkDuration?: number;
|
|
724
|
+
minOpacity?: number;
|
|
725
|
+
maxOpacity?: number;
|
|
726
|
+
}
|
|
727
|
+
declare const useBlinkAnimation: ({ delay, blinkDuration, minOpacity, maxOpacity, }?: UseBlinkAnimationProps) => {
|
|
728
|
+
animatedStyle: {
|
|
729
|
+
opacity: number;
|
|
730
|
+
};
|
|
731
|
+
};
|
|
732
|
+
|
|
733
|
+
interface UseFadeAnimationProps {
|
|
734
|
+
duration?: number;
|
|
735
|
+
delay?: number;
|
|
736
|
+
closeAfter?: number | null;
|
|
737
|
+
}
|
|
738
|
+
declare const useFadeAnimation: ({ duration, delay, closeAfter, }?: UseFadeAnimationProps) => {
|
|
739
|
+
animatedStyle: {
|
|
740
|
+
opacity: number;
|
|
741
|
+
};
|
|
742
|
+
};
|
|
743
|
+
|
|
744
|
+
interface UseFloatAnimationProps {
|
|
745
|
+
duration?: number;
|
|
746
|
+
delay?: number;
|
|
747
|
+
closeAfter?: number | null;
|
|
748
|
+
closeDuration?: number;
|
|
749
|
+
floatDistance?: number;
|
|
750
|
+
floatDuration?: number;
|
|
751
|
+
}
|
|
752
|
+
declare const useFloatAnimation: ({ duration, delay, closeAfter, closeDuration, floatDistance, floatDuration, }?: UseFloatAnimationProps) => {
|
|
753
|
+
animatedStyle: {
|
|
754
|
+
opacity: number;
|
|
755
|
+
transform: {
|
|
756
|
+
translateY: number;
|
|
757
|
+
}[];
|
|
758
|
+
};
|
|
759
|
+
};
|
|
760
|
+
|
|
761
|
+
interface UseGrowAnimationProps {
|
|
762
|
+
duration?: number;
|
|
763
|
+
delay?: number;
|
|
764
|
+
closeAfter?: number | null;
|
|
765
|
+
initialScale?: number;
|
|
766
|
+
}
|
|
767
|
+
declare const useGrowAnimation: ({ duration, delay, closeAfter, initialScale, }?: UseGrowAnimationProps) => {
|
|
768
|
+
animatedStyle: {
|
|
769
|
+
transform: {
|
|
770
|
+
scale: number;
|
|
771
|
+
}[];
|
|
772
|
+
};
|
|
773
|
+
};
|
|
774
|
+
|
|
775
|
+
interface UseRollAnimationProps {
|
|
776
|
+
duration?: number;
|
|
777
|
+
delay?: number;
|
|
778
|
+
closeAfter?: number | null;
|
|
779
|
+
initialTranslateY?: number;
|
|
780
|
+
initialRotate?: string;
|
|
781
|
+
}
|
|
782
|
+
declare const useRollAnimation: ({ duration, delay, closeAfter, initialTranslateY, initialRotate, }?: UseRollAnimationProps) => {
|
|
783
|
+
animatedStyle: {
|
|
784
|
+
transform: ({
|
|
785
|
+
translateY: number;
|
|
786
|
+
rotate?: undefined;
|
|
787
|
+
} | {
|
|
788
|
+
rotate: string;
|
|
789
|
+
translateY?: undefined;
|
|
790
|
+
})[];
|
|
791
|
+
};
|
|
792
|
+
};
|
|
793
|
+
|
|
794
|
+
interface UseSlideAnimationProps {
|
|
795
|
+
duration?: number;
|
|
796
|
+
delay?: number;
|
|
797
|
+
direction?: "up" | "down" | "left" | "right";
|
|
798
|
+
closeAfter?: number | null;
|
|
799
|
+
initialValue?: number;
|
|
800
|
+
}
|
|
801
|
+
declare const useSlideAnimation: ({ duration, delay, direction, closeAfter, initialValue, }?: UseSlideAnimationProps) => {
|
|
802
|
+
animatedStyle: {
|
|
803
|
+
transform: {
|
|
804
|
+
translateY: number;
|
|
805
|
+
}[];
|
|
806
|
+
} | {
|
|
807
|
+
transform: {
|
|
808
|
+
translateX: number;
|
|
809
|
+
}[];
|
|
810
|
+
};
|
|
811
|
+
};
|
|
812
|
+
|
|
813
|
+
interface UseThrownUpAnimationProps {
|
|
814
|
+
delay?: number;
|
|
815
|
+
closeAfter?: number | null;
|
|
816
|
+
}
|
|
817
|
+
declare const useThrownUpAnimation: ({ delay, closeAfter, }?: UseThrownUpAnimationProps) => {
|
|
818
|
+
animatedStyle: {
|
|
819
|
+
transform: {
|
|
820
|
+
translateY: number;
|
|
821
|
+
}[];
|
|
822
|
+
opacity: number;
|
|
823
|
+
};
|
|
824
|
+
};
|
|
825
|
+
|
|
826
|
+
/**
|
|
827
|
+
* Unified Animator component that handles multiple animation types with type-safe props.
|
|
828
|
+
*
|
|
829
|
+
* Each animation type only accepts its relevant props, ensuring type safety and better developer experience.
|
|
830
|
+
*
|
|
831
|
+
* @example
|
|
832
|
+
* // Fade animation - only accepts base props
|
|
833
|
+
* <Animator type="fade" duration={1000} closeAfter={3000}>
|
|
834
|
+
* <Text>This will fade in and out</Text>
|
|
835
|
+
* </Animator>
|
|
836
|
+
*
|
|
837
|
+
* @example
|
|
838
|
+
* // Slide animation - only accepts direction and initialValue props
|
|
839
|
+
* <Animator type="slide" direction="up" duration={800} closeAfter={2000}>
|
|
840
|
+
* <View>This will slide up from bottom</View>
|
|
841
|
+
* </Animator>
|
|
842
|
+
*
|
|
843
|
+
* @example
|
|
844
|
+
* // Grow animation - only accepts initialScale prop
|
|
845
|
+
* <Animator type="grow" initialScale={0.5} duration={600}>
|
|
846
|
+
* <Button>This will grow from 50% scale</Button>
|
|
847
|
+
* </Animator>
|
|
848
|
+
*
|
|
849
|
+
* @example
|
|
850
|
+
* // Blink animation - only accepts blink-specific props
|
|
851
|
+
* <Animator type="blink" blinkDuration={1000} minOpacity={0.3}>
|
|
852
|
+
* <Icon>This will blink continuously</Icon>
|
|
853
|
+
* </Animator>
|
|
854
|
+
*
|
|
855
|
+
* @example
|
|
856
|
+
* // TypeScript will show errors for invalid prop combinations:
|
|
857
|
+
* // ❌ This will cause a TypeScript error:
|
|
858
|
+
* // <Animator type="fade" direction="up"> // direction is not valid for fade
|
|
859
|
+
* //
|
|
860
|
+
* // ✅ This is correct:
|
|
861
|
+
* // <Animator type="slide" direction="up">
|
|
862
|
+
*/
|
|
863
|
+
declare const Animator: FC<AnimatorProps>;
|
|
864
|
+
|
|
717
865
|
declare const HoddyUI: {
|
|
718
866
|
initialize: typeof initialize;
|
|
719
867
|
};
|
|
720
868
|
|
|
721
|
-
export { AdaptiveStatusBar, AlertX, type AlertXProps, type AnimationType, type AnimatorProps, Avatar, type AvatarProps, Button, type ButtonProps, CheckBox, type CheckboxProps, Divider, type DividerProps, type FlashMessageProps, FormWrapper, type FormWrapperProps, Grid, GridItem, type GridItemProps, type GridProps, IconButton, type IconButtonProps, LinkButton, type LinkButtonProps, type ListItemProps, type ListItemTextProps, type ListProps, Locator, type LocatorInputProps, type LocatorProps, OTPInput, type OTPInputProps, Popup, type PopupProps, RatingInput, type RatingInputProps, RatingStars, type RatingStarsProps, SafeAreaView, type SafeAreaViewProps, SelectMenu, type SelectMenuProps, Spinner, type SpinnerProps, TextField, TextField2, type TextFieldProps, type ThemeActionTypes, type ThemeContext, type ThemeModes, type ThemeProviderProps, type ThemeState, type ThemeTypes, Typography, type TypographyProps, UIThemeContext, UIThemeProvider, type colorTypes, HoddyUI as default, type extraColorTypes, getLocationFromPlaceId, getPredictionsFromCoords, getPredictionsFromQuery, type locatorLocation, type predictionType, showFlashMessage, useColors, useNavScreenOptions, useTheme, useThemeContext };
|
|
869
|
+
export { AdaptiveStatusBar, AlertX, type AlertXProps, type AnimationType, Animator, type AnimatorProps, Avatar, type AvatarProps, Button, type ButtonProps, CheckBox, type CheckboxProps, Divider, type DividerProps, type FlashMessageProps, FormWrapper, type FormWrapperProps, Grid, GridItem, type GridItemProps, type GridProps, IconButton, type IconButtonProps, LinkButton, type LinkButtonProps, type ListItemProps, type ListItemTextProps, type ListProps, Locator, type LocatorInputProps, type LocatorProps, OTPInput, type OTPInputProps, Popup, type PopupProps, RatingInput, type RatingInputProps, RatingStars, type RatingStarsProps, SafeAreaView, type SafeAreaViewProps, SelectMenu, type SelectMenuProps, Spinner, type SpinnerProps, TextField, TextField2, type TextFieldProps, type ThemeActionTypes, type ThemeContext, type ThemeModes, type ThemeProviderProps, type ThemeState, type ThemeTypes, Typography, type TypographyProps, UIThemeContext, UIThemeProvider, type colorTypes, HoddyUI as default, type extraColorTypes, getLocationFromPlaceId, getPredictionsFromCoords, getPredictionsFromQuery, type locatorLocation, type predictionType, showFlashMessage, useAppState, useBlinkAnimation, useColors, useFadeAnimation, useFloatAnimation, useGrowAnimation, useNavScreenOptions, useRollAnimation, useSlideAnimation, useTheme, useThemeContext, useThrownUpAnimation };
|
package/dist/index.d.ts
CHANGED
|
@@ -714,8 +714,156 @@ declare const useNavScreenOptions: (type: "stack" | "tab" | "drawer") => any;
|
|
|
714
714
|
declare const UIThemeContext: React.Context<ThemeContext>;
|
|
715
715
|
declare const UIThemeProvider: ({ children }: ThemeProviderProps) => React.JSX.Element;
|
|
716
716
|
|
|
717
|
+
declare const useAppState: () => {
|
|
718
|
+
isActive: boolean;
|
|
719
|
+
};
|
|
720
|
+
|
|
721
|
+
interface UseBlinkAnimationProps {
|
|
722
|
+
delay?: number;
|
|
723
|
+
blinkDuration?: number;
|
|
724
|
+
minOpacity?: number;
|
|
725
|
+
maxOpacity?: number;
|
|
726
|
+
}
|
|
727
|
+
declare const useBlinkAnimation: ({ delay, blinkDuration, minOpacity, maxOpacity, }?: UseBlinkAnimationProps) => {
|
|
728
|
+
animatedStyle: {
|
|
729
|
+
opacity: number;
|
|
730
|
+
};
|
|
731
|
+
};
|
|
732
|
+
|
|
733
|
+
interface UseFadeAnimationProps {
|
|
734
|
+
duration?: number;
|
|
735
|
+
delay?: number;
|
|
736
|
+
closeAfter?: number | null;
|
|
737
|
+
}
|
|
738
|
+
declare const useFadeAnimation: ({ duration, delay, closeAfter, }?: UseFadeAnimationProps) => {
|
|
739
|
+
animatedStyle: {
|
|
740
|
+
opacity: number;
|
|
741
|
+
};
|
|
742
|
+
};
|
|
743
|
+
|
|
744
|
+
interface UseFloatAnimationProps {
|
|
745
|
+
duration?: number;
|
|
746
|
+
delay?: number;
|
|
747
|
+
closeAfter?: number | null;
|
|
748
|
+
closeDuration?: number;
|
|
749
|
+
floatDistance?: number;
|
|
750
|
+
floatDuration?: number;
|
|
751
|
+
}
|
|
752
|
+
declare const useFloatAnimation: ({ duration, delay, closeAfter, closeDuration, floatDistance, floatDuration, }?: UseFloatAnimationProps) => {
|
|
753
|
+
animatedStyle: {
|
|
754
|
+
opacity: number;
|
|
755
|
+
transform: {
|
|
756
|
+
translateY: number;
|
|
757
|
+
}[];
|
|
758
|
+
};
|
|
759
|
+
};
|
|
760
|
+
|
|
761
|
+
interface UseGrowAnimationProps {
|
|
762
|
+
duration?: number;
|
|
763
|
+
delay?: number;
|
|
764
|
+
closeAfter?: number | null;
|
|
765
|
+
initialScale?: number;
|
|
766
|
+
}
|
|
767
|
+
declare const useGrowAnimation: ({ duration, delay, closeAfter, initialScale, }?: UseGrowAnimationProps) => {
|
|
768
|
+
animatedStyle: {
|
|
769
|
+
transform: {
|
|
770
|
+
scale: number;
|
|
771
|
+
}[];
|
|
772
|
+
};
|
|
773
|
+
};
|
|
774
|
+
|
|
775
|
+
interface UseRollAnimationProps {
|
|
776
|
+
duration?: number;
|
|
777
|
+
delay?: number;
|
|
778
|
+
closeAfter?: number | null;
|
|
779
|
+
initialTranslateY?: number;
|
|
780
|
+
initialRotate?: string;
|
|
781
|
+
}
|
|
782
|
+
declare const useRollAnimation: ({ duration, delay, closeAfter, initialTranslateY, initialRotate, }?: UseRollAnimationProps) => {
|
|
783
|
+
animatedStyle: {
|
|
784
|
+
transform: ({
|
|
785
|
+
translateY: number;
|
|
786
|
+
rotate?: undefined;
|
|
787
|
+
} | {
|
|
788
|
+
rotate: string;
|
|
789
|
+
translateY?: undefined;
|
|
790
|
+
})[];
|
|
791
|
+
};
|
|
792
|
+
};
|
|
793
|
+
|
|
794
|
+
interface UseSlideAnimationProps {
|
|
795
|
+
duration?: number;
|
|
796
|
+
delay?: number;
|
|
797
|
+
direction?: "up" | "down" | "left" | "right";
|
|
798
|
+
closeAfter?: number | null;
|
|
799
|
+
initialValue?: number;
|
|
800
|
+
}
|
|
801
|
+
declare const useSlideAnimation: ({ duration, delay, direction, closeAfter, initialValue, }?: UseSlideAnimationProps) => {
|
|
802
|
+
animatedStyle: {
|
|
803
|
+
transform: {
|
|
804
|
+
translateY: number;
|
|
805
|
+
}[];
|
|
806
|
+
} | {
|
|
807
|
+
transform: {
|
|
808
|
+
translateX: number;
|
|
809
|
+
}[];
|
|
810
|
+
};
|
|
811
|
+
};
|
|
812
|
+
|
|
813
|
+
interface UseThrownUpAnimationProps {
|
|
814
|
+
delay?: number;
|
|
815
|
+
closeAfter?: number | null;
|
|
816
|
+
}
|
|
817
|
+
declare const useThrownUpAnimation: ({ delay, closeAfter, }?: UseThrownUpAnimationProps) => {
|
|
818
|
+
animatedStyle: {
|
|
819
|
+
transform: {
|
|
820
|
+
translateY: number;
|
|
821
|
+
}[];
|
|
822
|
+
opacity: number;
|
|
823
|
+
};
|
|
824
|
+
};
|
|
825
|
+
|
|
826
|
+
/**
|
|
827
|
+
* Unified Animator component that handles multiple animation types with type-safe props.
|
|
828
|
+
*
|
|
829
|
+
* Each animation type only accepts its relevant props, ensuring type safety and better developer experience.
|
|
830
|
+
*
|
|
831
|
+
* @example
|
|
832
|
+
* // Fade animation - only accepts base props
|
|
833
|
+
* <Animator type="fade" duration={1000} closeAfter={3000}>
|
|
834
|
+
* <Text>This will fade in and out</Text>
|
|
835
|
+
* </Animator>
|
|
836
|
+
*
|
|
837
|
+
* @example
|
|
838
|
+
* // Slide animation - only accepts direction and initialValue props
|
|
839
|
+
* <Animator type="slide" direction="up" duration={800} closeAfter={2000}>
|
|
840
|
+
* <View>This will slide up from bottom</View>
|
|
841
|
+
* </Animator>
|
|
842
|
+
*
|
|
843
|
+
* @example
|
|
844
|
+
* // Grow animation - only accepts initialScale prop
|
|
845
|
+
* <Animator type="grow" initialScale={0.5} duration={600}>
|
|
846
|
+
* <Button>This will grow from 50% scale</Button>
|
|
847
|
+
* </Animator>
|
|
848
|
+
*
|
|
849
|
+
* @example
|
|
850
|
+
* // Blink animation - only accepts blink-specific props
|
|
851
|
+
* <Animator type="blink" blinkDuration={1000} minOpacity={0.3}>
|
|
852
|
+
* <Icon>This will blink continuously</Icon>
|
|
853
|
+
* </Animator>
|
|
854
|
+
*
|
|
855
|
+
* @example
|
|
856
|
+
* // TypeScript will show errors for invalid prop combinations:
|
|
857
|
+
* // ❌ This will cause a TypeScript error:
|
|
858
|
+
* // <Animator type="fade" direction="up"> // direction is not valid for fade
|
|
859
|
+
* //
|
|
860
|
+
* // ✅ This is correct:
|
|
861
|
+
* // <Animator type="slide" direction="up">
|
|
862
|
+
*/
|
|
863
|
+
declare const Animator: FC<AnimatorProps>;
|
|
864
|
+
|
|
717
865
|
declare const HoddyUI: {
|
|
718
866
|
initialize: typeof initialize;
|
|
719
867
|
};
|
|
720
868
|
|
|
721
|
-
export { AdaptiveStatusBar, AlertX, type AlertXProps, type AnimationType, type AnimatorProps, Avatar, type AvatarProps, Button, type ButtonProps, CheckBox, type CheckboxProps, Divider, type DividerProps, type FlashMessageProps, FormWrapper, type FormWrapperProps, Grid, GridItem, type GridItemProps, type GridProps, IconButton, type IconButtonProps, LinkButton, type LinkButtonProps, type ListItemProps, type ListItemTextProps, type ListProps, Locator, type LocatorInputProps, type LocatorProps, OTPInput, type OTPInputProps, Popup, type PopupProps, RatingInput, type RatingInputProps, RatingStars, type RatingStarsProps, SafeAreaView, type SafeAreaViewProps, SelectMenu, type SelectMenuProps, Spinner, type SpinnerProps, TextField, TextField2, type TextFieldProps, type ThemeActionTypes, type ThemeContext, type ThemeModes, type ThemeProviderProps, type ThemeState, type ThemeTypes, Typography, type TypographyProps, UIThemeContext, UIThemeProvider, type colorTypes, HoddyUI as default, type extraColorTypes, getLocationFromPlaceId, getPredictionsFromCoords, getPredictionsFromQuery, type locatorLocation, type predictionType, showFlashMessage, useColors, useNavScreenOptions, useTheme, useThemeContext };
|
|
869
|
+
export { AdaptiveStatusBar, AlertX, type AlertXProps, type AnimationType, Animator, type AnimatorProps, Avatar, type AvatarProps, Button, type ButtonProps, CheckBox, type CheckboxProps, Divider, type DividerProps, type FlashMessageProps, FormWrapper, type FormWrapperProps, Grid, GridItem, type GridItemProps, type GridProps, IconButton, type IconButtonProps, LinkButton, type LinkButtonProps, type ListItemProps, type ListItemTextProps, type ListProps, Locator, type LocatorInputProps, type LocatorProps, OTPInput, type OTPInputProps, Popup, type PopupProps, RatingInput, type RatingInputProps, RatingStars, type RatingStarsProps, SafeAreaView, type SafeAreaViewProps, SelectMenu, type SelectMenuProps, Spinner, type SpinnerProps, TextField, TextField2, type TextFieldProps, type ThemeActionTypes, type ThemeContext, type ThemeModes, type ThemeProviderProps, type ThemeState, type ThemeTypes, Typography, type TypographyProps, UIThemeContext, UIThemeProvider, type colorTypes, HoddyUI as default, type extraColorTypes, getLocationFromPlaceId, getPredictionsFromCoords, getPredictionsFromQuery, type locatorLocation, type predictionType, showFlashMessage, useAppState, useBlinkAnimation, useColors, useFadeAnimation, useFloatAnimation, useGrowAnimation, useNavScreenOptions, useRollAnimation, useSlideAnimation, useTheme, useThemeContext, useThrownUpAnimation };
|