$ account antvis
This repository contains the official AntV website, built with Astro and React islands. It serves as the primary marketing and documentation portal for AntV's data visualization libraries (G2, G6, L7, etc.), featuring a hero section, interactive chart demos, a theme customizer that generates downloadable JSON palettes, and a wealth of bilingual (Chinese/English) specification documents covering design principles, chart types, components, and interaction patterns. The site is a static Jekyll-like documentation site, but with substantial client-side interactivity delivered through React components that embed G2Plot and G6 charts. The architecture is a typical modern static site: Astro handles content collections and build, React components are mounted as islands for interactive sections, and JSON files drive most of the home page content. The docs are written in Markdown with frontmatter and use a custom Astro loader to integrate with the @antv/astro-theme-antv theme package. The code is clean and well-organized, with a clear separation between data, libs, and components. The most reusable component is an overflow text truncation utility that gracefully degrades to a tooltip on overflow, demonstrating good engineering practices. While the repository is primarily a content and marketing site, it contains a few genuinely reusable patterns, though most are tightly coupled to the AntV ecosystem. The lack of a lockfile and the use of an older G6 version indicate some technical drift, but the project appears actively maintained with recent commits and CI/CD deployment.
@antv/hierarchy is a TypeScript library providing layout algorithms for visualizing hierarchical data. It implements four primary layout types: compact box, dendrogram, indented, and mindmap layouts. The library takes tree-structured data as input and returns positioned nodes with x/y coordinates for rendering. Built with a modular architecture, it separates core tree construction from layout algorithms and directional handling, enabling clean extension and customization. The package is published as an ES module with UMD fallback and includes comprehensive type definitions.