fix(ui): types

This commit is contained in:
Fuma Nama
2026-05-27 19:27:47 +08:00
parent 34e4c59f4f
commit 858df3aff2
7 changed files with 10 additions and 17 deletions
@@ -21,7 +21,6 @@
"react": "^19.2.6",
"react-dom": "^19.2.6",
"tailwind-merge": "^3.6.0",
"ts-morph": "^28.0.0",
"vite": "^8.0.14"
},
"devDependencies": {
+1 -1
View File
@@ -10,7 +10,7 @@ export default defineConfig({
port: 3000,
},
resolve: {
external: ['typescript', 'ts-morph'],
external: ['typescript'],
tsconfigPaths: true,
},
plugins: [
+1 -5
View File
@@ -35,11 +35,7 @@ declare module 'mdx/types.js' {
}
}
function Image(
props: ImgHTMLAttributes<HTMLImageElement> & {
sizes?: string;
},
) {
function Image(props: ImgHTMLAttributes<HTMLImageElement>) {
return (
<FrameworkImage
sizes="(max-width: 768px) 100vw, (max-width: 1200px) 70vw, 900px"
+1 -1
View File
@@ -233,7 +233,7 @@
"inlinedDependencies": {
"@formatjs/fast-memoize": "3.1.5",
"@formatjs/intl-localematcher": "0.8.8",
"@shikijs/transformers": "4.0.2",
"@shikijs/transformers": "4.1.0",
"image-size": "2.0.2",
"negotiator": "1.0.0",
"npm-to-yarn": "3.0.1",
+1 -5
View File
@@ -35,11 +35,7 @@ declare module 'mdx/types.js' {
}
}
function Image(
props: ImgHTMLAttributes<HTMLImageElement> & {
sizes?: string;
},
) {
function Image(props: ImgHTMLAttributes<HTMLImageElement>) {
return (
<FrameworkImage
sizes="(max-width: 768px) 100vw, (max-width: 1200px) 70vw, 900px"
+1 -1
View File
@@ -6,5 +6,5 @@
},
"types": ["@types/node"]
},
"exclude": ["node_modules", "dist", "eslint.config.mjs"]
"exclude": ["node_modules", "dist"]
}
+5 -3
View File
@@ -140,9 +140,11 @@ function renderMarkdown(this: ShikiTransformerContextCommon, md: string): Elemen
return this.codeToHast(node.value, {
...this.options,
transformers: [],
meta: {
__raw: node.meta ?? undefined,
},
meta: node.meta
? {
__raw: node.meta,
}
: {},
lang,
}).children[0] as Element;
};