3928 Commits

Author SHA1 Message Date
Carson Gross
835e148dbb remove obsolete hx-ext references 2026-02-26 10:57:24 -07:00
Carson Gross
765123b159 clean up core extensions table 2026-02-26 10:47:39 -07:00
Carson Gross
2b9b5d552a add docs for extension 2026-02-26 10:43:21 -07:00
Carson Gross
a4705c3c6d extension to show the system indicator 2026-02-26 10:38:47 -07:00
Carson Gross
ae04ff5c0a document the ability to delay indicators showing on requests 2026-02-24 12:13:58 -07:00
Carson Gross
c1f05ee411 no need to add these to be removed since they are on the node that is being removed anyway 2026-02-22 22:04:08 -07:00
MichaelWest22
c6644aa72a
handle newContent processing of outerMorph that inserts new nodes (#3667) 2026-02-22 17:01:43 -07:00
Carson Gross
75d41c5de4 warn, but don't return elt 2026-02-22 15:07:12 -07:00
Carson Gross
f0c2247f63 properly clean up observer 2026-02-22 14:32:05 -07:00
Carson Gross
80aacdbbe9 warn on bad selectors 2026-02-22 14:30:42 -07:00
Carson Gross
4c5d84edec only look for autofocus inside new content 2026-02-22 14:17:24 -07:00
Carson Gross
1fe3798ce9 holy smokes i'm an idiot 2026-02-22 13:51:33 -07:00
Carson Gross
464c48e2c7 update dist 2026-02-22 13:27:26 -07:00
Carson Gross
d6bd83641e improve naming consistency 2026-02-22 13:25:43 -07:00
Carson Gross
503a4d1b8a slight update to the confirm API 2026-02-22 13:21:44 -07:00
Carson Gross
93fda88ed1 handle bad scroll selectors gracefully 2026-02-22 10:11:38 -07:00
Carson Gross
5ef73e4348 add hx-on listeners to cleanup list 2026-02-22 10:05:47 -07:00
Carson Gross
fbb4dab9e8 use proper getter/setter 2026-02-22 09:52:16 -07:00
Carson Gross
d5a592d84b update dist 2026-02-22 09:28:35 -07:00
Carson Gross
d241765e2c parenthesize for clarity 2026-02-22 09:05:57 -07:00
Carson Gross
9209f99aa9 typo 2026-02-22 08:59:07 -07:00
Carson Gross
b237c3483b use console.error to report error 2026-02-22 08:58:45 -07:00
Carson Gross
d0a267b06c remove vars from implementation 2026-02-22 08:53:28 -07:00
Carson Gross
d9a43f0a5b switch to forEach 2026-02-22 08:52:23 -07:00
Carson Gross
eef2379c8b Handle situation when there are no extensions that add custom swaps gracefully 2026-02-22 08:50:44 -07:00
Carson Gross
b1dec6a349 remove originalTarget (dead prop) 2026-02-21 16:57:30 -07:00
Carson Gross
df39d0df00 switch to weakmap to avoid keeping elements around after swaps 2026-02-21 16:54:23 -07:00
Carson Gross
f032843bde fix abort bug 2026-02-21 16:31:05 -07:00
Carson Gross
ee0e5d92c6 remove hx-live from dist for now 2026-02-21 16:28:36 -07:00
Carson Gross
ba66f59119 remove some old dead code 2026-02-21 16:12:08 -07:00
Carson Gross
6454c7d307 prepare for first beta 2026-02-21 15:58:28 -07:00
Christian Tanul
923b022d9b
Extract SSE from core into standalone extension (#3666)
Move SSE out of htmx core into a standalone extension (hx-sse.js).

The new extension uses Fetch + ReadableStream instead of EventSource,
so it works with POST, custom headers, and cookies. Two modes:
- One-off streams: any hx-get/hx-post returning text/event-stream
- Persistent connections: hx-sse:connect with auto-reconnect

SSE events now follow the extension pattern:
- htmx:before:sse:connection / htmx:after:sse:connection
- htmx:before:sse:message / htmx:after:sse:message
- htmx:sse:error / htmx:sse:close

New features:
- hx-sse:close="eventname" to close connection on a named event
- htmx:sse:close event with reason (message, removed, ended, etc.)
- htmx:before:response core event for extension response interception
- Server retry: field updates reconnect delay per SSE spec
- Non-2xx reconnect responses fire htmx:sse:error

SSE parser improvements (spec compliance):
- Handle CRLF, CR, and LF line endings
- Strip leading BOM (U+FEFF)
- Dispatch empty data fields
- Ignore id fields containing NULL
- Process field-only lines (no colon) per spec

Docs:
- Document htmx:before:response in events, reference, building guide
- Add htmx 2.x → 4.x SSE migration guide
- Document hx-sse:close and htmx:sse:close
- Add hx-sse:connect, hx-sse:close to JetBrains web-types
- Fix stale Accept header reference in migration guide

Remove htmx.config.sse from core config tables (extension-only now).
Remove stale SSE event references from core docs.
2026-02-21 14:43:06 -07:00
MichaelWest22
093ee58bc0
handle empty non get actions (#3661) 2026-02-17 21:46:50 -07:00
Carson Gross
ba7dea7014 add day 2026-02-12 19:18:48 -07:00
Carson Gross
49c62f3de5 update sha v4.0.0-alpha7 2026-02-12 17:47:37 -07:00
Carson Gross
3540cf043f www 2026-02-12 17:47:03 -07:00
Carson Gross
6a524ec665 bump version and dist 2026-02-12 17:46:08 -07:00
Carson Gross
812ffc4e65 changelog 2026-02-12 17:42:52 -07:00
Carson Gross
fe9bdd13dc don't bother with a settle delay if there are no CSS transitions 2026-02-12 17:41:54 -07:00
Carson Gross
f3f8873f9b add a new testing API for deterministically resolved responses 2026-02-12 17:20:52 -07:00
Carson Gross
c65fed404f Merge remote-tracking branch 'origin/four' into four 2026-02-12 16:57:39 -07:00
MichaelWest22
a741517211
partials should fall back to use transition default (#3656) 2026-02-12 16:25:23 -07:00
Carson Gross
fa167f318e Merge remote-tracking branch 'origin/four' into four 2026-02-12 15:55:41 -07:00
MichaelWest22
081b82dcde
fix history restore to always use innerHTML (#3655)
* fix history restore to always use innerHTML

* avoid test breaking browser tests
2026-02-12 15:53:18 -07:00
Carson Gross
866c9155c4 fix history restoration when default swap type is overridden 2026-02-12 14:32:34 -07:00
MichaelWest22
3b2ab35019
Alpine compatibility extension (#3654)
* remove apline attributes from pre settle nodes

* simplify a little

* move to an extension

* Try applying alpine to fragments before swap

* handle morph properly

* defer count tracking

* handle child template morph and use local alpine for test reliablilty

* improve defercount

* post rebase tidy

* improve x-id and x-for handling

* patch isSoftMatch instead of removing generated id's
2026-02-12 14:27:24 -07:00
MichaelWest22
b15849a0ca
Add focus resoration support (#3645)
* Add focus resoration support

* add focusScroll support
2026-02-10 16:41:10 -07:00
MichaelWest22
5ec9235abb
Improve Morph matching (#3647)
* improve morph to scan for matching content before doing bad soft matching or removing nodes

* insert non-persistent ID's instead of soft matching
2026-02-08 08:57:11 -07:00
MichaelWest22
cd0024e8aa
fix firefox not handling script tags in templates (#3650) 2026-02-09 02:05:40 +13:00
Carson Gross
f7d84d2058 Merge remote-tracking branch 'origin/four' into four 2026-02-02 18:35:35 -07:00