diff --git a/apps/framer-plugin/framer.json b/apps/framer-plugin/framer.json index a7bf00db..07db7b4e 100644 --- a/apps/framer-plugin/framer.json +++ b/apps/framer-plugin/framer.json @@ -2,5 +2,5 @@ "id": "ab22de", "name": "ShaderGradient", "modes": ["canvas"], - "icon": "/icon.svg" + "icon": "/icon.png" } diff --git a/apps/framer-plugin/index.html b/apps/framer-plugin/index.html index aed78fd8..25c30630 100644 --- a/apps/framer-plugin/index.html +++ b/apps/framer-plugin/index.html @@ -2,7 +2,7 @@ - + ShaderGradient diff --git a/apps/framer-plugin/package.json b/apps/framer-plugin/package.json index 81780afc..a986d6eb 100644 --- a/apps/framer-plugin/package.json +++ b/apps/framer-plugin/package.json @@ -17,10 +17,7 @@ "vite-plugin-mkcert": "^1" }, "devDependencies": { - "@react-three/fiber": "^8.17.10", - "@react-spring/three": "^9.7.3", - "three": "^0.169.0", - "@shadergradient/react": "workspace:*", + "@eslint/js": "^9", "@types/react-dom": "^18", "@types/react": "^18", diff --git a/apps/framer-plugin/public/icon.png b/apps/framer-plugin/public/icon.png new file mode 100644 index 00000000..bb26c2ca Binary files /dev/null and b/apps/framer-plugin/public/icon.png differ diff --git a/apps/framer-plugin/public/icon.svg b/apps/framer-plugin/public/icon.svg deleted file mode 100644 index 3393c0f1..00000000 --- a/apps/framer-plugin/public/icon.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/apps/framer-plugin/src/App.css b/apps/framer-plugin/src/App.css index 557237f2..42d4c82c 100644 --- a/apps/framer-plugin/src/App.css +++ b/apps/framer-plugin/src/App.css @@ -9,3 +9,11 @@ main { gap: 15px; overflow: hidden; } + +[data-framer-theme='dark'] #light-iframe { + display: none; +} + +[data-framer-theme='light'] #dark-iframe { + display: none; +} diff --git a/apps/framer-plugin/src/App.tsx b/apps/framer-plugin/src/App.tsx index 730dd04e..80c299c3 100644 --- a/apps/framer-plugin/src/App.tsx +++ b/apps/framer-plugin/src/App.tsx @@ -27,16 +27,17 @@ const handleAddShaderGradient = async (controls: { message: string }) => { }) } -function handleMessage(event: { origin: string; data: { message: string } }) { - if (event.origin === framerPluginURLOrigin) { - console.log(event) +export function App() { + function handleMessage(event: { origin: string; data: { message: string } }) { + if (event.origin === framerPluginURLOrigin) { + console.log(event) - if (event.data.message === 'ADD_TO_CANVAS') { - handleAddShaderGradient(event.data) + if (event.data.message === 'ADD_TO_CANVAS') { + handleAddShaderGradient(event.data) + } } } -} -export function App() { + useEffect(() => { window.addEventListener('message', handleMessage, false) }, []) @@ -44,7 +45,7 @@ export function App() { return (