@istmx/ui 0.1.11 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +533 -463
- package/bin/istmx.mjs +481 -314
- package/package.json +27 -27
- package/registry/accordion.tsx +186 -0
- package/registry/ai-chat-block/ai-chat-block.tsx +456 -460
- package/registry/ai-chat-block/ai-chat-input.tsx +694 -694
- package/registry/ai-chat-block/attachment.tsx +466 -466
- package/registry/ai-chat-block/chat-code-block.tsx +50 -50
- package/registry/ai-chat-block/chat-composer.tsx +51 -51
- package/registry/ai-chat-block/chat-logo.tsx +18 -18
- package/registry/ai-chat-block/chat-message.tsx +161 -161
- package/registry/ai-chat-block/chat-sidebar.tsx +273 -273
- package/registry/ai-chat-block/chat-user-avatar.tsx +9 -9
- package/registry/ai-chat-block/code-highlighter.tsx +342 -357
- package/registry/ai-chat-block/default-attachments.tsx +42 -42
- package/registry/ai-chat-block/index.ts +30 -30
- package/registry/ai-chat-block/message-content.tsx +287 -287
- package/registry/ai-chat-block/message-list.tsx +93 -93
- package/registry/ai-chat-block/send-button.tsx +102 -102
- package/registry/ai-chat-block/types.ts +70 -71
- package/registry/ai-chat-block/utils.ts +6 -6
- package/registry/ai-chat-block/voice-button.tsx +66 -66
- package/registry/alert-dialog.tsx +229 -0
- package/registry/alert.tsx +188 -0
- package/registry/animated-text.tsx +228 -225
- package/registry/aspect-ratio.tsx +32 -0
- package/registry/avatar-group.tsx +66 -0
- package/registry/avatar.tsx +121 -0
- package/registry/badge.tsx +52 -0
- package/registry/bento-grid.tsx +438 -433
- package/registry/button.tsx +156 -237
- package/registry/carousel.tsx +184 -0
- package/registry/dock-navigation.tsx +200 -198
- package/registry/drift-canvas.tsx +383 -0
- package/registry/drift-wall.tsx +361 -0
- package/registry/flex-carousel.tsx +1430 -0
- package/registry/guided-gallery.tsx +1506 -0
- package/registry/image-accordion.tsx +306 -302
- package/registry/image-trail.tsx +126 -121
- package/registry/infinite-image-canvas.tsx +268 -263
- package/registry/input-otp.tsx +332 -0
- package/registry/list-card.tsx +130 -0
- package/registry/mobile-menu-dock.tsx +216 -211
- package/registry/morph-slider.tsx +756 -0
- package/registry/pixel-cat.tsx +972 -1020
- package/registry/scroll-canvas-cards.tsx +643 -0
- package/registry/scroll-parallax-hero.tsx +566 -565
- package/registry/scroll-story-cards.tsx +443 -438
- package/registry/slider.tsx +163 -0
- package/registry/spotlight-grid.tsx +226 -0
- package/registry/streaming-text.tsx +269 -278
- package/registry/text-reveal.tsx +311 -307
- package/registry/user-avatar.tsx +99 -0
- package/registry/utils.ts +6 -6
package/registry/text-reveal.tsx
CHANGED
|
@@ -1,307 +1,311 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
[
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
[
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
[
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
[
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
[
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
const
|
|
110
|
-
const
|
|
111
|
-
const
|
|
112
|
-
const
|
|
113
|
-
const
|
|
114
|
-
const
|
|
115
|
-
const
|
|
116
|
-
const
|
|
117
|
-
const
|
|
118
|
-
const
|
|
119
|
-
const
|
|
120
|
-
const
|
|
121
|
-
const
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
nextLineDelay
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
const
|
|
138
|
-
const
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
{
|
|
148
|
-
|
|
149
|
-
const
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
scrollWeight
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import { forwardRef } from 'react'
|
|
4
|
+
import { motion, useReducedMotion, useTransform } from 'motion/react'
|
|
5
|
+
import type { MotionValue } from 'motion/react'
|
|
6
|
+
import { cn } from '@/lib/utils'
|
|
7
|
+
|
|
8
|
+
export type TextRevealProps = {
|
|
9
|
+
text: string
|
|
10
|
+
className?: string
|
|
11
|
+
characterStagger?: number
|
|
12
|
+
lineStagger?: number
|
|
13
|
+
duration?: number
|
|
14
|
+
waveDistance?: number
|
|
15
|
+
waveOvershoot?: number
|
|
16
|
+
sidewaysDistance?: number
|
|
17
|
+
blurAmount?: number
|
|
18
|
+
opacityFrom?: number
|
|
19
|
+
opacityPeak?: number
|
|
20
|
+
scaleFrom?: number
|
|
21
|
+
scalePeak?: number
|
|
22
|
+
scrollProgress?: MotionValue<number>
|
|
23
|
+
once?: boolean
|
|
24
|
+
viewportAmount?: number
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function ScrollRevealCharacter({
|
|
28
|
+
character,
|
|
29
|
+
progress,
|
|
30
|
+
start,
|
|
31
|
+
end,
|
|
32
|
+
waveDistance,
|
|
33
|
+
waveOvershoot,
|
|
34
|
+
sidewaysDistance,
|
|
35
|
+
blurAmount,
|
|
36
|
+
opacityFrom,
|
|
37
|
+
opacityPeak,
|
|
38
|
+
scaleFrom,
|
|
39
|
+
scalePeak,
|
|
40
|
+
}: {
|
|
41
|
+
character: string
|
|
42
|
+
progress: MotionValue<number>
|
|
43
|
+
start: number
|
|
44
|
+
end: number
|
|
45
|
+
waveDistance: number
|
|
46
|
+
waveOvershoot: number
|
|
47
|
+
sidewaysDistance: number
|
|
48
|
+
blurAmount: number
|
|
49
|
+
opacityFrom: number
|
|
50
|
+
opacityPeak: number
|
|
51
|
+
scaleFrom: number
|
|
52
|
+
scalePeak: number
|
|
53
|
+
}) {
|
|
54
|
+
const characterProgress = useTransform(progress, [start, end], [0, 1])
|
|
55
|
+
const opacity = useTransform(
|
|
56
|
+
characterProgress,
|
|
57
|
+
[0, 0.55, 1],
|
|
58
|
+
[opacityFrom, opacityPeak, 1],
|
|
59
|
+
)
|
|
60
|
+
const y = useTransform(
|
|
61
|
+
characterProgress,
|
|
62
|
+
[0, 0.55, 1],
|
|
63
|
+
[waveDistance, -waveOvershoot, 0],
|
|
64
|
+
)
|
|
65
|
+
const x = useTransform(
|
|
66
|
+
characterProgress,
|
|
67
|
+
[0, 0.55, 1],
|
|
68
|
+
[-sidewaysDistance, sidewaysDistance * 0.5, 0],
|
|
69
|
+
)
|
|
70
|
+
const scale = useTransform(
|
|
71
|
+
characterProgress,
|
|
72
|
+
[0, 0.55, 1],
|
|
73
|
+
[scaleFrom, scalePeak, 1],
|
|
74
|
+
)
|
|
75
|
+
const filter = useTransform(
|
|
76
|
+
characterProgress,
|
|
77
|
+
[0, 0.55, 1],
|
|
78
|
+
[`blur(${blurAmount}px)`, `blur(${blurAmount * 0.35}px)`, 'blur(0px)'],
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
return (
|
|
82
|
+
<motion.span
|
|
83
|
+
style={{ opacity, x, y, scale, filter }}
|
|
84
|
+
className="inline-block whitespace-pre"
|
|
85
|
+
>
|
|
86
|
+
{character}
|
|
87
|
+
</motion.span>
|
|
88
|
+
)
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export const TextReveal = forwardRef<HTMLParagraphElement, TextRevealProps>(function TextReveal({
|
|
92
|
+
text,
|
|
93
|
+
className,
|
|
94
|
+
characterStagger = 0.024,
|
|
95
|
+
lineStagger = 0.24,
|
|
96
|
+
duration = 0.7,
|
|
97
|
+
waveDistance = 5,
|
|
98
|
+
waveOvershoot = waveDistance * 0.75,
|
|
99
|
+
sidewaysDistance = waveDistance * 0.12,
|
|
100
|
+
blurAmount = 7,
|
|
101
|
+
opacityFrom = 0.08,
|
|
102
|
+
opacityPeak = 0.72,
|
|
103
|
+
scaleFrom = 0.96,
|
|
104
|
+
scalePeak = 1.025,
|
|
105
|
+
scrollProgress,
|
|
106
|
+
once = true,
|
|
107
|
+
viewportAmount = 0.4,
|
|
108
|
+
}, ref) {
|
|
109
|
+
const shouldReduceMotion = useReducedMotion()
|
|
110
|
+
const lines = text.split('\n')
|
|
111
|
+
const stagger = Math.max(0, characterStagger)
|
|
112
|
+
const lineDelay = Math.max(0, lineStagger)
|
|
113
|
+
const animationDuration = Math.max(0, duration)
|
|
114
|
+
const wave = Math.max(0, waveDistance)
|
|
115
|
+
const wavePeak = Math.max(0, waveOvershoot)
|
|
116
|
+
const sideways = Math.max(0, sidewaysDistance)
|
|
117
|
+
const blur = Math.max(0, blurAmount)
|
|
118
|
+
const startOpacity = Math.min(1, Math.max(0, opacityFrom))
|
|
119
|
+
const middleOpacity = Math.min(1, Math.max(startOpacity, opacityPeak))
|
|
120
|
+
const startScale = Math.max(0.01, scaleFrom)
|
|
121
|
+
const middleScale = Math.max(0.01, scalePeak)
|
|
122
|
+
const lineStartDelays: number[] = []
|
|
123
|
+
let nextLineDelay = 0
|
|
124
|
+
|
|
125
|
+
for (const line of lines) {
|
|
126
|
+
lineStartDelays.push(nextLineDelay)
|
|
127
|
+
nextLineDelay +=
|
|
128
|
+
Math.max(0, Array.from(line).length - 1) * stagger +
|
|
129
|
+
animationDuration +
|
|
130
|
+
lineDelay
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
const characterCount = lines.reduce(
|
|
134
|
+
(total, line) => total + Array.from(line).length,
|
|
135
|
+
0,
|
|
136
|
+
)
|
|
137
|
+
const scrollCharacterWeight = Math.max(stagger, 0.001)
|
|
138
|
+
const scrollLineWeight = Math.max(0, lineDelay)
|
|
139
|
+
const totalScrollWeight =
|
|
140
|
+
characterCount * scrollCharacterWeight +
|
|
141
|
+
Math.max(0, lines.length - 1) * scrollLineWeight
|
|
142
|
+
let scrollWeight = 0
|
|
143
|
+
|
|
144
|
+
if (scrollProgress && !shouldReduceMotion) {
|
|
145
|
+
return (
|
|
146
|
+
<p ref={ref} className={cn('text-foreground', className)}>
|
|
147
|
+
<span className="sr-only">{text.replace(/\n/g, ' ')}</span>
|
|
148
|
+
{lines.map((line, lineIndex) => {
|
|
149
|
+
const words = line.match(/\s+|\S+/gu) ?? []
|
|
150
|
+
const content = words.map((word, wordIndex) => {
|
|
151
|
+
if (/^\s+$/u.test(word)) {
|
|
152
|
+
scrollWeight += Array.from(word).length * scrollCharacterWeight
|
|
153
|
+
return (
|
|
154
|
+
<span
|
|
155
|
+
key={`${wordIndex}-${word}`}
|
|
156
|
+
className="whitespace-pre-wrap"
|
|
157
|
+
>
|
|
158
|
+
{word}
|
|
159
|
+
</span>
|
|
160
|
+
)
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
const characters = Array.from(word).map((character) => {
|
|
164
|
+
const start = scrollWeight / totalScrollWeight
|
|
165
|
+
scrollWeight += scrollCharacterWeight
|
|
166
|
+
const end = scrollWeight / totalScrollWeight
|
|
167
|
+
|
|
168
|
+
return (
|
|
169
|
+
<ScrollRevealCharacter
|
|
170
|
+
key={`${start}-${character}`}
|
|
171
|
+
character={character}
|
|
172
|
+
progress={scrollProgress}
|
|
173
|
+
start={start}
|
|
174
|
+
end={end}
|
|
175
|
+
waveDistance={wave}
|
|
176
|
+
waveOvershoot={wavePeak}
|
|
177
|
+
sidewaysDistance={sideways}
|
|
178
|
+
blurAmount={blur}
|
|
179
|
+
opacityFrom={startOpacity}
|
|
180
|
+
opacityPeak={middleOpacity}
|
|
181
|
+
scaleFrom={startScale}
|
|
182
|
+
scalePeak={middleScale}
|
|
183
|
+
/>
|
|
184
|
+
)
|
|
185
|
+
})
|
|
186
|
+
|
|
187
|
+
return (
|
|
188
|
+
<span
|
|
189
|
+
key={`${wordIndex}-${word}`}
|
|
190
|
+
className="inline-block whitespace-nowrap"
|
|
191
|
+
>
|
|
192
|
+
{characters}
|
|
193
|
+
</span>
|
|
194
|
+
)
|
|
195
|
+
})
|
|
196
|
+
|
|
197
|
+
if (lineIndex < lines.length - 1) {
|
|
198
|
+
scrollWeight += scrollLineWeight
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
return (
|
|
202
|
+
<span
|
|
203
|
+
key={`${lineIndex}-${line}`}
|
|
204
|
+
aria-hidden="true"
|
|
205
|
+
className="block"
|
|
206
|
+
>
|
|
207
|
+
{content}
|
|
208
|
+
</span>
|
|
209
|
+
)
|
|
210
|
+
})}
|
|
211
|
+
</p>
|
|
212
|
+
)
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
return (
|
|
216
|
+
<motion.p
|
|
217
|
+
ref={ref}
|
|
218
|
+
initial={shouldReduceMotion ? false : 'hidden'}
|
|
219
|
+
whileInView="visible"
|
|
220
|
+
viewport={{ once, amount: Math.min(1, Math.max(0, viewportAmount)) }}
|
|
221
|
+
className={cn('text-foreground', className)}
|
|
222
|
+
>
|
|
223
|
+
<span className="sr-only">{text.replace(/\n/g, ' ')}</span>
|
|
224
|
+
{lines.map((line, lineIndex) => {
|
|
225
|
+
let characterIndex = 0
|
|
226
|
+
const words = line.match(/\s+|\S+/gu) ?? []
|
|
227
|
+
|
|
228
|
+
return (
|
|
229
|
+
<span
|
|
230
|
+
key={`${lineIndex}-${line}`}
|
|
231
|
+
aria-hidden="true"
|
|
232
|
+
className="block"
|
|
233
|
+
>
|
|
234
|
+
{words.map((word, wordIndex) => {
|
|
235
|
+
if (/^\s+$/u.test(word)) {
|
|
236
|
+
characterIndex += Array.from(word).length
|
|
237
|
+
return (
|
|
238
|
+
<span
|
|
239
|
+
key={`${wordIndex}-${word}`}
|
|
240
|
+
className="whitespace-pre-wrap"
|
|
241
|
+
>
|
|
242
|
+
{word}
|
|
243
|
+
</span>
|
|
244
|
+
)
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
const characters = Array.from(word).map((character) => {
|
|
248
|
+
const delay =
|
|
249
|
+
lineStartDelays[lineIndex] + characterIndex * stagger
|
|
250
|
+
characterIndex += 1
|
|
251
|
+
|
|
252
|
+
return (
|
|
253
|
+
<motion.span
|
|
254
|
+
key={`${characterIndex}-${character}`}
|
|
255
|
+
custom={delay}
|
|
256
|
+
variants={{
|
|
257
|
+
hidden: {
|
|
258
|
+
opacity: startOpacity,
|
|
259
|
+
y: wave,
|
|
260
|
+
x: -sideways,
|
|
261
|
+
scale: startScale,
|
|
262
|
+
filter: `blur(${blur}px)`,
|
|
263
|
+
},
|
|
264
|
+
visible: shouldReduceMotion
|
|
265
|
+
? {
|
|
266
|
+
opacity: 1,
|
|
267
|
+
y: 0,
|
|
268
|
+
x: 0,
|
|
269
|
+
scale: 1,
|
|
270
|
+
filter: 'blur(0px)',
|
|
271
|
+
transition: { duration: 0 },
|
|
272
|
+
}
|
|
273
|
+
: (staggerDelay: number) => ({
|
|
274
|
+
opacity: 1,
|
|
275
|
+
y: [wave, -wavePeak, 0],
|
|
276
|
+
x: [-sideways, sideways * 0.5, 0],
|
|
277
|
+
scale: [startScale, middleScale, 1],
|
|
278
|
+
filter: ['blur(' + blur + 'px)', 'blur(0px)'],
|
|
279
|
+
transition: {
|
|
280
|
+
duration: animationDuration,
|
|
281
|
+
delay: staggerDelay,
|
|
282
|
+
ease: 'easeOut',
|
|
283
|
+
},
|
|
284
|
+
}),
|
|
285
|
+
}}
|
|
286
|
+
className="inline-block whitespace-pre"
|
|
287
|
+
>
|
|
288
|
+
{character}
|
|
289
|
+
</motion.span>
|
|
290
|
+
)
|
|
291
|
+
})
|
|
292
|
+
|
|
293
|
+
return (
|
|
294
|
+
<span
|
|
295
|
+
key={`${wordIndex}-${word}`}
|
|
296
|
+
className="inline-block whitespace-nowrap"
|
|
297
|
+
>
|
|
298
|
+
{characters}
|
|
299
|
+
</span>
|
|
300
|
+
)
|
|
301
|
+
})}
|
|
302
|
+
</span>
|
|
303
|
+
)
|
|
304
|
+
})}
|
|
305
|
+
</motion.p>
|
|
306
|
+
)
|
|
307
|
+
})
|
|
308
|
+
|
|
309
|
+
TextReveal.displayName = 'TextReveal'
|
|
310
|
+
|
|
311
|
+
export default TextReveal
|