tiye/respo/node does not have a README file
pub(open) trait RespoEffect : ToJson {
fn build_effect(Self) -> RespoEffectBox = _
fn make_handler(Self) -> ((RespoEffectType, Node) -> Unit) = _
fn run(Self, RespoEffectType, Node) -> Unit = _
fn mounted(Self, Node) -> Unit = _
fn before_update(Self, Node) -> Unit = _
fn updated(Self, Node) -> Unit = _
fn before_unmount(Self, Node) -> Unit = _
}pub(all) suberror RespoCommonError {
RespoCommonError(String)
}impl Show for RespoCommonErrorpub(all) enum AnchorElementTarget {
Blank
Parent
Self
Top
}type ChildDomOp[T, G]impl Show for DispatchFn[T]fn[T : RespoAction, S] DispatchFn::empty_state(self : DispatchFn[T], cursor : RespoCursor[S]) -> Unit raise RespoCommonError#deprecated("use `empty_state` instead")
fn[T : RespoAction] DispatchFn::run_empty_state(self : DispatchFn[T], cursor : Array[String]) -> Unit raise RespoCommonErrorfn[T : RespoAction, S : ToJson] DispatchFn::set_state(self : DispatchFn[T], cursor : RespoCursor[S], state : S) -> Unit raise RespoCommonErrortype DomChange[T, G]pub(all) struct RespoComponent[T, G] {
name : String
effects : Array[RespoEffectBox]
tree : RespoNode[T, G]
listeners : (G, DispatchFn[T]) -> Unit raise RespoCommonError?
}impl Eq for RespoComponent[T, G]fn[T, G] RespoComponent::named(name : String, tree : RespoNode[T, G], effects? : Array[&RespoEffect], listeners? : (G, DispatchFn[T]) -> Unit raise RespoCommonError?) -> RespoComponent[T, G]impl Show for RespoEffectTypepub(all) struct RespoElement[T, G] {
name : String
attrs : Map[String, String]
event : Map[RespoEventType, (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError]
style : RespoStyle
children : Array[(RespoIndexKey, RespoNode[T, G])]
}impl Eq for RespoElement[T, G]impl Show for RespoElement[T, G]fn[T, G] RespoElement::set_attribute(self : RespoElement[T, G], key : String, value : String) -> Unitpub(all) enum RespoEvent {
Click(Float, Float, MouseEvent)
Keyboard(String, UInt, Bool, Bool, Bool, Bool, Bool, KeyboardEvent)
Input(String, InputEvent)
Focus(FocusEvent)
Blur(BlurEvent)
Drag(Float, Float, DataTransfer, DragEvent)
}impl Show for RespoEventpub(all) struct RespoEventMark {
coord : Vector[RespoCoord]
name : RespoEventType
event_info : RespoEvent
}impl Show for RespoEventTypefn[T, G] a(inner_text? : String, class_name? : String, class_list? : Array[String], href~ : String, download? : String, target? : AnchorElementTarget, attrs? : Map[String, String], type_? : String, event? : Map[RespoEventType, (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError], style? : RespoStyle, children? : Array[RespoNode[T, G]]) -> RespoNode[T, G]fn attach_event(element : Element, key : RespoEventType, coord : Vector[RespoCoord], handle_event : (RespoEventMark) -> Unit raise RespoCommonError) -> Unit raise RespoCommonErrorfn[T, G] b(class_name? : String, class_list? : Array[String], inner_text? : String, innerHTML? : String, attrs? : Map[String, String], event? : Map[RespoEventType, (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError], style? : RespoStyle, children : Array[RespoNode[T, G]]) -> RespoNode[T, G]fn[T, G] br(attrs? : Map[String, String], event? : Map[RespoEventType, (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError], style? : RespoStyle) -> RespoNode[T, G]fn[T, G] build_dom_tree(tree : RespoNode[T, G], coord : Vector[RespoCoord], handle_event : (RespoEventMark) -> Unit raise RespoCommonError) -> Node raise RespoCommonErrorfn[T, G] button(class_name? : String, class_list? : Array[String], inner_text~ : String, attrs? : Map[String, String], event? : Map[RespoEventType, (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError], style? : RespoStyle, on_click? : (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError) -> RespoNode[T, G]fn[T, G] canvas(class_name? : String, class_list? : Array[String], height? : Int, width? : Int, attrs? : Map[String, String], event? : Map[RespoEventType, (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError], style? : RespoStyle) -> RespoNode[T, G]fn[T, G] code(class_name? : String, class_list? : Array[String], inner_text~ : String, attrs? : Map[String, String], event? : Map[RespoEventType, (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError], style? : RespoStyle) -> RespoNode[T, G]fn[T, G] collect_effects_inside_out_as(tree : RespoNode[T, G], coord : Vector[RespoCoord], dom_path : Vector[UInt], effect_type : RespoEffectType, changes : Ref[Array[DomChange[T, G]]]) -> Unit raise RespoCommonErrorfn[T, G] collect_effects_outside_in_as(tree : RespoNode[T, G], coord : Vector[RespoCoord], dom_path : Vector[UInt], effect_type : RespoEffectType, changes : Ref[Array[DomChange[T, G]]]) -> Unit raise RespoCommonError#callsite(autofill(loc))
fn[U : Show] contained_static_style(rules : Array[(String?, U, RespoStyle)], loc~ : SourceLoc) -> Stringlet _style_demo : String = contained_static_style([
(
Some("@media only screen and (max-width: 600px)"),
"&",
@css.respo_style(margin=4 |> Px, background_color=Hsl(200, 90, 96)),
),
])fn[T, G] create_element(name : String, attrs? : Map[String, String], event? : Map[RespoEventType, (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError], style? : RespoStyle, children : Array[RespoNode[T, G]]) -> RespoNode[T, G]#deprecated("This function is deprecated.")
#callsite(autofill(loc))
fn[U : Show] declare_contained_style(rules : Array[(String?, U, RespoStyle)], loc~ : SourceLoc) -> String#deprecated("This function is deprecated.")
#callsite(autofill(loc))
fn[U : Show] declare_static_style(rules : Array[(U, RespoStyle)], loc~ : SourceLoc) -> Stringfn[T, G] diff_tree(new_tree : RespoNode[T, G], old_tree : RespoNode[T, G], coord : Vector[RespoCoord], dom_path : Vector[UInt], changes : Ref[Array[DomChange[T, G]]]) -> Unit raise RespoCommonErrorfn[T, G] div(class_name? : String, class_list? : Array[String], attrs? : Map[String, String], event? : Map[RespoEventType, (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError], style? : RespoStyle, children : Array[RespoNode[T, G]], innerHTML? : String, draggable? : Bool, on_click? : (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError, on_drag_start? : (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError, on_drag_end? : (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError, on_drag_over? : (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError, on_drag_enter? : (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError, on_drag_leave? : (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError, on_drop? : (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError) -> RespoNode[T, G]fn[T, G] div_listed(class_name? : String, class_list? : Array[String], attrs? : Map[String, String], event? : Map[RespoEventType, (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError], style? : RespoStyle, children : Array[(RespoIndexKey, RespoNode[T, G])]) -> RespoNode[T, G]fn[T, G] h1(class_name? : String, class_list? : Array[String], inner_text? : String, innerHTML? : String, attrs? : Map[String, String], event? : Map[RespoEventType, (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError], style? : RespoStyle, children : Array[RespoNode[T, G]]) -> RespoNode[T, G]fn[T, G] h2(class_name? : String, class_list? : Array[String], inner_text? : String, innerHTML? : String, attrs? : Map[String, String], event? : Map[RespoEventType, (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError], style? : RespoStyle, children : Array[RespoNode[T, G]]) -> RespoNode[T, G]fn[T, G] h3(class_name? : String, class_list? : Array[String], inner_text? : String, innerHTML? : String, attrs? : Map[String, String], event? : Map[RespoEventType, (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError], style? : RespoStyle, children : Array[RespoNode[T, G]]) -> RespoNode[T, G]fn[T, G] h4(class_name? : String, class_list? : Array[String], inner_text? : String, innerHTML? : String, attrs? : Map[String, String], event? : Map[RespoEventType, (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError], style? : RespoStyle, children : Array[RespoNode[T, G]]) -> RespoNode[T, G]fn[T, G] h5(class_name? : String, class_list? : Array[String], inner_text? : String, innerHTML? : String, attrs? : Map[String, String], event? : Map[RespoEventType, (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError], style? : RespoStyle, children : Array[RespoNode[T, G]]) -> RespoNode[T, G]fn[T, G] h6(class_name? : String, class_list? : Array[String], inner_text? : String, innerHTML? : String, attrs? : Map[String, String], event? : Map[RespoEventType, (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError], style? : RespoStyle, children : Array[RespoNode[T, G]]) -> RespoNode[T, G]fn[T, G] hr(class_name? : String, class_list? : Array[String], attrs? : Map[String, String], event? : Map[RespoEventType, (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError], style? : RespoStyle) -> RespoNode[T, G]fn[T, G] i(class_name? : String, class_list? : Array[String], inner_text? : String, innerHTML? : String, attrs? : Map[String, String], event? : Map[RespoEventType, (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError], style? : RespoStyle, children : Array[RespoNode[T, G]], on_click? : (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError) -> RespoNode[T, G]fn[T, G] iframe(class_name? : String, class_list? : Array[String], height? : Int, width? : Int, loading? : IframeElementLoading, src~ : String, attrs? : Map[String, String], event? : Map[RespoEventType, (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError], style? : RespoStyle) -> RespoNode[T, G]fn[T, G] img(class_name? : String, class_list? : Array[String], alt~ : String, height? : Int, src~ : String, width? : Int, loading? : ImgElementLoading, attrs? : Map[String, String], event? : Map[RespoEventType, (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError], style? : RespoStyle) -> RespoNode[T, G]fn[T, G] input(class_name? : String, class_list? : Array[String], autocomplete? : TextareaElementAutoComplete, autofocus? : Bool, disabled? : Bool, name? : String, placeholder? : String, readonly_? : Bool, spellcheck? : Bool, attrs? : Map[String, String], value~ : String, event? : Map[RespoEventType, (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError], style? : RespoStyle, on_input? : (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError, on_change? : (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError, on_keydown? : (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError, on_keyup? : (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError, on_keypress? : (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError, on_focus? : (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError, on_blur? : (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError) -> RespoNode[T, G]fn[T, G] li(class_name? : String, class_list? : Array[String], attrs? : Map[String, String], event? : Map[RespoEventType, (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError], style? : RespoStyle, children : Array[RespoNode[T, G]], innerHTML? : String) -> RespoNode[T, G]fn[T, G] load_coord_target_tree(tree : RespoNode[T, G], coord : ArrayView[RespoCoord]) -> RespoNode[T, G] raise RespoCommonErrorfn[T, G] patch_tree(tree : RespoNode[T, G], old_tree : RespoNode[T, G], mount_target : Node, changes : Array[DomChange[T, G]], handle_event : (RespoEventMark) -> Unit raise RespoCommonError) -> Unit raise RespoCommonErrorfn[T, G] pre(class_name? : String, class_list? : Array[String], inner_text? : String, innerHTML? : String, attrs? : Map[String, String], event? : Map[RespoEventType, (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError], style? : RespoStyle, children? : Array[RespoNode[T, G]]) -> RespoNode[T, G]fn respo_attrs(id? : String, class_name? : String, hidden? : Bool, disabled? : Bool, value? : String, src? : String, href? : String, alt? : String, title? : String, placeholder? : String, type_? : String, name? : String, checked? : Bool, selected? : Bool, read_only? : Bool, max_length? : Int, min_length? : Int, tab_index? : Int, content_editable? : Bool, width? : String, height? : String, inner_text? : String, innerHTML? : String, draggable? : Bool, data? : Map[String, String]) -> Map[String, String]fn[T, G] span(class_name? : String, class_list? : Array[String], inner_text? : String, innerHTML? : String, attrs? : Map[String, String], event? : Map[RespoEventType, (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError], style? : RespoStyle, children : Array[RespoNode[T, G]], on_click? : (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError) -> RespoNode[T, G]#callsite(autofill(loc))
fn[U : Show] static_style(rules : Array[(U, RespoStyle)], loc~ : SourceLoc) -> Stringlet _style_demo : String = static_style([
("&", @css.respo_style(margin=4 |> Px, background_color=Hsl(200, 90, 96))),
])fn[T, G] text_node(class_name? : String, class_list? : Array[String], style? : RespoStyle, text : String) -> RespoNode[T, G]fn[T, G] textarea(class_name? : String, class_list? : Array[String], value~ : String, autocomplete? : TextareaElementAutoComplete, autofocus? : Bool, disabled? : Bool, name? : String, placeholder? : String, readonly_? : Bool, spellcheck? : Bool, attrs? : Map[String, String], event? : Map[RespoEventType, (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError], style? : RespoStyle, on_input? : (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError, on_change? : (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError, on_keydown? : (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError, on_keyup? : (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError, on_keypress? : (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError, on_focus? : (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError, on_blur? : (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError) -> RespoNode[T, G]fn[T, G] video(class_name? : String, class_list? : Array[String], height? : Int, width? : Int, src~ : String, controls? : Bool, preload? : VideoElementPreload, attrs? : Map[String, String], event? : Map[RespoEventType, (RespoEvent, DispatchFn[T]) -> Unit raise RespoCommonError], style? : RespoStyle) -> RespoNode[T, G]Install
Download zipA tiny virtual DOM library
Dependencies