# ProEventsWP source and asset builds

The PHP files and original JavaScript are included in this package. The
`build/` directory contains browser assets compiled from `assets/`. Pro
packages additionally include the originals in `premium/assets/`.

MapLibre 6.4.1 source is available at:
https://github.com/maplibre/maplibre-gl-js/tree/v6.4.1
Its BSD license is in `build/LICENSE-maplibre.txt`.

To rebuild your own copy, use Node.js 22.22.2 and pnpm 10 from the plugin root:

```sh
pnpm add maplibre-gl@6.4.1
pnpm add --save-dev @wordpress/scripts@36.1.0
pnpm exec wp-scripts build assets/blocks.js assets/event-editor.js assets/series-editor.js assets/map-view.js --output-path=build
```

Copy `node_modules/maplibre-gl/dist/maplibre-gl-worker.mjs` and
`node_modules/maplibre-gl/dist/maplibre-gl-shared.mjs` into `build/`
after compilation. The worker and shared module load from the plugin's own
URL. Retain `build/LICENSE-maplibre.txt` when redistributing compiled maps.

For a Pro package, also run:

```sh
pnpm exec wp-scripts build premium/assets/premium-blocks.js premium/assets/ai-authoring.js --output-path=premium/build
```

Event block names, shortcodes, REST routes and storage identifiers retain
their existing `pro-calendar-wp` / `pcwp` prefixes for compatibility.
The translation domain and public package slug are `proeventswp`.
