@app-studio/web 0.8.91 → 0.8.93

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.
Files changed (30) hide show
  1. package/dist/components/Title/Title/Title.props.d.ts +26 -27
  2. package/dist/components/Title/Title/Title.state.d.ts +4 -118
  3. package/dist/components/Title/Title/Title.type.d.ts +1 -9
  4. package/dist/components/Title/Title/Title.view.d.ts +0 -5
  5. package/dist/components/Title/Title/TypewriterEffect.d.ts +17 -0
  6. package/dist/components/Title/examples/alternating.d.ts +1 -1
  7. package/dist/components/Title/examples/animated.d.ts +1 -1
  8. package/dist/components/Title/examples/custom.d.ts +1 -1
  9. package/dist/components/Title/examples/default.d.ts +1 -1
  10. package/dist/components/Title/examples/directAnimation.d.ts +1 -1
  11. package/dist/components/Title/examples/{gradientTest.d.ts → gradient.d.ts} +1 -1
  12. package/dist/components/Title/examples/hero.d.ts +1 -1
  13. package/dist/components/Title/examples/{highlightTest.d.ts → highlight.d.ts} +1 -1
  14. package/dist/components/Title/examples/highlightStyles.d.ts +5 -0
  15. package/dist/components/Title/examples/highlighted.d.ts +1 -1
  16. package/dist/components/Title/examples/index.d.ts +4 -2
  17. package/dist/components/Title/examples/responsive.d.ts +1 -1
  18. package/dist/components/Title/examples/typewriterHighlight.d.ts +5 -0
  19. package/dist/web.cjs.development.js +260 -397
  20. package/dist/web.cjs.development.js.map +1 -1
  21. package/dist/web.cjs.production.min.js +1 -1
  22. package/dist/web.cjs.production.min.js.map +1 -1
  23. package/dist/web.esm.js +261 -398
  24. package/dist/web.esm.js.map +1 -1
  25. package/dist/web.umd.development.js +260 -397
  26. package/dist/web.umd.development.js.map +1 -1
  27. package/dist/web.umd.production.min.js +1 -1
  28. package/dist/web.umd.production.min.js.map +1 -1
  29. package/package.json +2 -2
  30. package/dist/components/Title/examples/animationTest.d.ts +0 -5
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { ViewProps } from 'app-studio';
3
- import { HighlightStyle, TitleAnimation, AnimationDirection, TitleSize, TitleStyles } from './Title.type';
3
+ import { HighlightStyle, TitleSize, TitleStyles } from './Title.type';
4
+ import { AnimationProps } from 'app-studio/dist/utils/constants';
4
5
  /**
5
6
  * Props for the Title component
6
7
  */
@@ -25,18 +26,21 @@ export interface TitleProps extends ViewProps {
25
26
  */
26
27
  alternateHighlightText?: string[];
27
28
  /**
28
- * Enable alternating animation that replaces the highlightText with words from alternateHighlightText
29
- * When enabled, the component will replace the text specified in highlightText with each word
30
- * from alternateHighlightText in sequence, creating an infinite loop animation
29
+ * Animation for the highlighted text
30
+ * This can be a single animation object or an array of animation objects
31
+ * for multiple highlighted words
32
+ */
33
+ highlightAnimate?: AnimationProps | AnimationProps[];
34
+ /**
35
+ * Whether to apply a typewriter effect to the highlighted text
31
36
  * @default false
32
37
  */
33
- alternateAnimation?: boolean;
38
+ highlightTypewriter?: boolean;
34
39
  /**
35
- * Duration for each alternation cycle in milliseconds
36
- * Controls how long each word from alternateHighlightText is displayed before switching to the next
37
- * @default 3000
40
+ * Duration in milliseconds for the typewriter effect on highlighted text
41
+ * @default 1500
38
42
  */
39
- alternateDuration?: number;
43
+ highlightTypewriterDuration?: number;
40
44
  /**
41
45
  * Style of the highlight effect
42
46
  * @default 'background'
@@ -53,25 +57,10 @@ export interface TitleProps extends ViewProps {
53
57
  */
54
58
  highlightSecondaryColor?: string;
55
59
  /**
56
- * Animation type for the title
57
- * @default 'none'
60
+ * Animation for the title
61
+ * This should be an animation object with properties like from, to, duration, etc.
58
62
  */
59
- animation?: TitleAnimation;
60
- /**
61
- * Direction for slide animations
62
- * @default 'left'
63
- */
64
- animationDirection?: AnimationDirection;
65
- /**
66
- * Duration of the animation in seconds
67
- * @default '1s'
68
- */
69
- animationDuration?: string;
70
- /**
71
- * Delay before animation starts in seconds
72
- * @default '0s'
73
- */
74
- animationDelay?: string;
63
+ animate?: AnimationProps | AnimationProps[];
75
64
  /**
76
65
  * Size of the title
77
66
  * @default 'xl'
@@ -86,4 +75,14 @@ export interface TitleProps extends ViewProps {
86
75
  * Custom styles for different parts of the component
87
76
  */
88
77
  views?: TitleStyles;
78
+ /**
79
+ * Whether to animate the alternating highlight text
80
+ * @default false
81
+ */
82
+ alternateAnimation?: boolean;
83
+ /**
84
+ * Duration in milliseconds for each alternating highlight text
85
+ * @default 3000
86
+ */
87
+ alternateDuration?: number;
89
88
  }
@@ -1,124 +1,10 @@
1
1
  /// <reference types="react" />
2
2
  import { TitleProps } from './Title.props';
3
3
  /**
4
- * Custom hook for managing Title component state and animations
4
+ * Custom hook for managing Title component state
5
5
  */
6
6
  export declare const useTitleState: (props: TitleProps) => {
7
- displayText: string;
8
- getAnimation: () => {
9
- from: {
10
- opacity: number;
11
- transform?: undefined;
12
- backgroundSize?: undefined;
13
- clipPath?: undefined;
14
- };
15
- to: {
16
- opacity: number;
17
- transform?: undefined;
18
- backgroundSize?: undefined;
19
- clipPath?: undefined;
20
- };
21
- duration: string;
22
- delay: string;
23
- direction: string;
24
- '20%'?: undefined;
25
- '40%'?: undefined;
26
- '60%'?: undefined;
27
- '80%'?: undefined;
28
- iterationCount?: undefined;
29
- } | {
30
- from: {
31
- transform: string;
32
- opacity?: undefined;
33
- backgroundSize?: undefined;
34
- clipPath?: undefined;
35
- };
36
- to: {
37
- transform: string;
38
- opacity?: undefined;
39
- backgroundSize?: undefined;
40
- clipPath?: undefined;
41
- };
42
- duration: string;
43
- delay: string;
44
- direction: string;
45
- '20%'?: undefined;
46
- '40%'?: undefined;
47
- '60%'?: undefined;
48
- '80%'?: undefined;
49
- iterationCount?: undefined;
50
- } | {
51
- from: {
52
- transform: string;
53
- opacity?: undefined;
54
- backgroundSize?: undefined;
55
- clipPath?: undefined;
56
- };
57
- '20%': {
58
- transform: string;
59
- };
60
- '40%': {
61
- transform: string;
62
- };
63
- '60%': {
64
- transform: string;
65
- };
66
- '80%': {
67
- transform: string;
68
- };
69
- to: {
70
- transform: string;
71
- opacity?: undefined;
72
- backgroundSize?: undefined;
73
- clipPath?: undefined;
74
- };
75
- duration: string;
76
- delay: string;
77
- iterationCount: string;
78
- direction?: undefined;
79
- } | {
80
- from: {
81
- backgroundSize: string;
82
- opacity?: undefined;
83
- transform?: undefined;
84
- clipPath?: undefined;
85
- };
86
- to: {
87
- backgroundSize: string;
88
- opacity?: undefined;
89
- transform?: undefined;
90
- clipPath?: undefined;
91
- };
92
- duration: string;
93
- delay: string;
94
- direction?: undefined;
95
- '20%'?: undefined;
96
- '40%'?: undefined;
97
- '60%'?: undefined;
98
- '80%'?: undefined;
99
- iterationCount?: undefined;
100
- } | {
101
- from: {
102
- clipPath: string;
103
- opacity?: undefined;
104
- transform?: undefined;
105
- backgroundSize?: undefined;
106
- };
107
- to: {
108
- clipPath: string;
109
- opacity?: undefined;
110
- transform?: undefined;
111
- backgroundSize?: undefined;
112
- };
113
- duration: string;
114
- delay: string;
115
- direction?: undefined;
116
- '20%'?: undefined;
117
- '40%'?: undefined;
118
- '60%'?: undefined;
119
- '80%'?: undefined;
120
- iterationCount?: undefined;
121
- } | undefined;
122
- currentHighlightText: string | string[] | undefined;
123
- alternatingContent: import("react").ReactNode;
7
+ finalDisplayedText: import("react").ReactNode;
8
+ activeHighlightTarget: string | string[] | undefined;
9
+ highlightTypewriter: boolean;
124
10
  };
@@ -3,18 +3,10 @@ import { ViewProps } from 'app-studio';
3
3
  * Highlight style options for the Title component
4
4
  */
5
5
  export declare type HighlightStyle = 'underline' | 'background' | 'gradient' | 'outline' | 'glow';
6
- /**
7
- * Animation type for the Title component
8
- */
9
- export declare type TitleAnimation = 'fadeIn' | 'slideIn' | 'typewriter' | 'highlight' | 'reveal' | 'bounce' | 'alternate' | 'none';
10
- /**
11
- * Animation direction for slide animations
12
- */
13
- export declare type AnimationDirection = 'left' | 'right' | 'top' | 'bottom';
14
6
  /**
15
7
  * Title size options
16
8
  */
17
- export declare type TitleSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
9
+ export declare type TitleSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl';
18
10
  /**
19
11
  * Title styles for customization
20
12
  */
@@ -1,9 +1,4 @@
1
1
  import React from 'react';
2
2
  import { TitleProps } from './Title.props';
3
- /**
4
- * Title View Component
5
- *
6
- * Renders a title with optional highlighting and animations for hero sections.
7
- */
8
3
  declare const TitleView: React.FC<TitleProps>;
9
4
  export default TitleView;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ interface TypewriterEffectProps {
3
+ text: string | string[];
4
+ typingSpeed?: number;
5
+ pauseTime?: number;
6
+ onComplete?: () => void;
7
+ showCursor?: boolean;
8
+ cursorColor?: string;
9
+ textStyle?: React.CSSProperties;
10
+ as?: React.ElementType;
11
+ [key: string]: any;
12
+ }
13
+ /**
14
+ * A component that creates a typewriter effect for text
15
+ */
16
+ export declare const TypewriterEffect: React.FC<TypewriterEffectProps>;
17
+ export default TypewriterEffect;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  /**
3
- * Example of Title component with alternating highlighted text
3
+ * Examples of Title with alternating highlight text
4
4
  */
5
5
  export declare const AlternatingTitle: () => React.JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  /**
3
- * Examples of Title component with different animations
3
+ * Examples of Title with different animation types
4
4
  */
5
5
  export declare const AnimatedTitle: () => React.JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  /**
3
- * Example of Title component with custom styling
3
+ * Example of Title with custom styling using the views prop
4
4
  */
5
5
  export declare const CustomTitle: () => React.JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  /**
3
- * Default Title examples
3
+ * Default Title examples showing different sizes
4
4
  */
5
5
  export declare const DefaultTitle: () => React.JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  /**
3
- * Example of direct animation without using Animation object
3
+ * Example of Title with direct animation props
4
4
  */
5
5
  export declare const DirectAnimationExample: () => React.JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  /**
3
- * Test for gradient highlighting in Title component
3
+ * Examples of Title with gradient highlight styles
4
4
  */
5
5
  export declare const GradientTest: () => React.JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  /**
3
- * Example of Title component in a hero section context
3
+ * Example of Title in a hero section context
4
4
  */
5
5
  export declare const HeroTitle: () => React.JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  /**
3
- * Test for highlighting issues in Title component
3
+ * Examples of Title with different highlight animations
4
4
  */
5
5
  export declare const HighlightTest: () => React.JSX.Element;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ /**
3
+ * Examples of Title with different highlight styles applied to the entire title
4
+ */
5
+ export declare const HighlightStylesDemo: () => React.JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  /**
3
- * Examples of Title component with different highlight styles
3
+ * Examples of Title with different highlight styles
4
4
  */
5
5
  export declare const HighlightedTitle: () => React.JSX.Element;
@@ -5,6 +5,8 @@ export * from './hero';
5
5
  export * from './responsive';
6
6
  export * from './custom';
7
7
  export * from './directAnimation';
8
- export * from './gradientTest';
9
- export * from './highlightTest';
8
+ export * from './gradient';
9
+ export * from './highlight';
10
10
  export * from './alternating';
11
+ export * from './highlightStyles';
12
+ export * from './typewriterHighlight';
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  /**
3
- * Example of Title component with responsive behavior
3
+ * Example of responsive Title using media queries
4
4
  */
5
5
  export declare const ResponsiveTitle: () => React.JSX.Element;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ /**
3
+ * Examples of Title with typewriter effect on highlighted text
4
+ */
5
+ export declare const TypewriterHighlightDemo: () => React.JSX.Element;