Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
04f23d4
feat: move code highlighter to x components
Nov 28, 2025
0418f32
feat: move x-markdown mermaid and highlight to components and remove …
Div627 Nov 30, 2025
a08e9a4
Merge remote-tracking branch 'origin/feature' into feature_markdown_c…
Div627 Nov 30, 2025
425bcdf
fix: remove console
Div627 Nov 30, 2025
ab551d6
Merge branch 'feature' into feature_markdown_component
kimteayon Nov 30, 2025
37c468b
chore: remove x-markdown css and token script
Div627 Dec 1, 2025
4e9c429
fix: fix cr
Div627 Dec 1, 2025
8a116f3
fix: use Actions.copy instead of navigator.clipboard to prevent compa…
Div627 Dec 1, 2025
0729db8
chore: modify codeHighlighter and mermaid locale config
Div627 Dec 1, 2025
22a88e4
fix: fix build preview
Div627 Dec 1, 2025
94120a8
chore: modify x-markdown father build config
Div627 Dec 1, 2025
b82861e
fix: fix ci
Div627 Dec 1, 2025
d266f55
fix: fix ci
Div627 Dec 1, 2025
8249f4d
fix: fix ci
Div627 Dec 1, 2025
232f95b
fix: fix ci
Div627 Dec 1, 2025
fbcd19a
fix: fix ci
Div627 Dec 1, 2025
4abe2da
fix: fix ci
Div627 Dec 1, 2025
b3a8e48
fix: fix ci
Div627 Dec 1, 2025
c745d47
Merge branch 'feature' into feature_markdown_component
Div627 Dec 3, 2025
035cf91
fix: modify build config
Div627 Dec 3, 2025
d9dce00
docs: description
Div627 Dec 3, 2025
9c0aacf
fix: fix test case
Div627 Dec 3, 2025
6299aee
fix: fix ci
Div627 Dec 3, 2025
fed177c
fix: fix ci
Div627 Dec 3, 2025
031684a
fix: fix ci
Div627 Dec 3, 2025
93518cb
docs: modify mermaid code highlighter sources docs
Div627 Dec 4, 2025
7bb8428
style: use componentCls instead of & avoid css loss
Div627 Dec 4, 2025
1c43beb
docs: mermaid and code highlighter cover
Div627 Dec 4, 2025
3f4392c
feat: mermaid add onRenderTypeChange props and mofidy semantic
Div627 Dec 4, 2025
52a614b
feat: change mermaid to peerDependece and lazy log
Div627 Dec 4, 2025
6268461
fix: fix ci
Div627 Dec 4, 2025
bd57787
fix: fix ci
Div627 Dec 4, 2025
9d75cf5
fix: fix ci
Div627 Dec 4, 2025
1bd216a
fix: fix ci
Div627 Dec 4, 2025
bae1b53
chore: remove declare module
Div627 Dec 4, 2025
9bc0c25
Merge remote-tracking branch 'origin/feature' into feature_markdown_c…
Div627 Dec 4, 2025
aa664a8
fix: fix ci
Div627 Dec 4, 2025
140f746
fix: mermaid size
Div627 Dec 4, 2025
e290757
fix: change package size limit
Div627 Dec 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 5 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
"circular-dependency-plugin": "^5.2.2",
"dekko": "^0.2.1",
"father": "^4.6.0",
"gh-pages": "^6.3.0",
"husky": "^9.1.6",
"lint-staged": "^16.1.5",
"gh-pages": "^6.3.0",
"marked-emoji": "^2.0.1",
"prettier": "^3.3.3",
"react-markdown": "^10.1.0",
Expand All @@ -49,27 +49,19 @@
"size-limit": [
{
"path": "./packages/x/dist/antdx.min.js",
"limit": "350 KiB"
"limit": "500 KiB"
},
{
"path": "./packages/x-sdk/dist/x-sdk.min.js",
"limit": "350 KiB"
},
{
"path": "./packages/x-markdown/dist/x-markdown.min.js",
"limit": "350 KiB"
},
{
"path": "./packages/x-markdown/dist/plugins/code-high-light.min.js",
"limit": "700 KiB"
"limit": "150 KiB"
},
{
"path": "./packages/x-markdown/dist/plugins/latex.min.js",
"limit": "700 KiB"
},
{
"path": "./packages/x-markdown/dist/plugins/mermaid.min.js",
"limit": "900 KiB"
"limit": "300 KiB"
}
],
"description": "Craft AI-driven interfaces effortlessly",
Expand All @@ -89,4 +81,4 @@
"@emotion/hash": "^0.9.2",
"react-is": "^18.3.1"
}
}
}
42 changes: 0 additions & 42 deletions packages/x-markdown/.fatherrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,6 @@ export default defineConfig({
filename: 'x-markdown',
},
},
'src/plugins/HighlightCode/index.tsx': {
name: 'HighlightCode',
sourcemap: true,
generateUnminified: true,
output: {
path: 'dist/plugins',
filename: 'code-high-light',
},
},
'src/plugins/Latex/index.ts': {
name: 'Latex',
sourcemap: true,
Expand All @@ -64,15 +55,6 @@ export default defineConfig({
filename: 'latex',
},
},
'src/plugins/Mermaid/index.tsx': {
name: 'Mermaid',
sourcemap: true,
generateUnminified: true,
output: {
path: 'dist/plugins',
filename: 'mermaid',
},
},
},
bundler: 'webpack',
// bundler: 'utoopack',
Expand All @@ -89,17 +71,7 @@ export default defineConfig({
commonjs: 'react-dom',
commonjs2: 'react-dom',
},
'@ant-design/cssinjs': {
root: 'antdCssinjs',
commonjs: 'antdCssinjs',
commonjs2: 'antdCssinjs',
},
},
// externals: {
// react: 'React',
// 'react-dom': 'ReactDOM',
// '@ant-design/cssinjs': 'antdCssinjs',
// },
transformRuntime: {
absoluteRuntime: process.cwd(),
},
Expand All @@ -116,26 +88,12 @@ export default defineConfig({
memo.plugin('circular-dependency-checker').use(CircularDependencyPlugin, [
{
failOnError: true,
exclude: /node_modules[\\/](chevrotain|d3-.*|langium)/,
},
]);
memo.plugin('duplicate-package-checker').use(DuplicatePackageCheckerPlugin, [
{
verbose: true,
emitError: true,
exclude: (instance: any) => {
// 排除特定包
if (
instance.name === 'cose-base' ||
instance.name === 'layout-base' ||
instance.name.startsWith('d3-') ||
instance.name === 'internmap'
) {
return true;
}

return false;
},
},
]);
}
Expand Down
17 changes: 3 additions & 14 deletions packages/x-markdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,12 @@
"test": "jest --config .jest.js --no-cache --collect-coverage",
"coverage": "jest --config .jest.js --no-cache --collect-coverage --coverage",
"plugin:meta": "tsx scripts/generate-plugin-meta.ts",
"prestart": "npm run version && npm run token:statistic && npm run plugin:meta && npm run token:meta",
"prestart": "npm run version && npm run plugin:meta",
"precompile": "npm run prestart",
"version": "tsx scripts/generate-version.ts",
"test:dekko": "tsx ./tests/dekko/index.test.ts",
"clean": "rm -rf es lib coverage plugins dist themes",
"test:package-diff": "antd-tools run package-diff",
"token:meta": "tsx scripts/generate-token-meta.ts",
"token:statistic": "tsx scripts/collect-token-statistic.ts"
"test:package-diff": "antd-tools run package-diff"
},
"sideEffects": false,
"main": "lib/index.js",
Expand Down Expand Up @@ -49,19 +47,11 @@
"license": "MIT",
"description": "placeholder for @ant-design/x-markdown",
"dependencies": {
"@ant-design/cssinjs": "^2.0.1",
"@ant-design/cssinjs-utils": "^2.0.2",
"@ant-design/fast-color": "^3.0.0",
"@ant-design/icons": "^6.0.0",
"@ant-design/x": "*",
"classnames": "^2.5.1",
"dompurify": "^3.2.6",
"html-react-parser": "^5.2.5",
"katex": "^0.16.22",
"lodash.throttle": "^4.1.1",
"marked": "^15.0.12",
"mermaid": "^11.11.0",
"react-syntax-highlighter": "^15.6.1"
"marked": "^15.0.12"
},
"devDependencies": {
"@types/dompurify": "^3.0.5",
Expand All @@ -76,7 +66,6 @@
"react-dom": "^19.0.0"
},
"peerDependencies": {
"antd": "^6.0.1",
"react": ">=18.0.0",
"react-dom": ">=18.0.0"
},
Expand Down
53 changes: 0 additions & 53 deletions packages/x-markdown/scripts/collect-token-statistic.ts

This file was deleted.

48 changes: 0 additions & 48 deletions packages/x-markdown/scripts/generate-cssinjs.ts

This file was deleted.

1 change: 1 addition & 0 deletions packages/x-markdown/scripts/generate-plugin-meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ function getPluginMeta(list?: DeclarationReflection[]) {
};
});
}

const main = async () => {
const app = await (Application as any).bootstrap(
{
Expand Down
Loading
Loading