Warning
This update contains breaking changes to attributes, actions and SSE events.
Added
- Added a custom bundle bundler.
- Added SDKs for Go, PHP and .NET.
- Added the
data-persist
attribute. - Added the
data-replace-url
attribute. - Added the
data-indicator
attribute. - Added the
datastar-remove-fragments
SSE event. - Added the
datastar-remove-signals
SSE event. - Added the
datastar-execute-script
SSE event.
Changed
- Changed the
$$
prefix to$
for action plugins. - The
data-model
attribute now upserts signals into the store. - The
data-ref
attribute now upserts a signal into the store. - The
data-show
attribute now shows/hides an element using thestyle
attribute only. Modifiers have been removed. For anything custom, usedata-class
instead. - Renamed the
datastar-fragment
SSE event todatastar-merge-fragments
. - Renamed the
datastar-signal
SSE event todatastar-merge-signals
. - Renamed the
fragment
dataline literal for SSE events tofragments
. - Renamed the
store
dataline literal for SSE events tosignals
. - Renamed the
upsert_attributes
merge mode toupsertAttributes
in the fragment event. - Renamed the
settle
option tosettleDuration
in the fragment event and changed the default value to300
. - Renamed the
vt
option touseViewTransition
in the fragment event and changed the default value tofalse
. - Changed the second argument of SSE actions from
onlyRemoteSignals
to an optional object withheaders
andonlyRemoteSignals
keys, defaulting to{}
andtrue
respectively. - Error codes that roughly match HTTP status codes are now used.
Removed
- Removed the
~ref
syntax. Use the signal created bydata-ref
directly instead. - Removed the
local
andsession
modifiers fromdata-store
. Use the newdata-persist
attribute instead. - Removed the
data-teleport
attribute. - Removed the
data-header
attribute. Use theheaders
option in SSE actions instead. - Removed the
$$isFetching
action and thedata-fetch-indicator
attribute. Usedata-indicator
instead. - Removed the
$$remote
action. - Removed the
datastar-delete
SSE event. Use the newdatastar-remove-fragments
anddatastar-remove-signals
SSE events instead. - Removed the
datastar-redirect
anddatastar-console
SSE events. Use the newdatastar-execute-script
SSE event instead. - Removed
sendDatastarEvent
from ctx. We have to rethink how to expose events for a better try at the inspector. - Removed the concept of
_dsPlugins
, made unnecessary by a more consistent architecture.