@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
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import * as React from 'react'
|
|
4
|
+
import { motion, useReducedMotion } from 'motion/react'
|
|
5
|
+
import { cn } from '@/lib/utils'
|
|
6
|
+
|
|
7
|
+
const sliderVariants = {
|
|
8
|
+
smooth: { type: 'tween' as const, duration: 0.18, ease: 'linear' as const },
|
|
9
|
+
elastic: { type: 'spring' as const, stiffness: 260, damping: 20, mass: 0.65 },
|
|
10
|
+
butter: { type: 'spring' as const, stiffness: 145, damping: 25, mass: 0.8 },
|
|
11
|
+
gooey: { type: 'spring' as const, stiffness: 320, damping: 24, mass: 0.55 },
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type SliderVariant = keyof typeof sliderVariants
|
|
15
|
+
export type SliderSize = 'sm' | 'md' | 'lg'
|
|
16
|
+
|
|
17
|
+
const sliderSizes: Record<SliderSize, { track: string; content: string; marker: string }> = {
|
|
18
|
+
sm: { track: 'h-11', content: 'px-3 text-xs', marker: 'inset-y-2' },
|
|
19
|
+
md: { track: 'h-14', content: 'px-4 text-sm', marker: 'inset-y-3' },
|
|
20
|
+
lg: { track: 'h-16', content: 'px-5 text-base', marker: 'inset-y-3.5' },
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface SliderProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'value' | 'defaultValue' | 'onChange' | 'size'> {
|
|
24
|
+
value?: number
|
|
25
|
+
defaultValue?: number
|
|
26
|
+
onValueChange?: (value: number) => void
|
|
27
|
+
label?: string
|
|
28
|
+
showValue?: boolean
|
|
29
|
+
formatValue?: (value: number) => React.ReactNode
|
|
30
|
+
variant?: SliderVariant
|
|
31
|
+
size?: SliderSize
|
|
32
|
+
showTicks?: boolean
|
|
33
|
+
showMinMax?: boolean
|
|
34
|
+
trackClassName?: string
|
|
35
|
+
fillClassName?: string
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const Slider = React.forwardRef<HTMLInputElement, SliderProps>(
|
|
39
|
+
({
|
|
40
|
+
className,
|
|
41
|
+
min = 0,
|
|
42
|
+
max = 100,
|
|
43
|
+
step = 1,
|
|
44
|
+
value,
|
|
45
|
+
defaultValue = 0,
|
|
46
|
+
onValueChange,
|
|
47
|
+
label,
|
|
48
|
+
showValue = true,
|
|
49
|
+
formatValue = (currentValue) => currentValue,
|
|
50
|
+
variant = 'butter',
|
|
51
|
+
size = 'md',
|
|
52
|
+
showTicks = true,
|
|
53
|
+
showMinMax = false,
|
|
54
|
+
trackClassName,
|
|
55
|
+
fillClassName,
|
|
56
|
+
disabled,
|
|
57
|
+
name,
|
|
58
|
+
id,
|
|
59
|
+
'aria-label': ariaLabel,
|
|
60
|
+
...props
|
|
61
|
+
}, ref) => {
|
|
62
|
+
const generatedId = React.useId()
|
|
63
|
+
const inputId = id ?? generatedId
|
|
64
|
+
const filterId = `slider-goo-${generatedId.replace(/:/g, '')}`
|
|
65
|
+
const [uncontrolledValue, setUncontrolledValue] = React.useState(defaultValue)
|
|
66
|
+
const currentValue = value ?? uncontrolledValue
|
|
67
|
+
const shouldReduceMotion = useReducedMotion()
|
|
68
|
+
const minimum = Number(min)
|
|
69
|
+
const maximum = Number(max)
|
|
70
|
+
const range = maximum - minimum
|
|
71
|
+
const safeValue = Math.min(maximum, Math.max(minimum, currentValue))
|
|
72
|
+
const progress = range > 0 ? ((safeValue - minimum) / range) * 100 : 0
|
|
73
|
+
|
|
74
|
+
return (
|
|
75
|
+
<div className={cn('relative isolate', className)}>
|
|
76
|
+
{variant === 'gooey' && (
|
|
77
|
+
<svg className="absolute size-0" aria-hidden="true" focusable="false">
|
|
78
|
+
<defs>
|
|
79
|
+
<filter id={filterId}>
|
|
80
|
+
<feGaussianBlur in="SourceGraphic" stdDeviation="3.5" result="blur" />
|
|
81
|
+
<feColorMatrix in="blur" mode="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 20 -9" result="goo" />
|
|
82
|
+
<feComposite in="SourceGraphic" in2="goo" operator="atop" />
|
|
83
|
+
</filter>
|
|
84
|
+
</defs>
|
|
85
|
+
</svg>
|
|
86
|
+
)}
|
|
87
|
+
{label && (
|
|
88
|
+
<label htmlFor={inputId} className="sr-only">{label}</label>
|
|
89
|
+
)}
|
|
90
|
+
<div
|
|
91
|
+
className={cn(
|
|
92
|
+
'relative flex items-center overflow-hidden rounded-xl border border-[var(--button-border)] bg-[linear-gradient(to_bottom,var(--button-surface-top),var(--button-surface-bottom))] shadow-[inset_0_0_0_1px_var(--effect-white-full)]',
|
|
93
|
+
sliderSizes[size].track,
|
|
94
|
+
trackClassName,
|
|
95
|
+
'focus-within:ring-2 focus-within:ring-inset focus-within:ring-foreground/70',
|
|
96
|
+
disabled && 'opacity-50',
|
|
97
|
+
)}
|
|
98
|
+
>
|
|
99
|
+
{showTicks && <div
|
|
100
|
+
aria-hidden="true"
|
|
101
|
+
className="pointer-events-none absolute inset-0 opacity-60"
|
|
102
|
+
style={{ backgroundImage: 'repeating-linear-gradient(90deg, transparent 0, transparent calc(10% - 1px), var(--border) calc(10% - 1px), var(--border) 10%)' }}
|
|
103
|
+
/>}
|
|
104
|
+
<motion.div
|
|
105
|
+
aria-hidden="true"
|
|
106
|
+
className={cn(
|
|
107
|
+
'pointer-events-none absolute inset-y-0 left-0 rounded-xl bg-muted/90',
|
|
108
|
+
fillClassName,
|
|
109
|
+
variant === 'gooey' && 'right-auto',
|
|
110
|
+
)}
|
|
111
|
+
initial={false}
|
|
112
|
+
animate={{ width: `${progress}%` }}
|
|
113
|
+
transition={shouldReduceMotion ? { duration: 0 } : sliderVariants[variant]}
|
|
114
|
+
style={variant === 'gooey' ? { filter: `url(#${filterId})` } : undefined}
|
|
115
|
+
>
|
|
116
|
+
{variant === 'gooey' && (
|
|
117
|
+
<motion.span
|
|
118
|
+
className="absolute -right-1 top-1/2 size-5 -translate-y-1/2 rounded-full bg-muted"
|
|
119
|
+
animate={{ x: 0 }}
|
|
120
|
+
transition={shouldReduceMotion ? { duration: 0 } : sliderVariants.gooey}
|
|
121
|
+
/>
|
|
122
|
+
)}
|
|
123
|
+
{variant !== 'gooey' && <span className={cn('absolute right-2 w-0.5 rounded-full bg-foreground/70', sliderSizes[size].marker)} />}
|
|
124
|
+
</motion.div>
|
|
125
|
+
<input
|
|
126
|
+
{...props}
|
|
127
|
+
ref={ref}
|
|
128
|
+
id={inputId}
|
|
129
|
+
type="range"
|
|
130
|
+
name={name}
|
|
131
|
+
min={min}
|
|
132
|
+
max={max}
|
|
133
|
+
step={step}
|
|
134
|
+
value={safeValue}
|
|
135
|
+
disabled={disabled}
|
|
136
|
+
aria-label={ariaLabel ?? label ?? 'Slider'}
|
|
137
|
+
onChange={(event) => {
|
|
138
|
+
const nextValue = event.currentTarget.valueAsNumber
|
|
139
|
+
if (value === undefined) setUncontrolledValue(nextValue)
|
|
140
|
+
onValueChange?.(nextValue)
|
|
141
|
+
}}
|
|
142
|
+
className="absolute inset-0 z-10 m-0 h-full w-full cursor-pointer appearance-none bg-transparent opacity-0 focus-visible:outline-none disabled:cursor-not-allowed"
|
|
143
|
+
/>
|
|
144
|
+
<div aria-hidden="true" className={cn('pointer-events-none relative z-0 flex w-full items-center justify-between font-medium', sliderSizes[size].content)}>
|
|
145
|
+
<span className="truncate text-muted-foreground">{label ?? ariaLabel}</span>
|
|
146
|
+
{showValue && <output className="shrink-0 pl-3 text-foreground">{formatValue(safeValue)}</output>}
|
|
147
|
+
</div>
|
|
148
|
+
</div>
|
|
149
|
+
{showMinMax && (
|
|
150
|
+
<div className="mt-1 flex justify-between px-1 text-[10px] text-muted-foreground" aria-hidden="true">
|
|
151
|
+
<span>{min}</span>
|
|
152
|
+
<span>{max}</span>
|
|
153
|
+
</div>
|
|
154
|
+
)}
|
|
155
|
+
<span className="sr-only" aria-live="off">{safeValue}</span>
|
|
156
|
+
</div>
|
|
157
|
+
)
|
|
158
|
+
},
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
Slider.displayName = 'Slider'
|
|
162
|
+
|
|
163
|
+
export { Slider, sliderVariants }
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import * as React from 'react'
|
|
4
|
+
import { cn } from '@/lib/utils'
|
|
5
|
+
|
|
6
|
+
export interface SpotlightGridProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
dotSize?: number
|
|
8
|
+
gap?: number
|
|
9
|
+
spotlightSize?: number
|
|
10
|
+
bulgeRadius?: number
|
|
11
|
+
maxBulge?: number
|
|
12
|
+
className?: string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const SpotlightGrid = React.forwardRef<HTMLDivElement, SpotlightGridProps>(
|
|
16
|
+
(
|
|
17
|
+
{
|
|
18
|
+
dotSize = 1.4,
|
|
19
|
+
gap = 32,
|
|
20
|
+
spotlightSize = 420,
|
|
21
|
+
bulgeRadius = 220,
|
|
22
|
+
maxBulge = 12,
|
|
23
|
+
className,
|
|
24
|
+
...props
|
|
25
|
+
},
|
|
26
|
+
ref
|
|
27
|
+
) => {
|
|
28
|
+
const containerRef = React.useRef<HTMLDivElement>(null)
|
|
29
|
+
const canvasRef = React.useRef<HTMLCanvasElement>(null)
|
|
30
|
+
|
|
31
|
+
React.useImperativeHandle(ref, () => containerRef.current as HTMLDivElement)
|
|
32
|
+
|
|
33
|
+
React.useEffect(() => {
|
|
34
|
+
const container = containerRef.current
|
|
35
|
+
const canvas = canvasRef.current
|
|
36
|
+
if (!container || !canvas) return
|
|
37
|
+
|
|
38
|
+
const ctx = canvas.getContext('2d', { alpha: true })
|
|
39
|
+
if (!ctx) return
|
|
40
|
+
|
|
41
|
+
let animationFrameId: number
|
|
42
|
+
let width = 0
|
|
43
|
+
let height = 0
|
|
44
|
+
let dpr = 1
|
|
45
|
+
|
|
46
|
+
const mouse = {
|
|
47
|
+
x: -2000,
|
|
48
|
+
y: -2000,
|
|
49
|
+
targetX: -2000,
|
|
50
|
+
targetY: -2000,
|
|
51
|
+
active: 0,
|
|
52
|
+
targetActive: 0,
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const updateDimensions = () => {
|
|
56
|
+
const rect = container.getBoundingClientRect()
|
|
57
|
+
width = rect.width
|
|
58
|
+
height = rect.height
|
|
59
|
+
dpr = Math.min(window.devicePixelRatio || 1, 2)
|
|
60
|
+
canvas.width = Math.floor(width * dpr)
|
|
61
|
+
canvas.height = Math.floor(height * dpr)
|
|
62
|
+
canvas.style.width = `${width}px`
|
|
63
|
+
canvas.style.height = `${height}px`
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
updateDimensions()
|
|
67
|
+
window.addEventListener('resize', updateDimensions)
|
|
68
|
+
|
|
69
|
+
const handlePointerMove = (e: PointerEvent) => {
|
|
70
|
+
const rect = container.getBoundingClientRect()
|
|
71
|
+
mouse.targetX = e.clientX - rect.left
|
|
72
|
+
mouse.targetY = e.clientY - rect.top
|
|
73
|
+
mouse.targetActive = 1
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const handlePointerLeave = () => {
|
|
77
|
+
mouse.targetActive = 0
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
window.addEventListener('pointermove', handlePointerMove, { passive: true })
|
|
81
|
+
document.addEventListener('mouseleave', handlePointerLeave)
|
|
82
|
+
|
|
83
|
+
interface BulgedDot {
|
|
84
|
+
x: number
|
|
85
|
+
y: number
|
|
86
|
+
r: number
|
|
87
|
+
color: string
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const render = () => {
|
|
91
|
+
mouse.x += (mouse.targetX - mouse.x) * 0.14
|
|
92
|
+
mouse.y += (mouse.targetY - mouse.y) * 0.14
|
|
93
|
+
mouse.active += (mouse.targetActive - mouse.active) * 0.1
|
|
94
|
+
|
|
95
|
+
ctx.setTransform(1, 0, 0, 1, 0, 0)
|
|
96
|
+
ctx.clearRect(0, 0, canvas.width, canvas.height)
|
|
97
|
+
ctx.scale(dpr, dpr)
|
|
98
|
+
|
|
99
|
+
const isDark = document.documentElement.classList.contains('dark')
|
|
100
|
+
|
|
101
|
+
const cols = Math.ceil(width / gap) + 1
|
|
102
|
+
const rows = Math.ceil(height / gap) + 1
|
|
103
|
+
const offsetX = (width % gap) / 2
|
|
104
|
+
const offsetY = (height % gap) / 2
|
|
105
|
+
|
|
106
|
+
const ambientBlurredPath = new Path2D()
|
|
107
|
+
const bulgedDots: BulgedDot[] = []
|
|
108
|
+
|
|
109
|
+
for (let r = 0; r <= rows; r++) {
|
|
110
|
+
const cy = offsetY + r * gap
|
|
111
|
+
const dyMask = (cy - height * 0.28) / (height * 0.58)
|
|
112
|
+
|
|
113
|
+
for (let c = 0; c <= cols; c++) {
|
|
114
|
+
const cx = offsetX + c * gap
|
|
115
|
+
const dxMask = (cx - width * 0.5) / (width * 0.48)
|
|
116
|
+
const maskDist = Math.sqrt(dxMask * dxMask * 1.1 + dyMask * dyMask * 1.5)
|
|
117
|
+
|
|
118
|
+
if (maskDist >= 1.0) continue
|
|
119
|
+
|
|
120
|
+
const maskAlpha = Math.max(0, Math.min(1, 1 - (maskDist - 0.25) / 0.75))
|
|
121
|
+
if (maskAlpha <= 0.03) continue
|
|
122
|
+
|
|
123
|
+
const dist = Math.hypot(cx - mouse.x, cy - mouse.y)
|
|
124
|
+
|
|
125
|
+
if (mouse.active > 0.01 && dist < bulgeRadius) {
|
|
126
|
+
const norm = dist / bulgeRadius
|
|
127
|
+
const domeFactor = Math.sin(norm * Math.PI) * mouse.active
|
|
128
|
+
const angle = Math.atan2(cy - mouse.y, cx - mouse.x)
|
|
129
|
+
const displacedX = cx + Math.cos(angle) * (domeFactor * maxBulge)
|
|
130
|
+
const displacedY = cy + Math.sin(angle) * (domeFactor * maxBulge)
|
|
131
|
+
|
|
132
|
+
const scale = 1 + Math.pow(1 - norm, 1.6) * 2.2 * mouse.active
|
|
133
|
+
const currentRadius = dotSize * scale
|
|
134
|
+
const intensity = Math.pow(1 - norm, 1.4) * mouse.active
|
|
135
|
+
|
|
136
|
+
let color: string
|
|
137
|
+
if (isDark) {
|
|
138
|
+
const red = Math.round(255 * (1 - intensity) + 251 * intensity)
|
|
139
|
+
const green = Math.round(255 * (1 - intensity) + 113 * intensity)
|
|
140
|
+
const blue = Math.round(255 * (1 - intensity) + 133 * intensity)
|
|
141
|
+
const alpha = (0.2 + 0.75 * intensity) * maskAlpha
|
|
142
|
+
color = `rgba(${red}, ${green}, ${blue}, ${alpha.toFixed(3)})`
|
|
143
|
+
} else {
|
|
144
|
+
const red = Math.round(9 * (1 - intensity) + 225 * intensity)
|
|
145
|
+
const green = Math.round(9 * (1 - intensity) + 29 * intensity)
|
|
146
|
+
const blue = Math.round(11 * (1 - intensity) + 72 * intensity)
|
|
147
|
+
const alpha = (0.16 + 0.72 * intensity) * maskAlpha
|
|
148
|
+
color = `rgba(${red}, ${green}, ${blue}, ${alpha.toFixed(3)})`
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
bulgedDots.push({
|
|
152
|
+
x: displacedX,
|
|
153
|
+
y: displacedY,
|
|
154
|
+
r: currentRadius,
|
|
155
|
+
color,
|
|
156
|
+
})
|
|
157
|
+
} else {
|
|
158
|
+
ambientBlurredPath.moveTo(cx + dotSize, cy)
|
|
159
|
+
ambientBlurredPath.arc(cx, cy, dotSize, 0, Math.PI * 2)
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
ctx.filter = 'blur(1.5px)'
|
|
165
|
+
ctx.fillStyle = isDark
|
|
166
|
+
? 'rgba(255, 255, 255, 0.12)'
|
|
167
|
+
: 'rgba(9, 9, 11, 0.08)'
|
|
168
|
+
ctx.fill(ambientBlurredPath)
|
|
169
|
+
|
|
170
|
+
ctx.filter = 'none'
|
|
171
|
+
for (let i = 0; i < bulgedDots.length; i++) {
|
|
172
|
+
const dot = bulgedDots[i]
|
|
173
|
+
ctx.beginPath()
|
|
174
|
+
ctx.arc(dot.x, dot.y, dot.r, 0, Math.PI * 2)
|
|
175
|
+
ctx.fillStyle = dot.color
|
|
176
|
+
ctx.fill()
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
animationFrameId = requestAnimationFrame(render)
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
animationFrameId = requestAnimationFrame(render)
|
|
183
|
+
|
|
184
|
+
return () => {
|
|
185
|
+
cancelAnimationFrame(animationFrameId)
|
|
186
|
+
window.removeEventListener('resize', updateDimensions)
|
|
187
|
+
window.removeEventListener('pointermove', handlePointerMove)
|
|
188
|
+
document.removeEventListener('mouseleave', handlePointerLeave)
|
|
189
|
+
}
|
|
190
|
+
}, [dotSize, gap, bulgeRadius, maxBulge])
|
|
191
|
+
|
|
192
|
+
return (
|
|
193
|
+
<div
|
|
194
|
+
ref={containerRef}
|
|
195
|
+
className={cn(
|
|
196
|
+
'absolute inset-0 pointer-events-none z-0 overflow-hidden select-none',
|
|
197
|
+
className
|
|
198
|
+
)}
|
|
199
|
+
{...props}
|
|
200
|
+
>
|
|
201
|
+
<div
|
|
202
|
+
aria-hidden="true"
|
|
203
|
+
className="absolute inset-0 bg-[radial-gradient(ellipse_80%_60%_at_50%_-15%,rgba(225,29,72,0.12),transparent_70%)] dark:bg-[radial-gradient(ellipse_80%_60%_at_50%_-15%,rgba(225,29,72,0.18),transparent_70%)]"
|
|
204
|
+
/>
|
|
205
|
+
|
|
206
|
+
<div
|
|
207
|
+
aria-hidden="true"
|
|
208
|
+
className="absolute inset-0 bg-[radial-gradient(ellipse_50%_35%_at_50%_10%,rgba(251,113,133,0.08),transparent_65%)] dark:bg-[radial-gradient(ellipse_50%_35%_at_50%_10%,rgba(225,29,72,0.12),transparent_65%)]"
|
|
209
|
+
/>
|
|
210
|
+
|
|
211
|
+
<canvas
|
|
212
|
+
ref={canvasRef}
|
|
213
|
+
aria-hidden="true"
|
|
214
|
+
className="absolute inset-0 h-full w-full pointer-events-none"
|
|
215
|
+
/>
|
|
216
|
+
|
|
217
|
+
<div
|
|
218
|
+
aria-hidden="true"
|
|
219
|
+
className="absolute inset-0 pointer-events-none backdrop-blur-[1.5px] [mask-image:radial-gradient(ellipse_60%_50%_at_50%_35%,transparent_35%,black_95%)]"
|
|
220
|
+
/>
|
|
221
|
+
</div>
|
|
222
|
+
)
|
|
223
|
+
}
|
|
224
|
+
)
|
|
225
|
+
|
|
226
|
+
SpotlightGrid.displayName = 'SpotlightGrid'
|