3146 Commits

Author SHA1 Message Date
MichaelWest22
5b550e5c49
Optimize Head regex (#2781)
* remove shared tag regex utility function that is no longer really needed

* fix head-support manual test to point to externally hosted extension

* minimize regex
2024-10-02 19:20:23 -06:00
MichaelWest22
b98e4f2b12
fix htmx.ajax defaulting to swap body when target not found (#2878)
* ajax helper handle no target

* allow source only targeting

* Add tests

* Handle source set but invalid target set

* Improve source logic

* missed #

* improve readiblity and add inline comment
2024-10-02 19:18:22 -06:00
Joerg Sonnenberger
df92b295d6
Change hx-trigger's changed modifier to work for independent trigger specifications (#2891)
* Adjust hx-trigger's changed modifier for multiple sources

The `changed` trigger modifier can see different event targets, either due
to the `from` modifier or event bubbling. The existing behavior trigger
only for one node (`from` modifier) or inconsistently (bubbling).

Use a nested weak map to keep track of the last value per distinguished
(trigger specification, event target node) pair. The weak map ensures
that Garbage Collection can still recycle the nodes.

If a event target was not seen via `from`, it is assumed changed for the
first time the trigger is hit.

* Add test case for separate triggers with changed modifier
2024-10-02 19:17:25 -06:00
Jackie Li
4916ce4d02
fix #2932: check parent is null for swap delete (#2933)
* fix #2932: check parent is null for swap

* fix test in swap when parent elt deleted
2024-10-02 19:08:39 -06:00
MichaelWest22
4a8172325e
enable hx-preserve handing for oob swaps (#2934)
* Add support for oob swaps with hx-preserve

* Add tests

* Documentation

* Impove fix to handle when oob swaps shouldSwap set false
2024-10-02 19:02:46 -06:00
Carson Gross
c069f208b2 clean up the formatting for the gumroad essay 2024-10-02 19:01:16 -06:00
Sahil Lavingia
42e51a191e
gumroad essay (#2936)
* gumroad essay

* cp

* cp

* cp

* updates based on feedback

* cp

* cp

* cp
2024-10-02 18:44:36 -06:00
Carson Gross
d0a84a451c sub in tracebit logo 2024-10-02 15:59:24 -06:00
Carson Gross
eeeba484cf add cased to sponsors replacing codacy 2024-10-01 12:15:50 -06:00
MichaelWest22
d528c9d94d
Handle Space before comma in Trigger Spec (#2903)
* strip space after trigger spec

* Add test

* handle addiional case
2024-09-25 13:12:37 -06:00
MichaelWest22
3d1a2e5202
[bug] load trigger stops hx-disabled-elt getting re-enabled (#2925)
* allow disable-elt on load to function

* Update requestCount fallback
2024-09-25 12:13:25 -06:00
Carson Gross
b8c92b8071 Merge branch 'master' into dev 2024-09-25 12:07:51 -06:00
Simon Hartley
aad0fbc7ed
Add a link to the extensions site on the docs page (#2930)
Add a link to the extensions site in the docs page
2024-09-25 09:40:55 +02:00
Luis Eduardo
27b5bcc438
Improved documentation for htmx:confirm event and examples for implementing sweetalert (#2926)
* Add detail.question and detail.issueRequest(skipConfirmation=false) documentation to htmx:confirm event

* Update htmx:confirm event documentation

* Update htmx:confirm event documentation

* Update htmx:confirm event documentation

* Modify htmx:confirm event documentation
2024-09-25 09:39:28 +02:00
Brooke Kuhlmann
44c4de41cc
Added htmx before transition reference link (#2929)
This is missing from the reference page but properly documented on the events page. This simply links the two together so anyone can quickly jump between the two.

Milestone: patch
2024-09-25 09:29:56 +02:00
Carson Gross
1ef814b0be Merge remote-tracking branch 'origin/master' 2024-09-22 20:39:18 -06:00
Carson Gross
9fd8aa80b5 lmao 2024-09-22 20:39:08 -06:00
gparmigiani
b4aff2340d
add F# server-examples (#2886)
add F# server-examples.md
2024-09-22 12:07:17 -04:00
Jon Sterling
653794436b
fix typo in rest-explained.md (#2924) 2024-09-22 12:02:40 -04:00
Carson Gross
b71af75f1a fix 2024-09-20 11:11:05 -06:00
Carson Gross
c2a29ce574 Merge remote-tracking branch 'origin/master' 2024-09-20 10:48:36 -06:00
Carson Gross
d61b000d73 add Tony's essay 2024-09-20 10:48:26 -06:00
Ben Croker
02aa8fd718
Fix docs for htmx.config.scrollBehavior (#2918)
* Update docs.md

* Update reference.md

* Update api.md

* Fix links

---------

Co-authored-by: Vincent <vichenzo-thebaud@hotmail.com>
2024-09-19 09:33:37 +02:00
Keeper-of-the-Keys
7f8105a905
[Documentation] Add more information about other swap strategies (#2889)
* Add more information about other swap strategies

* Change suggested by @MichaelWest22

* Grammar error as per comments from @Telroshan

* Clarification requested by @Telroshan
2024-09-18 09:22:43 +02:00
MichaelWest22
0023cd85f0
[Documentation] Config default update for methodsThatUseUrlParams (#2911)
Config default update
2024-09-16 10:09:38 +02:00
MichaelWest22
6ce6a1a77b
Documentation 3xx redirects can't send headers (#2904)
* 3xx redirects can't send headers

* fix response-headers links
2024-09-15 09:29:39 +02:00
shouya
e6a2ea15a2
Documentation for dynamic hx-vals (#2898)
* add test for spread operator in hx-vals

* update documentation

Closes #2885
2024-09-13 10:19:21 +02:00
Carson Gross
2b8acfa2ca Merge remote-tracking branch 'origin/master' 2024-09-10 07:10:10 -06:00
Carson Gross
25f26127b9 link ACM paper 2024-09-10 07:10:01 -06:00
MichaelWest22
230262cf93
Documentation of svg oob swaps (#2882)
* Slipery SVGs

* remove a

* Fix typo and punctuation

* Also add code syntax for tags

---------

Co-authored-by: Vincent <vichenzo-thebaud@hotmail.com>
2024-09-08 10:21:56 +02:00
Jared Foy
73f529e3c3
Update hx-select.md (#2881) 2024-09-08 10:10:07 +02:00
Jared Foy
73388624ca
Update CONTRIBUTING.md (#2875) 2024-09-06 10:29:44 +02:00
Carson Gross
7fc1d61b4f update sponsors 2024-09-02 14:59:20 -06:00
Carson Gross
1ef205da28 Merge remote-tracking branch 'origin/master' 2024-09-02 14:52:40 -06:00
Carson Gross
b25b911ba1 update sponsors 2024-09-02 14:52:32 -06:00
Ben Hoyt
be2e6b4970
Trivial grammar fixes (#2862) 2024-09-02 08:03:43 +02:00
Vincent
326ff3b296
Fix focusin-based tests (#2861) 2024-09-01 14:22:04 -04:00
Alexander Kulikov
324ee19377
Listen to resize events and check revealed (#2780) 2024-08-29 12:01:13 -06:00
Carson Gross
2855c2c24e merge https://github.com/bigskysoftware/htmx/pull/2723 2024-08-29 12:00:00 -06:00
Ben Croker
cd6cdb275e
Ability to add options argument to event listener (#2836)
* Update htmx.js

* Update events.js

* Add fallback value

* Use JSDoc syntax

* Document parameter

* Only accept an object

* Revert change

* Add useCapture

* Update htmx.js

* Add `useCapture` test

* Clean up

* Revert addition of test
2024-08-29 10:36:24 -06:00
MichaelWest22
bc4468ddcd
fix restoreHistory title replacment (#2841)
Co-authored-by: 1cg <469183+1cg@users.noreply.github.com>
2024-08-29 10:32:49 -06:00
MichaelWest22
2ba7fd280e
Upgrade Typescript to move configuration from const to let (#2853)
* typescript upgrade v5.5.4

* fix dist
2024-08-29 10:30:51 -06:00
Carson Gross
0fd854758c fix formatting 2024-08-27 07:47:01 -06:00
Carson Gross
b4048ebb59 add moveBefore support 2024-08-23 15:20:01 -06:00
Vincent
d152a3c75a
Redirect /extensions to extensions website (#2842) 2024-08-22 15:06:00 -06:00
Alexander Petros
4dfedf4f71
Fix duplicate typo (#2838)
Thanks!
2024-08-21 22:32:39 +02:00
Adam Johnson
bd2dc6564d
Link to htmx:sendError from error description (#2792) 2024-08-20 23:25:23 -04:00
SimunKaracic
4d35ef51e1
Update server-examples.md (#2827)
Add scalatags + zio-http example
2024-08-20 23:21:19 -04:00
Aaron Cunningham
2472bcab98
Update lazy-load.md (#2826)
fixed double-spacing issue in example
2024-08-19 22:29:06 +02:00
ehenighan
27fc37ce50
Issue #2676 - Tests for v2 to prevent regression of issue from v1 (#2829)
* Tests for v2 to prevent regression of issue from v1

* Linting

---------

Co-authored-by: Ed Henighan <ed.henighan@adi-uk.com>
2024-08-19 21:09:42 +02:00