Move 7 htmx-equivalent attrs from SX_UNIQUE_ATTRS to BEHAVIOR_ATTRS
These are sx implementations of htmx attributes (boost, preload, preserve, indicator, validate, ignore, optimistic), not unique to sx. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -113,10 +113,6 @@ BEHAVIOR_ATTRS = [
|
||||
("sx-media", "Only enable this element when the media query matches", True),
|
||||
("sx-disable", "Disable sx processing on this element and its children", True),
|
||||
("sx-on:*", "Inline event handler — e.g. sx-on:click runs JavaScript on event", True),
|
||||
]
|
||||
|
||||
SX_UNIQUE_ATTRS = [
|
||||
("sx-retry", "Exponential backoff retry on request failure", True),
|
||||
("sx-boost", "Progressively enhance all links and forms in a container with AJAX navigation", True),
|
||||
("sx-preload", "Preload content on hover/focus for instant response on click", True),
|
||||
("sx-preserve", "Preserve element across swaps — keeps DOM state, event listeners, and scroll position", True),
|
||||
@@ -124,6 +120,10 @@ SX_UNIQUE_ATTRS = [
|
||||
("sx-validate", "Run browser constraint validation (or custom validator) before sending the request", True),
|
||||
("sx-ignore", "Ignore element and its subtree during morph/swap — no updates applied", True),
|
||||
("sx-optimistic", "Apply optimistic UI updates immediately, reconcile on server response", True),
|
||||
]
|
||||
|
||||
SX_UNIQUE_ATTRS = [
|
||||
("sx-retry", "Exponential backoff retry on request failure", True),
|
||||
("data-sx", "Client-side rendering — evaluate the sx source in this attribute and render into the element", True),
|
||||
("data-sx-env", "Provide environment variables as JSON for data-sx rendering", True),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user