From 553abee6fae24ae4b0a2fb27c5af93bd487d481b Mon Sep 17 00:00:00 2001 From: Elias <36868565+Prodigist@users.noreply.github.com> Date: Wed, 26 Mar 2025 00:45:58 +0000 Subject: [PATCH] Remove unused files and dependencies --- src/core/registry.tsx | 47 ------------------------------------------- 1 file changed, 47 deletions(-) delete mode 100644 src/core/registry.tsx diff --git a/src/core/registry.tsx b/src/core/registry.tsx deleted file mode 100644 index 9728271..0000000 --- a/src/core/registry.tsx +++ /dev/null @@ -1,47 +0,0 @@ -// src/core/registry.tsx -import React, { FC, ComponentProps } from 'react'; -import { dynamic, dynamicNamed } from './dynamic'; - -interface Registry { - PieChart: FC>; - Chart: FC>; - ForceGraph2D: FC>; - [key: string]: FC>; // Add index signature - Pie: FC>; - Cell: FC>; - ResponsiveContainer: FC>; - Tooltip: FC>; - Legend: FC>; -} - -export const ComponentRegistry: Registry = { - // For named exports from recharts, use dynamicNamed - PieChart: dynamicNamed(() => - import('recharts').then(mod => mod.PieChart) - ), - Pie: dynamicNamed(() => - import('recharts').then(mod => mod.Pie) - ), - Cell: dynamicNamed(() => - import('recharts').then(mod => mod.Cell) - ), - ResponsiveContainer: dynamicNamed(() => - import('recharts').then(mod => mod.ResponsiveContainer) - ), - Tooltip: dynamicNamed(() => - import('recharts').then(mod => mod.Tooltip) - ), - Legend: dynamicNamed(() => - import('recharts').then(mod => mod.Legend) - ), - - // For components with default exports, use dynamic - Chart: dynamic(() => import('react-apexcharts')), - ForceGraph2D: dynamicNamed(() => - import('react-force-graph').then(mod => mod.ForceGraph2D) - ) -}; - -export const getRegisteredComponent = (name: string): FC> | null => { - return ComponentRegistry[name] || null; -}; \ No newline at end of file