{"name":"@ant-design/x","version":"2.7.0","keywords":["AI","Copilot","Agent","ant","components","framework","react"],"license":"MIT","_id":"@ant-design/x@2.7.0","maintainers":[{"name":"blueboylijian","email":"onlyyoulove3@gmail.com"},{"name":"afc163","email":"afc163@gmail.com"},{"name":"zombiej","email":"smith3816@gmail.com"},{"name":"yumoimer","email":"yumo.imer@gmail.com"},{"name":"lijianan","email":"574980606@qq.com"},{"name":"mickey_fanlu","email":"951203214@qq.com"}],"homepage":"https://x.ant.design","bugs":{"url":"https://github.com/ant-design/x/issues"},"dist":{"shasum":"62d82a6e128ce68980a929ae17c0c57064ad4c3b","tarball":"http://registry-npm.ywwl.com/@ant-design/x/download/@ant-design/x-2.7.0.tgz","fileCount":662,"integrity":"sha512-p5OtxQ9elbmeFRllGt1yj5wi6VHe41PIAmwrBU/OlaYydru5qIYsJzCS3DPRhkWkVdErU5oZwU74Z2oce2F5Uw==","signatures":[{"sig":"MEUCIEsT7affXr9aFCGH+STh3LIwUcWEcbH0zltpFqxoQFyQAiEAmXnXxzEmxDifPDMW4IPFkkH6K8Iy/9e1XmyluJdeGTM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17096907,"size":4242596,"noattachment":false,"key":"/@ant-design/x/-/@ant-design/x-2.7.0.tgz"},"main":"lib/index.js","module":"es/index.js","funding":{"url":"https://opencollective.com/ant-design","type":"opencollective"},"gitHead":"9108580ab01add41fa11b8afea911eba5cc30d57","scripts":{"pub":"echo 'Please use `npm publish` instead.'","tsc":"tsc --noEmit","lint":"npm run version && npm run tsc && npm run lint:script && npm run lint:md && npm run lint:style && npm run lint:changelog","site":"dumi build && cp .surgeignore _site","test":"jest --config .jest.js --no-cache --collect-coverage","clean":"antd-tools run clean && rm -rf es lib coverage locale dist report.html artifacts.zip oss-artifacts.zip","start":"tsx ./scripts/set-node-options.ts cross-env PORT=8001 dumi dev","format":"biome format --write .","authors":"tsx scripts/generate-authors.ts","compile":"father build && cp -r locale es","lint:md":"remark . -f -q","predist":"npm run version && npm run token:statistic && npm run token:meta","prelint":"dumi setup","pretest":"npm run prestart","version":"tsx scripts/generate-version.ts","coverage":"jest --config .jest.js --no-cache --collect-coverage --coverage","prestart":"npm run version && npm run token:statistic && npm run token:meta && npm run lint:changelog","prettier":"prettier -c --write **/* --cache","changelog":"npm run lint:changelog && tsx scripts/print-changelog.ts","lint:deps":"antd-tools run deps-lint","test:node":"npm run version && jest --config .jest.node.js --no-cache","test:site":"jest --config .jest.site.js","lint:style":"tsx scripts/check-cssinjs.tsx","precompile":"npm run prestart","test:dekko":"tsx ./tests/dekko/index.test.ts","token:meta":"tsx scripts/generate-token-meta.ts","lint:script":"biome lint","api-collection":"antd-tools run api-collection","lint:changelog":"tsx scripts/generate-component-changelog.ts","prepublishOnly":"tsx ../../scripts/pre-publish.ts x","sort:api-table":"antd-tools run sort-api-table","token:statistic":"tsx scripts/collect-token-statistic.ts","sort:package-json":"npx sort-package-json","test:package-diff":"antd-tools run package-diff","test:visual-regression":"tsx scripts/visual-regression/build.ts"},"typings":"es/index.d.ts","_npmUser":{"name":"mickey_fanlu","email":"951203214@qq.com"},"repository":{"url":"git+https://github.com/ant-design/x.git","type":"git"},"_npmVersion":"10.9.4","description":"Craft AI-driven interfaces effortlessly","directories":{},"sideEffects":false,"_nodeVersion":"22.21.1","browserslist":["defaults"],"dependencies":{"clsx":"^2.1.1","mermaid":"^11.12.1","@babel/runtime":"^7.25.6","lodash.throttle":"^4.1.1","@ant-design/icons":"^6.0.0","@ant-design/colors":"^8.0.0","@rc-component/util":"^1.4.0","@ant-design/cssinjs":"^2.0.1","@rc-component/motion":"^1.1.6","@ant-design/fast-color":"^3.0.0","react-syntax-highlighter":"^16.1.0","@ant-design/cssinjs-utils":"^2.0.2","@rc-component/resize-observer":"^1.0.1"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"qs":"^6.13.0","ora":"^9.0.0","tar":"^7.4.3","tsx":"^4.19.1","antd":"^6.1.1","dumi":"~2.4.21","jest":"^30.2.0","open":"^11.0.0","axios":"^1.7.7","chalk":"^5.4.1","dayjs":"^1.11.13","immer":"^11.1.3","is-ci":"^4.1.0","jsdom":"^26.0.0","pngjs":"^7.0.0","react":"^19.0.0","sharp":"^0.34.5","crypto":"^1.0.1","jquery":"^4.0.0","lodash":"^4.17.21","openai":"^6.15.0","remark":"^15.0.1","semver":"^7.6.3","adm-zip":"^0.5.16","ali-oss":"^6.21.0","cheerio":"^1.0.0","prismjs":"^1.29.0","typedoc":"^0.28.0","webpack":"^5.94.0","fs-extra":"^11.2.0","inquirer":"^13.1.0","jest-axe":"^10.0.0","minimist":"^1.2.8","mockdate":"^3.0.5","spinnies":"^0.5.1","@types/qs":"^6.9.16","cross-env":"^10.1.0","fast-glob":"^3.3.2","happy-dom":"^20.0.10","jsonml.js":"^0.1.0","lz-string":"^1.5.0","puppeteer":"^24.0.0","rc-footer":"^0.6.8","react-dom":"^19.0.0","@types/ora":"^3.2.0","@types/tar":"^7.0.87","antd-style":"^4.0.0-alpha.1","lottie-web":"^5.12.2","node-fetch":"^3.3.2","react-intl":"^7.1.11","remark-cli":"^12.0.1","remark-gfm":"^4.0.0","simple-git":"^3.26.0","typescript":"~5.9.3","@types/jest":"^30.0.0","@types/node":"^25.3.5","cross-fetch":"^4.0.0","fetch-jsonp":"^1.3.0","html2sketch":"^1.0.2","http-server":"^14.1.1","remark-lint":"^10.0.0","@types/jsdom":"^28.0.0","@types/pngjs":"^6.0.5","@types/react":"^19.0.2","browserslist":"^4.23.3","cli-progress":"^3.12.0","@antv/gpt-vis":"^0.6.0","@octokit/rest":"^22.0.1","@types/jquery":"^4.0.0","@types/lodash":"^4.17.7","@types/semver":"^7.5.8","@umijs/fabric":"^4.0.1","node-notifier":"^10.0.1","pretty-format":"^30.0.0","remark-rehype":"^11.1.0","@emotion/react":"^11.13.5","@prettier/sync":"^0.6.1","@types/adm-zip":"^0.5.5","@types/ali-oss":"^6.16.11","@types/gtag.js":"^0.0.20","@types/prismjs":"^1.26.4","@types/warning":"^3.0.3","esbuild-loader":"^4.2.2","jest-puppeteer":"^11.0.0","@blazediff/core":"^1.8.0","@emotion/server":"^11.11.0","@stackblitz/sdk":"^1.11.0","@types/fs-extra":"^11.0.4","@types/inquirer":"^9.0.7","@types/jest-axe":"^3.5.9","@types/minimist":"^1.2.5","@types/progress":"^2.0.7","@types/spinnies":"^0.5.3","react-resizable":"^3.0.5","tbox-nodejs-sdk":"^0.0.19","@rc-component/np":"^1.0.3","@types/react-dom":"^19.0.2","isomorphic-fetch":"^3.0.0","jest-canvas-mock":"^2.5.2","lunar-typescript":"^1.7.5","react-router-dom":"^7.0.1","react-sticky-box":"^2.0.5","rehype-stringify":"^10.0.0","@antv/infographic":"0.2.16","copy-to-clipboard":"^3.3.3","@npmcli/run-script":"^10.0.3","@types/http-server":"^0.12.4","identity-obj-proxy":"^3.0.0","vanilla-jsoneditor":"^3.0.0","@rc-component/table":"^1.9.0","@types/cli-progress":"^3.11.6","jest-image-snapshot":"^6.5.1","regenerator-runtime":"^0.14.1","@rc-component/drawer":"^1.3.0","@testing-library/dom":"^10.4.0","antd-token-previewer":"^3.0.0","web-streams-polyfill":"^4.0.0","@rc-component/trigger":"^3.7.1","jest-environment-node":"^30.0.0","prettier-plugin-jsdoc":"^1.3.0","react-highlight-words":"^0.20.0","@types/react-resizable":"^3.0.8","@types/isomorphic-fetch":"^0.0.39","browserslist-to-esbuild":"^2.1.1","dumi-plugin-color-chunk":"^2.1.0","jsonml-to-react-element":"^1.1.11","react-copy-to-clipboard":"^5.1.0","webpack-bundle-analyzer":"^5.0.1","@types/throttle-debounce":"^5.0.2","@microflash/rehype-figure":"^2.1.1","@testing-library/jest-dom":"^6.5.0","@rc-component/virtual-list":"^1.0.2","@types/jest-image-snapshot":"^6.4.0","scroll-into-view-if-needed":"^3.1.0","@codesandbox/sandpack-react":"^2.19.8","@happy-dom/jest-environment":"^20.0.11","@rc-component/father-plugin":"^2.0.4","@testing-library/user-event":"^14.5.2","react-intersection-observer":"^10.0.0","@types/react-highlight-words":"^0.20.0","@types/react-copy-to-clipboard":"^5.0.7","remark-preset-lint-recommended":"^7.0.0","react-infinite-scroll-component":"^6.1.0","@types/jest-environment-puppeteer":"^5.0.6","@ianvs/prettier-plugin-sort-imports":"^4.3.1","@qixian.cs/github-contributors-list":"^2.0.2","remark-lint-no-undefined-references":"^5.0.0"},"peerDependencies":{"antd":"^6.1.1","react":">=18.0.0","react-dom":">=18.0.0"},"_npmOperationalInternal":{"tmp":"tmp/x_2.7.0_1777516713902_0.8785165580755099","host":"s3://npm-registry-packages-npm-production"},"readme":"<div align=\"center\"><a name=\"readme-top\"></a>\n\n<img height=\"180\" src=\"https://mdn.alipayobjects.com/huamei_iwk9zp/afts/img/A*eco6RrQhxbMAAAAAAAAAAAAADgCCAQ/original\">\n\n<h1>Ant Design X</h1>\n\nEasily build AI-driven interfaces.\n\n[![CI status][github-action-image]][github-action-url] [![codecov][codecov-image]][codecov-url] [![NPM version][npm-image]][npm-url]\n\n[![NPM downloads][download-image]][download-url] [![][bundlephobia-image]][bundlephobia-url] [![antd][antd-image]][antd-url] [![Follow zhihu][zhihu-image]][zhihu-url]\n\n[Changelog](./CHANGELOG.md) · [Report a Bug][github-issues-bug-report] · [Feature Request][github-issues-feature-request] · [中文](./README-zh_CN.md) · English\n\n[npm-image]: https://img.shields.io/npm/v/@ant-design/x.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/@ant-design/x\n[github-action-image]: https://github.com/ant-design/x/actions/workflows/main.yml/badge.svg\n[github-action-url]: https://github.com/ant-design/x/actions/workflows/main.yml\n[codecov-image]: https://codecov.io/gh/ant-design/x/graph/badge.svg?token=wrCCsyTmdi\n[codecov-url]: https://codecov.io/gh/ant-design/x\n[download-image]: https://img.shields.io/npm/dm/@ant-design/x.svg?style=flat-square\n[download-url]: https://npmjs.org/package/@ant-design/x\n[bundlephobia-image]: https://badgen.net/bundlephobia/minzip/@ant-design/x?style=flat-square\n[bundlephobia-url]: https://bundlephobia.com/package/@ant-design/x\n[github-issues-bug-report]: https://github.com/ant-design/x/issues/new?template=bug-report.yml\n[github-issues-feature-request]: https://github.com/ant-design/x/issues/new?template=bug-feature-request.yml\n[antd-image]: https://img.shields.io/badge/-Ant%20Design-blue?labelColor=black&logo=antdesign&style=flat-square\n[antd-url]: https://ant.design\n[zhihu-image]: https://img.shields.io/badge/-Ant%20Design-white?logo=zhihu\n[zhihu-url]: https://www.zhihu.com/column/c_1564262000561106944\n\n</div>\n\n<img width=\"100%\" src=\"https://mdn.alipayobjects.com/huamei_35zehm/afts/img/A*DfJHS4rP4SgAAAAAgGAAAAgAejCDAQ/original\">\n\n## ✨ Features\n\n- 🌈 **Best practices from enterprise-level AI products**: Based on RICH interaction paradigms, providing excellent AI interaction experience\n- 🧩 **Flexible atomic components**: Covering most AI scenarios, helping you quickly build personalized AI interaction pages\n- ✨ **Stream-friendly, extensible, and high-performance Markdown renderer**: Supports streaming formulas, code highlighting, mermaid diagrams, etc. [@ant-design/x-markdown](../x-markdown/README.md)\n- 🚀 **Out-of-the-box model/agent integration**: Easily connect to OpenAI-compatible model/agent services [@ant-design/x-sdk](../x-sdk/README.md)\n- ⚡️ **Efficient management of large model data streams**: Provides handy data stream management features for more efficient development [@ant-design/x-sdk](../x-sdk/README.md)\n- 📦 **Rich template support**: Multiple templates for quick LUI app development [Templates](https://github.com/ant-design/x/tree/main/packages/x/docs/playground/)\n- 🛡 **Full TypeScript coverage**: Developed with TypeScript, providing complete type support for better experience and reliability\n- 🎨 **Deep theme customization**: Fine-grained style adjustments for personalized needs in various scenarios\n\n## 📦 Installation\n\n```bash\nnpm install @ant-design/x\n```\n\n```bash\nyarn add @ant-design/x\n```\n\n```bash\npnpm add @ant-design/x\n```\n\n```bash\nut install @ant-design/x\n```\n\n### Browser Usage\n\nUse `script` and `link` tags to directly import files and use the global variable `antdx`.\n\nThe npm package's [dist](https://cdn.jsdelivr.net/npm/@ant-design/x@1.0.0/dist/) directory provides `antdx.js`, `antdx.min.js`, and `antdx.min.js.map`.\n\n> **Strongly not recommended to use built files** as they do not support on-demand loading and may not get quick bug fixes for underlying dependencies.\n\n> Note: `antdx.js` and `antdx.min.js` depend on `react`, `react-dom`, `dayjs`, `antd`, `@ant-design/cssinjs`, and `@ant-design/icons`. Please make sure to import these files first.\n\n## 🧩 Atomic Components\n\nBased on the RICH interaction paradigm, we provide many atomic components for different interaction stages to help you flexibly build your AI application:\n\n- [Component Overview](https://x.ant.design/components/overview)\n- [Templates](https://x.ant.design/docs/playground/independent)\n\nHere is a simple example of building a dialog using atomic components:\n\n```tsx\nimport React from 'react';\nimport {\n  // Message bubble\n  Bubble,\n  // Sender box\n  Sender,\n} from '@ant-design/x';\n\nconst messages = [\n  {\n    key: 'message_1',\n    content: 'Hello, Ant Design X!',\n    role: 'user',\n  },\n  {\n    key: 'x_message_1',\n    content: 'Hello, I am Ant Design X!',\n    role: 'x',\n  },\n];\n\nconst role = {\n  // Bubble position: end\n  x: {\n    placement: 'end',\n  },\n};\n\nconst App = () => (\n  <div>\n    <Bubble.List items={messages} role={role} />\n    <Sender />\n  </div>\n);\n\nexport default App;\n```\n\n## ⚡️ Model/Agent Integration & Efficient Data Stream Management\n\n`@ant-design/x-sdk` provides a series of tool APIs for out-of-the-box management of AI application data streams. See details [here](../x-sdk/README.md).\n\n## ✨ Markdown Renderer\n\n`@ant-design/x-markdown` aims to provide a stream-friendly, extensible, and high-performance Markdown renderer. Supports streaming formulas, code highlighting, mermaid diagrams, etc. See details [here](../x-markdown/README.md).\n\n## On-demand Loading\n\n`@ant-design/x` supports tree shaking based on ES modules by default.\n\n## TypeScript\n\n`@ant-design/x` is written in TypeScript and provides complete definition files.\n\n## Who's Using\n\nAnt Design X is widely used in AI-driven user interfaces within Ant Group. If your company or product uses Ant Design X, feel free to leave a message [here](https://github.com/ant-design/x/issues/126).\n\n## Local Development\n\n> antx uses [npm-workspace](https://docs.npmjs.com/cli/v11/using-npm/workspaces) to organize code. It is recommended to use npm or [utoo](https://github.com/umijs/mako/tree/next) for local development.\n\n```bash\n# Install utoo\n$ npm i -g utoo\n\n# Install project dependencies (by utoo)\n$ ut [install]\n\n# Start project\n$ ut start # Method 1: Start via main package script\n$ ut start --workspace packages/x # Method 2: Start via workspace parameter\n$ ut start --workspace @ant-design/x # Method 3: Start via package.name (utoo only)\n$ cd packages/x && ut start # Method 4: Start in subpackage directory\n\n# Add dependencies\n$ ut install [pkg@version] # Add dependency to main package\n$ ut install [pkg@version] --workspace packages/x # Add dependency to subpackage\n$ cd packages/x && ut install [pkg@version] # Add dependency to subpackage\n\n# Update dependencies\n$ ut update # utoo only\n```\n\n## How to Contribute\n\nBefore participating in any form, please read the [Contributor Guide](https://github.com/ant-design/ant-design/blob/master/.github/CONTRIBUTING.md). If you wish to contribute, feel free to submit a [Pull Request](https://github.com/ant-design/ant-design/pulls) or [Report a Bug](http://new-issue.ant.design/).\n\n> Highly recommended reading [How To Ask Questions The Smart Way](https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way), [How to Ask Questions in Open Source Community](https://github.com/seajs/seajs/issues/545), [How to Report Bugs Effectively](http://www.chiark.greenend.org.uk/%7Esgtatham/bugs.html), and [How to Submit Unsolvable Issues to Open Source Projects](https://zhuanlan.zhihu.com/p/25795393) for better help.\n\n## Community Support\n\nIf you encounter problems during use, you can seek help through the following channels. We also encourage experienced users to help newcomers through these channels.\n\nWhen asking questions in GitHub Discussions, please use the `Q&A` label.\n\n1. [GitHub Discussions](https://github.com/ant-design/x/discussions)\n2. [GitHub Issues](https://github.com/ant-design/x/issues)\n\n<a href=\"https://openomy.app/github/ant-design/x\" target=\"_blank\" style=\"display: block; width: 100%;\" align=\"center\">\n  <img src=\"https://openomy.app/svg?repo=ant-design/x&chart=bubble&latestMonth=3\" target=\"_blank\" alt=\"Contribution Leaderboard\" style=\"display: block; width: 100%;\" />\n </a>\n","publish_time":1777516714309,"_cnpm_publish_time":1777516714309,"dist-tags":{"alpha":"2.0.0-alpha.17","beta":"2.8.0-beta.1","latest":"2.10.0"}}