# master

# 1.4.0

- Add Bun single-file executable support to the Vite plugin via `staticAssetRoutes.mode`, including an `embedded` mode for `bun build --compile` and normalized build-time asset URLs for generated browser assets like `resXClient_js`.

# 1.3.0

- Fix dev reload experience of the Vite dev setup.
- Expose `RequestController` and `Handlers` as record-of-functions APIs so user code can migrate from `requestController->RequestController.setStatus(404)` to `requestController.setStatus(404)` and from `handler->ResX.Handlers.handleRequest({...})` to `handler.handleRequest({...})`; the old free-function surface is still available but deprecated.
- BREAKING: Remove `ResX.BunUtils.serveStaticFile`; static assets now go through generated `ResXAssets.staticAssetRoutes`.
- Add `__rawProps?: Dict.t<JSON.t>` on JSX DOM props as a low-level escape hatch for arbitrary attributes (escaped values, invalid/non-serializable entries ignored, may emit duplicates after typed props), with accompanying tests and README docs.

# 1.2.1

- Fix CSRF verification for form submissions so handlers can still read `request.formData()` after CSRF checks by reading the token from a cloned request.
- Add CSRF tests covering `<CSRFToken />` token submission via form data for both `hxPost` and `formAction`.

# 1.2.0

- Add `securityPolicyData` on handlers so security policies can pass derived data into the handler on `Allow`.
- BREAKING: `SecurityPolicy.Allow` now carries metadata (`Allow(meta)`). Use `SecurityPolicy.allow` for no data or pass `Allow(yourMeta)`.

# 1.1.0

- First class CSRF protection with `Bun.CSRF` tokens.
- BREAKING: Fix `style` prop on DOM elements to be of the correct record type.

# 1.0.0

- Move fully to ReScript v12.

# 0.5.1

- Fix issue with the new `CopyToClipboard` action.

# 0.5.0

- Add `onAfterBuildResponse` hook that runs after render but before head/body injections.
- Add body-end append support: `RequestController.appendBeforeBodyEnd` and `RenderBeforeBodyEnd` component for content inserted before `</body>`.
- Add `CopyToClipboard` action to `ResXClient`, for simple copying of text to the clipboard.

# 0.4.0

- Expose `requestController` in `onBeforeBuildResponse` so you can do some final manipulations before the response is built.
- Add endpoint URL helper functions for HTMX handlers and form actions: `hxGetToEndpointURL`, `hxPostToEndpointURL`, `hxPutToEndpointURL`, `hxDeleteToEndpointURL`, `hxPatchToEndpointURL`, `formActionToEndpointURL`, and `FormAction.toEndpointURL`. These functions return the actual URL string for the handler endpoints, useful for programmatic access to endpoint URLs.

# 0.3.0

- **Breaking** Add required `~securityPolicy` argument for all form and HTMX handlers, to enforce keeping security in mind.
- **Breaking** Rename HTMX handler identifier functions: `makeHxXXXIdentifier` → `hxXXXRef` and `implementHxXXXIdentifier` → `hxXXXDefine`. Also fix bug with ref/define functionality.
- Add `Hjsx.dangerouslyOutputUnescapedContent` for rendering raw HTML content without HTML escaping.

# 0.2.0

- Add `onBeforeBuildResponse` hook for doing tasks that need to happen before the HTML/response is generated.
- Add `prependTitleSegment`.

# 0.1.3

- Add `hxSwapOob` and `rawHxSwapOob` attributes.

# 0.1.2

- Add `allowEmptyString` option to `FormDataHelpers.getString`, and make sure that empty strings are treated as `None` by default.
- Handle `on` and `off` values for `FormDataHelpers.getBool`.

# 0.1.1

- Fix issue with Vite transform and CSS files with imports.

# 0.1.0

- Move to using a generic JSX transform.

These versions are now required:

- `rescript@>=11.1.0-rc.2`
- `rescript-bun@>=0.4.1`

# 0.1.0-beta.6

- Add `SwapClass` to ResX client actions.

# 0.1.0-beta.5

- BREAKING: Restructure hx handler code.

# 0.1.0-beta.4

- Add `Security` module, and move HTML escaping to use Bun's builtin `escapeHTML`.
- BREAKING: Change types of `domProps.method` and `domProps.action`.
- Add `formAction` handler support.
- Prefix HTMX handler routes automatically.
- Alias `domProps` in the right place so we get completion.

# 0.1.0-beta.3

- Add `renderSyncToString` API.

# 0.1.0-beta.2

- Bind basic version of `hxTarget`.

# 0.1.0-beta.1

- Upgrade `rescript-bun` to `0.3.0`.

# 0.1.0-alpha.10

- Add `onBeforeSendResponse` hook.

# 0.1.0-alpha.9

- Escape title segments.
- Fix bug with races in appending content to `<head>`.

# 0.1.0-alpha.8

- Create target directory if it doesn't already exist.
- Remove unused `server` in `renderConfig`.

# 0.1.0-alpha.7

- Support removing elements with client actions.

# 0.1.0-alpha.6

- Fix issue with children in JSX.

# 0.1.0-alpha.5

- Fix dependency on `rescript-bun`.
- Add `BunUtils.URLSearchParams.copy` helper.
- Rename handler creators: `get` -> `hxGet`, `makeGet` -> `makeHxGetIdentifier`, `implementGet` -> `implementHxGetIdentifier`. Same for post/put/delete/patch.

# 0.1.0-alpha.4

- Add `hxGet/Post/Put/Delete/Patch` helpers suitable for when you need to handle cyclic dependencies.

# 0.1.0-alpha.3

- Include all files in package.

# 0.1.0-alpha.2

- Fix package name in `rescript.json`.
- Fix various smaller things.
