- Expose
RequestControllerandHandlersas record-of-functions APIs so user code can migrate fromrequestController->RequestController.setStatus(404)torequestController.setStatus(404)and fromhandler->ResX.Handlers.handleRequest({...})tohandler.handleRequest({...}); the old free-function surface is still available but deprecated. - BREAKING: Remove
ResX.BunUtils.serveStaticFile; static assets now go through generatedResXAssets.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.
- 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 bothhxPostandformAction.
- Add
securityPolicyDataon handlers so security policies can pass derived data into the handler onAllow. - BREAKING:
SecurityPolicy.Allownow carries metadata (Allow(meta)). UseSecurityPolicy.allowfor no data or passAllow(yourMeta).
- First class CSRF protection with
Bun.CSRFtokens. - BREAKING: Fix
styleprop on DOM elements to be of the correct record type.
- Move fully to ReScript v12.
- Fix issue with the new
CopyToClipboardaction.
- Add
onAfterBuildResponsehook that runs after render but before head/body injections. - Add body-end append support:
RequestController.appendBeforeBodyEndandRenderBeforeBodyEndcomponent for content inserted before</body>. - Add
CopyToClipboardaction toResXClient, for simple copying of text to the clipboard.
- Expose
requestControllerinonBeforeBuildResponseso 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, andFormAction.toEndpointURL. These functions return the actual URL string for the handler endpoints, useful for programmatic access to endpoint URLs.
- Breaking Add required
~securityPolicyargument for all form and HTMX handlers, to enforce keeping security in mind. - Breaking Rename HTMX handler identifier functions:
makeHxXXXIdentifier→hxXXXRefandimplementHxXXXIdentifier→hxXXXDefine. Also fix bug with ref/define functionality. - Add
Hjsx.dangerouslyOutputUnescapedContentfor rendering raw HTML content without HTML escaping.
- Add
onBeforeBuildResponsehook for doing tasks that need to happen before the HTML/response is generated. - Add
prependTitleSegment.
- Add
hxSwapOobandrawHxSwapOobattributes.
- Add
allowEmptyStringoption toFormDataHelpers.getString, and make sure that empty strings are treated asNoneby default. - Handle
onandoffvalues forFormDataHelpers.getBool.
- Fix issue with Vite transform and CSS files with imports.
- Move to using a generic JSX transform.
These versions are now required:
rescript@>=11.1.0-rc.2@rescript/core@>=1.0.0rescript-bun@>=0.4.1
- Add
SwapClassto ResX client actions.
- BREAKING: Restructure hx handler code.
- Add
Securitymodule, and move HTML escaping to use Bun's builtinescapeHTML. - BREAKING: Change types of
domProps.methodanddomProps.action. - Add
formActionhandler support. - Prefix HTMX handler routes automatically.
- Alias
domPropsin the right place so we get completion.
- Add
renderSyncToStringAPI.
- Bind basic version of
hxTarget.
- Upgrade
rescript-bunto0.3.0.
- Add
onBeforeSendResponsehook.
- Escape title segments.
- Fix bug with races in appending content to
<head>.
- Create target directory if it doesn't already exist.
- Remove unused
serverinrenderConfig.
- Support removing elements with client actions.
- Fix issue with children in JSX.
- Fix dependency on
rescript-bun. - Add
BunUtils.URLSearchParams.copyhelper. - Rename handler creators:
get->hxGet,makeGet->makeHxGetIdentifier,implementGet->implementHxGetIdentifier. Same for post/put/delete/patch.
- Add
hxGet/Post/Put/Delete/Patchhelpers suitable for when you need to handle cyclic dependencies.
- Include all files in package.
- Fix package name in
rescript.json. - Fix various smaller things.