127 Commits

Author SHA1 Message Date
MichaelWest22
7dbb8acfa6
Upsert swap extension (#3595)
* add upsert swap extension

* improve upsert

* simplify upsert to not use morph

* add doco

* Add hx-upsert tag support as well

---------

Co-authored-by: MichaelWest22 <michael.west@docuvera.com>
2025-12-31 12:47:08 -07:00
MichaelWest22
77e5c4724b
Handle newContent properly in insertContent (#3607)
* handle newContent processing in other swap styles

* Handle outerMorph newContent processing by adding target to newContent so it will be processed as well. also simplified textContent swaps

---------

Co-authored-by: MichaelWest22 <michael.west@docuvera.com>
2025-12-30 07:54:52 -07:00
MichaelWest22
095db015a4
Push response url (#3608)
* handle response url from redirects in push Url true

* add test

---------

Co-authored-by: MichaelWest22 <michael.west@docuvera.com>
2025-12-30 07:53:58 -07:00
MichaelWest22
9bab1d6704
handle no id found with hx-preserve (#3610)
Co-authored-by: MichaelWest22 <michael.west@docuvera.com>
2025-12-30 07:53:03 -07:00
Carson Gross
0dea4bc308 Merge branch 'four' into feature/settle-restoration
# Conflicts:
#	src/htmx.js
2025-12-24 13:40:25 -07:00
Stu Kennedy
37cf0e8c6c
WebSocket Extension (hx-ws) Improvements (#3592)
* refactor: Enhance WebSocket extension with URL normalization, improved request management, and refined message handling for better reliability and clarity.

feat: Add manual WebSocket server script and enhance WebSocket documentation with detailed message formats and connection management improvements.

feat: Include event type in WebSocket messages and update documentation for message format

* refactor: Update WebSocket extension to connect immediately by default, enhance documentation on connection triggers, and improve message handling examples.

* feat: Introduce URL validation for WebSocket send attributes to ensure proper connection handling and prevent non-URL markers from being processed.
2025-12-19 11:42:36 -07:00
MichaelWest22
56e6810284
add textContent swap style (#3593)
Co-authored-by: MichaelWest22 <michael.west@docuvera.com>
2025-12-19 11:39:09 -07:00
Carson Gross
2f816af101 move swap delay and settle delay inside of __insertContent (makes more sense to me here) 2025-12-18 11:18:41 -07:00
Carson Gross
c603dc9543 Merge remote-tracking branch 'origin/four' into four 2025-12-15 14:42:07 -07:00
Carson Gross
ab862afe74 finish up hx-sync 2025-12-15 14:41:45 -07:00
MichaelWest22
4403f8eff6
optimize hx-vals and headers async with a callback and fix ws async (#3581)
optimize hx-vals and headers async with a callback and fix ws async hx-vals

Co-authored-by: MichaelWest22 <michael.west@docuvera.com>
2025-12-11 11:04:08 -07:00
MichaelWest22
40ecbfd6b6
bug morph cleanup of textNodes should work (#3584)
* bug morph cleanup of textNodes should work

* use firstchild check instead

---------

Co-authored-by: MichaelWest22 <michael.west@docuvera.com>
2025-12-12 01:26:41 +13:00
MichaelWest22
f0ff590fb4
handle returning this from findAllExt for any inheritance level (#3579)
* change thisElt to thisAttr to simplify

* Handle returning this properlty at any level

* add this wrapper for clarity

* move to callback instead

* rename to eltCollector

---------

Co-authored-by: MichaelWest22 <michael.west@docuvera.com>
2025-12-09 09:23:30 -07:00
Carson Gross
b2f4abae76 add hx-disable.js test and fix logic to be the same as hx-indicator 2025-12-07 10:22:35 -07:00
Carson Gross
cab78da9ee make hx-headers dynamic like hx-vals and port 2.x tests 2025-12-07 10:08:51 -07:00
Carson Gross
36acc330f4 add sanity tests for core attributes 2025-12-07 09:31:58 -07:00
Carson Gross
c96179f3e7 port 2.0 tests and fix hx-include overriding 2025-12-07 09:24:23 -07:00
MichaelWest22
3b21c64193
improve parseConfig and append to allow joining json for hx-vals (#3577)
Co-authored-by: MichaelWest22 <michael.west@docuvera.com>
2025-12-07 09:00:47 -07:00
MichaelWest22
101110521a
handle transition overrides on oob/partial (#3570)
* handle transition overrides on oob/partial

* Handle swap dealys properly for transition true/false and respect main swap transition and swap delay.

* swapDelay let

---------

Co-authored-by: MichaelWest22 <michael.west@docuvera.com>
2025-12-06 07:35:56 -07:00
Carson Gross
9146038611 Merge remote-tracking branch 'origin/four' into four 2025-12-05 11:01:46 -07:00
Carson Gross
259ab69b0f fix hx-indicator 2025-12-05 11:01:37 -07:00
MichaelWest22
a5f48867b0
Morph skip support for web components (#3573)
* add morphSkip configs to allow web component no morph override options

* add tests

---------

Co-authored-by: MichaelWest22 <michael.west@docuvera.com>
2025-12-04 11:46:48 -07:00
MichaelWest22
0bb59973f8
fix hx-validate to respect noValidate and validate inputs outside of … (#3562)
fix hx-validate to respect noValidate and validate inputs outside of just forms

Co-authored-by: MichaelWest22 <michael.west@docuvera.com>
2025-12-04 11:45:04 -07:00
MichaelWest22
ab37e06ccc
fix missing target/swap via envelope and fix re-connection tests (#3571)
Co-authored-by: MichaelWest22 <michael.west@docuvera.com>
2025-12-04 11:39:14 -07:00
MichaelWest22
7e7592aeb8
fix bug with empty response after partial removal detection (#3569)
Co-authored-by: MichaelWest22 <michael.west@docuvera.com>
2025-12-03 13:21:18 -07:00
MichaelWest22
22205ce3f4
Add mergeConfig support and remove + hx-config merging (#3561)
Co-authored-by: MichaelWest22 <michael.west@docuvera.com>
2025-12-03 13:21:01 -07:00
MichaelWest22
1ca51d2fde
implement advanced hx-boost overrides (#3549)
* implement advanced hx-boost overrides

* fix hx-boost false and change to override hx-* attributes

---------

Co-authored-by: MichaelWest22 <michael.west@docuvera.com>
2025-12-03 13:20:30 -07:00
MichaelWest22
0c8dff8e4d
add findall and fix find (#3555)
Co-authored-by: MichaelWest22 <michael.west@docuvera.com>
2025-11-25 18:36:18 -07:00
Carson Gross
04dd71d82f clean up headers 2025-11-24 16:09:15 -07:00
MichaelWest22
90727149c7
add hx-target hx-source and hx-request-type headers (#3548)
Co-authored-by: MichaelWest22 <michael.west@docuvera.com>
2025-11-24 14:57:54 -07:00
Carson Gross
acf93fc989 support multiple events and the touchstart event for boosted links 2025-11-23 13:41:38 -07:00
Stu Kennedy
7510030e59
Websocket extension for HTMX (#3547)
* feat: add hx-ws WebSocket extension with accompanying tests and debug utilities.

* feat: Refine WebSocket extension initialization and processing logic, preventing re-initialization and ensuring comprehensive element handling.

* refactor: Enhance WebSocket connection handling with improved event triggering and dynamic configuration management

* refactor: Introduce dynamic configuration management for WebSocket connections, consolidating default settings into a dedicated function for improved maintainability and clarity.

* refactor: Update WebSocket extension to improve reconnection logic and dynamic configuration handling, enhancing maintainability and clarity.

* docs: Expand WebSocket extension documentation with detailed architecture, attributes, message formats, and example use cases for improved clarity and usability.

* refactor: Update WebSocket message structure to include default values for channel and format, enhancing clarity in documentation and implementation.

* feat: Add default `channel` and `format` values to WebSocket messages if not provided.
2025-11-23 11:38:02 -07:00
MichaelWest22
1a14d3d9ea
handle duplicates in action query params and form data (#3543)
Co-authored-by: MichaelWest22 <michael.west@docuvera.com>
2025-11-22 11:01:12 -07:00
MichaelWest22
d569ce6ccf
move to registerExtension to avoid extension upgrade confusion (#3546)
* move to registerExtension to avoid extension upgrade confusion

* Also fix window.htmx export to make modules work with extensions and add initial types file

* update docs on module use

---------

Co-authored-by: MichaelWest22 <michael.west@docuvera.com>
2025-11-22 10:58:38 -07:00
Carson Gross
0e1cdad9f1 merge streaming changes 2025-11-19 11:18:25 -07:00
Carson Gross
0794ae8572 Merge in headers from https://github.com/bigskysoftware/htmx/pull/3533 (leave HX-Request-Type out for now until we discuss) 2025-11-18 10:42:49 -07:00
MichaelWest22
aaff01750e
Implement hx-custom template tag support (#3537)
Co-authored-by: MichaelWest22 <michael.west@docuvera.com>
2025-11-18 07:19:03 -07:00
MichaelWest22
75b2a57d1f
handle inputs for web components that are form associated (#3523)
* use new formData(form) to capture web component inputs as well

* Handle duplicate name inputs better

* Add Tests

* restore comments

* restore default check

---------

Co-authored-by: MichaelWest22 <michael.west@docuvera.com>
2025-11-18 07:17:32 -07:00
MichaelWest22
0d72f8b2e2
add hx-confirm htmx:confirm event with async issueRequest (#3532)
Co-authored-by: MichaelWest22 <michael.west@docuvera.com>
2025-11-18 07:16:03 -07:00
MichaelWest22
44599fb4de
generalize hx-status and fix ajax issues (#3528)
Co-authored-by: MichaelWest22 <michael.west@docuvera.com>
2025-11-16 07:36:02 -07:00
Carson Gross
d94fd73fe0 Docs error for hx-status
fixes   https://github.com/bigskysoftware/htmx/issues/3520
2025-11-15 10:46:40 -07:00
Carson Gross
73dda15f0c support js: prefix in hx-vals
fixes  https://github.com/bigskysoftware/htmx/issues/3521
2025-11-15 10:35:38 -07:00
MichaelWest22
a9ba0a1c35
move tokenizer to parseConfig for all the things (#3516)
* move tokenizer to parseConfig for all the things

* move sse mode logic

* upgrade all JSON.parse!

---------

Co-authored-by: MichaelWest22 <michael.west@docuvera.com>
2025-11-12 04:55:02 -07:00
Carson Gross
4e8b5b53a0 support autofocus 2025-11-10 12:07:34 -07:00
Christian Tanul
006a87441f
Fix title not decoded on boost ("&lt;/&gt; htmx" instead of "</> htmx") (#3507)
* fix page title HTML entities being escaped with hx-boost

* add test for decoding HTML in title

* simplify title HTML entity decoding, update website htmx.js

* simplify further & update htmx.js in www/
2025-11-11 02:46:33 +13:00
MichaelWest22
5568bc2d73
fix bug in hx-config setting wrong level for + merge (#3508)
Co-authored-by: MichaelWest22 <michael.west@docuvera.com>
2025-11-11 02:07:27 +13:00
Carson Gross
00ab434e75 clean up boost logic to not boost non-same-origin links & forms 2025-11-09 17:21:51 -07:00
MichaelWest22
dd10454f20
optimize oob and fix partial tests (#3500)
Co-authored-by: MichaelWest22 <michael.west@docuvera.com>
2025-11-10 10:11:21 +13:00
Carson Gross
503313c42b add etag support 2025-11-08 19:54:13 -07:00
Carson Gross
f2bcf9d3ce etag support 2025-11-08 08:03:05 -07:00