Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
149 commits
Select commit Hold shift + click to select a range
185ed95
Create package.json for TypeScript, Vite, and development tools.
pearlwang1106 Mar 5, 2026
6160f4d
Add tsconfig.json with TypeScript compiler options targeting ES2020 a…
pearlwang1106 Mar 5, 2026
ead4997
refactor: simplify site checks and relocate browser examples
pearlwang1106 Nov 3, 2026
e79372a
Merge remote-tracking branch 'origin/master' into codex/simplify-site…
pearlwang1106 Nov 3, 2026
9d0c092
Merge remote-tracking branch 'origin/master' into codex/simplify-site…
pearlwang1106 Nov 3, 2026
b5544f3
fix(site): clarify graph attribution and container examples
pearlwang1106 Nov 3, 2026
308cfbe
docs: fix parallel edge spacing examples (B01)
pearlwang1106 Nov 4, 2026
bad3ffa
docs: clarify node configuration support (B02)
pearlwang1106 Nov 4, 2026
7e61adb
docs: add node body configuration reference (B03)
pearlwang1106 Nov 4, 2026
bd27577
docs: detail node label and icon options (B04)
pearlwang1106 Nov 4, 2026
c4489fc
docs: document node decoration configuration (B05)
pearlwang1106 Nov 4, 2026
c7da72e
docs: expose node reference in configuration navigation
pearlwang1106 Nov 4, 2026
e0ec3ad
docs: complete node icon and badge examples
pearlwang1106 Nov 4, 2026
b55d9a6
docs: pair inline node previews with runnable source
pearlwang1106 Nov 4, 2026
2759785
docs: pair node API configuration code with previews
pearlwang1106 Nov 4, 2026
18a55a8
style: align inline document canvases with existing previews
pearlwang1106 Nov 4, 2026
11400a6
docs: organize node guides by usage flow (B06)
pearlwang1106 Nov 4, 2026
598b5a8
docs: format node guide FAQs as prose
pearlwang1106 Nov 4, 2026
e3f9aac
docs: consolidate node options into detailed reference (B07)
pearlwang1106 Nov 4, 2026
ec5e183
docs: add inline edge style and picking previews (B08a)
pearlwang1106 Nov 4, 2026
6e35808
docs: add basic edge configuration reference (B08)
pearlwang1106 Nov 4, 2026
19c9c16
docs: document parallel edge configuration with live examples (B09)
pearlwang1106 Nov 4, 2026
ef31a31
docs: define edge curves and polyline routing contracts (B10)
pearlwang1106 Nov 4, 2026
c6fad9a
docs: complete edge label reference before consolidation (B10a)
pearlwang1106 Nov 4, 2026
7e57816
docs: rewrite edge guides around configuration workflows (B11)
pearlwang1106 Nov 4, 2026
3113229
docs: consolidate legacy edge configuration into reference links (B12)
pearlwang1106 Nov 4, 2026
21a6b66
docs: add initial Combo data preview (B13a)
pearlwang1106 Nov 4, 2026
417a4ca
docs: define Combo data and initial state contracts (B13)
pearlwang1106 Nov 4, 2026
0f70c37
docs: define Combo base styles and local precedence (B14)
pearlwang1106 Nov 4, 2026
36607be
docs: complete Combo collapse and state reference (B15)
pearlwang1106 Nov 4, 2026
4443b26
docs: organize Combo usage workflows and live examples (B16)
pearlwang1106 Nov 4, 2026
cf66809
docs: consolidate legacy Combo options entries (B17)
pearlwang1106 Nov 4, 2026
68fca44
docs: add interactive label policy preview (B18a)
pearlwang1106 Nov 4, 2026
46a322c
docs: define label policy reference and lookup entries (B18)
pearlwang1106 Nov 4, 2026
370b10e
docs: organize label and icon usage guide (B19)
pearlwang1106 Nov 4, 2026
726c409
docs: consolidate legacy label policy lookup entries (B20)
pearlwang1106 Nov 4, 2026
a7879b2
docs(theme): add complete theme configuration reference (B21)
pearlwang1106 Nov 4, 2026
2ede2fd
docs(theme): rewrite theme usage guide with live examples (B22)
pearlwang1106 Nov 4, 2026
1bdfca9
docs(theme): consolidate legacy theme API entries (B23)
pearlwang1106 Nov 4, 2026
89dc54f
docs(layout): add layout configuration reference (B24)
pearlwang1106 Nov 4, 2026
02f3b3e
docs(layout): organize layout usage and tree previews (B25)
pearlwang1106 Nov 4, 2026
1c7be99
docs(layout): add Worker usage and cancellation guide (B26)
pearlwang1106 Nov 4, 2026
7f51236
docs(layout): document layout methods and standalone results (B27)
pearlwang1106 Nov 4, 2026
aebbe5a
docs(layout): consolidate legacy layout documentation entries (B28)
pearlwang1106 Nov 4, 2026
02a4b06
docs(layout): give dagre preview room for node labels (B28a)
pearlwang1106 Nov 4, 2026
114e9bd
docs(behavior): add complete behavior configuration reference (B29)
pearlwang1106 Nov 4, 2026
6e7de45
docs(behavior): organize interaction workflows and highlighting (B30)
pearlwang1106 Nov 4, 2026
86e33cd
docs(behavior): rewrite custom Behavior tutorial with live implementa…
pearlwang1106 Nov 4, 2026
99bbfdc
docs(behavior): add hover and click Tooltip workflows (B32)
pearlwang1106 Nov 4, 2026
bd95a19
docs(behavior): consolidate legacy configuration and extension entrie…
pearlwang1106 Nov 4, 2026
3de92a0
docs(events): add complete event contract and listener preview (B34)
pearlwang1106 Nov 5, 2026
b675dde
docs(events): organize event workflows and lifecycle preview (B35)
pearlwang1106 Nov 5, 2026
663d5a2
docs(events): consolidate legacy entries and link workflows (B36)
pearlwang1106 Nov 5, 2026
96db858
docs(events): add readable element and selection detail pages (E04a)
pearlwang1106 Nov 5, 2026
8767cf9
docs(events): add individual drag and lifecycle contracts (E04b)
pearlwang1106 Nov 5, 2026
bc2fb2b
docs(events): make event API a progressive lookup entry (E04c)
pearlwang1106 Nov 5, 2026
c1d5a03
docs(examples): show source excerpts with expandable runnable code (E…
pearlwang1106 Nov 5, 2026
cdfdd18
docs(events): organize the topic around progressive workflows (E05b)
pearlwang1106 Nov 5, 2026
3b931b2
docs(states): explain state concepts through an interactive example (…
pearlwang1106 Nov 5, 2026
a90f33a
docs(states): add state workflows and selection-preserving refresh (B38)
pearlwang1106 Nov 5, 2026
4b9b4dc
docs: explain viewport and coordinate concepts
pearlwang1106 Nov 5, 2026
4c25b5d
docs: guide viewport fitting and view preservation
pearlwang1106 Nov 5, 2026
0681c87
docs: reference state and visibility methods
pearlwang1106 Nov 5, 2026
7c88b70
docs: reference viewport methods and live resizing
pearlwang1106 Nov 5, 2026
e8850c3
docs: consolidate viewport entries and preserve old anchors
pearlwang1106 Nov 5, 2026
5d458bf
docs: reference graph lifecycle and visual updates
pearlwang1106 Nov 5, 2026
2d33dee
docs: clarify lifecycle flow and asynchronous cleanup
pearlwang1106 Nov 5, 2026
539f668
docs: consolidate lifecycle references and event links
pearlwang1106 Nov 5, 2026
8f7f247
docs: reference graph data snapshots and queries
pearlwang1106 Nov 5, 2026
67ce3af
docs: reference data replacement and incremental mutations
pearlwang1106 Nov 5, 2026
5bfe94e
docs: define graph input data and identity contracts
pearlwang1106 Nov 5, 2026
a493278
docs: distinguish graph input live models and snapshots
pearlwang1106 Nov 5, 2026
907f996
docs: guide full and incremental data updates
pearlwang1106 Nov 5, 2026
ef8d3a7
docs: consolidate legacy data references and clarify fixed axes
pearlwang1106 Nov 5, 2026
6d2d10c
docs: reference combo membership and structural operations
pearlwang1106 Nov 5, 2026
e68cbdd
docs: consolidate combo operation entries
pearlwang1106 Nov 5, 2026
3d59589
docs: connect data state and combo examples to references
pearlwang1106 Nov 5, 2026
14bfaf9
docs: add polyline routing workflow (B56)
pearlwang1106 Nov 5, 2026
f549165
docs: define extension registration and context contracts (B57)
pearlwang1106 Nov 5, 2026
0471f7a
docs: define drawing extension contracts (B58)
pearlwang1106 Nov 5, 2026
83c7a45
docs: define runtime extension lifecycles (B59)
pearlwang1106 Nov 5, 2026
0050dc3
docs: reference transform and plugin options (B60)
pearlwang1106 Nov 5, 2026
4948fe0
docs: teach node descriptors overlays and anchors (B61)
pearlwang1106 Nov 5, 2026
57cd114
docs: teach custom edge styles and updates (B62)
pearlwang1106 Nov 5, 2026
02c48d7
docs: teach shared node and edge label rendering (B63)
pearlwang1106 Nov 5, 2026
fd490a0
docs: teach decoration content and engine-managed stacks (B64)
pearlwang1106 Nov 5, 2026
72fce83
docs: teach custom layout execution and cancellation (B65)
pearlwang1106 Nov 5, 2026
3b18e79
docs: teach transform inputs reuse and incremental boundaries (B66)
pearlwang1106 Nov 5, 2026
03d2160
docs: teach plugin subscriptions remounts and cleanup (B67)
pearlwang1106 Nov 5, 2026
7c31ae6
docs: consolidate extension overview and legacy entries (B68)
pearlwang1106 Nov 5, 2026
1315d63
docs: align extension preview limits and reference anchors
pearlwang1106 Nov 5, 2026
59faefd
docs: unify public utility references (B69)
pearlwang1106 Nov 5, 2026
86392a5
docs: index all public Graph methods by task (B70)
pearlwang1106 Nov 5, 2026
800f6fd
docs: focus GraphOptions overview on top-level contracts (B71)
pearlwang1106 Nov 5, 2026
e65c1b4
docs: classify root API exports and consolidate boundaries (B72)
pearlwang1106 Nov 5, 2026
0617eed
docs: keep legacy Graph anchors clear of sticky header
pearlwang1106 Nov 5, 2026
6b22ab7
docs: preserve verified framework changes and usable baseline (B00)
pearlwang1106 Nov 5, 2026
5dcf0c0
docs: make the documentation home a task index (B73)
pearlwang1106 Nov 5, 2026
d9a3cab
docs: clarify product positioning and capability boundaries (B74)
pearlwang1106 Nov 5, 2026
3699512
docs: ground library selection in current official capability sources…
pearlwang1106 Nov 5, 2026
0563fd3
docs: complete first graph setup verification and cleanup (B76)
pearlwang1106 Nov 5, 2026
0a1dda8
docs: explain React instance updates and StrictMode cleanup (B77)
pearlwang1106 Nov 5, 2026
a3ac43f
docs: split Vue integration and preserve former framework anchors (B78)
pearlwang1106 Nov 5, 2026
79fca48
docs: turn AI guidance into actionable inputs and acceptance steps (B79)
pearlwang1106 Nov 5, 2026
10882f9
docs: pin tutorial version and verify framework migration compatibility
pearlwang1106 Nov 5, 2026
0944e70
docs: validate onboarding against published types and real UMD artifacts
pearlwang1106 Nov 5, 2026
cba4432
docs: define reproducible performance measurement boundaries (B80)
pearlwang1106 Nov 5, 2026
8e38f1f
docs: make performance tuning a diagnose-change-verify workflow (B81)
pearlwang1106 Nov 5, 2026
cf0b06f
docs: separate measured bundle artifacts from loading budgets (B82)
pearlwang1106 Nov 5, 2026
f481c13
docs: distinguish architecture internals lifecycle and resource owner…
pearlwang1106 Nov 5, 2026
e1a475d
docs: add a task-based help and upgrade entry (B84)
pearlwang1106 Nov 5, 2026
a3927dd
docs: replace inferred browser guarantees with runtime acceptance bou…
pearlwang1106 Nov 5, 2026
5db05f6
docs: audit published source compatibility deprecated and internal bo…
pearlwang1106 Nov 5, 2026
91f1f71
docs: make G6 migration a scoped contract-by-contract workflow (B87)
pearlwang1106 Nov 5, 2026
620724e
docs: shorten FAQ into direct answers with canonical links (B88)
pearlwang1106 Nov 5, 2026
adbdd40
docs: add symptom-driven troubleshooting with reproducible diagnostic…
pearlwang1106 Nov 5, 2026
072b551
docs: separate verified releases from development history (B90)
pearlwang1106 Nov 5, 2026
f20d8bc
docs: group usage guides by developer task (B91)
pearlwang1106 Nov 5, 2026
f8e7757
docs: give extension tutorials their own section without changing URL…
pearlwang1106 Nov 5, 2026
755cd92
docs: group API contracts with active-section expansion (B93)
pearlwang1106 Nov 5, 2026
3ffc295
docs: collect measurement loading and architecture in one section (B94)
pearlwang1106 Nov 5, 2026
fc0c183
docs: expose troubleshooting FAQ migration and changelog together (B95)
pearlwang1106 Nov 5, 2026
d96e80f
docs: derive metadata and sidebar from one navigation manifest (B96)
pearlwang1106 Nov 5, 2026
af82fbb
docs: include nested event metadata in the navigation projection
pearlwang1106 Nov 5, 2026
b8a587c
docs: validate legacy routes examples exports and deployment paths (B97)
pearlwang1106 Nov 5, 2026
8a674c2
docs: complete parallel-edge and self-loop task guide with live examp…
pearlwang1106 Nov 5, 2026
136756e
docs: establish the complete 51-case example audit matrix (E06)
pearlwang1106 Nov 5, 2026
f51986b
docs: audit E07 example interactions and recovery
pearlwang1106 Nov 5, 2026
685c74e
docs: audit E08 example interactions and recovery
pearlwang1106 Nov 5, 2026
d965515
docs: audit E09 example interactions and recovery
pearlwang1106 Nov 5, 2026
efb1c61
docs: audit E10 example interactions and recovery
pearlwang1106 Nov 5, 2026
8bd0b60
docs: audit E11 example interactions and recovery
pearlwang1106 Nov 5, 2026
0381b7e
docs: audit E12 example interactions and recovery
pearlwang1106 Nov 5, 2026
5c740f6
docs: audit E13 example interactions and recovery
pearlwang1106 Nov 5, 2026
b3eec3d
docs: audit E14 example interactions and recovery
pearlwang1106 Nov 5, 2026
8bec513
docs: audit E15 example interactions and recovery
pearlwang1106 Nov 5, 2026
68d284c
docs: audit E16 example interactions and recovery
pearlwang1106 Nov 5, 2026
d2096b0
docs: audit E17 example interactions and recovery
pearlwang1106 Nov 5, 2026
eed8cbc
docs: audit E18 example interactions and recovery
pearlwang1106 Nov 5, 2026
679a152
docs: audit E19 example interactions and recovery
pearlwang1106 Nov 5, 2026
f63c64d
docs: audit E20 example interactions and recovery
pearlwang1106 Nov 5, 2026
ae1a1a1
docs: audit E21 example interactions and recovery
pearlwang1106 Nov 5, 2026
30fb535
docs: audit E22 example interactions and recovery
pearlwang1106 Nov 5, 2026
2ad82c5
docs: audit E23 example interactions and recovery
pearlwang1106 Nov 5, 2026
f597e5e
docs: complete example center and source export acceptance (E24)
pearlwang1106 Nov 5, 2026
7fa8aba
feat: refine G6Lite documentation and split optional layouts
pearlwang1106 Nov 13, 2026
ede7ceb
merge: retain dev history and sync G6Lite development
pearlwang1106 Nov 13, 2026
43982fa
fix: pass lint and demo autoFit checks
pearlwang1106 Nov 13, 2026
7711929
fix: decouple SEO tests from site dependencies
pearlwang1106 Nov 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ English | [简体中文](./README.zh-CN.md)
</p>

<p align="center">
<a href="https://www.npmjs.com/package/@antv/g6-lite"><img alt="npm version" src="https://img.shields.io/npm/v/@antv/g6-lite.svg"></a>
<a href="https://www.npmjs.com/package/@antv/g6-lite/v/0.1.0"><img alt="npm version" src="https://img.shields.io/badge/version-0.1.0-blue"></a>
<a href="https://github.com/antvis/G6Lite/actions/workflows/build.yml"><img alt="build" src="https://github.com/antvis/G6Lite/actions/workflows/build.yml/badge.svg"></a>
<a href="https://bundlephobia.com/package/@antv/g6-lite"><img alt="minified and gzipped size" src="https://img.shields.io/bundlephobia/minzip/@antv/g6-lite"></a>
<a href="https://cdn.jsdelivr.net/npm/@antv/g6-lite@beta/dist/g6-lite.min.js"><img alt="UMD gzip size" src="https://img.badgesize.io/https://cdn.jsdelivr.net/npm/@antv/g6-lite@beta/dist/g6-lite.min.js?compression=gzip&amp;label=UMD%20gzip"></a>
<a href="https://bundlephobia.com/package/@antv/g6-lite@0.1.0"><img alt="minified and gzipped size" src="https://img.shields.io/bundlephobia/minzip/@antv/g6-lite/0.1.0"></a>
<a href="https://cdn.jsdelivr.net/npm/@antv/g6-lite@0.1.0/dist/g6-lite.min.js"><img alt="UMD gzip size" src="https://img.badgesize.io/https://cdn.jsdelivr.net/npm/@antv/g6-lite@0.1.0/dist/g6-lite.min.js?compression=gzip&amp;label=UMD%20gzip"></a>
<a href="./LICENSE"><img alt="MIT license" src="https://img.shields.io/npm/l/@antv/g6-lite.svg"></a>
</p>

<p align="center">
<a href="https://g6lite.antv.vision/en">Website</a> ·
<a href="https://g6lite.antv.vision/en/docs/getting-started/quick-start">Quick Start</a> ·
<a href="https://g6lite.antv.vision/en/docs/api">API</a> ·
<a href="https://g6lite.antv.vision/en/docs/api/graph">API</a> ·
<a href="https://g6lite.antv.vision/en/docs/examples">Examples</a>
</p>

Expand All @@ -38,7 +38,7 @@ English | [简体中文](./README.zh-CN.md)
## Install

```bash
npm install @antv/g6-lite
npm install @antv/g6-lite@0.1.0
```

## Quick Start
Expand Down Expand Up @@ -86,11 +86,11 @@ Only package-root exports from `@antv/g6-lite` and `package.json#exports` are pu

## CDN / UMD

Use the UMD build directly in a browser without a bundler. It exposes `window.G6Lite` and includes the runtime dependencies, layouts, and an inline layout Worker:
Use the UMD build directly in a browser without a bundler. It exposes `window.G6Lite` and includes the runtime dependencies and built-in layouts. See [Optional layouts](https://g6lite.antv.vision/en/docs/guides/layout-overview#optional-layouts) for additional layouts.

```html
<div id="container" style="width: 100%; height: 500px"></div>
<script src="https://cdn.jsdelivr.net/npm/@antv/g6-lite@beta/dist/g6-lite.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@antv/g6-lite@0.1.0/dist/g6-lite.min.js"></script>
<script>
const graph = new G6Lite.Graph({
container: '#container',
Expand All @@ -108,18 +108,18 @@ Use the UMD build directly in a browser without a bundler. It exposes `window.G6
</script>
```

- [jsDelivr](https://cdn.jsdelivr.net/npm/@antv/g6-lite@beta/dist/g6-lite.min.js)
- [UNPKG](https://unpkg.com/@antv/g6-lite@beta/dist/g6-lite.min.js)
- [jsDelivr](https://cdn.jsdelivr.net/npm/@antv/g6-lite@0.1.0/dist/g6-lite.min.js)
- [UNPKG](https://unpkg.com/@antv/g6-lite@0.1.0/dist/g6-lite.min.js)

Pin `beta` to an exact published version in production. The UMD badge measures the complete CDN download; the Bundlephobia badge measures the npm entry bundled by that service.
The UMD badge measures the complete CDN download; the Bundlephobia badge measures the npm entry bundled by that service.

## Learn More

- [Website](https://g6lite.antv.vision/en)
- [Quick Start](https://g6lite.antv.vision/en/docs/getting-started/quick-start)
- [Core Concepts](https://g6lite.antv.vision/en/docs/concepts/overview)
- [What is G6Lite?](https://g6lite.antv.vision/en/docs)
- [Data and Configuration](https://g6lite.antv.vision/en/docs/guides/data)
- [API Reference](https://g6lite.antv.vision/en/docs/api)
- [Graph API](https://g6lite.antv.vision/en/docs/api/graph)
- [Examples](https://g6lite.antv.vision/en/docs/examples)
- [Performance Metrics](https://g6lite.antv.vision/en/docs/metrics/performance)
- [Browser Compatibility](https://g6lite.antv.vision/en/docs/compatibility/browser)
Expand Down
24 changes: 12 additions & 12 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@
</p>

<p align="center">
<a href="https://www.npmjs.com/package/@antv/g6-lite"><img alt="npm 版本" src="https://img.shields.io/npm/v/@antv/g6-lite.svg"></a>
<a href="https://www.npmjs.com/package/@antv/g6-lite/v/0.1.0"><img alt="npm 版本" src="https://img.shields.io/badge/version-0.1.0-blue"></a>
<a href="https://github.com/antvis/G6Lite/actions/workflows/build.yml"><img alt="构建" src="https://github.com/antvis/G6Lite/actions/workflows/build.yml/badge.svg"></a>
<a href="https://bundlephobia.com/package/@antv/g6-lite"><img alt="压缩后体积" src="https://img.shields.io/bundlephobia/minzip/@antv/g6-lite"></a>
<a href="https://cdn.jsdelivr.net/npm/@antv/g6-lite@beta/dist/g6-lite.min.js"><img alt="UMD gzip 体积" src="https://img.badgesize.io/https://cdn.jsdelivr.net/npm/@antv/g6-lite@beta/dist/g6-lite.min.js?compression=gzip&amp;label=UMD%20gzip"></a>
<a href="https://bundlephobia.com/package/@antv/g6-lite@0.1.0"><img alt="压缩后体积" src="https://img.shields.io/bundlephobia/minzip/@antv/g6-lite/0.1.0"></a>
<a href="https://cdn.jsdelivr.net/npm/@antv/g6-lite@0.1.0/dist/g6-lite.min.js"><img alt="UMD gzip 体积" src="https://img.badgesize.io/https://cdn.jsdelivr.net/npm/@antv/g6-lite@0.1.0/dist/g6-lite.min.js?compression=gzip&amp;label=UMD%20gzip"></a>
<a href="./LICENSE"><img alt="MIT 许可证" src="https://img.shields.io/npm/l/@antv/g6-lite.svg"></a>
</p>

<p align="center">
<a href="https://g6lite.antv.vision">官网</a> ·
<a href="https://g6lite.antv.vision/docs/getting-started/quick-start">快速开始</a> ·
<a href="https://g6lite.antv.vision/docs/api">API</a> ·
<a href="https://g6lite.antv.vision/docs/api/graph">API</a> ·
<a href="https://g6lite.antv.vision/docs/examples">示例</a>
</p>

Expand All @@ -38,7 +38,7 @@
## 安装

```bash
npm install @antv/g6-lite
npm install @antv/g6-lite@0.1.0
```

## 快速开始
Expand Down Expand Up @@ -86,11 +86,11 @@ await graph.render();

## CDN / UMD

无需构建工具,在浏览器中直接加载 UMD 包即可使用 `window.G6Lite`。产物包含运行时依赖、布局算法和内联的布局 Worker:
无需构建工具,在浏览器中直接加载 UMD 包即可使用 `window.G6Lite`。主脚本包含运行时依赖和内置布局。可选布局的接入方式见[布局总览](https://g6lite.antv.vision/docs/guides/layout-overview#optional-layouts)。

```html
<div id="container" style="width: 100%; height: 500px"></div>
<script src="https://cdn.jsdelivr.net/npm/@antv/g6-lite@beta/dist/g6-lite.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@antv/g6-lite@0.1.0/dist/g6-lite.min.js"></script>
<script>
const graph = new G6Lite.Graph({
container: '#container',
Expand All @@ -108,18 +108,18 @@ await graph.render();
</script>
```

- [jsDelivr](https://cdn.jsdelivr.net/npm/@antv/g6-lite@beta/dist/g6-lite.min.js)
- [UNPKG](https://unpkg.com/@antv/g6-lite@beta/dist/g6-lite.min.js)
- [jsDelivr](https://cdn.jsdelivr.net/npm/@antv/g6-lite@0.1.0/dist/g6-lite.min.js)
- [UNPKG](https://unpkg.com/@antv/g6-lite@0.1.0/dist/g6-lite.min.js)

生产环境请将 `beta` 替换为已发布的确切版本号。UMD 徽章展示完整 CDN 文件的下载体积;Bundlephobia 徽章展示该服务打包 npm 入口后测得的体积。
UMD 徽章展示完整 CDN 文件的下载体积;Bundlephobia 徽章展示该服务打包 npm 入口后测得的体积。

## 继续阅读

- [官网](https://g6lite.antv.vision)
- [快速开始](https://g6lite.antv.vision/docs/getting-started/quick-start)
- [核心概念](https://g6lite.antv.vision/docs/concepts/overview)
- [G6Lite 是什么](https://g6lite.antv.vision/docs)
- [数据与配置](https://g6lite.antv.vision/docs/guides/data)
- [API 参考](https://g6lite.antv.vision/docs/api)
- [图 API](https://g6lite.antv.vision/docs/api/graph)
- [示例](https://g6lite.antv.vision/docs/examples)
- [性能指标](https://g6lite.antv.vision/docs/metrics/performance)
- [浏览器兼容性](https://g6lite.antv.vision/docs/compatibility/browser)
Expand Down
26 changes: 25 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g6-lite",
"version": "0.1.0-beta.27",
"version": "0.1.0",
"description": "Lightweight graph visualization, built for large-scale relationship data",
"type": "module",
"main": "dist/index.js",
Expand All @@ -12,6 +12,30 @@
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
},
"./layouts/mds": {
"types": "./dist/layouts/mds.d.ts",
"import": "./dist/layouts/mds.js"
},
"./layouts/radial": {
"types": "./dist/layouts/radial.d.ts",
"import": "./dist/layouts/radial.js"
},
"./layouts/indented": {
"types": "./dist/layouts/indented.d.ts",
"import": "./dist/layouts/indented.js"
},
"./layouts/mindmap": {
"types": "./dist/layouts/mindmap.d.ts",
"import": "./dist/layouts/mindmap.js"
},
"./layouts/fishbone": {
"types": "./dist/layouts/fishbone.d.ts",
"import": "./dist/layouts/fishbone.js"
},
"./layouts/random": {
"types": "./dist/layouts/random.d.ts",
"import": "./dist/layouts/random.js"
}
},
"files": [
Expand Down
30 changes: 27 additions & 3 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ const ts = () =>
},
});

const optionalLayouts = Object.fromEntries(
['mds', 'radial', 'indented', 'mindmap', 'fishbone', 'random'].map((type) => [
`layouts/${type}`,
`src/layout/optional/${type}.ts`,
]),
);

export default [
// npm 产物:ESM bundle + 独立 layout worker chunk。
{
Expand All @@ -27,6 +34,7 @@ export default [
// workerLayout.ts 以 `new URL('./layoutWorker.js', import.meta.url)` 引用
// worker,入口必须保持扁平文件名,落在 dist 根目录。
layoutWorker: 'src/layout/layoutWorker.ts',
...optionalLayouts,
},
external,
output: {
Expand All @@ -38,11 +46,16 @@ export default [
},
plugins: [ts()],
},
// 汇总类型声明为单个自包含文件,依赖类型保持外部引用。
// Share declarations between the main entry and the optional layouts.
{
input: 'src/index.ts',
input: { index: 'src/index.ts', ...optionalLayouts },
external,
output: { file: 'dist/index.d.ts', format: 'es' },
output: {
dir: 'dist',
format: 'es',
entryFileNames: '[name].d.ts',
chunkFileNames: 'chunks/[name]-[hash].d.ts',
},
plugins: [dts({ respectExternal: true, compilerOptions: { stripInternal: true } })],
},
// 浏览器 script 标签直引的 UMD bundle(依赖内联;worker 失败自动回退主线程)。
Expand All @@ -58,4 +71,15 @@ export default [
},
plugins: [resolve({ browser: true, preferBuiltins: false }), commonjs(), ts()],
},
{
input: 'src/layout/optional/index.ts',
output: {
file: 'dist/g6-lite-layouts.min.js',
format: 'umd',
name: 'G6LiteLayouts',
sourcemap: true,
plugins: [terser()],
},
plugins: [resolve({ browser: true, preferBuiltins: false }), commonjs(), ts()],
},
];
132 changes: 24 additions & 108 deletions site/content/docs/en/ai.mdx
Original file line number Diff line number Diff line change
@@ -1,125 +1,41 @@
---
title: Build G6Lite graphs with AI
description: Use the G6Lite Skill, local AI agents, and Sive to create, troubleshoot, and optimize graph visualizations
title: G6Lite AI Guide
description: Use the AI Skill to write graph code in your project and ask Sive for API guidance and examples.
---

import { ArchitectureDiagram } from '@/components/architecture-diagram';
## AI Skill

<div className="ai-entry-hero not-prose">
<span>AI for graph visualization</span>
<h2>Turn intent into a graph you can verify</h2>
<div className="ai-entry-description">
The G6Lite Skill helps an AI agent identify data scale, layout, interaction, and browser
boundaries before it generates an implementation through the current package-root API.
</div>
<div className="ai-entry-actions">
<a href="https://github.com/antvis/G6Lite/tree/master/skills/antv-g6lite-graph">
View the G6Lite Skill
</a>
<a
className="is-secondary"
href="https://sive.antv.antgroup.com/qa?message=Use%20G6Lite%20to%20create%20a%20relationship%20graph.%20First%20confirm%20the%20data%20scale%2C%20layout%2C%20interactions%2C%20and%20compatibility%20requirements%2C%20then%20provide%20a%20package-root%20API%20example."
>
Start in Sive
</a>
</div>
</div>
G6Lite provides an [AI Skill](https://github.com/antvis/G6Lite/tree/master/skills/antv-g6lite-graph) (`antv-g6lite-graph`) that helps you build graphs in your project, add interactions like dragging and zooming to existing graphs, and troubleshoot rendering issues.

## Two ways to use it
### Install and use the Skill

<Cards>
<Card
title="Local agent + G6Lite Skill"
href="https://github.com/antvis/G6Lite/tree/master/skills/antv-g6lite-graph"
>
Keep implementation aligned with G6Lite's real API, capability boundary, and performance paths.
</Card>
<Card
title="Ask Sive online"
href="https://sive.antv.antgroup.com/qa?message=Use%20G6Lite%20to%20create%20a%20relationship%20graph.%20First%20confirm%20the%20data%20scale%2C%20layout%2C%20interactions%2C%20and%20compatibility%20requirements%2C%20then%20provide%20a%20package-root%20API%20example."
>
Start an online question with G6Lite context. Answers depend on Sive's current knowledge state.
</Card>
<Card title="Understand the architecture" href="/en/docs/concepts/architecture">
See how data, layout, scheduling, WebGL rendering, Canvas information layers, and extensions
work together.
</Card>
</Cards>
Run this command in your project directory to install the Skill for a coding assistant that supports Skills.

## Use the Skill locally

Provide the GitHub [`skills/antv-g6lite-graph`](https://github.com/antvis/G6Lite/tree/master/skills/antv-g6lite-graph)
directory as a Skill source to a compatible agent, then invoke it explicitly:

```text
Use $antv-g6lite-graph to build a force-directed dependency graph
with hover highlighting and node dragging.
```bash
npx skills add antvis/G6Lite --skill antv-g6lite-graph
```

You can also ask an agent to install it directly from GitHub:
Open the project in your coding assistant and ask it to use `antv-g6lite-graph`. For a new graph, share sample nodes and edges along with the layout and interactions you want. For an existing graph, include the component path and any behavior to preserve. For a bug, include the error and steps to reproduce it.

### Example prompt

```text
Install the skill from
https://github.com/antvis/G6Lite/tree/master/skills/antv-g6lite-graph
Use the G6Lite Skill (antv-g6lite-graph) to build a React + TypeScript component for the version of @antv/g6-lite installed in this project.
- Start with three nodes (A, B, C) and two edges (A→B, A→C).
- Arrange the nodes in a circle, show their IDs, and enable zooming, panning, and node dragging.
- Add an “Add node” button that inserts node D and edge B→D while keeping the current zoom and position.
- Create the graph in the browser. Clean up the canvas and event listeners when the component unmounts.
Provide the full component and instructions to run it.
```

The Skill keeps the agent focused on these constraints:

- Import only from the `@antv/g6-lite` package root, never `src/` or `dist/` internals.
- Use ESM and a real browser lifecycle with DOM, Canvas, and WebGL.
- Generate only the node, edge, layout, Behavior, Combo, and extension capabilities G6Lite supports.
- Distinguish G6Lite from G6 v5 instead of copying plugin, event, or element configuration.
- For large graphs, examine layout, label density, incremental updates, DPR, GPU, and real devices.

## Good agent tasks

| Task | Include in the prompt |
| --------------------------- | ---------------------------------------------------------------- |
| Create a relationship graph | Data fields, node/edge count, layout, container size |
| Add interactions | Selection, drag, tooltip, highlight, brush, or lasso |
| Migrate from G6 v5 | List capability differences and unsupported needs before editing |
| Diagnose a blank canvas | Container size, endpoints, WebGL, lifecycle, and version |
| Optimize a large graph | First render, layout, labels, state patches, memory, and devices |
| Create an extension | Category, lifecycle, public ExtensionContext, and cleanup |

## Recommended workflow

<div className="ai-workflow not-prose">
<ol>
<li>
<strong>Clarify input</strong>
<span>Confirm data, scale, coordinates, layout, interactions, and runtime.</span>
</li>
<li>
<strong>Render the minimum</strong>
<span>Prove a visible, disposable graph through package-root APIs.</span>
</li>
<li>
<strong>Add layers</strong>
<span>Introduce styling, layout, behaviors, states, Combo, and extensions in sequence.</span>
</li>
<li>
<strong>Validate for real</strong>
<span>Check the target browser, DPR, GPU, and container dimensions.</span>
</li>
</ol>
</div>

AI-generated code still needs type checking, browser validation, and product-data review. Do not treat agent output as a production result by itself.

## The engine an agent should understand
## Sive Online Q&A

<ArchitectureDiagram locale="en" compact />
Open [Sive online Q&A](https://sive.antv.antgroup.com/qa) to ask how an API works or get a short example. For project-specific questions, include your G6Lite version, framework, and the relevant code.

The diagram shows stable responsibilities only. See [Technical architecture](/en/docs/concepts/architecture) for data flow, update paths, and extension boundaries.
Try one of these questions.

## Continue learning
- “How do I enable node dragging in G6Lite? Show the smallest configuration that works.”
- “How do I keep the current zoom and position when updating nodes and edges with `setData()`? Show an example.”
- “Where should I call `destroy()` when leaving a page in React? How do I handle a render that is still in progress?”

<Cards>
<Card title="Install and render a graph" href="/en/docs/getting-started/quick-start" />
<Card title="Technical architecture" href="/en/docs/concepts/architecture" />
<Card title="Examples" href="/en/docs/examples" />
<Card title="API reference" href="/en/docs/api" />
<Card title="Performance tuning" href="/en/docs/metrics/performance-tuning" />
<Card title="Migrate from G6 v5" href="/en/docs/compatibility/g6-v5-migration" />
</Cards>
Check the example against the reference for [interaction options](/en/docs/api/options#options-behaviors), [setData()](/en/docs/api/graph#graph-data-mutations-setdata), or [destroy()](/en/docs/api/graph#graph-lifecycle-destroy), then try the relevant code in your project.
Loading
Loading