Rocky_Mountain_Vending/.pnpm-store/v10/files/9e/7cb7fb17023f26ae3dafdb667a84e38871a9ccbe5141f2249d32c237ef5ef61749e766e904a6a8c154460dee139b97a5b1f10ef886bd85c1bee4551bf9374d
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

58 lines
1.1 KiB
Text

import setRafTimeout from './setRafTimeout';
export default function createAnimateManager() {
let currStyle = {};
let handleChange = () => null;
let shouldStop = false;
const setStyle = _style => {
if (shouldStop) {
return;
}
if (Array.isArray(_style)) {
if (!_style.length) {
return;
}
const styles = _style;
const [curr, ...restStyles] = styles;
if (typeof curr === 'number') {
setRafTimeout(setStyle.bind(null, restStyles), curr);
return;
}
setStyle(curr);
setRafTimeout(setStyle.bind(null, restStyles));
return;
}
if (typeof _style === 'object') {
currStyle = _style;
handleChange(currStyle);
}
if (typeof _style === 'function') {
_style();
}
};
return {
stop: () => {
shouldStop = true;
},
start: style => {
shouldStop = false;
setStyle(style);
},
subscribe: _handleChange => {
handleChange = _handleChange;
return () => {
handleChange = () => null;
};
},
};
}