@antv/gpt-vis 0.2.1 → 0.3.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja-JP.md +160 -0
- package/README.md +6 -2
- package/README.zh-CN.md +6 -2
- package/dist/cjs/GPTVis/Lite.js +3 -0
- package/dist/cjs/export-map.browser.d.ts +4 -0
- package/dist/cjs/export-map.browser.js +48 -0
- package/dist/cjs/export-map.d.ts +10 -0
- package/dist/cjs/export-map.js +41 -0
- package/dist/cjs/export.d.ts +2 -4
- package/dist/cjs/export.js +9 -13
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/GPTVis/Lite.js +5 -2
- package/dist/esm/export-map.browser.d.ts +4 -0
- package/dist/esm/export-map.browser.js +5 -0
- package/dist/esm/export-map.d.ts +10 -0
- package/dist/esm/export-map.js +9 -0
- package/dist/esm/export.d.ts +2 -4
- package/dist/esm/export.js +4 -5
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/umd/697.async.js +1 -0
- package/dist/umd/index.min.js +1 -1
- package/package.json +7 -2
- package/dist/umd/558.async.js +0 -1
package/README.ja-JP.md
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
<img src="https://gw.alipayobjects.com/zos/antfincdn/R8sN%24GNdh6/language.svg" width="18"> [English](./README.md) | [简体中文](./README.zh-CN.md) | 日本語
|
|
2
|
+
|
|
3
|
+
<h1 align="center">GPT-Vis</h1>
|
|
4
|
+
|
|
5
|
+
<div align="center">
|
|
6
|
+
|
|
7
|
+
GPTs、生成AI、およびLLMプロジェクトのためのコンポーネント。**UIコンポーネントだけではありません**。
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
<a href="https://gpt-vis.antv.vision" target="_blank">ドキュメント</a> •
|
|
11
|
+
<a href="/knowledges" target="_blank">知識</a> •
|
|
12
|
+
<a href="https://tbox.alipay.com/experience/202410APr1n200110168?id=20241122F8eB00104644" target="_blank">エージェントデモ</a>
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
<div align="center">
|
|
16
|
+
<img src="https://github.com/eosphoros-ai/GPT-Vis/assets/17919400/c8804ffb-d3d6-45d3-846f-cf217681ab05" width=500">
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
## ✨ 特徴
|
|
22
|
+
|
|
23
|
+
- 🤖 **LLMプロトコル**: LLMエージェントカードのための視覚的プロトコルで、LLMの対話型インタラクションとサービスのシリアライズされた出力のために設計されており、AIアプリケーションへの迅速な統合を容易にします。
|
|
24
|
+
- 🍡 **LLMコンポーネント**: LLMアプリケーションのために開発されたコンポーネントで、20以上の一般的なVISコンポーネントが組み込まれており、カスタマイズされたUI要件のための便利な拡張メカニズムとアーキテクチャ設計を提供します。
|
|
25
|
+
- 📈 **LLMアクセス**: チャート知識ベースとチャート推奨モデルをシームレスにLLMにアクセスし、LLMのために視覚カードを直接出力し、エージェントのための知識ベースと推奨モデルソリューションを提供します。
|
|
26
|
+
|
|
27
|
+
## 📦 インストール
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
$ npm i @antv/gpt-vis --save
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## 🔨 使用方法
|
|
34
|
+
|
|
35
|
+
```jsx
|
|
36
|
+
import { GPTVis } from '@antv/gpt-vis';
|
|
37
|
+
|
|
38
|
+
const markdownContent = `
|
|
39
|
+
# GPT-VIS \n\nGPTs、生成AI、およびLLMプロジェクトのためのコンポーネント。UIコンポーネントだけではありません。
|
|
40
|
+
|
|
41
|
+
ここに、2013年から2022年までのHaidilaoのフードデリバリー収益の視覚化があります。年々着実に増加しており、特に最近の年では顕著な*成長*が見られます。
|
|
42
|
+
|
|
43
|
+
\`\`\`vis-chart
|
|
44
|
+
{
|
|
45
|
+
"type": "line",
|
|
46
|
+
"data": [
|
|
47
|
+
{ "time":2013,"value":59.3 },
|
|
48
|
+
{ "time":2014,"value":64.4 },
|
|
49
|
+
{ "time":2015,"value":68.9 },
|
|
50
|
+
{ "time":2016,"value":74.4 },
|
|
51
|
+
{ "time":2017,"value":82.7 },
|
|
52
|
+
{ "time":2018,"value":91.9 },
|
|
53
|
+
{ "time":2019,"value":99.1 },
|
|
54
|
+
{ "time":2020,"value":101.6 },
|
|
55
|
+
{ "time":2021,"value":114.4 },
|
|
56
|
+
{ "time":2022,"value":121 }
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
\`\`\`
|
|
60
|
+
`;
|
|
61
|
+
|
|
62
|
+
export default () => {
|
|
63
|
+
return <GPTVis>{markdownContent}</GPTVis>;
|
|
64
|
+
};
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
<details>
|
|
68
|
+
<summary>🛠 カスタムレンダラー</summary>
|
|
69
|
+
|
|
70
|
+
```jsx
|
|
71
|
+
import { GPTVisLite, withChartCode, ChartType, Pie } from '@antv/gpt-vis';
|
|
72
|
+
|
|
73
|
+
const markdownContent = `
|
|
74
|
+
\`\`\`my-ui
|
|
75
|
+
my data
|
|
76
|
+
\`\`\`
|
|
77
|
+
|
|
78
|
+
\`\`\`vis-chart
|
|
79
|
+
{
|
|
80
|
+
"type": "pie",
|
|
81
|
+
"data": [
|
|
82
|
+
{ "category": "カテゴリ1", "value": 27 },
|
|
83
|
+
{ "category": "カテゴリ2", "value": 25 },
|
|
84
|
+
{ "category": "カテゴリ3", "value": 18 },
|
|
85
|
+
{ "category": "その他", "value": 5 }
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
\`\`\`
|
|
89
|
+
`;
|
|
90
|
+
|
|
91
|
+
const customRenderers = { 'my-ui': ({ children }) => <div>{children}</div> };
|
|
92
|
+
const components = {
|
|
93
|
+
code: withChartCode({
|
|
94
|
+
languageRenderers: customRenderers, // カスタムブロックレンダラーを登録
|
|
95
|
+
components: { [ChartType.Pie]: Pie }, // パイチャートを登録
|
|
96
|
+
}),
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export default () => {
|
|
100
|
+
return <GPTVisLite components={components}>{markdownContent}</GPTVisLite>;
|
|
101
|
+
};
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
</details>
|
|
105
|
+
|
|
106
|
+
## 🐍 Streamlit
|
|
107
|
+
|
|
108
|
+
```python
|
|
109
|
+
import streamlit as st
|
|
110
|
+
from streamlit_gpt_vis import set_gpt_vis
|
|
111
|
+
|
|
112
|
+
content = '''
|
|
113
|
+
ここに、2013年から2022年までのHaidilaoのフードデリバリー収益の視覚化があります。年々着実に増加しており、特に最近の年では顕著な*成長*が見られます。
|
|
114
|
+
|
|
115
|
+
\`\`\`vis-chart
|
|
116
|
+
{"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}]}
|
|
117
|
+
\`\`\`
|
|
118
|
+
'''
|
|
119
|
+
|
|
120
|
+
set_gpt_vis(content)
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
詳細はこちら 👉 [streamlit-gpt-vis](https://github.com/antvis/GPT-Vis/tree/main/bindings/streamlit-gpt-vis)
|
|
124
|
+
|
|
125
|
+
## ビジュアル知識
|
|
126
|
+
|
|
127
|
+
[ビジュアル知識ベース](https://github.com/antvis/GPT-Vis/tree/main/knowledges)の目的は、エージェントがさまざまなデータ可視化チャートを理解、選択、作成するのを支援するための包括的かつ体系的なリソースを提供することです。以下は、RAGを通じて評価データセットに基づいて正確なチャートプロトコルを生成するためのメトリクスです。
|
|
128
|
+
|
|
129
|
+
| | | | | | | |
|
|
130
|
+
| ------------- | ----------------------- | -------------------- | ------------- | -------------------- | --------------- | ------- |
|
|
131
|
+
| Line(Multi) | Column(Grouped/Stacked) | Pie | Area(Stacked) | Bar(Grouped/Stacked) | Scatter(Bubble) | Heatmap |
|
|
132
|
+
| 40/40 | 25/27 | 13/14 | 18/18 | 18/20 | 10/10 | 9/10 |
|
|
133
|
+
| Histogram | Tree Map | Word Cloud | Radar | Dual Axis | Rich Text NTV | Pin Map |
|
|
134
|
+
| 15/16 | 13/15 | 11/12 | 23/23 | 13/14 | 7.3/10 | 10/11 |
|
|
135
|
+
| Network Graph | Mind Map | Organizational Chart | Flow Diagram | Fishbone Diagram | | |
|
|
136
|
+
| 8/10 | 12/14 | 10/12 | 10/11 | 10/12 | | |
|
|
137
|
+
| | | | | | | |
|
|
138
|
+
|
|
139
|
+
注: X/Y形式の数字は、データセットに対して評価されたときのそれぞれのチャートタイプのメトリクスを表しています。
|
|
140
|
+
|
|
141
|
+
## 🤖 チャート推奨データセット
|
|
142
|
+
|
|
143
|
+
チャート推奨データセットは、与えられたデータに基づいてチャートタイプを推奨する能力を評価または微調整するために設計されています。データセットは現在、16種類のチャートをカバーしており、各チャートタイプには1〜3の異なるデータシナリオがあり、各シナリオには15以上のチャートデータインスタンスがあります。データセットは継続的に更新されており、使用ケースから収集したチャートデータの提供を歓迎します。データセットの詳細については、[evaluations/recommend](https://github.com/antvis/GPT-Vis/tree/main/evaluations/recommend/README.md)をご覧ください。
|
|
144
|
+
|
|
145
|
+
## 💻 開発
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
# 依存関係をインストール
|
|
149
|
+
$ pnpm install
|
|
150
|
+
|
|
151
|
+
# ドキュメントデモでライブラリを開発
|
|
152
|
+
$ pnpm dev
|
|
153
|
+
|
|
154
|
+
# ライブラリのソースコードをビルド
|
|
155
|
+
$ pnpm build
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## ライセンス
|
|
159
|
+
|
|
160
|
+
[MIT](./LICENSE)
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<img src="https://gw.alipayobjects.com/zos/antfincdn/R8sN%24GNdh6/language.svg" width="18"> English | [简体中文](./README.zh-CN.md)
|
|
1
|
+
<img src="https://gw.alipayobjects.com/zos/antfincdn/R8sN%24GNdh6/language.svg" width="18"> English | [简体中文](./README.zh-CN.md) | [日本語](./README.ja-JP.md)
|
|
2
2
|
|
|
3
3
|
<h1 align="center">GPT-Vis</h1>
|
|
4
4
|
|
|
@@ -9,7 +9,7 @@ Components for GPTs, generative AI, and LLM projects. **Not only UI Components**
|
|
|
9
9
|
<p align="center">
|
|
10
10
|
<a href="https://gpt-vis.antv.vision" target="_blank">Document</a> •
|
|
11
11
|
<a href="/knowledges" target="_blank">Knowledge</a> •
|
|
12
|
-
<a href="https://tbox.alipay.com/experience/202410APr1n200110168?id=
|
|
12
|
+
<a href="https://tbox.alipay.com/experience/202410APr1n200110168?id=20241122F8eB00104644" target="_blank">Agent Demo</a>
|
|
13
13
|
</p>
|
|
14
14
|
|
|
15
15
|
<div align="center">
|
|
@@ -138,6 +138,10 @@ The purpose of the [Visual Knowledge Base](https://github.com/antvis/GPT-Vis/tre
|
|
|
138
138
|
|
|
139
139
|
Note: The numbers in the format of X/Y represent the metrics of the respective chart types when evaluated against the dataset.
|
|
140
140
|
|
|
141
|
+
## 🤖 Chart Recommendation Dataset
|
|
142
|
+
|
|
143
|
+
The chart recommendation dataset is designed to evaluate or fine-tune large language models on their ability to recommend chart types based on given data. The dataset currently encompasses 16 types of charts, with 1-3 different data scenarios per chart type, and more than 15 chart data instances for each scenario. The dataset is continuously updated, and we welcome contributions of chart data collected from your own use cases. For more detailed information about the dataset, please visit [evaluations/recommend](https://github.com/antvis/GPT-Vis/tree/main/evaluations/recommend/README.md).
|
|
144
|
+
|
|
141
145
|
## 💻 Development
|
|
142
146
|
|
|
143
147
|
```bash
|
package/README.zh-CN.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<img src="https://gw.alipayobjects.com/zos/antfincdn/R8sN%24GNdh6/language.svg" width="18"> [English](./README.md) | 简体中文
|
|
1
|
+
<img src="https://gw.alipayobjects.com/zos/antfincdn/R8sN%24GNdh6/language.svg" width="18"> [English](./README.md) | 简体中文 | [日本語](./README.ja-JP.md)
|
|
2
2
|
|
|
3
3
|
<h1 align="center">GPT-Vis</h1>
|
|
4
4
|
|
|
@@ -9,7 +9,7 @@ Components for GPTs, generative AI, and LLM projects. **Not only UI Components**
|
|
|
9
9
|
<p align="center">
|
|
10
10
|
<a href="https://gpt-vis.antv.vision" target="_blank">文档</a> •
|
|
11
11
|
<a href="/knowledges" target="_blank">知识库</a> •
|
|
12
|
-
<a href="https://tbox.alipay.com/experience/202410APr1n200110168?id=
|
|
12
|
+
<a href="https://tbox.alipay.com/experience/202410APr1n200110168?id=20241122F8eB00104644" target="_blank">体验 Agent</a>
|
|
13
13
|
</p>
|
|
14
14
|
|
|
15
15
|
<div align="center">
|
|
@@ -136,6 +136,10 @@ set_gpt_vis(content)
|
|
|
136
136
|
| 8/10 | 12/14 | 10/12 | 10/11 | 10/12 | | |
|
|
137
137
|
| | | | | | | |
|
|
138
138
|
|
|
139
|
+
## 🤖 图表模型推荐数据集
|
|
140
|
+
|
|
141
|
+
图表推荐数据集用于评测/微调大模型在“给定数据,推荐图表类型”任务上的能力。数据集目前涵盖了 16 种图表类型,每种图表类型下 1-3 个不同数据场景,每个场景下 15+ 个图表数据。数据会持续更新,也欢迎向我们贡献你的使用场景中收集的图表数据。数据集详细信息见 [evaluations/recommend](https://github.com/antvis/GPT-Vis/tree/main/evaluations/recommend/README.md)
|
|
142
|
+
|
|
139
143
|
## 💻 本地开发
|
|
140
144
|
|
|
141
145
|
```bash
|
package/dist/cjs/GPTVis/Lite.js
CHANGED
|
@@ -35,10 +35,12 @@ module.exports = __toCommonJS(Lite_exports);
|
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_react_markdown = __toESM(require("react-markdown"));
|
|
37
37
|
var import_rehype_raw = __toESM(require("rehype-raw"));
|
|
38
|
+
var import_remark_gfm = __toESM(require("remark-gfm"));
|
|
38
39
|
var GPTVisLite = ({
|
|
39
40
|
children,
|
|
40
41
|
components,
|
|
41
42
|
rehypePlugins,
|
|
43
|
+
remarkPlugins,
|
|
42
44
|
...rest
|
|
43
45
|
}) => {
|
|
44
46
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -46,6 +48,7 @@ var GPTVisLite = ({
|
|
|
46
48
|
{
|
|
47
49
|
components,
|
|
48
50
|
rehypePlugins: [import_rehype_raw.default, ...rehypePlugins ? rehypePlugins : []],
|
|
51
|
+
remarkPlugins: [import_remark_gfm.default, ...remarkPlugins ? remarkPlugins : []],
|
|
49
52
|
...rest
|
|
50
53
|
},
|
|
51
54
|
children
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/export-map.browser.ts
|
|
30
|
+
var export_map_browser_exports = {};
|
|
31
|
+
__export(export_map_browser_exports, {
|
|
32
|
+
HeatMap: () => import_HeatMap.default,
|
|
33
|
+
Map: () => import_Map.default,
|
|
34
|
+
PathMap: () => import_PathMap.default,
|
|
35
|
+
PinMap: () => import_PinMap.default
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(export_map_browser_exports);
|
|
38
|
+
var import_Map = __toESM(require("./Map"));
|
|
39
|
+
var import_PinMap = __toESM(require("./PinMap"));
|
|
40
|
+
var import_HeatMap = __toESM(require("./HeatMap"));
|
|
41
|
+
var import_PathMap = __toESM(require("./PathMap"));
|
|
42
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
43
|
+
0 && (module.exports = {
|
|
44
|
+
HeatMap,
|
|
45
|
+
Map,
|
|
46
|
+
PathMap,
|
|
47
|
+
PinMap
|
|
48
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import { type HeatMapProps } from './HeatMap';
|
|
3
|
+
import { type MapProps } from './Map';
|
|
4
|
+
import { type PathMapProps } from './PathMap';
|
|
5
|
+
import { type PinMapProps } from './PinMap';
|
|
6
|
+
export declare const Map: FC<MapProps>;
|
|
7
|
+
export declare const HeatMap: FC<HeatMapProps>;
|
|
8
|
+
export declare const PathMap: FC<PathMapProps>;
|
|
9
|
+
export declare const PinMap: FC<PinMapProps>;
|
|
10
|
+
export type { HeatMapProps, MapProps, PathMapProps, PinMapProps };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/export-map.ts
|
|
20
|
+
var export_map_exports = {};
|
|
21
|
+
__export(export_map_exports, {
|
|
22
|
+
HeatMap: () => HeatMap,
|
|
23
|
+
Map: () => Map,
|
|
24
|
+
PathMap: () => PathMap,
|
|
25
|
+
PinMap: () => PinMap
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(export_map_exports);
|
|
28
|
+
function MockMap() {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
var Map = MockMap;
|
|
32
|
+
var HeatMap = MockMap;
|
|
33
|
+
var PathMap = MockMap;
|
|
34
|
+
var PinMap = MockMap;
|
|
35
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
36
|
+
0 && (module.exports = {
|
|
37
|
+
HeatMap,
|
|
38
|
+
Map,
|
|
39
|
+
PathMap,
|
|
40
|
+
PinMap
|
|
41
|
+
});
|
package/dist/cjs/export.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ import { default as Area, type AreaProps } from './Area';
|
|
|
4
4
|
import { default as Bar, type BarProps } from './Bar';
|
|
5
5
|
import { default as Column, type ColumnProps } from './Column';
|
|
6
6
|
import { default as DualAxes, type DualAxesProps } from './DualAxes';
|
|
7
|
-
import { default as HeatMap, type HeatMapProps } from './HeatMap';
|
|
8
7
|
import { default as Histogram, type HistogramProps } from './Histogram';
|
|
9
8
|
import { default as Line, type LineProps } from './Line';
|
|
10
9
|
import { default as Pie, type PieProps } from './Pie';
|
|
@@ -18,11 +17,10 @@ import { default as FlowDiagram, type FlowDiagramProps } from './FlowDiagram';
|
|
|
18
17
|
import { default as MindMap, type MindMapProps } from './MindMap';
|
|
19
18
|
import { default as NetworkGraph, type NetworkGraphProps } from './NetworkGraph';
|
|
20
19
|
export { default as IndentedTree, type IndentedTreeProps } from './IndentedTree';
|
|
21
|
-
export { default as Map, type MapProps } from './Map';
|
|
22
20
|
export { default as OrganizationChart, type OrganizationChartProps } from './OrganizationChart';
|
|
23
21
|
/********** map chart **********/
|
|
24
|
-
|
|
25
|
-
import {
|
|
22
|
+
export { Map, type MapProps } from './export-map';
|
|
23
|
+
import { PinMap, type PinMapProps, HeatMap, type HeatMapProps, PathMap, type PathMapProps } from './export-map';
|
|
26
24
|
/********** NTV **********/
|
|
27
25
|
export { VisText, type VisTextProps } from './Text';
|
|
28
26
|
export { Area, Bar, Column, DualAxes, FishboneDiagram, FlowDiagram, HeatMap, Histogram, Line, MindMap, NetworkGraph, PathMap, Pie, PinMap, Radar, Scatter, Treemap, WordCloud, type AreaProps, type BarProps, type ColumnProps, type DualAxesProps, type FishboneDiagramProps, type FlowDiagramProps, type HeatMapProps, type HistogramProps, type LineProps, type MindMapProps, type NetworkGraphProps, type PathMapProps, type PieProps, type PinMapProps, type RadarProps, type ScatterProps, type TreemapProps, type WordCloudProps, };
|
package/dist/cjs/export.js
CHANGED
|
@@ -36,17 +36,17 @@ __export(export_exports, {
|
|
|
36
36
|
DualAxes: () => import_DualAxes.default,
|
|
37
37
|
FishboneDiagram: () => import_FishboneDiagram.default,
|
|
38
38
|
FlowDiagram: () => import_FlowDiagram.default,
|
|
39
|
-
HeatMap: () =>
|
|
39
|
+
HeatMap: () => import_export_map2.HeatMap,
|
|
40
40
|
Histogram: () => import_Histogram.default,
|
|
41
41
|
IndentedTree: () => import_IndentedTree.default,
|
|
42
42
|
Line: () => import_Line.default,
|
|
43
|
-
Map: () =>
|
|
43
|
+
Map: () => import_export_map.Map,
|
|
44
44
|
MindMap: () => import_MindMap.default,
|
|
45
45
|
NetworkGraph: () => import_NetworkGraph.default,
|
|
46
46
|
OrganizationChart: () => import_OrganizationChart.default,
|
|
47
|
-
PathMap: () =>
|
|
47
|
+
PathMap: () => import_export_map2.PathMap,
|
|
48
48
|
Pie: () => import_Pie.default,
|
|
49
|
-
PinMap: () =>
|
|
49
|
+
PinMap: () => import_export_map2.PinMap,
|
|
50
50
|
Radar: () => import_Radar.default,
|
|
51
51
|
Scatter: () => import_Scatter.default,
|
|
52
52
|
Treemap: () => import_Treemap.default,
|
|
@@ -59,7 +59,6 @@ var import_Area = __toESM(require("./Area"));
|
|
|
59
59
|
var import_Bar = __toESM(require("./Bar"));
|
|
60
60
|
var import_Column = __toESM(require("./Column"));
|
|
61
61
|
var import_DualAxes = __toESM(require("./DualAxes"));
|
|
62
|
-
var import_HeatMap = __toESM(require("./HeatMap"));
|
|
63
62
|
var import_Histogram = __toESM(require("./Histogram"));
|
|
64
63
|
var import_Line = __toESM(require("./Line"));
|
|
65
64
|
var import_Pie = __toESM(require("./Pie"));
|
|
@@ -72,10 +71,9 @@ var import_FlowDiagram = __toESM(require("./FlowDiagram"));
|
|
|
72
71
|
var import_MindMap = __toESM(require("./MindMap"));
|
|
73
72
|
var import_NetworkGraph = __toESM(require("./NetworkGraph"));
|
|
74
73
|
var import_IndentedTree = __toESM(require("./IndentedTree"));
|
|
75
|
-
var import_Map = __toESM(require("./Map"));
|
|
76
74
|
var import_OrganizationChart = __toESM(require("./OrganizationChart"));
|
|
77
|
-
var
|
|
78
|
-
var
|
|
75
|
+
var import_export_map = require("./export-map");
|
|
76
|
+
var import_export_map2 = require("./export-map");
|
|
79
77
|
var import_Text = require("./Text");
|
|
80
78
|
var DEFAULT_CHART_COMPONENTS = {
|
|
81
79
|
[import_types.ChartType.Line]: import_Line.default,
|
|
@@ -84,13 +82,11 @@ var DEFAULT_CHART_COMPONENTS = {
|
|
|
84
82
|
[import_types.ChartType.Bar]: import_Bar.default,
|
|
85
83
|
[import_types.ChartType.Area]: import_Area.default,
|
|
86
84
|
[import_types.ChartType.Scatter]: import_Scatter.default,
|
|
87
|
-
[import_types.ChartType.PinMap]:
|
|
88
|
-
[import_types.ChartType.
|
|
89
|
-
[import_types.ChartType.HeatMap]: import_HeatMap.default,
|
|
85
|
+
[import_types.ChartType.PinMap]: import_export_map2.PinMap,
|
|
86
|
+
[import_types.ChartType.HeatMap]: import_export_map2.HeatMap,
|
|
90
87
|
[import_types.ChartType.MindMap]: import_MindMap.default,
|
|
91
88
|
[import_types.ChartType.FlowDiagram]: import_FlowDiagram.default,
|
|
92
|
-
[import_types.ChartType.NetworkGraph]: import_NetworkGraph.default
|
|
93
|
-
[import_types.ChartType.FishboneDiagram]: import_FishboneDiagram.default
|
|
89
|
+
[import_types.ChartType.NetworkGraph]: import_NetworkGraph.default
|
|
94
90
|
};
|
|
95
91
|
// Annotate the CommonJS export names for ESM import in node:
|
|
96
92
|
0 && (module.exports = {
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "0.
|
|
1
|
+
declare const _default: "0.3.0-beta.0";
|
|
2
2
|
export default _default;
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/GPTVis/Lite.js
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["children", "components", "rehypePlugins"];
|
|
4
|
+
var _excluded = ["children", "components", "rehypePlugins", "remarkPlugins"];
|
|
5
5
|
import React, { memo } from 'react';
|
|
6
6
|
import Markdown from 'react-markdown';
|
|
7
7
|
import rehypeRaw from 'rehype-raw';
|
|
8
|
+
import remarkGfm from 'remark-gfm';
|
|
8
9
|
var GPTVisLite = function GPTVisLite(_ref) {
|
|
9
10
|
var children = _ref.children,
|
|
10
11
|
components = _ref.components,
|
|
11
12
|
rehypePlugins = _ref.rehypePlugins,
|
|
13
|
+
remarkPlugins = _ref.remarkPlugins,
|
|
12
14
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
13
15
|
return /*#__PURE__*/React.createElement(Markdown, _extends({
|
|
14
16
|
components: components,
|
|
15
|
-
rehypePlugins: [rehypeRaw].concat(_toConsumableArray(rehypePlugins ? rehypePlugins : []))
|
|
17
|
+
rehypePlugins: [rehypeRaw].concat(_toConsumableArray(rehypePlugins ? rehypePlugins : [])),
|
|
18
|
+
remarkPlugins: [remarkGfm].concat(_toConsumableArray(remarkPlugins ? remarkPlugins : []))
|
|
16
19
|
}, rest), children);
|
|
17
20
|
};
|
|
18
21
|
export default /*#__PURE__*/memo(GPTVisLite);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import { type HeatMapProps } from './HeatMap';
|
|
3
|
+
import { type MapProps } from './Map';
|
|
4
|
+
import { type PathMapProps } from './PathMap';
|
|
5
|
+
import { type PinMapProps } from './PinMap';
|
|
6
|
+
export declare const Map: FC<MapProps>;
|
|
7
|
+
export declare const HeatMap: FC<HeatMapProps>;
|
|
8
|
+
export declare const PathMap: FC<PathMapProps>;
|
|
9
|
+
export declare const PinMap: FC<PinMapProps>;
|
|
10
|
+
export type { HeatMapProps, MapProps, PathMapProps, PinMapProps };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Map Components mock for use in environments without `document` / `window`, like ssr pre render
|
|
2
|
+
|
|
3
|
+
function MockMap() {
|
|
4
|
+
return null;
|
|
5
|
+
}
|
|
6
|
+
export var Map = MockMap;
|
|
7
|
+
export var HeatMap = MockMap;
|
|
8
|
+
export var PathMap = MockMap;
|
|
9
|
+
export var PinMap = MockMap;
|
package/dist/esm/export.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ import { default as Area, type AreaProps } from './Area';
|
|
|
4
4
|
import { default as Bar, type BarProps } from './Bar';
|
|
5
5
|
import { default as Column, type ColumnProps } from './Column';
|
|
6
6
|
import { default as DualAxes, type DualAxesProps } from './DualAxes';
|
|
7
|
-
import { default as HeatMap, type HeatMapProps } from './HeatMap';
|
|
8
7
|
import { default as Histogram, type HistogramProps } from './Histogram';
|
|
9
8
|
import { default as Line, type LineProps } from './Line';
|
|
10
9
|
import { default as Pie, type PieProps } from './Pie';
|
|
@@ -18,11 +17,10 @@ import { default as FlowDiagram, type FlowDiagramProps } from './FlowDiagram';
|
|
|
18
17
|
import { default as MindMap, type MindMapProps } from './MindMap';
|
|
19
18
|
import { default as NetworkGraph, type NetworkGraphProps } from './NetworkGraph';
|
|
20
19
|
export { default as IndentedTree, type IndentedTreeProps } from './IndentedTree';
|
|
21
|
-
export { default as Map, type MapProps } from './Map';
|
|
22
20
|
export { default as OrganizationChart, type OrganizationChartProps } from './OrganizationChart';
|
|
23
21
|
/********** map chart **********/
|
|
24
|
-
|
|
25
|
-
import {
|
|
22
|
+
export { Map, type MapProps } from './export-map';
|
|
23
|
+
import { PinMap, type PinMapProps, HeatMap, type HeatMapProps, PathMap, type PathMapProps } from './export-map';
|
|
26
24
|
/********** NTV **********/
|
|
27
25
|
export { VisText, type VisTextProps } from './Text';
|
|
28
26
|
export { Area, Bar, Column, DualAxes, FishboneDiagram, FlowDiagram, HeatMap, Histogram, Line, MindMap, NetworkGraph, PathMap, Pie, PinMap, Radar, Scatter, Treemap, WordCloud, type AreaProps, type BarProps, type ColumnProps, type DualAxesProps, type FishboneDiagramProps, type FlowDiagramProps, type HeatMapProps, type HistogramProps, type LineProps, type MindMapProps, type NetworkGraphProps, type PathMapProps, type PieProps, type PinMapProps, type RadarProps, type ScatterProps, type TreemapProps, type WordCloudProps, };
|
package/dist/esm/export.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
2
|
var _DEFAULT_CHART_COMPON;
|
|
3
|
+
// organize-imports-ignore
|
|
3
4
|
import { ChartType } from "./types";
|
|
4
5
|
|
|
5
6
|
/********** plot chart **********/
|
|
@@ -7,7 +8,6 @@ import { default as Area } from "./Area";
|
|
|
7
8
|
import { default as Bar } from "./Bar";
|
|
8
9
|
import { default as Column } from "./Column";
|
|
9
10
|
import { default as DualAxes } from "./DualAxes";
|
|
10
|
-
import { default as HeatMap } from "./HeatMap";
|
|
11
11
|
import { default as Histogram } from "./Histogram";
|
|
12
12
|
import { default as Line } from "./Line";
|
|
13
13
|
import { default as Pie } from "./Pie";
|
|
@@ -22,14 +22,13 @@ import { default as FlowDiagram } from "./FlowDiagram";
|
|
|
22
22
|
import { default as MindMap } from "./MindMap";
|
|
23
23
|
import { default as NetworkGraph } from "./NetworkGraph";
|
|
24
24
|
export { default as IndentedTree } from "./IndentedTree";
|
|
25
|
-
export { default as Map } from "./Map";
|
|
26
25
|
export { default as OrganizationChart } from "./OrganizationChart";
|
|
27
26
|
|
|
28
27
|
/********** map chart **********/
|
|
29
|
-
|
|
30
|
-
import {
|
|
28
|
+
export { Map } from "./export-map";
|
|
29
|
+
import { PinMap, HeatMap, PathMap } from "./export-map";
|
|
31
30
|
|
|
32
31
|
/********** NTV **********/
|
|
33
32
|
export { VisText } from "./Text";
|
|
34
33
|
export { Area, Bar, Column, DualAxes, FishboneDiagram, FlowDiagram, HeatMap, Histogram, Line, MindMap, NetworkGraph, PathMap, Pie, PinMap, Radar, Scatter, Treemap, WordCloud };
|
|
35
|
-
export var DEFAULT_CHART_COMPONENTS = (_DEFAULT_CHART_COMPON = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_DEFAULT_CHART_COMPON, ChartType.Line, Line), ChartType.Column, Column), ChartType.Pie, Pie), ChartType.Bar, Bar), ChartType.Area, Area), ChartType.Scatter, Scatter), ChartType.PinMap, PinMap), ChartType.
|
|
34
|
+
export var DEFAULT_CHART_COMPONENTS = (_DEFAULT_CHART_COMPON = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_DEFAULT_CHART_COMPON, ChartType.Line, Line), ChartType.Column, Column), ChartType.Pie, Pie), ChartType.Bar, Bar), ChartType.Area, Area), ChartType.Scatter, Scatter), ChartType.PinMap, PinMap), ChartType.HeatMap, HeatMap), ChartType.MindMap, MindMap), ChartType.FlowDiagram, FlowDiagram), _defineProperty(_DEFAULT_CHART_COMPON, ChartType.NetworkGraph, NetworkGraph));
|
package/dist/esm/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "0.
|
|
1
|
+
declare const _default: "0.3.0-beta.0";
|
|
2
2
|
export default _default;
|
package/dist/esm/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '0.
|
|
1
|
+
export default '0.3.0-beta.0';
|