From d70d17b6aee94a01b7178bd91ad45ff346685d03 Mon Sep 17 00:00:00 2001 From: Arjun Sharma Date: Thu, 16 Apr 2026 22:40:30 +0530 Subject: [PATCH 1/2] fix: remove mathjs import and use Math instead in GradualBlur component --- src/content/Animations/GradualBlur/GradualBlur.jsx | 11 +++++------ src/tailwind/Animations/GradualBlur/GradualBlur.jsx | 11 +++++------ src/ts-default/Animations/GradualBlur/GradualBlur.tsx | 11 +++++------ .../Animations/GradualBlur/GradualBlur.tsx | 11 +++++------ 4 files changed, 20 insertions(+), 24 deletions(-) diff --git a/src/content/Animations/GradualBlur/GradualBlur.jsx b/src/content/Animations/GradualBlur/GradualBlur.jsx index 115cf0c31..818915250 100644 --- a/src/content/Animations/GradualBlur/GradualBlur.jsx +++ b/src/content/Animations/GradualBlur/GradualBlur.jsx @@ -1,5 +1,4 @@ import React, { useEffect, useRef, useState, useMemo } from 'react'; -import * as math from 'mathjs'; import './GradualBlur.css'; @@ -128,15 +127,15 @@ function GradualBlur(props) { let blurValue; if (config.exponential) { - blurValue = math.pow(2, progress * 4) * 0.0625 * currentStrength; + blurValue = Math.pow(2, progress * 4) * 0.0625 * currentStrength; } else { blurValue = 0.0625 * (progress * config.divCount + 1) * currentStrength; } - const p1 = math.round((increment * i - increment) * 10) / 10; - const p2 = math.round(increment * i * 10) / 10; - const p3 = math.round((increment * i + increment) * 10) / 10; - const p4 = math.round((increment * i + increment * 2) * 10) / 10; + const p1 = Math.round((increment * i - increment) * 10) / 10; + const p2 = Math.round(increment * i * 10) / 10; + const p3 = Math.round((increment * i + increment) * 10) / 10; + const p4 = Math.round((increment * i + increment * 2) * 10) / 10; let gradient = `transparent ${p1}%, black ${p2}%`; if (p3 <= 100) gradient += `, black ${p3}%`; diff --git a/src/tailwind/Animations/GradualBlur/GradualBlur.jsx b/src/tailwind/Animations/GradualBlur/GradualBlur.jsx index 5971814a4..2e058e81f 100644 --- a/src/tailwind/Animations/GradualBlur/GradualBlur.jsx +++ b/src/tailwind/Animations/GradualBlur/GradualBlur.jsx @@ -1,5 +1,4 @@ import React, { useEffect, useRef, useState, useMemo } from 'react'; -import * as math from 'mathjs'; const DEFAULT_CONFIG = { position: 'bottom', @@ -128,14 +127,14 @@ const GradualBlur = props => { let blurValue; if (config.exponential) { - blurValue = math.pow(2, progress * 4) * 0.0625 * currentStrength; + blurValue = Math.pow(2, progress * 4) * 0.0625 * currentStrength; } else { blurValue = 0.0625 * (progress * config.divCount + 1) * currentStrength; } - const p1 = math.round((increment * i - increment) * 10) / 10; - const p2 = math.round(increment * i * 10) / 10; - const p3 = math.round((increment * i + increment) * 10) / 10; - const p4 = math.round((increment * i + increment * 2) * 10) / 10; + const p1 = Math.round((increment * i - increment) * 10) / 10; + const p2 = Math.round(increment * i * 10) / 10; + const p3 = Math.round((increment * i + increment) * 10) / 10; + const p4 = Math.round((increment * i + increment * 2) * 10) / 10; let gradient = `transparent ${p1}%, black ${p2}%`; if (p3 <= 100) gradient += `, black ${p3}%`; if (p4 <= 100) gradient += `, transparent ${p4}%`; diff --git a/src/ts-default/Animations/GradualBlur/GradualBlur.tsx b/src/ts-default/Animations/GradualBlur/GradualBlur.tsx index 6b3da2eac..8f4f5be32 100644 --- a/src/ts-default/Animations/GradualBlur/GradualBlur.tsx +++ b/src/ts-default/Animations/GradualBlur/GradualBlur.tsx @@ -1,5 +1,4 @@ import React, { CSSProperties, useEffect, useRef, useState, useMemo, PropsWithChildren } from 'react'; -import * as math from 'mathjs'; import './GradualBlur.css'; @@ -188,15 +187,15 @@ const GradualBlur: React.FC> = props => { let blurValue: number; if (config.exponential) { - blurValue = Number(math.pow(2, progress * 4)) * 0.0625 * currentStrength; + blurValue = Number(Math.pow(2, progress * 4)) * 0.0625 * currentStrength; } else { blurValue = 0.0625 * (progress * config.divCount + 1) * currentStrength; } - const p1 = math.round((increment * i - increment) * 10) / 10; - const p2 = math.round(increment * i * 10) / 10; - const p3 = math.round((increment * i + increment) * 10) / 10; - const p4 = math.round((increment * i + increment * 2) * 10) / 10; + const p1 = Math.round((increment * i - increment) * 10) / 10; + const p2 = Math.round(increment * i * 10) / 10; + const p3 = Math.round((increment * i + increment) * 10) / 10; + const p4 = Math.round((increment * i + increment * 2) * 10) / 10; let gradient = `transparent ${p1}%, black ${p2}%`; if (p3 <= 100) gradient += `, black ${p3}%`; diff --git a/src/ts-tailwind/Animations/GradualBlur/GradualBlur.tsx b/src/ts-tailwind/Animations/GradualBlur/GradualBlur.tsx index 78b71b952..d43eb13a4 100644 --- a/src/ts-tailwind/Animations/GradualBlur/GradualBlur.tsx +++ b/src/ts-tailwind/Animations/GradualBlur/GradualBlur.tsx @@ -1,5 +1,4 @@ import React, { CSSProperties, useEffect, useRef, useState, useMemo, PropsWithChildren } from 'react'; -import * as math from 'mathjs'; type GradualBlurProps = PropsWithChildren<{ position?: 'top' | 'bottom' | 'left' | 'right'; @@ -191,15 +190,15 @@ const GradualBlur: React.FC = props => { let blurValue: number; if (config.exponential) { - blurValue = Number(math.pow(2, progress * 4)) * 0.0625 * currentStrength; + blurValue = Number(Math.pow(2, progress * 4)) * 0.0625 * currentStrength; } else { blurValue = 0.0625 * (progress * config.divCount + 1) * currentStrength; } - const p1 = math.round((increment * i - increment) * 10) / 10; - const p2 = math.round(increment * i * 10) / 10; - const p3 = math.round((increment * i + increment) * 10) / 10; - const p4 = math.round((increment * i + increment * 2) * 10) / 10; + const p1 = Math.round((increment * i - increment) * 10) / 10; + const p2 = Math.round(increment * i * 10) / 10; + const p3 = Math.round((increment * i + increment) * 10) / 10; + const p4 = Math.round((increment * i + increment * 2) * 10) / 10; let gradient = `transparent ${p1}%, black ${p2}%`; if (p3 <= 100) gradient += `, black ${p3}%`; From d1ca6f77b5bed0ede9cc837705fcf621a3886bc6 Mon Sep 17 00:00:00 2001 From: Arjun Sharma Date: Fri, 17 Apr 2026 20:39:45 +0530 Subject: [PATCH 2/2] fix: remove mathjs as a dependency from registry.json --- public/r/registry.json | 38 +++++++++++++++----------------------- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git a/public/r/registry.json b/public/r/registry.json index 197f4e82f..ee8b0a431 100644 --- a/public/r/registry.json +++ b/public/r/registry.json @@ -528,9 +528,7 @@ "title": "GradualBlur", "description": "Progressively un-blurs content based on scroll or trigger creating a cinematic reveal.", "type": "registry:component", - "dependencies": [ - "mathjs@^14.6.0" - ], + "dependencies": [], "registryDependencies": [], "files": [ { @@ -548,9 +546,7 @@ "title": "GradualBlur", "description": "Progressively un-blurs content based on scroll or trigger creating a cinematic reveal.", "type": "registry:component", - "dependencies": [ - "mathjs@^14.6.0" - ], + "dependencies": [], "registryDependencies": [], "files": [ { @@ -564,9 +560,7 @@ "title": "GradualBlur", "description": "Progressively un-blurs content based on scroll or trigger creating a cinematic reveal.", "type": "registry:component", - "dependencies": [ - "mathjs@^14.6.0" - ], + "dependencies": [], "registryDependencies": [], "files": [ { @@ -584,9 +578,7 @@ "title": "GradualBlur", "description": "Progressively un-blurs content based on scroll or trigger creating a cinematic reveal.", "type": "registry:component", - "dependencies": [ - "mathjs@^14.6.0" - ], + "dependencies": [], "registryDependencies": [], "files": [ { @@ -7262,15 +7254,15 @@ "files": [ { "type": "registry:component", - "path": "Hyperspeed/HyperSpeedPresets.js" + "path": "Hyperspeed/Hyperspeed.css" }, { "type": "registry:component", - "path": "Hyperspeed/Hyperspeed.css" + "path": "Hyperspeed/Hyperspeed.jsx" }, { "type": "registry:component", - "path": "Hyperspeed/Hyperspeed.jsx" + "path": "Hyperspeed/HyperSpeedPresets.js" } ] }, @@ -7287,11 +7279,11 @@ "files": [ { "type": "registry:component", - "path": "Hyperspeed/HyperSpeedPresets.js" + "path": "Hyperspeed/Hyperspeed.jsx" }, { "type": "registry:component", - "path": "Hyperspeed/Hyperspeed.jsx" + "path": "Hyperspeed/HyperSpeedPresets.js" } ] }, @@ -7308,15 +7300,15 @@ "files": [ { "type": "registry:component", - "path": "Hyperspeed/HyperSpeedPresets.ts" + "path": "Hyperspeed/Hyperspeed.css" }, { "type": "registry:component", - "path": "Hyperspeed/Hyperspeed.css" + "path": "Hyperspeed/Hyperspeed.tsx" }, { "type": "registry:component", - "path": "Hyperspeed/Hyperspeed.tsx" + "path": "Hyperspeed/HyperSpeedPresets.ts" } ] }, @@ -7333,11 +7325,11 @@ "files": [ { "type": "registry:component", - "path": "Hyperspeed/HyperSpeedPresets.ts" + "path": "Hyperspeed/Hyperspeed.tsx" }, { "type": "registry:component", - "path": "Hyperspeed/Hyperspeed.tsx" + "path": "Hyperspeed/HyperSpeedPresets.ts" } ] }, @@ -9102,4 +9094,4 @@ ] } ] -} \ No newline at end of file +}