import { html, svg } from 'lit'; export const point1 = () => { return html` `; }; export const point2 = () => { return html` `; }; export const point3 = () => { return html` `; }; export const point4 = () => { return html` `; }; const toggleSVG = svg``; export const toggleRight = html` ${toggleSVG} `; export const toggleDown = html` ${toggleSVG} `; export const checkboxChecked = () => { return html` `; }; export const checkboxUnchecked = () => { return html` `; }; export const playCheckAnimation = async ( refElement: Element, { left = 0, size = 20 }: { left?: number; size?: number } = {} ) => { const sparkingEl = document.createElement('div'); sparkingEl.classList.add('affine-check-animation'); if (size < 20) { console.warn('If the size is less than 20, the animation may be abnormal.'); } sparkingEl.style.cssText = ` position: absolute; width: ${size}px; height: ${size}px; border-radius: 50%; `; sparkingEl.style.left = `${left}px`; refElement.appendChild(sparkingEl); await sparkingEl.animate( [ { boxShadow: '0 -18px 0 -8px #1e96eb, 16px -8px 0 -8px #1e96eb, 16px 8px 0 -8px #1e96eb, 0 18px 0 -8px #1e96eb, -16px 8px 0 -8px #1e96eb, -16px -8px 0 -8px #1e96eb', }, ], { duration: 240, easing: 'ease', fill: 'forwards' } ).finished; await sparkingEl.animate( [ { boxShadow: '0 -36px 0 -10px transparent, 32px -16px 0 -10px transparent, 32px 16px 0 -10px transparent, 0 36px 0 -10px transparent, -32px 16px 0 -10px transparent, -32px -16px 0 -10px transparent', }, ], { duration: 360, easing: 'ease', fill: 'forwards' } ).finished; sparkingEl.remove(); }; export const points = [point1(), point2(), point3(), point4()];