Expand description
Sauron is an web framework for creating fast and interactive client side web application, as well as server-side rendering for back-end web applications.
Re-exports
pub use sauron_core::web_sys;
pub use sauron_core::wasm_bindgen;
pub use sauron_core::wasm_bindgen_futures;
pub use sauron_core::js_sys;
pub use sauron_core::mt_dom;
Modules
- provides functionalities for commands to be executed by the system, such as when the application starts or after the application updates.
- This module provides functionalities for manipulating the actual Document Object Model in the browser
- Create events Object
- Provides functions and macros to build html elements
- reexport prelude from sauron core
- Provides functions and macros to build svg elements
- provides function and macro for html units such as px, %, em, etc.
Macros
- Creates css using json notation
- Create a css string using json notation and use namespace on the class selectors
- create css using jss with namespace macro with correct indentions
- Create css using jss macro with nice indentions
- Quasi-quoting macro for building sauron Nodes.
Structs
- The
AnimationEvent
class. - A generic wrapper for a closure in rust where we can transform and pass around.
- A node along with all of the closures that were created for that node’s events and all of it’s child node’s events.
- a Patch where the virtual nodes are all created in the document. This is necessary since the CreatedNode doesn’t contain references as opposed to Patch which contains reference to the vdom, which makes it hard to be included in a struct
- Effects is a convenient way to group Msg for component to execute subsequent updates based on certain conditions. This can be used for doing animation and incremental changes to the view to provide an effect of transition or animation.
- The
HashChangeEvent
class. - Provides functions for doing http network request
- a custom InputEvent to contain the input string value
- The
KeyboardEvent
class. - Contains the time it took for the last app update call for the component TODO: Maybe rename to Diagnostics
- an event when a virtual Node is mounted the field node is the actual dom node where the virtual Node is created in the actual dom
- The
MouseEvent
class. - Program handle the lifecycle of the APP
- The
TouchEvent
class. - The
TransitionEvent
class. - Provides access to the Browser window
Enums
- Map the Event to DomEvent, which are browser events
- specify how the App is mounted to the DOM
- specify whether to attach the Node in shadow_root
- patch variant
Constants
- html events
Traits
- An Application is the root component of your program. Everything that happens in your application is done here.
- A component has a view and can update itself.
- A Container have children that is set from the parent component
- a trait for implementing CustomElement in the DOM with custom tag
- This trait is used in the DomUpdater to call the dispatch method when an event occured
- render node, elements to a writable buffer
Functions
- simulate a delay using promise in js
- provides access to the document body
- cancel the execution of a delayed closure
- execute with a timeout delay
- This is a sauron html specific functionality diff 2 nodes with attribute using
&'static str
instead of generic ATT - provides access to the document element
- utility function which returns the history api of the browser
- return the instantaneous time
- an event builder
- attach an on_animationend event to the html element
- attach an on_auxclick event to the html element
- attach an on_blur event to the html element
- attach an on_broadcast event to the html element
- attach an on_change event to the html element
- attach an on_checked event to the html element
- on click event
- attach an on_contextmenu event to the html element
- attach an on_dblclick event to the html element
- attach an on_doubleclick event to the html element
- custom on_enter event, which is triggered from key_press when the Enter key is pressed
- attach an on_focus event to the html element
- attach an on_hashchange event to the html element
- attach an on_input event to the html element
- attach an on_keydown event to the html element
- attach an on_keypress event to the html element
- attach an on_keyup event to the html element
- custom mount event
- attach an on_mousedown event to the html element
- attach an on_mouseenter event to the html element
- attach an on_mouseleave event to the html element
- attach an on_mousemove event to the html element
- attach an on_mouseout event to the html element
- attach an on_mouseover event to the html element
- attach an on_mouseup event to the html element
- attach an on_pointerlockchange event to the html element
- attach an on_pointerlockerror event to the html element
- attach an on_popstate event to the html element
- attach an on_readystatechange event to the html element
- attach an on_reset event to the html element
- attach callback to the scroll event
- attach an on_select event to the html element
- attach an on_submit event to the html element
- attach an on_toggle event to the html element
- attach an on_touchend event to the html element
- attach an on_touchmove event to the html element
- attach an on_touchstart event to the html element
- attach an on_transitionend event to the html element
- attach an on_wheel event to the html element
- provides access to the window Performance api
- utility function which a closure in request animation frame
- Runs a Rust
Future
on the current thread. - utility function which returns the Window element
Type Definitions
- Attribute type used in sauron where the type of the Attribute name is &’static str
- alias Cmd to use Program as the APP
- Element type with tag and attribute name type set to &’static str
- Callback where Event type is supplied for Components
- A simplified version of saurdon_vdom node, where we supplied the type for the tag which is a &’static str. The missing type is now only MSG which will be supplied by the users App code.
- Patch as result of diffing the current_vdom and the new vdom. The tag and attribute name types is set to &’static str