Skip to content

Releases: ivanceras/sauron

0.40.0

15 Aug 13:32
Compare
Choose a tag to compare

0.40.0

  • Improve sauron-node-macro performance by resolving the values of namespace and self_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 in Cmd to be used after an update call in a Component
  • Add popstate to events 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 to Program::replace_mount.
    • Rename Program::new_append_to_mount to Program::append_to_mount.
    • Program is not optional anymore when passed to functions in modules such as apply_patches, dom_updater and created_node
  • Added safe_html to Text node, this indicated whether to render as text node or as innerHTML 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 and created_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 to Cmd which tells the Program wheter to log and call measurements.
  • Add performance optimization for sauron-parse crate lookup on tag_namespace and self_closing_tags by putting it in a once_cell Lazy HashSet
  • breaking Rename html_element_sc to html_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.

0.37.0

06 Aug 05:30
Compare
Choose a tag to compare
Remove patch to crates.io

0.7.1

07 Jun 12:15
Compare
Choose a tag to compare
  • Added initial implementation for markdown handling
  • Added history function get history object
    events now prevents defaults and stop propagation

0.7.0

20 May 06:29
Compare
Choose a tag to compare
  • 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

28 Apr 09:58
Compare
Choose a tag to compare

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:
       onclick(|event: Event| {
            if let Event::MouseEvent(mouse) = event{
                sauron::log!("clicked at ({},{})", mouse.x(), mouse.y())
            }else{
                panic!("This should not happen")
            }
       })
    Now:
        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 used style attributes.
  • Separate the uncommon attributes such as span, label which conflicts with the
    commonly used span and label html tags.
  • Use snake_case for non-ident tags and attributes.

0.5.0

28 Apr 07:42
Compare
Choose a tag to compare

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 used style attributes.
  • Separate the uncommon attributes such as span, label which conflicts with the
    commonly used span and label html tags.
  • Use snake_case for non-ident tags and attributes.