Releases: ivanceras/sauron
Releases · ivanceras/sauron
0.40.0
0.40.0
- Improve
sauron-node-macro
performance by resolving the values ofnamespace
andself_closing
tags at compile time, rather than at runtime. - Add plugin capability of
sauron-markdown
to easily hook user define functions such as code-highlighting. - Modify
Window::scroll_to_top
to return it as wrapped inCmd
to be used after anupdate
call in aComponent
- Add
popstate
toevents
module. - Make
sauron::jss!
macro to create the css without the use of indents and new lines by default.- This makes it easier to setup test as we don't have to deal with whitespace anymore.
- Added
sauron::jss_pretty!
variant to use nice indents and space on the generated css.
- breaking Improve the ergonomic to
Http
api. It is now easier to receive and deserialize text response. - Add a code fence processor plugin for
sauron-markdown
. Developers can hook code to create a custom element out of code blocks in markdown parser. - Rename
Program::new_replace_mount
toProgram::replace_mount
.- Rename
Program::new_append_to_mount
toProgram::append_to_mount
. Program
is not optional anymore when passed to functions in modules such asapply_patches
,dom_updater
andcreated_node
- Rename
- Added
safe_html
toText
node, this indicated whether to render as text node or asinnerHTML
of its parent element.ammonia
crate is used to sanitize the html text.
- breaking Program agument is not optional anymore in module
apply_patches
,dom_updater
andcreated_node
. - Improve rustdoc on prominent functions and modules.
- Add measurements function to Component for letting components know how much time is spent in each of major steps in dispatching and updating the DOM.
- Add a field
log_measurement
toCmd
which tells theProgram
wheter to log and call measurements.
- Add a field
- Add performance optimization for
sauron-parse
crate lookup ontag_namespace
andself_closing_tags
by putting it in a once_cell Lazy HashSet - breaking Rename
html_element_sc
tohtml_element_self_closing
. - breaking Remove the use of underscore_ to html/svg tags such as
type_
,etc and attributes which are also rust identifier to use the raw r#ident.- This includes
type
for
async
.
- This includes
0.37.0
0.7.1
0.7.0
- Added an initial implementation for Http for fetching data which returns a Cmd
- Added Examples usage of Http fetch
- Added Browser for listening to browser resize event which returns a Cmd
- Added Cmd module for abstracting calls such as Http requests
- Added an optional
init
function in Component which allows apps execute Cmd Task such as fetching data at the start of the app - Change the update method in Component to return Cmd<Self,Msg> in update method
0.6.0
0.6.0
- Refactor sauron_vdom::Event to cater general usecase for mouse, keyboard and input event
- Events such as onclick, onkeypress, and oninput are now supplied with: MouseEvent, KeyEvent, and InputEvent
accordingly, therefore no additional matching/unwrapping code is neccessary on the users code.
Before:Now:onclick(|event: Event| { if let Event::MouseEvent(mouse) = event{ sauron::log!("clicked at ({},{})", mouse.x(), mouse.y()) }else{ panic!("This should not happen") } })
onclick(|mouse: MouseEvent| { sauron::log!("clicked at ({},{})", mouse.x(), mouse.y()) })
- Move to svg_extra the following tags and attributes: style, width, height, id, font_size, font_family,
since these conflicts with the commonly used tags and attributes in html. Attributes that are defined in html attributes
could also be used in svg attributes. What's not possible is using tags declared in html module in svg elements,
since svg elements needs to be created with svg namespace in the DOM.
0.5.0
- Use &'static str type for Node's attribute name, event name and namespace.
- Add helper function
styles
which allows users to write style properties easily. - Add helper function
styles_flag
which allows users to write even more granular style properties. - Elements attributes are now appended to the existing attributes ones,
this is needed when there is multiple calls assigning on the same attributes on the same element - Put back
Callback<Event,MSG>
as the value of node.events. - Add
map
functionality which lets user embed subcomponents view into the parent component by mapping the callbacks
with a wrapped MSG variant from the parent.
0.4.0
- Added the complete list of svg/html attributes.
- Separate the uncommon html tags into html_extract module. These includes
style
, which conflicts with the
commonly usedstyle
attributes. - Separate the uncommon attributes such as
span
,label
which conflicts with the
commonly usedspan
andlabel
html tags. - Use snake_case for non-ident tags and attributes.
0.5.0
0.5.0
- Use &'static str type for Node's attribute name, event name and namespace.
- Add helper function
styles
which allows users to write style properties easily. - Add helper function
styles_flag
which allows users to write even more granular style properties. - Elements attributes are now appended to the existing attributes ones,
this is needed when there is multiple calls assigning on the same attributes on the same element - Put back
Callback<Event,MSG>
as the value of node.events. - Add
map
functionality which lets user embed subcomponents view into the parent component by mapping the callbacks
with a wrapped MSG variant from the parent.
0.4.0
- Added the complete list of svg/html attributes.
- Separate the uncommon html tags into html_extract module. These includes
style
, which conflicts with the
commonly usedstyle
attributes. - Separate the uncommon attributes such as
span
,label
which conflicts with the
commonly usedspan
andlabel
html tags. - Use snake_case for non-ident tags and attributes.