From c952946d1703ed97861b9067bf39265f940c0ec2 Mon Sep 17 00:00:00 2001 From: afc163 Date: Sat, 30 Nov 2024 22:35:10 +0800 Subject: [PATCH] Revert "docs: add GPT-Vis demo for bubble (#278)" This reverts commit 9ddf51c2df98be731ea5507188ca372c6fef0d84. --- .dumirc.ts | 5 --- .../bubble/__tests__/demo-extend.test.ts | 5 +-- components/bubble/__tests__/demo.test.ts | 5 +-- components/bubble/demo/gpt-vis.md | 7 ---- components/bubble/demo/gpt-vis.tsx | 38 ------------------- components/bubble/index.en-US.md | 1 - components/bubble/index.zh-CN.md | 1 - package.json | 1 - 8 files changed, 2 insertions(+), 61 deletions(-) delete mode 100644 components/bubble/demo/gpt-vis.md delete mode 100644 components/bubble/demo/gpt-vis.tsx diff --git a/.dumirc.ts b/.dumirc.ts index 5c2e244f..7eb85c6f 100644 --- a/.dumirc.ts +++ b/.dumirc.ts @@ -40,11 +40,6 @@ export default defineConfig({ define: { antdReproduceVersion: version, }, - externals: { - // optimize build of GPT-Vis - 'mapbox-gl': 'mapboxgl', - 'maplibre-gl': 'maplibregl', - }, alias: { '@ant-design/x/lib': path.join(__dirname, 'components'), '@ant-design/x/es': path.join(__dirname, 'components'), diff --git a/components/bubble/__tests__/demo-extend.test.ts b/components/bubble/__tests__/demo-extend.test.ts index 6b34cb04..a0799bad 100644 --- a/components/bubble/__tests__/demo-extend.test.ts +++ b/components/bubble/__tests__/demo-extend.test.ts @@ -1,6 +1,3 @@ import { extendTest } from '../../../tests/shared/demoTest'; -extendTest('bubble', { - // Ignore gpt-vis demo, need browser env not jsdom - skip: ['gpt-vis'], -}); +extendTest('bubble'); diff --git a/components/bubble/__tests__/demo.test.ts b/components/bubble/__tests__/demo.test.ts index dea852e4..1dac79ab 100644 --- a/components/bubble/__tests__/demo.test.ts +++ b/components/bubble/__tests__/demo.test.ts @@ -1,6 +1,3 @@ import demoTest from '../../../tests/shared/demoTest'; -demoTest('bubble', { - // Ignore gpt-vis demo, need browser env not jsdom - skip: ['gpt-vis'], -}); +demoTest('bubble'); diff --git a/components/bubble/demo/gpt-vis.md b/components/bubble/demo/gpt-vis.md deleted file mode 100644 index 92d2a37d..00000000 --- a/components/bubble/demo/gpt-vis.md +++ /dev/null @@ -1,7 +0,0 @@ -## zh-CN - -配合 `@antv/GPT-Vis` 实现大模型输出的图表渲染。 - -## en-US - -Cooperate with `@antv/GPT-Vis` to achieve customized rendering chart of LLM output. diff --git a/components/bubble/demo/gpt-vis.tsx b/components/bubble/demo/gpt-vis.tsx deleted file mode 100644 index 078a6b80..00000000 --- a/components/bubble/demo/gpt-vis.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import { Bubble } from '@ant-design/x'; -import type { BubbleProps } from '@ant-design/x'; -import { GPTVis } from '@antv/gpt-vis'; -/* eslint-disable react/no-danger */ -import React from 'react'; - -const text = ` -**GPT-Vis**, Components for GPTs, generative AI, and LLM projects. Not only UI Components. [more...](https://github.com/antvis/GPT-Vis) \n\n - -Here’s a visualization of Haidilao's food delivery revenue from 2013 to 2022. You can see a steady increase over the years, with notable *growth* particularly in recent years. - -\`\`\`vis-chart -{ - "type": "line", - "data": [{"time":2013,"value":59.3},{"time":2014,"value":64.4},{"time":2015,"value":68.9},{"time":2016,"value":74.4},{"time":2017,"value":82.7},{"time":2018,"value":91.9},{"time":2019,"value":99.1},{"time":2020,"value":101.6},{"time":2021,"value":114.4},{"time":2022,"value":121}], - "axisXTitle": "year", - "axisYTitle": "sale" -} -\`\`\` -`; - -const RenderMarkdown: BubbleProps['messageRender'] = (content) => {content}; - -const App = () => { - return ( - - ); -}; - -export default App; diff --git a/components/bubble/index.en-US.md b/components/bubble/index.en-US.md index 48705db7..573499ef 100644 --- a/components/bubble/index.en-US.md +++ b/components/bubble/index.en-US.md @@ -29,7 +29,6 @@ Often used when chatting. Bubble List Semantic Custom Custom List Content -Using GPT-Vis to render charts ## API diff --git a/components/bubble/index.zh-CN.md b/components/bubble/index.zh-CN.md index 7985340e..12afbf12 100644 --- a/components/bubble/index.zh-CN.md +++ b/components/bubble/index.zh-CN.md @@ -30,7 +30,6 @@ demo: 气泡列表 语义化自定义 自定义列表内容 -使用 GPT-Vis 渲染图表 ## API diff --git a/package.json b/package.json index 005a6e2d..d3c9be87 100644 --- a/package.json +++ b/package.json @@ -97,7 +97,6 @@ }, "devDependencies": { "@ant-design/tools": "^18.0.2", - "@antv/gpt-vis": "^0.2.2", "@biomejs/biome": "^1.9.0", "@codecov/webpack-plugin": "^1.4.0", "@codesandbox/sandpack-react": "^2.19.8",