revert(app): "STUPID SEXY TIMELINE (#16420)" (#16745)

This commit is contained in:
Adam
2026-03-09 07:36:39 -05:00
committed by GitHub
parent f27ef595f6
commit c71d1bde5e
48 changed files with 2287 additions and 5499 deletions

View File

@@ -37,16 +37,6 @@ export const TextShimmer = <T extends ValidComponent = "span">(props: {
clearTimeout(timer)
})
const len = createMemo(() => Math.max(text().length, 1))
const shimmerSize = createMemo(() => Math.max(300, Math.round(200 + 1400 / len())))
// duration = len × (size - 1) / velocity → uniform perceived sweep speed
const VELOCITY = 0.01375 // ch per ms, ~10% faster than original 0.0125 baseline
const shimmerDuration = createMemo(() => {
const s = shimmerSize() / 100
return Math.max(1000, Math.min(2500, Math.round((len() * (s - 1)) / VELOCITY)))
})
return (
<Dynamic
component={props.as ?? "span"}
@@ -57,8 +47,6 @@ export const TextShimmer = <T extends ValidComponent = "span">(props: {
style={{
"--text-shimmer-swap": `${swap}ms`,
"--text-shimmer-index": `${offset()}`,
"--text-shimmer-size": `${shimmerSize()}%`,
"--text-shimmer-duration": `${shimmerDuration()}ms`,
}}
>
<span data-slot="text-shimmer-char">