Metadata-Version: 2.4
Name: dash-ant-design
Version: 0.1.0
Summary: Ant Design components for Plotly Dash
Author-email: C0deBeez <ethan.zhang2016@gmail.com>
License-Expression: MIT
Classifier: Framework :: Dash
Classifier: Framework :: Flask
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: dash>=2.0.0
Dynamic: license-file

# Dash Ant Design

Ant Design components for Plotly Dash.

## Installation

```bash
pip install dash-ant-design
```

## Usage

```python
import dash_antd_components as dac
```

## Documentation development

The documentation source is split by responsibility:

- `docs/<category>/<component>.md` contains page prose and `demo`/`api` directives.
- `docs/examples/` contains executable Dash layouts and callbacks.
- `docs/__init__.py` provides the Flask application factory.
- `docs/extensions/` registers Dash and Flask-Babel with the Flask application.
- `docs/*.py` contains localization, CLI, and API generation modules.
- `docs/_generated/api.json` is generated from component metadata and Python signatures.
- `docs/app.py` configures the Dash layout and callbacks.

Regenerate and validate the API documentation after changing component metadata:

```bash
pnpm run build:docs
pnpm run check:docs
uv run python -m docs
```

Translation catalogs are maintained through the Flask CLI:

```bash
uv run flask --app docs translate update
uv run flask --app docs translate compile
uv run flask --app docs translate check
```

Component pages use `/components/<component>` and standalone demos use `/examples/<demo-id>`.
Legacy `/components#<demo-id>` links are normalized automatically.

## Documentation MCP server

The deployed documentation application exposes a read-only Dash MCP server at
`https://<documentation-host>/_mcp`. It provides version information, component
and property discovery, localized API documentation, and runnable example source
through the following tools:

- `dac_get_library_info`
- `dac_list_components`
- `dac_get_component`
- `dac_search_props`
- `dac_get_examples`

Add the published documentation server to Codex:

```bash
codex mcp add dash-antd-components-docs \
  --url https://<documentation-host>/_mcp
```

Or add it to Claude Code:

```bash
claude mcp add dash-antd-components-docs \
  --transport http \
  --scope user \
  https://<documentation-host>/_mcp
```

Other Streamable HTTP MCP clients can use:

```json
{
  "mcpServers": {
    "dash-antd-components-docs": {
      "type": "http",
      "url": "https://<documentation-host>/_mcp"
    }
  }
}
```

## React compatibility

The JavaScript bundle is built and tested with React 19.2.4 by default while remaining compatible with React 18.3.1. React is provided by Dash at runtime and is not bundled or selected when this package is imported.

React 19 requires a Dash version that includes Plotly Dash PR #3880. Until that support is released, the test suite uses the same `umd-react` resources and compatibility shim as that PR without changing the package's stable Dash dependency.

```bash
REACT_VERSION=19.2.4 python app.py
```

To run an application or the compatibility suite with React 18:

```bash
REACT_VERSION=18.3.1 python app.py
pnpm run test:react18
```
