Chore: Update Shiki

This commit is contained in:
Fuma Nama
2025-01-20 19:59:52 +08:00
parent ec54240e9b
commit b9601fb87f
14 changed files with 461 additions and 315 deletions
+10
View File
@@ -0,0 +1,10 @@
---
'@fumadocs/mdx-remote': patch
'fumadocs-typescript': patch
'fumadocs-twoslash': patch
'fumadocs-docgen': patch
'fumadocs-openapi': patch
'fumadocs-core': patch
---
Update Shiki
+3 -3
View File
@@ -18,7 +18,7 @@
"@radix-ui/react-popover": "^1.1.4",
"@radix-ui/react-slot": "^1.1.1",
"@radix-ui/react-tooltip": "^1.1.6",
"@shikijs/rehype": "^1.27.2",
"@shikijs/rehype": "^2.0.3",
"@theguild/remark-mermaid": "^0.2.0",
"class-variance-authority": "^0.7.1",
"fumadocs-core": "workspace:*",
@@ -33,7 +33,7 @@
"katex": "^0.16.21",
"lucide-react": "^0.473.0",
"next": "15.1.5",
"oxc-transform": "^0.47.0",
"oxc-transform": "^0.47.1",
"phenomenon": "^1.6.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
@@ -45,7 +45,7 @@
"remark-rehype": "^11.1.1",
"remark-stringify": "^11.0.0",
"scroll-into-view-if-needed": "^3.1.0",
"shiki": "^1.27.2",
"shiki": "^2.0.3",
"tailwind-merge": "^2.6.0",
"zod": "^3.24.1"
},
+1 -1
View File
@@ -18,7 +18,7 @@
"postcss": "^8.5.1",
"react": "19.0.0",
"react-dom": "19.0.0",
"shiki": "^1.27.2",
"shiki": "^2.0.3",
"tailwindcss": "^3.4.17",
"zod": "^3.24.1"
},
+3 -3
View File
@@ -86,7 +86,8 @@
"dependencies": {
"@formatjs/intl-localematcher": "^0.5.10",
"@orama/orama": "^2.1.1",
"@shikijs/rehype": "^1.27.2",
"@shikijs/rehype": "^2.0.3",
"@shikijs/transformers": "^2.0.3",
"github-slugger": "^2.0.0",
"hast-util-to-estree": "^3.1.1",
"hast-util-to-jsx-runtime": "^2.3.2",
@@ -96,7 +97,7 @@
"remark": "^15.0.0",
"remark-gfm": "^4.0.0",
"scroll-into-view-if-needed": "^3.1.0",
"shiki": "^1.27.2",
"shiki": "^2.0.3",
"unist-util-visit": "^5.0.0"
},
"devDependencies": {
@@ -118,7 +119,6 @@
"next": "^15.1.5",
"remark-mdx": "^3.1.0",
"remark-rehype": "^11.1.1",
"shiki-transformers": "^1.0.1",
"tsconfig": "workspace:*",
"typescript": "^5.7.3",
"unified": "^11.0.5",
+47 -45
View File
@@ -1,11 +1,11 @@
import type { Root } from 'hast';
import type { RehypeShikiOptions } from '@shikijs/rehype';
import type { RehypeShikiOptions } from '`@shikijs/rehype`';
import rehypeShikiFromHighlighter from '@shikijs/rehype/core';
import {
transformerNotationDiff,
transformerNotationHighlight,
transformerNotationWordHighlight,
} from 'shiki-transformers';
} from '@shikijs/transformers';
import type { Processor, Transformer } from 'unified';
import {
getSingletonHighlighter,
@@ -54,9 +54,15 @@ export const rehypeCodeDefaultOptions: RehypeCodeOptions = {
experimentalJSEngine: false,
transformers: [
createStyleTransformer(),
transformerNotationHighlight(),
transformerNotationWordHighlight(),
transformerNotationDiff(),
transformerNotationHighlight({
matchAlgorithm: 'v3',
}),
transformerNotationWordHighlight({
matchAlgorithm: 'v3',
}),
transformerNotationDiff({
matchAlgorithm: 'v3',
}),
],
parseMetaString(meta) {
const map: Record<string, string> = {};
@@ -106,67 +112,63 @@ export type RehypeCodeOptions = RehypeShikiOptions & {
*/
export function rehypeCode(
this: Processor,
options: Partial<RehypeCodeOptions> = {},
_options: Partial<RehypeCodeOptions> = {},
): Transformer<Root, Root> {
const codeOptions: RehypeCodeOptions = {
const options: RehypeCodeOptions = {
...rehypeCodeDefaultOptions,
...options,
..._options,
};
codeOptions.transformers ||= [];
codeOptions.transformers = [
{
name: 'rehype-code:pre-process',
preprocess(code, { meta }) {
if (meta && '__parsed_raw' in meta) {
meta.__raw = meta.__parsed_raw;
delete meta.__parsed_raw;
}
const transformers = [...(options.transformers ?? [])];
transformers.unshift({
name: 'rehype-code:pre-process',
preprocess(code, { meta }) {
if (meta && '__parsed_raw' in meta) {
meta.__raw = meta.__parsed_raw;
delete meta.__parsed_raw;
}
if (meta && codeOptions.filterMetaString) {
meta.__raw = codeOptions.filterMetaString(meta.__raw ?? '');
}
if (meta && options.filterMetaString) {
meta.__raw = options.filterMetaString(meta.__raw ?? '');
}
// Remove empty line at end
return code.replace(/\n$/, '');
},
// Remove empty line at end
return code.replace(/\n$/, '');
},
...codeOptions.transformers,
];
});
if (codeOptions.icon !== false) {
codeOptions.transformers = [
...codeOptions.transformers,
transformerIcon(codeOptions.icon),
];
if (options.icon !== false) {
transformers.push(transformerIcon(options.icon));
}
if (codeOptions.tab !== false) {
codeOptions.transformers = [...codeOptions.transformers, transformerTab()];
}
let themeItems: unknown[] = [];
if ('themes' in codeOptions) {
themeItems = Object.values(codeOptions.themes);
} else if ('theme' in codeOptions) {
themeItems = [codeOptions.theme];
if (options.tab !== false) {
transformers.push(transformerTab());
}
const highlighter = getSingletonHighlighter({
engine: codeOptions.experimentalJSEngine
engine: options.experimentalJSEngine
? createJavaScriptRegexEngine()
: createOnigurumaEngine(() => import('shiki/wasm')),
themes: themeItems.filter(Boolean) as BuiltinTheme[],
langs: codeOptions.langs ?? Object.keys(bundledLanguages),
themes:
'themes' in options
? (Object.values(options.themes).filter(Boolean) as BuiltinTheme[])
: [options.theme],
langs:
options.langs ??
(options.lazy ? undefined : Object.keys(bundledLanguages)),
});
const transformer = highlighter.then((instance) =>
rehypeShikiFromHighlighter(instance, codeOptions),
rehypeShikiFromHighlighter(instance, {
...options,
transformers,
}),
);
return async (tree, file) => {
(await transformer)(tree, file, () => {
await (
await transformer
)(tree, file, () => {
// nothing
});
};
+1 -1
View File
@@ -31,7 +31,7 @@
"fumadocs-typescript": "workspace:^",
"hast-util-to-estree": "^3.1.1",
"npm-to-yarn": "^3.0.1",
"oxc-transform": "^0.47.0",
"oxc-transform": "^0.47.1",
"unist-util-visit": "^5.0.0",
"zod": "^3.24.1"
},
+1
View File
@@ -1,2 +1,3 @@
export * from './compile';
export { parseFrontmatter } from './utils';
export { renderMDX } from './render';
+58 -54
View File
@@ -21,61 +21,65 @@ function _createMdxContent(props) {
fileName: "<source.js>",
lineNumber: 2,
columnNumber: 1
}, this), "\n", _jsxDEV(_components.pre, {
className: "shiki shiki-themes github-light github-dark",
style: {
"--shiki-light": "#24292e",
"--shiki-dark": "#e1e4e8",
"--shiki-light-bg": "#fff",
"--shiki-dark-bg": "#24292e"
},
tabIndex: "0",
icon: "<svg viewBox=\"0 0 24 24\"><path d=\"M14.23 12.004a2.236 2.236 0 0 1-2.235 2.236 2.236 2.236 0 0 1-2.236-2.236 2.236 2.236 0 0 1 2.235-2.236 2.236 2.236 0 0 1 2.236 2.236zm2.648-10.69c-1.346 0-3.107.96-4.888 2.622-1.78-1.653-3.542-2.602-4.887-2.602-.41 0-.783.093-1.106.278-1.375.793-1.683 3.264-.973 6.365C1.98 8.917 0 10.42 0 12.004c0 1.59 1.99 3.097 5.043 4.03-.704 3.113-.39 5.588.988 6.38.32.187.69.275 1.102.275 1.345 0 3.107-.96 4.888-2.624 1.78 1.654 3.542 2.603 4.887 2.603.41 0 .783-.09 1.106-.275 1.374-.792 1.683-3.263.973-6.365C22.02 15.096 24 13.59 24 12.004c0-1.59-1.99-3.097-5.043-4.032.704-3.11.39-5.587-.988-6.38-.318-.184-.688-.277-1.092-.278zm-.005 1.09v.006c.225 0 .406.044.558.127.666.382.955 1.835.73 3.704-.054.46-.142.945-.25 1.44-.96-.236-2.006-.417-3.107-.534-.66-.905-1.345-1.727-2.035-2.447 1.592-1.48 3.087-2.292 4.105-2.295zm-9.77.02c1.012 0 2.514.808 4.11 2.28-.686.72-1.37 1.537-2.02 2.442-1.107.117-2.154.298-3.113.538-.112-.49-.195-.964-.254-1.42-.23-1.868.054-3.32.714-3.707.19-.09.4-.127.563-.132zm4.882 3.05c.455.468.91.992 1.36 1.564-.44-.02-.89-.034-1.345-.034-.46 0-.915.01-1.36.034.44-.572.895-1.096 1.345-1.565zM12 8.1c.74 0 1.477.034 2.202.093.406.582.802 1.203 1.183 1.86.372.64.71 1.29 1.018 1.946-.308.655-.646 1.31-1.013 1.95-.38.66-.773 1.288-1.18 1.87-.728.063-1.466.098-2.21.098-.74 0-1.477-.035-2.202-.093-.406-.582-.802-1.204-1.183-1.86-.372-.64-.71-1.29-1.018-1.946.303-.657.646-1.313 1.013-1.954.38-.66.773-1.286 1.18-1.868.728-.064 1.466-.098 2.21-.098zm-3.635.254c-.24.377-.48.763-.704 1.16-.225.39-.435.782-.635 1.174-.265-.656-.49-1.31-.676-1.947.64-.15 1.315-.283 2.015-.386zm7.26 0c.695.103 1.365.23 2.006.387-.18.632-.405 1.282-.66 1.933-.2-.39-.41-.783-.64-1.174-.225-.392-.465-.774-.705-1.146zm3.063.675c.484.15.944.317 1.375.498 1.732.74 2.852 1.708 2.852 2.476-.005.768-1.125 1.74-2.857 2.475-.42.18-.88.342-1.355.493-.28-.958-.646-1.956-1.1-2.98.45-1.017.81-2.01 1.085-2.964zm-13.395.004c.278.96.645 1.957 1.1 2.98-.45 1.017-.812 2.01-1.086 2.964-.484-.15-.944-.318-1.37-.5-1.732-.737-2.852-1.706-2.852-2.474 0-.768 1.12-1.742 2.852-2.476.42-.18.88-.342 1.356-.494zm11.678 4.28c.265.657.49 1.312.676 1.948-.64.157-1.316.29-2.016.39.24-.375.48-.762.705-1.158.225-.39.435-.788.636-1.18zm-9.945.02c.2.392.41.783.64 1.175.23.39.465.772.705 1.143-.695-.102-1.365-.23-2.006-.386.18-.63.406-1.282.66-1.933zM17.92 16.32c.112.493.2.968.254 1.423.23 1.868-.054 3.32-.714 3.708-.147.09-.338.128-.563.128-1.012 0-2.514-.807-4.11-2.28.686-.72 1.37-1.536 2.02-2.44 1.107-.118 2.154-.3 3.113-.54zm-11.83.01c.96.234 2.006.415 3.107.532.66.905 1.345 1.727 2.035 2.446-1.595 1.483-3.092 2.295-4.11 2.295-.22-.005-.406-.05-.553-.132-.666-.38-.955-1.834-.73-3.703.054-.46.142-.944.25-1.438zm4.56.64c.44.02.89.034 1.345.034.46 0 .915-.01 1.36-.034-.44.572-.895 1.095-1.345 1.565-.455-.47-.91-.993-1.36-1.565z\" fill=\"currentColor\" /></svg>",
children: _jsxDEV(_components.code, {
children: _jsxDEV(_components.span, {
className: "line",
children: [_jsxDEV(_components.span, {
style: {
"--shiki-light": "#24292E",
"--shiki-dark": "#E1E4E8"
},
children: "console."
}, undefined, false, {
}, this), "\n", _jsxDEV(_Fragment, {
children: _jsxDEV(_components.pre, {
className: "shiki shiki-themes github-light github-dark",
style: {
"--shiki-light": "#24292e",
"--shiki-dark": "#e1e4e8",
"--shiki-light-bg": "#fff",
"--shiki-dark-bg": "#24292e"
},
tabIndex: "0",
icon: "<svg viewBox=\"0 0 24 24\"><path d=\"M14.23 12.004a2.236 2.236 0 0 1-2.235 2.236 2.236 2.236 0 0 1-2.236-2.236 2.236 2.236 0 0 1 2.235-2.236 2.236 2.236 0 0 1 2.236 2.236zm2.648-10.69c-1.346 0-3.107.96-4.888 2.622-1.78-1.653-3.542-2.602-4.887-2.602-.41 0-.783.093-1.106.278-1.375.793-1.683 3.264-.973 6.365C1.98 8.917 0 10.42 0 12.004c0 1.59 1.99 3.097 5.043 4.03-.704 3.113-.39 5.588.988 6.38.32.187.69.275 1.102.275 1.345 0 3.107-.96 4.888-2.624 1.78 1.654 3.542 2.603 4.887 2.603.41 0 .783-.09 1.106-.275 1.374-.792 1.683-3.263.973-6.365C22.02 15.096 24 13.59 24 12.004c0-1.59-1.99-3.097-5.043-4.032.704-3.11.39-5.587-.988-6.38-.318-.184-.688-.277-1.092-.278zm-.005 1.09v.006c.225 0 .406.044.558.127.666.382.955 1.835.73 3.704-.054.46-.142.945-.25 1.44-.96-.236-2.006-.417-3.107-.534-.66-.905-1.345-1.727-2.035-2.447 1.592-1.48 3.087-2.292 4.105-2.295zm-9.77.02c1.012 0 2.514.808 4.11 2.28-.686.72-1.37 1.537-2.02 2.442-1.107.117-2.154.298-3.113.538-.112-.49-.195-.964-.254-1.42-.23-1.868.054-3.32.714-3.707.19-.09.4-.127.563-.132zm4.882 3.05c.455.468.91.992 1.36 1.564-.44-.02-.89-.034-1.345-.034-.46 0-.915.01-1.36.034.44-.572.895-1.096 1.345-1.565zM12 8.1c.74 0 1.477.034 2.202.093.406.582.802 1.203 1.183 1.86.372.64.71 1.29 1.018 1.946-.308.655-.646 1.31-1.013 1.95-.38.66-.773 1.288-1.18 1.87-.728.063-1.466.098-2.21.098-.74 0-1.477-.035-2.202-.093-.406-.582-.802-1.204-1.183-1.86-.372-.64-.71-1.29-1.018-1.946.303-.657.646-1.313 1.013-1.954.38-.66.773-1.286 1.18-1.868.728-.064 1.466-.098 2.21-.098zm-3.635.254c-.24.377-.48.763-.704 1.16-.225.39-.435.782-.635 1.174-.265-.656-.49-1.31-.676-1.947.64-.15 1.315-.283 2.015-.386zm7.26 0c.695.103 1.365.23 2.006.387-.18.632-.405 1.282-.66 1.933-.2-.39-.41-.783-.64-1.174-.225-.392-.465-.774-.705-1.146zm3.063.675c.484.15.944.317 1.375.498 1.732.74 2.852 1.708 2.852 2.476-.005.768-1.125 1.74-2.857 2.475-.42.18-.88.342-1.355.493-.28-.958-.646-1.956-1.1-2.98.45-1.017.81-2.01 1.085-2.964zm-13.395.004c.278.96.645 1.957 1.1 2.98-.45 1.017-.812 2.01-1.086 2.964-.484-.15-.944-.318-1.37-.5-1.732-.737-2.852-1.706-2.852-2.474 0-.768 1.12-1.742 2.852-2.476.42-.18.88-.342 1.356-.494zm11.678 4.28c.265.657.49 1.312.676 1.948-.64.157-1.316.29-2.016.39.24-.375.48-.762.705-1.158.225-.39.435-.788.636-1.18zm-9.945.02c.2.392.41.783.64 1.175.23.39.465.772.705 1.143-.695-.102-1.365-.23-2.006-.386.18-.63.406-1.282.66-1.933zM17.92 16.32c.112.493.2.968.254 1.423.23 1.868-.054 3.32-.714 3.708-.147.09-.338.128-.563.128-1.012 0-2.514-.807-4.11-2.28.686-.72 1.37-1.536 2.02-2.44 1.107-.118 2.154-.3 3.113-.54zm-11.83.01c.96.234 2.006.415 3.107.532.66.905 1.345 1.727 2.035 2.446-1.595 1.483-3.092 2.295-4.11 2.295-.22-.005-.406-.05-.553-.132-.666-.38-.955-1.834-.73-3.703.054-.46.142-.944.25-1.438zm4.56.64c.44.02.89.034 1.345.034.46 0 .915-.01 1.36-.034-.44.572-.895 1.095-1.345 1.565-.455-.47-.91-.993-1.36-1.565z\" fill=\"currentColor\" /></svg>",
children: _jsxDEV(_components.code, {
children: _jsxDEV(_components.span, {
className: "line",
children: [_jsxDEV(_components.span, {
style: {
"--shiki-light": "#24292E",
"--shiki-dark": "#E1E4E8"
},
children: "console."
}, undefined, false, {
fileName: "<source.js>"
}, this), _jsxDEV(_components.span, {
style: {
"--shiki-light": "#6F42C1",
"--shiki-dark": "#B392F0"
},
children: "log"
}, undefined, false, {
fileName: "<source.js>"
}, this), _jsxDEV(_components.span, {
style: {
"--shiki-light": "#24292E",
"--shiki-dark": "#E1E4E8"
},
children: "("
}, undefined, false, {
fileName: "<source.js>"
}, this), _jsxDEV(_components.span, {
style: {
"--shiki-light": "#032F62",
"--shiki-dark": "#9ECBFF"
},
children: "'Hello World'"
}, undefined, false, {
fileName: "<source.js>"
}, this), _jsxDEV(_components.span, {
style: {
"--shiki-light": "#24292E",
"--shiki-dark": "#E1E4E8"
},
children: ");"
}, undefined, false, {
fileName: "<source.js>"
}, this)]
}, undefined, true, {
fileName: "<source.js>"
}, this), _jsxDEV(_components.span, {
style: {
"--shiki-light": "#6F42C1",
"--shiki-dark": "#B392F0"
},
children: "log"
}, undefined, false, {
fileName: "<source.js>"
}, this), _jsxDEV(_components.span, {
style: {
"--shiki-light": "#24292E",
"--shiki-dark": "#E1E4E8"
},
children: "("
}, undefined, false, {
fileName: "<source.js>"
}, this), _jsxDEV(_components.span, {
style: {
"--shiki-light": "#032F62",
"--shiki-dark": "#9ECBFF"
},
children: "'Hello World'"
}, undefined, false, {
fileName: "<source.js>"
}, this), _jsxDEV(_components.span, {
style: {
"--shiki-light": "#24292E",
"--shiki-dark": "#E1E4E8"
},
children: ");"
}, undefined, false, {
fileName: "<source.js>"
}, this)]
}, undefined, true, {
}, this)
}, undefined, false, {
fileName: "<source.js>"
}, this)
}, undefined, false, {
+46 -44
View File
@@ -17,50 +17,52 @@ function _createMdxContent(props) {
return _jsxs(_Fragment, {
children: [_jsx(_components.p, {
children: "Hey!"
}), "\n", _jsx(_components.pre, {
className: "shiki shiki-themes github-light github-dark",
style: {
"--shiki-light": "#24292e",
"--shiki-dark": "#e1e4e8",
"--shiki-light-bg": "#fff",
"--shiki-dark-bg": "#24292e"
},
tabIndex: "0",
icon: "<svg viewBox=\"0 0 24 24\"><path d=\"M14.23 12.004a2.236 2.236 0 0 1-2.235 2.236 2.236 2.236 0 0 1-2.236-2.236 2.236 2.236 0 0 1 2.235-2.236 2.236 2.236 0 0 1 2.236 2.236zm2.648-10.69c-1.346 0-3.107.96-4.888 2.622-1.78-1.653-3.542-2.602-4.887-2.602-.41 0-.783.093-1.106.278-1.375.793-1.683 3.264-.973 6.365C1.98 8.917 0 10.42 0 12.004c0 1.59 1.99 3.097 5.043 4.03-.704 3.113-.39 5.588.988 6.38.32.187.69.275 1.102.275 1.345 0 3.107-.96 4.888-2.624 1.78 1.654 3.542 2.603 4.887 2.603.41 0 .783-.09 1.106-.275 1.374-.792 1.683-3.263.973-6.365C22.02 15.096 24 13.59 24 12.004c0-1.59-1.99-3.097-5.043-4.032.704-3.11.39-5.587-.988-6.38-.318-.184-.688-.277-1.092-.278zm-.005 1.09v.006c.225 0 .406.044.558.127.666.382.955 1.835.73 3.704-.054.46-.142.945-.25 1.44-.96-.236-2.006-.417-3.107-.534-.66-.905-1.345-1.727-2.035-2.447 1.592-1.48 3.087-2.292 4.105-2.295zm-9.77.02c1.012 0 2.514.808 4.11 2.28-.686.72-1.37 1.537-2.02 2.442-1.107.117-2.154.298-3.113.538-.112-.49-.195-.964-.254-1.42-.23-1.868.054-3.32.714-3.707.19-.09.4-.127.563-.132zm4.882 3.05c.455.468.91.992 1.36 1.564-.44-.02-.89-.034-1.345-.034-.46 0-.915.01-1.36.034.44-.572.895-1.096 1.345-1.565zM12 8.1c.74 0 1.477.034 2.202.093.406.582.802 1.203 1.183 1.86.372.64.71 1.29 1.018 1.946-.308.655-.646 1.31-1.013 1.95-.38.66-.773 1.288-1.18 1.87-.728.063-1.466.098-2.21.098-.74 0-1.477-.035-2.202-.093-.406-.582-.802-1.204-1.183-1.86-.372-.64-.71-1.29-1.018-1.946.303-.657.646-1.313 1.013-1.954.38-.66.773-1.286 1.18-1.868.728-.064 1.466-.098 2.21-.098zm-3.635.254c-.24.377-.48.763-.704 1.16-.225.39-.435.782-.635 1.174-.265-.656-.49-1.31-.676-1.947.64-.15 1.315-.283 2.015-.386zm7.26 0c.695.103 1.365.23 2.006.387-.18.632-.405 1.282-.66 1.933-.2-.39-.41-.783-.64-1.174-.225-.392-.465-.774-.705-1.146zm3.063.675c.484.15.944.317 1.375.498 1.732.74 2.852 1.708 2.852 2.476-.005.768-1.125 1.74-2.857 2.475-.42.18-.88.342-1.355.493-.28-.958-.646-1.956-1.1-2.98.45-1.017.81-2.01 1.085-2.964zm-13.395.004c.278.96.645 1.957 1.1 2.98-.45 1.017-.812 2.01-1.086 2.964-.484-.15-.944-.318-1.37-.5-1.732-.737-2.852-1.706-2.852-2.474 0-.768 1.12-1.742 2.852-2.476.42-.18.88-.342 1.356-.494zm11.678 4.28c.265.657.49 1.312.676 1.948-.64.157-1.316.29-2.016.39.24-.375.48-.762.705-1.158.225-.39.435-.788.636-1.18zm-9.945.02c.2.392.41.783.64 1.175.23.39.465.772.705 1.143-.695-.102-1.365-.23-2.006-.386.18-.63.406-1.282.66-1.933zM17.92 16.32c.112.493.2.968.254 1.423.23 1.868-.054 3.32-.714 3.708-.147.09-.338.128-.563.128-1.012 0-2.514-.807-4.11-2.28.686-.72 1.37-1.536 2.02-2.44 1.107-.118 2.154-.3 3.113-.54zm-11.83.01c.96.234 2.006.415 3.107.532.66.905 1.345 1.727 2.035 2.446-1.595 1.483-3.092 2.295-4.11 2.295-.22-.005-.406-.05-.553-.132-.666-.38-.955-1.834-.73-3.703.054-.46.142-.944.25-1.438zm4.56.64c.44.02.89.034 1.345.034.46 0 .915-.01 1.36-.034-.44.572-.895 1.095-1.345 1.565-.455-.47-.91-.993-1.36-1.565z\" fill=\"currentColor\" /></svg>",
children: _jsx(_components.code, {
children: _jsxs(_components.span, {
className: "line",
children: [_jsx(_components.span, {
style: {
"--shiki-light": "#24292E",
"--shiki-dark": "#E1E4E8"
},
children: "console."
}), _jsx(_components.span, {
style: {
"--shiki-light": "#6F42C1",
"--shiki-dark": "#B392F0"
},
children: "log"
}), _jsx(_components.span, {
style: {
"--shiki-light": "#24292E",
"--shiki-dark": "#E1E4E8"
},
children: "("
}), _jsx(_components.span, {
style: {
"--shiki-light": "#032F62",
"--shiki-dark": "#9ECBFF"
},
children: "'Hello World'"
}), _jsx(_components.span, {
style: {
"--shiki-light": "#24292E",
"--shiki-dark": "#E1E4E8"
},
children: ");"
})]
}), "\n", _jsx(_Fragment, {
children: _jsx(_components.pre, {
className: "shiki shiki-themes github-light github-dark",
style: {
"--shiki-light": "#24292e",
"--shiki-dark": "#e1e4e8",
"--shiki-light-bg": "#fff",
"--shiki-dark-bg": "#24292e"
},
tabIndex: "0",
icon: "<svg viewBox=\"0 0 24 24\"><path d=\"M14.23 12.004a2.236 2.236 0 0 1-2.235 2.236 2.236 2.236 0 0 1-2.236-2.236 2.236 2.236 0 0 1 2.235-2.236 2.236 2.236 0 0 1 2.236 2.236zm2.648-10.69c-1.346 0-3.107.96-4.888 2.622-1.78-1.653-3.542-2.602-4.887-2.602-.41 0-.783.093-1.106.278-1.375.793-1.683 3.264-.973 6.365C1.98 8.917 0 10.42 0 12.004c0 1.59 1.99 3.097 5.043 4.03-.704 3.113-.39 5.588.988 6.38.32.187.69.275 1.102.275 1.345 0 3.107-.96 4.888-2.624 1.78 1.654 3.542 2.603 4.887 2.603.41 0 .783-.09 1.106-.275 1.374-.792 1.683-3.263.973-6.365C22.02 15.096 24 13.59 24 12.004c0-1.59-1.99-3.097-5.043-4.032.704-3.11.39-5.587-.988-6.38-.318-.184-.688-.277-1.092-.278zm-.005 1.09v.006c.225 0 .406.044.558.127.666.382.955 1.835.73 3.704-.054.46-.142.945-.25 1.44-.96-.236-2.006-.417-3.107-.534-.66-.905-1.345-1.727-2.035-2.447 1.592-1.48 3.087-2.292 4.105-2.295zm-9.77.02c1.012 0 2.514.808 4.11 2.28-.686.72-1.37 1.537-2.02 2.442-1.107.117-2.154.298-3.113.538-.112-.49-.195-.964-.254-1.42-.23-1.868.054-3.32.714-3.707.19-.09.4-.127.563-.132zm4.882 3.05c.455.468.91.992 1.36 1.564-.44-.02-.89-.034-1.345-.034-.46 0-.915.01-1.36.034.44-.572.895-1.096 1.345-1.565zM12 8.1c.74 0 1.477.034 2.202.093.406.582.802 1.203 1.183 1.86.372.64.71 1.29 1.018 1.946-.308.655-.646 1.31-1.013 1.95-.38.66-.773 1.288-1.18 1.87-.728.063-1.466.098-2.21.098-.74 0-1.477-.035-2.202-.093-.406-.582-.802-1.204-1.183-1.86-.372-.64-.71-1.29-1.018-1.946.303-.657.646-1.313 1.013-1.954.38-.66.773-1.286 1.18-1.868.728-.064 1.466-.098 2.21-.098zm-3.635.254c-.24.377-.48.763-.704 1.16-.225.39-.435.782-.635 1.174-.265-.656-.49-1.31-.676-1.947.64-.15 1.315-.283 2.015-.386zm7.26 0c.695.103 1.365.23 2.006.387-.18.632-.405 1.282-.66 1.933-.2-.39-.41-.783-.64-1.174-.225-.392-.465-.774-.705-1.146zm3.063.675c.484.15.944.317 1.375.498 1.732.74 2.852 1.708 2.852 2.476-.005.768-1.125 1.74-2.857 2.475-.42.18-.88.342-1.355.493-.28-.958-.646-1.956-1.1-2.98.45-1.017.81-2.01 1.085-2.964zm-13.395.004c.278.96.645 1.957 1.1 2.98-.45 1.017-.812 2.01-1.086 2.964-.484-.15-.944-.318-1.37-.5-1.732-.737-2.852-1.706-2.852-2.474 0-.768 1.12-1.742 2.852-2.476.42-.18.88-.342 1.356-.494zm11.678 4.28c.265.657.49 1.312.676 1.948-.64.157-1.316.29-2.016.39.24-.375.48-.762.705-1.158.225-.39.435-.788.636-1.18zm-9.945.02c.2.392.41.783.64 1.175.23.39.465.772.705 1.143-.695-.102-1.365-.23-2.006-.386.18-.63.406-1.282.66-1.933zM17.92 16.32c.112.493.2.968.254 1.423.23 1.868-.054 3.32-.714 3.708-.147.09-.338.128-.563.128-1.012 0-2.514-.807-4.11-2.28.686-.72 1.37-1.536 2.02-2.44 1.107-.118 2.154-.3 3.113-.54zm-11.83.01c.96.234 2.006.415 3.107.532.66.905 1.345 1.727 2.035 2.446-1.595 1.483-3.092 2.295-4.11 2.295-.22-.005-.406-.05-.553-.132-.666-.38-.955-1.834-.73-3.703.054-.46.142-.944.25-1.438zm4.56.64c.44.02.89.034 1.345.034.46 0 .915-.01 1.36-.034-.44.572-.895 1.095-1.345 1.565-.455-.47-.91-.993-1.36-1.565z\" fill=\"currentColor\" /></svg>",
children: _jsx(_components.code, {
children: _jsxs(_components.span, {
className: "line",
children: [_jsx(_components.span, {
style: {
"--shiki-light": "#24292E",
"--shiki-dark": "#E1E4E8"
},
children: "console."
}), _jsx(_components.span, {
style: {
"--shiki-light": "#6F42C1",
"--shiki-dark": "#B392F0"
},
children: "log"
}), _jsx(_components.span, {
style: {
"--shiki-light": "#24292E",
"--shiki-dark": "#E1E4E8"
},
children: "("
}), _jsx(_components.span, {
style: {
"--shiki-light": "#032F62",
"--shiki-dark": "#9ECBFF"
},
children: "'Hello World'"
}), _jsx(_components.span, {
style: {
"--shiki-light": "#24292E",
"--shiki-dark": "#E1E4E8"
},
children: ");"
})]
})
})
})
}), "\n", _jsxs(_components.table, {
+46 -34
View File
@@ -1,5 +1,5 @@
import { expect, test } from 'vitest';
import { compileMDX } from '@/compile';
import { createCompiler } from '@/compile';
import Glob from 'fast-glob';
import fs from 'node:fs/promises';
import { fileURLToPath } from 'node:url';
@@ -10,43 +10,55 @@ const files = await Glob('./fixtures/*.mdx', {
cwd: dir,
});
const compiler = createCompiler({
rehypeCodeOptions: {
experimentalJSEngine: true,
lazy: true,
themes: {
light: 'github-light',
dark: 'github-dark',
},
},
});
const compilerProduction = createCompiler({
development: false,
rehypeCodeOptions: {
experimentalJSEngine: true,
lazy: true,
themes: {
light: 'github-light',
dark: 'github-dark',
},
},
});
for (const file of files) {
const content = (await fs.readFile(path.join(dir, file))).toString();
test(
`compile: ${file}`,
async () => {
const out = await compileMDX({
skipRender: true,
source: content,
});
test(`compile: ${file}`, async () => {
const out = await compiler.compile({
skipRender: true,
source: content,
});
await expect(out.compiled).toMatchFileSnapshot(`${file}.js`);
await expect({
toc: out.toc,
frontmatter: out.frontmatter,
}).toMatchFileSnapshot(`${file}.json`);
},
1000 * 15,
);
await expect(out.compiled).toMatchFileSnapshot(`${file}.js`);
await expect({
toc: out.toc,
frontmatter: out.frontmatter,
}).toMatchFileSnapshot(`${file}.json`);
});
test(
`compile: ${file} (production)`,
async () => {
const out = await compileMDX({
skipRender: true,
mdxOptions: {
development: false,
},
source: content,
});
test(`compile: ${file} (production)`, async () => {
const out = await compilerProduction.compile({
skipRender: true,
source: content,
});
await expect(out.compiled).toMatchFileSnapshot(`${file}.production.js`);
await expect({
toc: out.toc,
frontmatter: out.frontmatter,
}).toMatchFileSnapshot(`${file}.json`);
},
1000 * 15,
);
await expect(out.compiled).toMatchFileSnapshot(`${file}.production.js`);
await expect({
toc: out.toc,
frontmatter: out.frontmatter,
}).toMatchFileSnapshot(`${file}.json`);
});
}
+1 -1
View File
@@ -54,7 +54,7 @@
"react-hook-form": "^7.54.2",
"remark": "^15.0.1",
"remark-rehype": "^11.1.1",
"shiki": "^1.27.2",
"shiki": "^2.0.3",
"xml-js": "^1.6.11"
},
"devDependencies": {
+2 -2
View File
@@ -37,7 +37,7 @@
},
"dependencies": {
"@radix-ui/react-popover": "^1.1.4",
"@shikijs/twoslash": "^1.27.2",
"@shikijs/twoslash": "^2.0.3",
"mdast-util-from-markdown": "^2.0.2",
"mdast-util-gfm": "^3.0.0",
"mdast-util-to-hast": "^13.2.0",
@@ -52,7 +52,7 @@
"fumadocs-ui": "workspace:*",
"postcss": "^8.5.1",
"postcss-lightningcss": "^1.0.1",
"shiki": "^1.27.2",
"shiki": "^2.0.3",
"tailwindcss": "^3.4.17",
"tsconfig": "workspace:*"
},
+1 -1
View File
@@ -40,7 +40,7 @@
"mdast-util-from-markdown": "^2.0.2",
"mdast-util-gfm": "^3.0.0",
"mdast-util-to-hast": "^13.2.0",
"shiki": "^1.27.2",
"shiki": "^2.0.3",
"ts-morph": "^25.0.0"
},
"devDependencies": {
+241 -126
View File
@@ -40,7 +40,7 @@ importers:
version: 6.0.1
tsup:
specifier: 8.3.5
version: 8.3.5(@swc/[email protected].7)([email protected])([email protected])([email protected])([email protected])([email protected])
version: 8.3.5(@swc/[email protected].8)([email protected])([email protected])([email protected])([email protected])([email protected])
turbo:
specifier: 2.3.3
version: 2.3.3
@@ -75,8 +75,8 @@ importers:
specifier: ^1.1.6
version: 1.1.6(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
'@shikijs/rehype':
specifier: ^1.27.2
version: 1.27.2
specifier: ^2.0.3
version: 2.0.3
'@theguild/remark-mermaid':
specifier: ^0.2.0
version: 0.2.0([email protected])
@@ -120,8 +120,8 @@ importers:
specifier: 15.1.5
version: 15.1.5(@opentelemetry/[email protected])([email protected]([email protected]))([email protected])
oxc-transform:
specifier: ^0.47.0
version: 0.47.0
specifier: ^0.47.1
version: 0.47.1
phenomenon:
specifier: ^1.6.0
version: 1.6.0
@@ -156,8 +156,8 @@ importers:
specifier: ^3.1.0
version: 3.1.0
shiki:
specifier: ^1.27.2
version: 1.27.2
specifier: ^2.0.3
version: 2.0.3
tailwind-merge:
specifier: ^2.6.0
version: 2.6.0
@@ -376,8 +376,8 @@ importers:
specifier: 19.0.0
version: 19.0.0([email protected])
shiki:
specifier: ^1.27.2
version: 1.27.2
specifier: ^2.0.3
version: 2.0.3
tailwindcss:
specifier: ^3.4.17
version: 3.4.17
@@ -517,8 +517,11 @@ importers:
specifier: ^2.1.1
version: 2.1.1
'@shikijs/rehype':
specifier: ^1.27.2
version: 1.27.2
specifier: ^2.0.3
version: 2.0.3
'@shikijs/transformers':
specifier: ^2.0.3
version: 2.0.3
github-slugger:
specifier: ^2.0.0
version: 2.0.0
@@ -553,8 +556,8 @@ importers:
specifier: ^3.1.0
version: 3.1.0
shiki:
specifier: ^1.27.2
version: 1.27.2
specifier: ^2.0.3
version: 2.0.3
unist-util-visit:
specifier: ^5.0.0
version: 5.0.0
@@ -613,9 +616,6 @@ importers:
remark-rehype:
specifier: ^11.1.1
version: 11.1.1
shiki-transformers:
specifier: ^1.0.1
version: 1.0.1([email protected])
tsconfig:
specifier: workspace:*
version: link:../tsconfig
@@ -717,8 +717,8 @@ importers:
specifier: ^3.0.1
version: 3.0.1
oxc-transform:
specifier: ^0.47.0
version: 0.47.0
specifier: ^0.47.1
version: 0.47.1
unist-util-visit:
specifier: ^5.0.0
version: 5.0.0
@@ -833,7 +833,7 @@ importers:
version: 6.0.3
webpack:
specifier: ^5.97.1
version: 5.97.1(@swc/[email protected].7)([email protected])
version: 5.97.1(@swc/[email protected].8)([email protected])
packages/mdx-remote:
dependencies:
@@ -938,8 +938,8 @@ importers:
specifier: ^11.1.1
version: 11.1.1
shiki:
specifier: ^1.27.2
version: 1.27.2
specifier: ^2.0.3
version: 2.0.3
xml-js:
specifier: ^1.6.11
version: 1.6.11
@@ -983,8 +983,8 @@ importers:
specifier: ^1.1.4
version: 1.1.4(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])
'@shikijs/twoslash':
specifier: ^1.27.2
version: 1.27.2([email protected])
specifier: ^2.0.3
version: 2.0.3([email protected])
mdast-util-from-markdown:
specifier: ^2.0.2
version: 2.0.2
@@ -1026,8 +1026,8 @@ importers:
specifier: ^1.0.1
version: 1.0.1([email protected])
shiki:
specifier: ^1.27.2
version: 1.27.2
specifier: ^2.0.3
version: 2.0.3
tailwindcss:
specifier: ^3.4.17
version: 3.4.17
@@ -1053,8 +1053,8 @@ importers:
specifier: ^13.2.0
version: 13.2.0
shiki:
specifier: ^1.27.2
version: 1.27.2
specifier: ^2.0.3
version: 2.0.3
ts-morph:
specifier: ^25.0.0
version: 25.0.0
@@ -2151,43 +2151,43 @@ packages:
'@oramacloud/[email protected]':
resolution: {integrity: sha512-uNPFs4wq/iOPbggCwTkVNbIr64Vfd7ZS/h+cricXVnzXWocjDTfJ3wLL4lr0qiSu41g8z+eCAGBqJ30RO2O4AA==}
'@oxc-transform/[email protected].0':
resolution: {integrity: sha512-RetUn1u7C/NPBIISCMi5qGj6uBbedt5I+fzHcPt3/quR3HsxY9rCJXE6OR4Thliad2vYFSOl6Bzu4wu/zATx2w==}
'@oxc-transform/[email protected].1':
resolution: {integrity: sha512-GT56Wkk/M1Eo1HCFfj8PxNn/ssBfxFVIrS3A5lJ6GE2k3gbVRORNzVA1znHtB3Tj4hIvWPNzqh+EQ2bhaFypNQ==}
cpu: [arm64]
os: [darwin]
'@oxc-transform/[email protected].0':
resolution: {integrity: sha512-rvR1Bb+jKyqg0Gxxrs9OD7gKrmViBAHDKWKydVIJZ1g6sv2bqQxGmbAvmPLcXVMinqOdbu7Qpk51hbuU7rah5w==}
'@oxc-transform/[email protected].1':
resolution: {integrity: sha512-2lwBMYHouI8Q0wubDCRuK4lMosiA0acsk2ZZzvTzYkn2xNKXtug2+D5UsOxpRLzW1vtIiTEdE5kPaafGPIIcqw==}
cpu: [x64]
os: [darwin]
'@oxc-transform/[email protected].0':
resolution: {integrity: sha512-Z0tFWTWQdtLoQDOc3rN3ae7sGLssaalTuV+pT+VcU6n995lX8c8cRUTJC73F1rQVFZy6Oxzg4g5uMgoAsfbCew==}
'@oxc-transform/[email protected].1':
resolution: {integrity: sha512-AvAhryJTpOF0pJdroI0167cmRHDGv2aBBbTjEeNYW5b5KHNvmfeFF1eKT5e8pwj9ygR6DhwXQMIfYOsR2GBzrw==}
cpu: [arm64]
os: [linux]
'@oxc-transform/[email protected].0':
resolution: {integrity: sha512-g59eI7TwhL764Ls6oGomN3B1COOHi39X1fqfswIxl3EwCpPijWFc98EKUapdaZD8/7ID+x0QZpjvmexpSqPxLg==}
'@oxc-transform/[email protected].1':
resolution: {integrity: sha512-b3KDPQeC3yTZXF3vroOD9Mq6QfODxVt8OOeWkufytgOvNyM0NrHhXiiRLBvbNQyf7GfKd82B0l7is6hKuGELwg==}
cpu: [arm64]
os: [linux]
'@oxc-transform/[email protected].0':
resolution: {integrity: sha512-TTCjgpP1SEIkAWjRBwUBGyBzGZoXfdBcTpGrYVi8kHzZhgfLB8KoFpASCuNTnvRyWll6lCTWM7W0QjgclXSczQ==}
'@oxc-transform/[email protected].1':
resolution: {integrity: sha512-bvdPbWnAtfWhQ+hRLtZCeI+mHivHBR4oJL1Zk8HZdo61LEr32XrfTjAOjzoaRqcANKaZv5o9Skyotp71Pf+Xfg==}
cpu: [x64]
os: [linux]
'@oxc-transform/[email protected].0':
resolution: {integrity: sha512-CuaK7pE7m8bRSa9vor9lEnMwOgRcVqpq9ymQqCVd3AdVt7bzOKe6Ud7BwRtBGKtwRzUUl8PS3RXsuyPCL6BBWA==}
'@oxc-transform/[email protected].1':
resolution: {integrity: sha512-E549H+YqzkkvX72QxJechLEAAIseHndrrSWW5lacfCpatZjpTEBoHaMfTf7L3B4Ha/hg/JRZrn/rudYOMJ7ztA==}
cpu: [x64]
os: [linux]
'@oxc-transform/[email protected].0':
resolution: {integrity: sha512-2JY+PZcy53FvGx6258Z4jdwdbwFVNgET6n/Q6w3XaehWFgdW2b2ru09y1QUP+j0mLDuzKTtGKLorZV+gCyJQNQ==}
'@oxc-transform/[email protected].1':
resolution: {integrity: sha512-GGbQBBKjIJ3CZ+lnOyPdKdyy1cbazZxTAJWN+EShfXJz+T1gY3BF6U3yhiRAvDefZ2SYLvALi2n4Wz//4vUz6A==}
cpu: [arm64]
os: [win32]
'@oxc-transform/[email protected].0':
resolution: {integrity: sha512-Nrwxv+y4ljfesIQhJ/GV1IPP6nPRvLRsqHUVu8pRCvacDnNH92ShPYPfOZGRZmy03QQk8u2rtwye4FsNLoGImg==}
'@oxc-transform/[email protected].1':
resolution: {integrity: sha512-IVdLjLWknwrhWsWj0f0WTWd3Mfu3a/kjEWwTy0X65udWNxfzpIOVSnauHL7E0lWiatAKmpjS4GacVDPtMdw3GQ==}
cpu: [x64]
os: [win32]
@@ -2809,29 +2809,32 @@ packages:
'@sec-ant/[email protected]':
resolution: {integrity: sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==}
'@shikijs/core@1.27.2':
resolution: {integrity: sha512-ns1dokDr0KE1lQ9mWd4rqaBkhSApk0qGCK1+lOqwnkQSkVZ08UGqXj1Ef8dAcTMZNFkN6PSNjkL5TYNX7pyPbQ==}
'@shikijs/core@2.0.3':
resolution: {integrity: sha512-dhbLagx1As0BmaNGUTxJ/qshb4MPyKYIvjCcd7y1utDToebUS4BZI3FH+WVCJF3/VwWWKOhuzX4lgjOb7qtSjQ==}
'@shikijs/engine-javascript@1.27.2':
resolution: {integrity: sha512-0JB7U5vJc16NShBdxv9hSSJYSKX79+32O7F4oXIxJLdYfomyFvx4B982ackUI9ftO9T3WwagkiiD3nOxOOLiGA==}
'@shikijs/engine-javascript@2.0.3':
resolution: {integrity: sha512-GMmfP8xEmUl0H7RXo4VTFYqAWzAADtlghA9perlm6mzuo0n/Ih+owh57ZLWBMMe/N1TUMis4SGJRvx31HtK3jg==}
'@shikijs/engine-oniguruma@1.27.2':
resolution: {integrity: sha512-FZYKD1KN7srvpkz4lbGLOYWlyDU4Rd+2RtuKfABTkafAPOFr+J6umfIwY/TzOQqfNtWjL7SAwPAO0dcOraRLaQ==}
'@shikijs/engine-oniguruma@2.0.3':
resolution: {integrity: sha512-MicRzo0aNaS18yXBnXjYFLnzi5Sh3NUHtm/WXzavtpGiWd75gRdZsZDMceeFyTL9MMy9iGifK2JePXY5dlZHIA==}
'@shikijs/langs@1.27.2':
resolution: {integrity: sha512-MSrknKL0DbeXvhtSigMLIzjPOOQfvK7fsbcRv2NUUB0EvuTTomY8/U+lAkczYrXY2+dygKOapJKk8ScFYbtoNw==}
'@shikijs/langs@2.0.3':
resolution: {integrity: sha512-L+QcwH6tjVY21xDxe3etR+C+33mAbkyQVvUIsszwnQrRVI54r7VPNTMVWR4EbZfPFwWmwLCoO83V5YiBWusvVg==}
'@shikijs/rehype@1.27.2':
resolution: {integrity: sha512-/atIU07PvWvScw6Scln08nSevZocXsqNipiyk/dhxq25Xqc0weCQQlh502cggsHulMQNfidZ7tnu8U8wb9Cx3A==}
'@shikijs/rehype@2.0.3':
resolution: {integrity: sha512-aNeguwI069jSZQc77uj2UKpF8vmpqlg5OZCGLPO3DfbTQbLDrSJbzz2AzWg8Rwf0PDHk8U1Jhuslh+NV6mEDcA==}
'@shikijs/themes@1.27.2':
resolution: {integrity: sha512-Yw/uV7EijjWavIIZLoWneTAohcbBqEKj6XMX1bfMqO3llqTKsyXukPp1evf8qPqzUHY7ibauqEaQchhfi857mg==}
'@shikijs/themes@2.0.3':
resolution: {integrity: sha512-NFnArltjzmYAssn1SLIFlKX9HJEL9K12z0uBB0tg579hW6UHIXwfd+AhsaB/+cXYLix2YuN5uEPJpqtRN2zi0A==}
'@shikijs/t[email protected]':
resolution: {integrity: sha512-hi/ysuEzEkHua3qdc/6hOTVdxS1s6SUFs985NB4t5/5qLyF+ST7GwLHPRyRZmT1TJ2IhPX8dg8McVU+oeDJmwA==}
'@shikijs/t[email protected]':
resolution: {integrity: sha512-Y5qmHA2LyoXccq6IPP5AeGqialn54ZORPBxbyNH+NEbCaw1nTCCy+Tfm3idRkqYLZOw0yq+0MUSDWbGezHksow==}
'@shikijs/t[email protected]':
resolution: {integrity: sha512-DM9OWUyjmdYdnKDpaGB/GEn9XkToyK1tqxuqbmc5PV+5K8WjjwfygL3+cIvbkSw2v1ySwHDgqATq/+98pJ4Kyg==}
'@shikijs/t[email protected]':
resolution: {integrity: sha512-JcRb1onXgDmxhx8MXsE/apzpUnY5WwvVpkvHXjvv6F+GreorLf47BIDvqOPJZ+N6L6OYjNhFUQhcxIWqjzPDbQ==}
'@shikijs/[email protected]':
resolution: {integrity: sha512-jyP6NMdWkbBpEn3WqqH8TCfkzE52/hS7msKGJAvxcwyQQah7+hU8x7ejFhCVoxrBaW001v+ID4zl3wspcDSaaw==}
'@shikijs/[email protected]':
resolution: {integrity: sha512-fTIQwLF+Qhuws31iw7Ncl1R3HUDtGwIipiJ9iU+UsDUwMhegFcQKQHd51nZjb7CArq0MvON8rbgCGQYWHUKAdg==}
@@ -2850,60 +2853,120 @@ packages:
cpu: [arm64]
os: [darwin]
'@swc/[email protected]':
resolution: {integrity: sha512-FtacTu9zS5YuepujQqujveNw8BQ8ESJ+pN1Z7C+WrKCHlCl+5dh0n6gMAlEj+3iRvY6UAYqkzTVeiX/bOMoJKA==}
engines: {node: '>=10'}
cpu: [arm64]
os: [darwin]
'@swc/[email protected]':
resolution: {integrity: sha512-RFIAmWVicD/l3RzxgHW0R/G1ya/6nyMspE2cAeDcTbjHi0I5qgdhBWd6ieXOaqwEwiCd0Mot1g2VZrLGoBLsjQ==}
engines: {node: '>=10'}
cpu: [x64]
os: [darwin]
'@swc/[email protected]':
resolution: {integrity: sha512-nfk+iq7EKQwADaCERzZLSi9ovzjJcqDWaO4e2ztyCNaLFi6fP1m6+ij21aki5KAd8AXoY4fue4Mo2fuYbesX9Q==}
engines: {node: '>=10'}
cpu: [x64]
os: [darwin]
'@swc/[email protected]':
resolution: {integrity: sha512-QP8vz7yELWfop5mM5foN6KkLylVO7ZUgWSF2cA0owwIaziactB2hCPZY5QU690coJouk9KmdFsPWDnaCFUP8tg==}
engines: {node: '>=10'}
cpu: [arm]
os: [linux]
'@swc/[email protected]':
resolution: {integrity: sha512-CL2zfbnrEc6nIiWbgshOz0mjn/zY8JcYqO12vGcTxmZOrh0n+mmHN2ejX91pYWQnQDtbhCmFTaEndExFpA7Gww==}
engines: {node: '>=10'}
cpu: [arm]
os: [linux]
'@swc/[email protected]':
resolution: {integrity: sha512-NgUDBGQcOeLNR+EOpmUvSDIP/F7i/OVOKxst4wOvT5FTxhnkWrW+StJGKj+DcUVSK5eWOYboSXr1y+Hlywwokw==}
engines: {node: '>=10'}
cpu: [arm64]
os: [linux]
'@swc/[email protected]':
resolution: {integrity: sha512-quS8F18DDScW3B7qnbWkz95abZ5p0xp/W8N498NAAls/YQj4jQIlf8WlAWoxVVjY/SmSus5kN5tuwhHD8t0NPw==}
engines: {node: '>=10'}
cpu: [arm64]
os: [linux]
'@swc/[email protected]':
resolution: {integrity: sha512-gp5Un3EbeSThBIh6oac5ZArV/CsSmTKj5jNuuUAuEsML3VF9vqPO+25VuxCvsRf/z3py+xOWRaN2HY/rjMeZog==}
engines: {node: '>=10'}
cpu: [arm64]
os: [linux]
'@swc/[email protected]':
resolution: {integrity: sha512-wI0Hny8fHbBK/OjJ7eFYP0uDKiCMMMr5OBWGKMRRUvWs2zlGeJQZbwUeCnWuLLXzDfL+feMfh5TieYlqKTTtRw==}
engines: {node: '>=10'}
cpu: [arm64]
os: [linux]
'@swc/[email protected]':
resolution: {integrity: sha512-k/OxLLMl/edYqbZyUNg6/bqEHTXJT15l9WGqsl/2QaIGwWGvles8YjruQYQ9d4h/thSXLT9gd8bExU2D0N+bUA==}
engines: {node: '>=10'}
cpu: [x64]
os: [linux]
'@swc/[email protected]':
resolution: {integrity: sha512-24FCRUFO8gzPP2eu3soHTm3lk+ktcsIhdM2DTOlXGA+2TBYFWgAZX/yZV+eeRrtIZYSr4OcOWsNWnQ5Ma4budA==}
engines: {node: '>=10'}
cpu: [x64]
os: [linux]
'@swc/[email protected]':
resolution: {integrity: sha512-XeDoURdWt/ybYmXLCEE8aSiTOzEn0o3Dx5l9hgt0IZEmTts7HgHHVeRgzGXbR4yDo0MfRuX5nE1dYpTmCz0uyA==}
engines: {node: '>=10'}
cpu: [x64]
os: [linux]
'@swc/[email protected]':
resolution: {integrity: sha512-mBo7M/FmUhoWpUG17MLbS98iRA7t6ThxQBWDJZd322whkN1GqrvumYm2wvvjmoMTeDOPwAL3hIIa5H+Q4vb1zA==}
engines: {node: '>=10'}
cpu: [x64]
os: [linux]
'@swc/[email protected]':
resolution: {integrity: sha512-nYAbi/uLS+CU0wFtBx8TquJw2uIMKBnl04LBmiVoFrsIhqSl+0MklaA9FVMGA35NcxSJfcm92Prl2W2LfSnTqQ==}
engines: {node: '>=10'}
cpu: [arm64]
os: [win32]
'@swc/[email protected]':
resolution: {integrity: sha512-rXJ9y77JZZXoZkgFR0mObKa3TethRBJ6Exs/pwhScl9pz4qsfxhj/bQbEu1g1i/ihmd0l+IKZwGSC7Ibh3HA2Q==}
engines: {node: '>=10'}
cpu: [arm64]
os: [win32]
'@swc/[email protected]':
resolution: {integrity: sha512-+aGAbsDsIxeLxw0IzyQLtvtAcI1ctlXVvVcXZMNXIXtTURM876yNrufRo4ngoXB3jnb1MLjIIjgXfFs/eZTUSw==}
engines: {node: '>=10'}
cpu: [ia32]
os: [win32]
'@swc/[email protected]':
resolution: {integrity: sha512-n6ekYFJEBPvTpRIqJiu6EHXVzVnuCtDTpFnn/0KVGJI1yQHriGVEovnb/+qyLh8Rwx2AZM9qgZVgMhVtfcFQJg==}
engines: {node: '>=10'}
cpu: [ia32]
os: [win32]
'@swc/[email protected]':
resolution: {integrity: sha512-TBf4clpDBjF/UUnkKrT0/th76/zwvudk5wwobiTFqDywMApHip5O0VpBgZ+4raY2TM8k5+ujoy7bfHb22zu17Q==}
engines: {node: '>=10'}
cpu: [x64]
os: [win32]
'@swc/[email protected]':
resolution: {integrity: sha512-vplXxtH/lFc/epELnAyvdCvqlDJrM+OKtkphYcbPqq50g/dEZYZ8FYHU5Df9Uo19UooWSo1LaxPk4R7n6i1Axw==}
engines: {node: '>=10'}
cpu: [x64]
os: [win32]
'@swc/[email protected]':
resolution: {integrity: sha512-py91kjI1jV5D5W/Q+PurBdGsdU5TFbrzamP7zSCqLdMcHkKi3rQEM5jkQcZr0MXXSJTaayLxS3MWYTBIkzPDrg==}
engines: {node: '>=10'}
@@ -2913,6 +2976,15 @@ packages:
'@swc/helpers':
optional: true
'@swc/[email protected]':
resolution: {integrity: sha512-I3G+n9qbHNu6KNraaAG1+Z1S1x5S7MGRA6OEppT8Pt3Z9uD5a/kYAGU33eXy7zY+BoKuKA2X1H0r4vSimAgU8w==}
engines: {node: '>=10'}
peerDependencies:
'@swc/helpers': '*'
peerDependenciesMeta:
'@swc/helpers':
optional: true
'@swc/[email protected]':
resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==}
@@ -5298,8 +5370,8 @@ packages:
resolution: {integrity: sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==}
engines: {node: '>=18'}
oniguruma-to-es@2.1.0:
resolution: {integrity: sha512-Iq/949c5IueVC5gQR7OYXs0uHsDIePcgZFlVRIVGfQcWwbKG+nsyWfthswdytShlRdkZADY+bWSi+BRyUL81gA==}
oniguruma-to-es@2.2.0:
resolution: {integrity: sha512-EEsso27ri0sf+t4uRFEj5C5gvXQj0d0w1Y2qq06b+hDLBnvzO1rWTwEW4C7ytan6nhg4WPwE26eLoiPhHUbvKg==}
[email protected]:
resolution: {integrity: sha512-s1cIatOqrrhSj2tmJ4abFYZQK6l5v+V4toO5q1Pa0DyN8mtyqy2I+Qrj5W9vOELEtybIMQs/TBZGVO/DtTFK8w==}
@@ -5330,8 +5402,8 @@ packages:
resolution: {integrity: sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==}
engines: {node: '>= 0.4'}
[email protected].0:
resolution: {integrity: sha512-qkKXksYdUTKWC6lzY/IcimP9qfxX8swPH34aBKOsBRbJjr7tuS84XVa3gdkTs3gpRXqKkUp+2Bwose9PXtobCA==}
[email protected].1:
resolution: {integrity: sha512-krLyXKa+2RWT9MFcj2q4ffEFFzX3EoypcLGpXMhTW0ayLxmGxyiLYlDlwFwP+5fbaVeeBu36XsVroOZelddl7g==}
[email protected]:
resolution: {integrity: sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==}
@@ -5915,13 +5987,8 @@ packages:
resolution: {integrity: sha512-AzqKpGKjrj7EM6rKVQEPpB288oCfnrEIuyoT9cyF4nmGa7V8Zk6f7RRqYisX8X9m+Q7bd632aZW4ky7EhbQztA==}
engines: {node: '>= 0.4'}
shiki-transformers@1.0.1:
resolution: {integrity: sha512-54myhk9WIgJbZVWoieB8zmJwbLt3RRO5gRT8F8eyfRihWPABzBT+oUlZdUFEn9bKpG5QEoczUnCHeh/djk9Ibg==}
peerDependencies:
shiki: ^1.22.1
[email protected]:
resolution: {integrity: sha512-QtA1C41oEVixKog+V8I3ia7jjGls7oCZ8Yul8vdHrVBga5uPoyTtMvFF4lMMXIyAZo5A5QbXq91bot2vA6Q+eQ==}
shiki@2.0.3:
resolution: {integrity: sha512-njF3iF97mxWcEFxxB591EeVFgf5VPpXJKFIB3RCFSkcgINetMIb+9CfNInmzkz8BlPWlEEY1nSGd0F1807YhCg==}
[email protected]:
resolution: {integrity: sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==}
@@ -7536,28 +7603,28 @@ snapshots:
'@orama/orama': 3.0.2
lodash: 4.17.21
'@oxc-transform/[email protected].0':
'@oxc-transform/[email protected].1':
optional: true
'@oxc-transform/[email protected].0':
'@oxc-transform/[email protected].1':
optional: true
'@oxc-transform/[email protected].0':
'@oxc-transform/[email protected].1':
optional: true
'@oxc-transform/[email protected].0':
'@oxc-transform/[email protected].1':
optional: true
'@oxc-transform/[email protected].0':
'@oxc-transform/[email protected].1':
optional: true
'@oxc-transform/[email protected].0':
'@oxc-transform/[email protected].1':
optional: true
'@oxc-transform/[email protected].0':
'@oxc-transform/[email protected].1':
optional: true
'@oxc-transform/[email protected].0':
'@oxc-transform/[email protected].1':
optional: true
'@parcel/[email protected]':
@@ -8132,53 +8199,58 @@ snapshots:
'@sec-ant/[email protected]': {}
'@shikijs/core@1.27.2':
'@shikijs/core@2.0.3':
dependencies:
'@shikijs/engine-javascript': 1.27.2
'@shikijs/engine-oniguruma': 1.27.2
'@shikijs/types': 1.27.2
'@shikijs/engine-javascript': 2.0.3
'@shikijs/engine-oniguruma': 2.0.3
'@shikijs/types': 2.0.3
'@shikijs/vscode-textmate': 10.0.1
'@types/hast': 3.0.4
hast-util-to-html: 9.0.4
'@shikijs/engine-javascript@1.27.2':
'@shikijs/engine-javascript@2.0.3':
dependencies:
'@shikijs/types': 1.27.2
'@shikijs/types': 2.0.3
'@shikijs/vscode-textmate': 10.0.1
oniguruma-to-es: 2.1.0
oniguruma-to-es: 2.2.0
'@shikijs/engine-oniguruma@1.27.2':
'@shikijs/engine-oniguruma@2.0.3':
dependencies:
'@shikijs/types': 1.27.2
'@shikijs/types': 2.0.3
'@shikijs/vscode-textmate': 10.0.1
'@shikijs/langs@1.27.2':
'@shikijs/langs@2.0.3':
dependencies:
'@shikijs/types': 1.27.2
'@shikijs/types': 2.0.3
'@shikijs/rehype@1.27.2':
'@shikijs/rehype@2.0.3':
dependencies:
'@shikijs/types': 1.27.2
'@shikijs/types': 2.0.3
'@types/hast': 3.0.4
hast-util-to-string: 3.0.1
shiki: 1.27.2
shiki: 2.0.3
unified: 11.0.5
unist-util-visit: 5.0.0
'@shikijs/themes@1.27.2':
'@shikijs/themes@2.0.3':
dependencies:
'@shikijs/types': 1.27.2
'@shikijs/types': 2.0.3
'@shikijs/t[email protected]([email protected].3)':
'@shikijs/t[email protected].3':
dependencies:
'@shikijs/core': 1.27.2
'@shikijs/types': 1.27.2
'@shikijs/core': 2.0.3
'@shikijs/types': 2.0.3
'@shikijs/[email protected]([email protected])':
dependencies:
'@shikijs/core': 2.0.3
'@shikijs/types': 2.0.3
twoslash: 0.2.12([email protected])
transitivePeerDependencies:
- supports-color
- typescript
'@shikijs/types@1.27.2':
'@shikijs/types@2.0.3':
dependencies:
'@shikijs/vscode-textmate': 10.0.1
'@types/hast': 3.0.4
@@ -8192,33 +8264,63 @@ snapshots:
'@swc/[email protected]':
optional: true
'@swc/[email protected]':
optional: true
'@swc/[email protected]':
optional: true
'@swc/[email protected]':
optional: true
'@swc/[email protected]':
optional: true
'@swc/[email protected]':
optional: true
'@swc/[email protected]':
optional: true
'@swc/[email protected]':
optional: true
'@swc/[email protected]':
optional: true
'@swc/[email protected]':
optional: true
'@swc/[email protected]':
optional: true
'@swc/[email protected]':
optional: true
'@swc/[email protected]':
optional: true
'@swc/[email protected]':
optional: true
'@swc/[email protected]':
optional: true
'@swc/[email protected]':
optional: true
'@swc/[email protected]':
optional: true
'@swc/[email protected]':
optional: true
'@swc/[email protected]':
optional: true
'@swc/[email protected]':
optional: true
'@swc/[email protected](@swc/[email protected])':
dependencies:
'@swc/counter': 0.1.3
@@ -8236,6 +8338,23 @@ snapshots:
'@swc/core-win32-x64-msvc': 1.10.7
'@swc/helpers': 0.5.15
'@swc/[email protected]':
dependencies:
'@swc/counter': 0.1.3
'@swc/types': 0.1.17
optionalDependencies:
'@swc/core-darwin-arm64': 1.10.8
'@swc/core-darwin-x64': 1.10.8
'@swc/core-linux-arm-gnueabihf': 1.10.8
'@swc/core-linux-arm64-gnu': 1.10.8
'@swc/core-linux-arm64-musl': 1.10.8
'@swc/core-linux-x64-gnu': 1.10.8
'@swc/core-linux-x64-musl': 1.10.8
'@swc/core-win32-arm64-msvc': 1.10.8
'@swc/core-win32-ia32-msvc': 1.10.8
'@swc/core-win32-x64-msvc': 1.10.8
optional: true
'@swc/[email protected]': {}
'@swc/[email protected]':
@@ -11296,7 +11415,7 @@ snapshots:
dependencies:
mimic-function: 5.0.1
oniguruma-to-es@2.1.0:
oniguruma-to-es@2.2.0:
dependencies:
emoji-regex-xs: 1.0.0
regex: 5.1.1
@@ -11343,16 +11462,16 @@ snapshots:
object-keys: 1.1.1
safe-push-apply: 1.0.0
[email protected].0:
[email protected].1:
optionalDependencies:
'@oxc-transform/binding-darwin-arm64': 0.47.0
'@oxc-transform/binding-darwin-x64': 0.47.0
'@oxc-transform/binding-linux-arm64-gnu': 0.47.0
'@oxc-transform/binding-linux-arm64-musl': 0.47.0
'@oxc-transform/binding-linux-x64-gnu': 0.47.0
'@oxc-transform/binding-linux-x64-musl': 0.47.0
'@oxc-transform/binding-win32-arm64-msvc': 0.47.0
'@oxc-transform/binding-win32-x64-msvc': 0.47.0
'@oxc-transform/binding-darwin-arm64': 0.47.1
'@oxc-transform/binding-darwin-x64': 0.47.1
'@oxc-transform/binding-linux-arm64-gnu': 0.47.1
'@oxc-transform/binding-linux-arm64-musl': 0.47.1
'@oxc-transform/binding-linux-x64-gnu': 0.47.1
'@oxc-transform/binding-linux-x64-musl': 0.47.1
'@oxc-transform/binding-win32-arm64-msvc': 0.47.1
'@oxc-transform/binding-win32-x64-msvc': 0.47.1
[email protected]:
dependencies:
@@ -12031,18 +12150,14 @@ snapshots:
[email protected]: {}
shiki[email protected]([email protected]):
shiki@2.0.3:
dependencies:
shiki: 1.27.2
[email protected]:
dependencies:
'@shikijs/core': 1.27.2
'@shikijs/engine-javascript': 1.27.2
'@shikijs/engine-oniguruma': 1.27.2
'@shikijs/langs': 1.27.2
'@shikijs/themes': 1.27.2
'@shikijs/types': 1.27.2
'@shikijs/core': 2.0.3
'@shikijs/engine-javascript': 2.0.3
'@shikijs/engine-oniguruma': 2.0.3
'@shikijs/langs': 2.0.3
'@shikijs/themes': 2.0.3
'@shikijs/types': 2.0.3
'@shikijs/vscode-textmate': 10.0.1
'@types/hast': 3.0.4
@@ -12280,16 +12395,16 @@ snapshots:
[email protected]: {}
[email protected](@swc/[email protected].7)([email protected])([email protected](@swc/[email protected].7)([email protected])):
[email protected](@swc/[email protected].8)([email protected])([email protected](@swc/[email protected].8)([email protected])):
dependencies:
'@jridgewell/trace-mapping': 0.3.25
jest-worker: 27.5.1
schema-utils: 3.3.0
serialize-javascript: 6.0.2
terser: 5.37.0
webpack: 5.97.1(@swc/[email protected].7)([email protected])
webpack: 5.97.1(@swc/[email protected].8)([email protected])
optionalDependencies:
'@swc/core': 1.10.7(@swc/[email protected])
'@swc/core': 1.10.8
esbuild: 0.24.2
[email protected]:
@@ -12372,7 +12487,7 @@ snapshots:
[email protected]: {}
[email protected](@swc/[email protected].7)([email protected])([email protected])([email protected])([email protected])([email protected]):
[email protected](@swc/[email protected].8)([email protected])([email protected])([email protected])([email protected])([email protected]):
dependencies:
bundle-require: 5.0.0([email protected])
cac: 6.7.14
@@ -12391,7 +12506,7 @@ snapshots:
tinyglobby: 0.2.10
tree-kill: 1.2.2
optionalDependencies:
'@swc/core': 1.10.7(@swc/[email protected])
'@swc/core': 1.10.8
postcss: 8.5.1
typescript: 5.7.3
transitivePeerDependencies:
@@ -12723,7 +12838,7 @@ snapshots:
[email protected]: {}
[email protected](@swc/[email protected].7)([email protected]):
[email protected](@swc/[email protected].8)([email protected]):
dependencies:
'@types/eslint-scope': 3.7.7
'@types/estree': 1.0.6
@@ -12745,7 +12860,7 @@ snapshots:
neo-async: 2.6.2
schema-utils: 3.3.0
tapable: 2.2.1
terser-webpack-plugin: 5.3.10(@swc/[email protected].7)([email protected])([email protected](@swc/[email protected].7)([email protected]))
terser-webpack-plugin: 5.3.10(@swc/[email protected].8)([email protected])([email protected](@swc/[email protected].8)([email protected]))
watchpack: 2.4.2
webpack-sources: 3.2.3
transitivePeerDependencies: