# Aube AI WordPress Widget Source

This directory contains the TypeScript/Preact source code and build configuration used to generate the bundled WordPress widget JavaScript file:

```text
assets/js/widget.wordpress.js
```

## Build

```sh
npm ci
npm run build:wp
```

The build output is written to:

```text
dist/widget.wordpress.js
```

Copy that file to the plugin bundle path:

```text
assets/js/widget.wordpress.js
```

The WordPress widget entrypoint is `src/wordpress.ts`; it mounts `src/AppWordPress.tsx` and reads configuration from `window.AubeAIConfig`, which is supplied by the PHP plugin via `wp_localize_script()`.
