@devries-cameron20 / composio Mirror · read-only
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 21, 03:37 UTC

next
tsx 30 lines 944 Bytes
Raw
1 'use client';
2
3 import { useEffect } from 'react';
4
5 export function ProductTransitionLoader() {
6 useEffect(() => {
7 if (typeof CSS === 'undefined' || !('paintWorklet' in CSS)) return;
8
9 const properties = [
10 { name: '--docs-reveal-radius', syntax: '<percentage>', initialValue: '0%' },
11 { name: '--docs-pixel-size', syntax: '<number>', initialValue: '20' },
12 { name: '--docs-dissolve-amount', syntax: '<number>', initialValue: '0.65' },
13 ];
14
15 for (const property of properties) {
16 try {
17 CSS.registerProperty({ ...property, inherits: false });
18 } catch {
19 // The CSS @property rule or React Strict Mode may register it first.
20 }
21 }
22
23 const paintWorklet = (CSS as typeof CSS & {
24 paintWorklet: { addModule: (url: string) => Promise<void> };
25 }).paintWorklet;
26 void paintWorklet.addModule('/pixelated-circle-worklet.js').catch(() => undefined);
27 }, []);
28
29 return null;
30 }