Commit Graph

40 Commits

Author SHA1 Message Date
github-actions[bot] 6925989ad7 data: sync antd metadata (v6@6.5.0) 2026-06-27 15:57:49 +00:00
github-actions[bot] acd7275a99 data: sync antd metadata (v6@6.4.5) 2026-06-22 06:26:36 +00:00
afc163 b28de139b8 fix: keep doctor bug checks offline (#164) 2026-06-20 21:42:50 +08:00
github-actions[bot] 7ced20461f data: sync antd metadata (v6@6.4.4) 2026-06-12 11:26:30 +00:00
二货爱吃白萝卜 9e4e358e0f feat: add design.md command and antd_design_md MCP tool (#147)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 17:45:43 +08:00
afc163 f1140fa92a fix: restore missing token data in v5/v6 snapshots and prevent silent data loss in sync (#138)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 18:05:42 +08:00
afc163 62ebb21feb fix: repair malformed prop metadata caused by escaped pipe/bracket parsing (#122)
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 18:10:11 +08:00
github-actions[bot] 6cbe2a927c data: sync antd metadata (v6@6.4.3) 2026-05-18 09:56:01 +00:00
afc163 a70f9a4eee chore: remove stale v6 snapshots and prevent re-accumulation (#107)
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 00:27:58 +08:00
github-actions[bot] 3255e46714 data: sync antd metadata (v6@6.4.2) 2026-05-14 15:43:49 +00:00
github-actions[bot] ea470f7ac8 data: sync antd metadata (v6@6.4.1) 2026-05-14 11:20:42 +00:00
github-actions[bot] 5dfbf911a6 data: sync antd metadata (v4@4.24.16, v5@5.29.3, v6@6.4.0) 2026-05-14 07:34:04 +00:00
github-actions[bot] 0e59e57b08 data: sync antd metadata (v4@4.24.16, v5@5.29.3, v6@6.3.7) 2026-04-27 07:28:10 +00:00
github-actions[bot] 52e2cb79af data: sync antd metadata (v4@4.24.16, v5@5.29.3, v6@6.3.6) 2026-04-17 10:55:29 +00:00
afc163 aad2fc0738 feat: add antd v3 support (#77)
* docs: add antd v3 support design spec

Design for adding antd 3.x support to enable migration assistance
and legacy project queries. Covers data extraction, command support
matrix, and enhanced v3→v4 migration knowledge.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add antd v3 support

- Add v3 data extraction with demo format compatibility
- Generate v3.json and v3.26.20.json data files
- Add v3-to-v4 migration knowledge module
- Return UNSUPPORTED_VERSION_FEATURE for token/semantic on v3
- Update spec.md with v3 support documentation

Closes #66

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: address PR review comments

- Fix regex \Z anchor to $ for JS compatibility in demo extractor
- Fix v3 theming docs URL (3x.ant.design)
- Remove redundant Tree filterTreeNode migration entry
- Correct Table render description (signature unchanged)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: update design spec for v3 support

- Add language tag to code block
- Fix v3 theming docs URL to 3x.ant.design
- Update migration module path to match implementation
- Correct BackTop and Less variables migration notes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: address remaining PR review comments

- Fix enMatch regex to use lookahead for zh-CN section
- Make JSX code block regex more flexible (jsx or js)
- Correct ConfigProvider migration description (introduced in v4)
- Update design doc with correct module path and migration notes
- Update snapshot for v3 Watermark component

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* test: add comprehensive v3 test coverage

- Add e2e tests for `antd migrate 3 4` command
- Add v3 error tests for token and semantic commands
- Add v3 version detection tests
- Add v3 data loading tests (components, snapshots)
- Add tests for v3-specific components (Mention, Icon, LocaleProvider)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-02 18:54:02 +08:00
github-actions[bot] 6021d19668 data: sync antd metadata (v6@6.3.5) 2026-03-30 09:01:16 +00:00
afc163 1192f255f1 chore: keep JSON in git, exclude from npm via .npmignore (#41)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 18:25:05 +08:00
github-actions[bot] eb68a54bff data: sync antd metadata (v4@4.24.16, v5@5.29.3, v6@6.3.4) 2026-03-24 12:57:00 +00:00
afc163 8256a2885d chore: remove v5.30.0-guidelines-alpha.1 snapshot
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 18:39:18 +08:00
afc163 8c92655b4b fix: remove empty author links in changelog descriptions (#31)
Contributor mentions like [@guoyunhe](https://github.com/guoyunhe) were
being stripped to [](https://github.com/guoyunhe) because the regex
only removed the @username portion, leaving an empty link shell.

Fix the extractor to match and remove the full contributor link pattern
first, then fall back to stripping bare @mentions.

Also patch all 65 existing data snapshot files (28,337 occurrences fixed)
and update affected test snapshots.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 01:09:52 -07:00
github-actions[bot] 124847fa1b data: sync antd metadata (v4@4.24.16, v5@5.29.3, v6@6.3.3) 2026-03-20 08:56:43 +00:00
afc163 8e423507e9 data: regenerate v6.json and v6.3.3.json with fixed escaped pipe parsing 2026-03-20 15:23:36 +08:00
github-actions[bot] 4b2306dc78 data: sync antd metadata (v4@4.24.16, v5@5.29.3, v6@6.3.3) 2026-03-19 08:57:30 +00:00
afc163 3f683f1887 data: patch doc/docZh fields into all historical snapshots
Use git-show to read markdown from each version's tag and inject
doc/docZh into the 61 existing snapshot files without full re-extraction.
Also adds scripts/patch-doc-fields.ts for future use.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 19:07:08 -07:00
afc163 c0fe017ce9 feat: add antd doc <component> command to output full markdown docs
Bundle raw markdown content (doc/docZh) in component data during
extraction, and expose it via a new `doc` command. This complements
`antd info` by providing the complete unprocessed API documentation
for cases where structured prop extraction is insufficient.

- src/types.ts: Add `doc` and `docZh` optional fields to ComponentData
- scripts/extract.ts: Bundle raw markdown (frontmatter-stripped) into each component during extraction
- src/commands/doc.ts: New command — outputs markdown or JSON, with error handling and fuzzy match suggestions
- src/index.ts: Register the new doc command
- data/v5.json, data/v5.29.3.json: Re-extracted with doc/docZh fields

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 19:07:08 -07:00
afc163 9f00d82b6f fix(info): parse multi-section API docs (Form.FormInstance, useWatch, etc.)
Some components (Form, Cascader) split their API across multiple ## sections:
  ## API        → main Form props
  ## Form.Item  → Form.Item props
  ## Hooks      → ### Form.useForm, ### Form.useWatch, ...
  ## Interface  → ### FormInstance (contains validateFields), ### Rule, ...

The previous parser stopped at the first ## heading after ## API,
so everything in ## Hooks and ## Interface was silently dropped.

Fix: collect all ## sections from ## API through all intermediate
API sections, stopping only at terminal sections (Design Token, FAQ,
Note, Examples, Semantic DOM). Within each block, ## headings provide
the sub-component label for content appearing before the first ###.

Result for Form (v5.29.3):
  Before: main=25, subComponentProps={}
  After:  main=25 | Form.Item(30) Form.FormInstance(15, incl. validateFields)
          Form.List(4) Form.Rule(15) Form.WatchOptions(2) etc.

Note: Form.useWatch is a function-type annotation (not a table) so it
cannot be extracted as props — this is a docs format limitation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 19:07:08 -07:00
afc163 88e4b81c30 fix(info): fix isMainSection detection for all antd API patterns
Improve sub-component props extraction to correctly handle all naming
conventions in antd's markdown docs, not just Splitter:

- Add 'Param' to recognized column headers (fixes Menu losing its props)
- Strip HTML <Badge> and {#anchor} noise from section labels
- Expanded isMainSection() to match:
  - "Select props" / "Anchor Props" (ComponentName + " props/API" suffix)
  - "Tree props" for TreeSelect (base word is prefix of component name)
  - "Radio/Radio.Button" slash format
  - "Mention" → "Mentions" (singular/plural variants, ≤2 chars diff)
  - "common API" generic phrase

Before: Select main=0, Radio main=0, Tree main=0, FloatButton main=0...
After:  all main props correctly in props[], sub-types in subComponentProps

Also re-extracted data/v5.json and data/v5.29.3.json with improved extractor.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 19:07:08 -07:00
afc163 bcd505d254 feat(info): show sub-component props separately (e.g. Splitter.Panel)
Previously the `info` command mixed all API table rows together, so
`antd info Splitter` incorrectly listed Panel props (defaultSize, min,
max, size, collapsible, resizable) alongside main Splitter props.

Changes:
- scripts/extractors/props.ts: split API section by ### headings;
  tables under the component name become main props, other sub-sections
  (e.g. "Panel") become subComponentProps keyed as "Splitter.Panel"
- scripts/extract.ts: pass componentName to extractProps; store
  subComponentProps in the JSON when present
- src/types.ts: add subComponentProps?: Record<string, PropData[]>
  to ComponentData
- src/commands/info.ts: render sub-component sections below the main
  table in text/markdown output; include subComponentProps in JSON output
- data: re-extracted v5.json and v5.29.3.json; manually patched all v5
  (5.21–5.28) and v6 snapshots to separate Splitter.Panel props

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 19:07:08 -07:00
github-actions[bot] 08ced74692 data: sync antd metadata (v5@5.29.3) 2026-03-18 08:59:22 +00:00
afc163 e3e9ed2aed fix: restore missing name field in globalTokens for token command (#10)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 19:34:03 +08:00
github-actions[bot] 1dee830b05 data: sync v6 data from antd 6.3.3 2026-03-17 09:00:21 +00:00
github-actions[bot] a040def89e data: sync v5 data from antd 5.30.0-guidelines-alpha.1 2026-03-17 08:59:52 +00:00
github-actions[bot] b8d7e35e4e data: sync v4 data from antd 4.24.16 2026-03-17 08:59:22 +00:00
afc163 d879a4ee56 fix: improve list command with correct categories, bilingual names, and since version (#2)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 15:38:56 +08:00
afc163 78d2a944ee fix: properly filter debug demos using regex attribute match
The previous string-based check missed cases where `debug` attribute
appears after other attributes (e.g. `iframe="800" debug`). Switch to
a regex that matches `debug` anywhere within the <code> tag.

Regenerate all per-minor snapshots and latest v4/v5/v6.json with
the corrected filter applied.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 14:21:09 +08:00
afc163 3ce5cb13bc data: bootstrap historical per-minor snapshots for v4/v5/v6
- v4: 25 minor series (4.0.x ~ 4.24.x), extracted from each representative patch tag
- v5: 30 minor series (5.0.x ~ 5.29.x)
- v6: 4 minor series (6.0.x ~ 6.3.x)
- Update data/versions.json with all 59 minor entries
- Fix bootstrap-snapshots.ts to use git checkout -f to handle untracked file conflicts

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 14:11:40 +08:00
afc163 5d8e48d504 feat: add multi-version snapshot architecture for accurate historical queries
- Add loadMetadataForVersion() to loader.ts with 3-level resolution:
  exact minor match → nearest earlier minor → fallback to latest major
- Add data/versions.json as version index (minor series → snapshot tag)
- Update all 7 command files to use loadMetadataForVersion(versionInfo.version)
- Update sync.yml to extract per-minor snapshots on each daily sync
- Add scripts/bootstrap-snapshots.ts for one-time historical backfill
- Update spec.md with multi-snapshot architecture documentation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 12:16:44 +08:00
afc163 21d75b49e4 feat: add auto-extraction scripts and GitHub Actions sync workflow
Add scripts/extract.ts pipeline that extracts antd metadata (components,
props, demos, tokens, semantic, changelog, FAQ) from source. Add daily
GitHub Actions workflow to detect new antd releases and auto-publish.
CLI version now aligns with antd version.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-16 16:24:03 +08:00
afc163 0acab2adc5 data: populate real changelog from antd GitHub, fix accuracy issues
- Replace fabricated changelog entries with real data parsed from
  CHANGELOG.zh-CN.md (v4/v5/v6 branches)
  - v4: 158 versions (4.0.0–4.24.16), 1226 changes
  - v5: 170 versions (5.0.0–5.29.3), 1362 changes
  - v6: 14 versions (6.0.0–6.3.2), 188 changes

- Fix data inaccuracies in v5.json:
  - Add missing `ghost` prop to Button (deprecated since 5.22.0)
  - Remove duplicate/wrong changelog entries claiming Table `virtual`
    was added in 5.20.0 and 5.22.0 (it was added in 5.9.0)
  - Fix Input `count` changelog entry (was since 5.10.0, not 5.20.0)

- Fix changelog version routing bug in `diff.ts`: querying
  `antd changelog 6.3.2` now auto-detects major version from the
  version argument itself instead of always defaulting to v5

- Fix README: remove non-existent --no-cache flag, fix feature
  descriptions, add real CLI output examples, update version examples
  to use versions that actually exist in the bundled data

- Update tests to match real data (5.21.0 has Segmented not Button;
  use 5.99.99 for version-not-found test to ensure v5 routing)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 01:38:52 +08:00
afc163 fa6166a755 Simplify data strategy: bundle metadata in CLI, remove --no-cache
- Remove @ant-design/metadata dependency; all data is bundled in data/
- Rename sample-data/ to data/ and update package.json files field
- Remove --no-cache flag from CLI and all command implementations
- Simplify loadMetadata() to read directly from bundled JSON files
- Update spec.md to reflect bundled data strategy

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 00:09:33 +08:00