Something went wrong. Try again.
Monorepo for Tangled forked from tangled.org/core
Something went wrong. Try again.
12345678910111213141516import { prefersReducedMotion } from "svelte/motion";import type { CommentView } from "#lib/components/comment/comments.ts";import { revealItem } from "#lib/motion/reveal.ts";import { RAIL_DURATION, railEasing } from "#lib/motion/spring.ts";
const FRESH = 60_000;
export const revealComment = (node: HTMLElement, comment: CommentView) => revealItem(node, { duration: Date.now() - Date.parse(comment.createdAt) < FRESH && !prefersReducedMotion.current ? RAIL_DURATION : 0, easing: railEasing });