Removed shamefully-hoist and updated all packages to respect that
This commit is contained in:
@@ -39,6 +39,8 @@
|
||||
"class-variance-authority": "^0.7.0",
|
||||
"date-fns": "^3.2.0",
|
||||
"lucide-react": "^0.366.0",
|
||||
"next": "^14.1.4",
|
||||
"next-themes": "^0.3.0",
|
||||
"react-hook-form": "^7.51.2",
|
||||
"react-i18next": "^14.1.0",
|
||||
"sonner": "^1.4.41",
|
||||
@@ -51,12 +53,14 @@
|
||||
"@kit/tsconfig": "workspace:*",
|
||||
"@radix-ui/react-icons": "^1.3.0",
|
||||
"@tanstack/react-table": "^8.15.3",
|
||||
"@types/react": "^18.2.73",
|
||||
"@types/react": "^18.2.75",
|
||||
"@types/react-dom": "^18.2.22",
|
||||
"class-variance-authority": "^0.7.0",
|
||||
"date-fns": "^3.6.0",
|
||||
"eslint": "^8.57.0",
|
||||
"lucide-react": "^0.363.0",
|
||||
"next": "14.2.0-canary.63",
|
||||
"next-themes": "0.3.0",
|
||||
"prettier": "^3.2.5",
|
||||
"react-day-picker": "^8.10.0",
|
||||
"react-hook-form": "^7.51.2",
|
||||
@@ -119,7 +123,6 @@
|
||||
"./auth-change-listener": "./src/makerkit/auth-change-listener.tsx",
|
||||
"./loading-overlay": "./src/makerkit/loading-overlay.tsx",
|
||||
"./profile-avatar": "./src/makerkit/profile-avatar.tsx",
|
||||
"./mdx-components": "./src/makerkit/mdx-components.tsx",
|
||||
"./mode-toggle": "./src/makerkit/mode-toggle.tsx",
|
||||
"./enhanced-data-table": "./src/makerkit/data-table.tsx"
|
||||
},
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
import { forwardRef } from 'react';
|
||||
|
||||
import Image from 'next/image';
|
||||
|
||||
import { cn } from '../utils';
|
||||
import { LazyRender } from './lazy-render';
|
||||
|
||||
const NextImage: React.FC<{
|
||||
width: number;
|
||||
height: number;
|
||||
src: string;
|
||||
alt: string;
|
||||
class?: string;
|
||||
}> = (props) => {
|
||||
const className = cn(props.class, `object-cover`);
|
||||
|
||||
return <Image className={className} src={props.src} alt={props.alt} />;
|
||||
};
|
||||
|
||||
const ExternalLink = forwardRef<
|
||||
React.ElementRef<'a'>,
|
||||
React.AnchorHTMLAttributes<unknown>
|
||||
>(function ExternalLink(props, ref) {
|
||||
const href = props.href ?? '';
|
||||
const isRoot = href === '/';
|
||||
|
||||
const isInternalLink =
|
||||
isRoot || href.startsWith(process.env.NEXT_PUBLIC_SITE_URL!);
|
||||
|
||||
if (isInternalLink) {
|
||||
return (
|
||||
<a {...props} ref={ref} href={href}>
|
||||
{props.children}
|
||||
</a>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<a
|
||||
href={href}
|
||||
ref={ref}
|
||||
{...props}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
{props.children}
|
||||
</a>
|
||||
);
|
||||
});
|
||||
|
||||
const Video: React.FC<{
|
||||
src: string;
|
||||
width?: string;
|
||||
type?: string;
|
||||
}> = ({ src, type, width }) => {
|
||||
const useType = type ?? 'video/mp4';
|
||||
|
||||
return (
|
||||
<LazyRender rootMargin={'-200px 0px'}>
|
||||
<video
|
||||
className="my-4"
|
||||
width={width ?? `100%`}
|
||||
height="auto"
|
||||
playsInline
|
||||
autoPlay
|
||||
muted
|
||||
loop
|
||||
>
|
||||
<source src={src} type={useType} />
|
||||
</video>
|
||||
</LazyRender>
|
||||
);
|
||||
};
|
||||
|
||||
export const MDXComponents = {
|
||||
img: NextImage,
|
||||
a: ExternalLink,
|
||||
Video,
|
||||
Image: NextImage,
|
||||
};
|
||||
Reference in New Issue
Block a user