2636 Commits

Author SHA1 Message Date
Carson Gross
e16f1865a4 change license to 0 clause BSD 2024-01-15 06:03:09 -07:00
Carson Gross
0cab76455e add new sponsor 2024-01-11 17:57:54 -07:00
Carson Gross
2ad9b22d5d Merge remote-tracking branch 'origin/master' 2024-01-11 13:22:19 -07:00
Carson Gross
ef9e326545 add new sponsor 2024-01-11 13:22:07 -07:00
Alexander Petros
7006830109
Fix typo in framework essay (#2174) 2024-01-10 17:28:48 -07:00
Carson Gross
509feb5d4f small language change 2024-01-10 16:48:45 -07:00
Alexander Petros
747f262b8c
Add "Is htmx Just Another Js Framework" Essay (#2172) 2024-01-10 16:47:29 -07:00
Fan Fei
1195102fc9
Update docs.md (#2155)
fixed an example mistke
2024-01-10 11:01:04 -05:00
Carson Gross
67c94043cb fix bad autocomplete 2024-01-10 06:52:03 -07:00
Carson Gross
e126f4f6a5 update hydra hosting to doublewide 2024-01-09 15:37:49 -07:00
Carson Gross
894b4dd3e8 nuke hyperscript (for the most part) 2024-01-09 11:23:15 -07:00
Carson Gross
0d37715ffd fix alt 2024-01-08 13:18:56 -07:00
Carson Gross
3d265b3a3a add transloadit & pullapprove logos and update news element 2024-01-08 13:16:38 -07:00
Carson Gross
29f0761d98 add hydrahost logo 2024-01-08 13:04:51 -07:00
Carson Gross
3a31a0e60a add das filter 2024-01-07 21:23:08 -07:00
Carson Gross
e6cee52696 resize image 2024-01-05 11:10:30 -07:00
Carson Gross
c63513a223 Merge remote-tracking branch 'origin/master' 2024-01-05 11:07:41 -07:00
Carson Gross
63fd24ea43 doggo sponsorship 2024-01-05 11:07:33 -07:00
Moussa Haidous
145627a579
typo: dahs -> dash (#2142) 2024-01-01 23:39:05 -05:00
nickchomey
8b26a418a0
Fix broken link in essay (#2143)
Update why-tend-not-to-use-content-negotiation.md

fixing broken link
2024-01-01 23:38:47 -05:00
Carson Gross
c73aa077ca update sponsor info 2023-12-28 11:31:19 -07:00
Carson Gross
8966f1d01d clarify morphing docs 2023-12-22 10:25:40 -07:00
Carson Gross
51baa6bb31 fix broken link v1.9.10 2023-12-21 18:35:46 -07:00
Carson Gross
71c3f2a9a9 fix build 2023-12-21 18:34:09 -07:00
Carson Gross
b9a673a4f3 CHANGELOG.md for 1.9.10 2023-12-21 18:17:58 -07:00
Carson Gross
6489f1bfef prep web for release 2023-12-21 17:38:56 -07:00
Carson Gross
b1e15c08cc more release prep 2023-12-21 17:37:15 -07:00
Carson Gross
66599ef887 Merge branch 'master' into dev
# Conflicts:
#	www/content/docs.md
2023-12-21 17:28:58 -07:00
Carson Gross
98334ea5b2 update version 2023-12-21 17:27:52 -07:00
Vincent
0bfef443c5
Enable Node CI for v2.0v2.0 branch (#2123)
Run tests for v2.0v2.0 branch too
2023-12-21 16:32:24 -05:00
Vincent
0b7a68e352
Removed outdated note in oob swap documentation (#2119) 2023-12-21 10:33:47 -05:00
Carson Gross
b4080e71da remove psychotic test 2023-12-20 15:48:31 -07:00
Carson Gross
126187fe8e slight rename 2023-12-20 15:47:05 -07:00
Thomas Cowart
078d5da5b4
Update parseInterval to handle "0" correctly (#1835)
* Update parseInterval to handle "0" correctly

When a parameter like "0ms" is passed in to parseInterval it gets parsed to 0.
Previously this would result in a return value of "undefined" because 0 is falsy
and thus the `return 0 || undefined` statements return undefined.

The purpose of the form `parseFloat(str) || undefined` was to return "undefined" if
parseFloat failed (parseFloat returns NaN, a falsy value, if it can't parse its
argument). Unfortunately, as mentioned, parseFloat can also succeed and return a
falsy value -- when the argument is "0" (or "0.0", etc.). So the new code, rather
than depending on the falsiness of the result of parseFloat, explicitly checks for
a NaN.

* Adds some semicolons

Adds some semicolons to parseInterval (and tests) for consistency.

* Add one more parseInterval test for "0"

Adds test test to make sure parseInterval works on "0".

* Adds functional tests for every, swap, settle, throttle, and delay

* Explcitly check that setTimeout values are > 0

These values come from user settings that are read from parseInterval,
so they could be a number or undefined.

If the value being checked is > 0 setTimeout will be called with some
associated function. If the value is 0 or 'undefined' the associated function
will be called immediately ('undefined' is not greater than 0).

* Change '!== undefined' to '> 0'

`pollInterval !== undefined` is a subtly different conditional than just `pollInterval` or `pollInterval > 0` (which are equivalent). Changes the conditional to `pollInterval > 0` so as to not change the behavior but also be more explicit in the test.
2023-12-20 15:46:04 -07:00
Noa Aarts
1f4903c213
rewrite the HX-Retarget header to use extended query selectors (#2017) 2023-12-20 15:38:25 -07:00
Fernando Comunello
e9bce8db65
Improve head tag parsing on template fragments (#2024)
Fix https://github.com/bigskysoftware/htmx/issues/2018
2023-12-20 15:37:42 -07:00
Denis Palashevskii
31d01c9145
fix conflicting function names in sse.js (#2096)
* fix conflicting function names in sse.js

* update jsdoc

* rollback whitespace changes

* fix "afterProcessNode" call
2023-12-14 15:08:41 -07:00
fhp-mec
11cef8ee83
Fix: Make the SSE extension work properly and adhere to tests (#2025)
* Process sse-swap properly when swapped in

Previously `sse-swap` were only processed when `sse-connect` was on the
root of what was being swapped in.
This is now fixed so that the closest sseEventSource is found and used as the
event source

* Pass for code readabiltiy

remove the nested if statements as there is no difference in handling
between sseURL and LegacySSEUrl.

* Fix indenting

* Initial attempt at sse extension tests

* Make existing tests pass

* Add test case for #916

* backport test for #916 to hx-sse for completeness

* add a distinct test for sse-swap

* more tests, fix tests

+ more tests differentiating the implementation of sse-swap and
hx-trigger
* fix for "is closed after removal with no close and activity"

* Cleanup listener if element is gone

* Revert "Cleanup listener if element is gone"

This reverts commit bbe3715276302656d1a422fbc4778842776e35f6.

* Clean up listeners if element gone, fix indenting

* Incorportate feedback from first review

+ seperate eventSource creation logic and event registering logic
+ manually create event handling, still confused by how hx-trigger works
* `createEventSourceOnElement` now looks for event sources in children
* explicitly handle legacy sse handling instead of having extra
  selectors in `querySelectorOnThisOrChildren`
+ a few readability changes
+ add regression check to make sure that sseEventSource is only created
  on elements with sse-connect or equivalent
+ add test to make sure that sse-connect in the child of a swapped
  element is handled

* Allow multiple listeners in eventsource mock

* Backport eventsource mocks to legacy tests

---------

Co-authored-by: 1cg <469183+1cg@users.noreply.github.com>
2023-12-14 14:33:38 -07:00
Mark Croxton
9052a4d520
Prevent references to nodes swapped out of the dom accumulating as detached elements in memory (#2091)
* Prevent references to elements swapped out of the dom accumulating as detached nodes (memory leak).

* Safely delete internal data when we tear down a node
2023-12-14 12:12:34 -07:00
Vincent
4057f9c465
Trigger specs cache indentation fix + documentation & tests (#2094)
* Fix parseAndCacheTrigger indentation as discussed in #1540

https://github.com/bigskysoftware/htmx/pull/1540#issuecomment-1834651800

* Trigger specs cache documentation + tests
2023-12-14 11:44:11 -07:00
Jyri-Matti Lähteenmäki
7866258936
add extension to populate path variables with request parameters (#1307)
* add extension to populate path variables with request parameters

* update extension readme
2023-12-13 18:31:28 -07:00
Carson Gross
c4d8548406 being annoying, but remove a lookup of the cache 2023-12-13 18:29:39 -07:00
Vincent
da546050c3
Cache evaluated trigger specs (#1540)
* Cache evaluated trigger specs

* Removed spec array copy

* parseAndCacheTrigger func (wrong indentation for more readable diff)

* triggerSpecsCache config property

* Avoid htmx.config.triggerSpecsCache repetition
2023-12-13 18:27:58 -07:00
Carson Gross
73ec692e6c remove some lets that snuck in 2023-12-13 15:01:16 -07:00
Carson Gross
b75962b9bb update docs 2023-12-13 14:45:47 -07:00
Qori El-Hafizh
89b523cde0
fix typo (#2088)
connect:<url> instead of connect <url>
2023-12-12 11:34:07 -05:00
Deniz Akşimşek
206912b71d
Add missing doctype (#2085) 2023-12-11 12:48:46 -05:00
Henrik Berglund
7de6351d20
feat: Improve web site accessibility/legibility (#2080)
* fix: change css midBlue saturation and body tag color to a darker color

* feat: add empty alt attribute to decorative bars

* feat: add alt attributes for index link images

* fix: tweak code background alpha

* feat: add custom highlighting theme, change comment color to be legible

* fix: replace a tags with span

* fix: lighten background color of div

* feat: add doctype and meta description

* fix: remove doctype to prevent no quirks mode (why.png)
2023-12-10 19:51:40 -05:00
Carson Gross
3be4202e5e add support for dashes in hx-on* attributes 2023-12-07 15:15:10 -07:00
Thad Guidry
9de3c3f068
Add hyperlink to HTML standards for data- prefix (#2072)
Fixes #2071
2023-12-07 11:59:58 -05:00