> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# Status and Compatibility

## Version status

| Item          | Current state                                                                                             |
| ------------- | --------------------------------------------------------------------------------------------------------- |
| Version       | `0.1.0-alpha.1`                                                                                           |
| Distribution  | npm, alpha dist-tag; install with `pnpm add react-wikitext@alpha`                                         |
| Stability     | 0.x releases follow semantic versioning; minor versions may break public APIs                             |
| Changelog     | [GitHub Releases](https://github.com/BearBin1215/react-wikitext/releases)                                 |
| Documentation | [react-wikitext.pages.dev](https://react-wikitext.pages.dev); tracks the main branch, no version switcher |

Installation is covered in [Quick start](/guide/quick-start.md).

## Runtime compatibility

| Item                 | Supported range                                                  |
| -------------------- | ---------------------------------------------------------------- |
| React                | `>=18.2 <20` (peer dependency)                                   |
| Node                 | `>=18.18` at runtime; the repository and CI main job use Node 24 |
| Module format        | ESM and CJS, both with type declarations                         |
| Bundlers             | Vite and webpack 5 consumer builds are covered by tests          |
| Browsers             | Output targets ES2022; IE and older browsers are unsupported     |
| Runtime dependencies | No Wikimedia, font CDN, or external API dependency               |

The npm package only contains `dist/`, `NOTICE`, and `THIRD_PARTY_LICENSES`; see the [contributing guide](/project/contributing.md) for building from source.

## Pinned upstream

| Item                | Value                                               |
| ------------------- | --------------------------------------------------- |
| Parser              | `wikiparser-node@1.48.1`                            |
| Default site config | `MEDIAWIKI_CONFIG` from the same version's snapshot |

Upgrading the parser changes AST shape, source ranges, and the rendering baseline. Re-run rendering and security review.

## Snapshot versions

| Constant                | Value | Applies to         |
| ----------------------- | ----- | ------------------ |
| `AST_SCHEMA_VERSION`    | `1`   | Semantic AST       |
| `SYNTAX_SCHEMA_VERSION` | `1`   | Source syntax tree |
| `RENDER_SCHEMA_VERSION` | `1`   | Render snapshot    |

A version change is a structural break. Include versions in cache keys; restore rejects mismatched data.

## Styling and security baseline

- Styles live in `react-wikitext/styles.css` and must be imported explicitly; there are no global element styles.
- Inline styles keep only whitelisted layout and appearance declarations; values using `url()`, `expression()`, or `!important` are dropped whole and reported as diagnostics. There is no `eval` dependency; under strict CSP, allow `style-src` as needed for them to apply.
- No `dangerouslySetInnerHTML`; the final HAST comes from the sanitizer and wiki policy.
- Images are not loaded by default; only authorized URLs (from a resolver, or an explicitly enabled plugin-image policy) become `<img>`.
- React entries depend on Context and only run in Client Components; the root entry and `/view` ship a `"use client"` directive, so the host does not need to repeat it.

See [Security model](/guide/security.md) and [Rendering behavior](/guide/rendering.md) for the full boundaries.

## Verifying compatibility

| Command                    | Checks                                                        |
| -------------------------- | ------------------------------------------------------------- |
| `pnpm test`                | Unit and rendering tests                                      |
| `pnpm typecheck`           | Source types                                                  |
| `pnpm test:types:consumer` | Consumer type resolution (Node16 and bundler)                 |
| `pnpm test:consumer`       | dist entries, subpath isolation, CSS, Vite/webpack, view-only |
| `pnpm bench`               | Parsing and rendering benchmarks                              |

After upgrading React, the parser, or bundler config, at least run `test:consumer` and `test`.

## License

- The library is released under **GPL-3.0-or-later**.
- `wikiparser-node@1.48.1` uses the same license.
- Third-party notices are in `NOTICE` and `THIRD_PARTY_LICENSES` at the repository root.

Check GPL-3.0-or-later compatibility before distributing builds that include this library.
