Sign in

    mizchi/luna/dom/static does not have a README file

    RenderResult

    pub struct RenderResult {
    html : String
    preload_urls : Array[String]
    }

    Render result with HTML and preload URLs

    ServerAssets

    pub struct ServerAssets {
    styles : Array[String]
    scripts : Array[String]
    }

    CSS and JavaScript assets declared by server components.

    ServerAssets::empty

    fn ServerAssets::empty() -> ServerAssets

    Create an empty ServerAssets value.

    ServerAssets::merge

    fn ServerAssets::merge(self : ServerAssets, other : ServerAssets) -> ServerAssets

    Merge assets preserving first-seen order.

    ServerAssets::new

    fn ServerAssets::new(styles? : Array[String], scripts? : Array[String]) -> ServerAssets

    Create ServerAssets from style and script paths.

    ServerNode

    pub enum ServerNode {
    Sync(
    Node
    [Unit, String])
    Async(async () ->
    Node
    [Unit, String])
    Group(Array[ServerNode])
    WithAssets(styles~ : Array[String], scripts~ : Array[String], child~ : ServerNode)
    }

    Server component result type Supports both synchronous and asynchronous server components:
    • Sync: returns Node[Unit] directly
    • Async: returns async function that resolves to Node[Unit]

    ServerNode::async_

    fn ServerNode::async_(render : async () ->
    Node
    [Unit, String]) -> ServerNode

    Create an asynchronous ServerNode from an async function

    ServerNode::declared_assets

    fn ServerNode::declared_assets(self : ServerNode) -> ServerAssets

    Collect assets declared by this ServerNode without resolving async content.

    ServerNode::group

    fn ServerNode::group(children : Array[ServerNode]) -> ServerNode

    Create a ServerNode group from multiple server components.

    ServerNode::is_async

    fn ServerNode::is_async(self : ServerNode) -> Bool

    Check if ServerNode is async

    ServerNode::resolve

    async fn ServerNode::resolve(self : ServerNode) ->
    Node
    [Unit, String]

    Resolve ServerNode to Node (awaits if async)

    ServerNode::sync

    fn ServerNode::sync(node :
    Node
    [Unit, String]) -> ServerNode

    Create a synchronous ServerNode from a Node

    ServerNode::with_assets

    fn ServerNode::with_assets(self : ServerNode, styles? : Array[String], scripts? : Array[String]) -> ServerNode

    Attach CSS and JavaScript assets to a ServerNode.

    ServerNode::with_script

    fn ServerNode::with_script(self : ServerNode, script : String) -> ServerNode

    Attach a client script asset to a ServerNode.

    ServerNode::with_style

    fn ServerNode::with_style(self : ServerNode, style : String) -> ServerNode

    Attach a stylesheet asset to a ServerNode.

    TrustedScript

    pub(all) struct TrustedScript {
    content : String
    }

    Explicit wrapper for trusted inline script content.

    TrustedScript::to_string

    fn TrustedScript::to_string(self : TrustedScript) -> String

    TrustedStyle

    pub(all) struct TrustedStyle {
    content : String
    }

    Explicit wrapper for trusted inline style content.

    TrustedStyle::to_string

    fn TrustedStyle::to_string(self : TrustedStyle) -> String

    fn a(href? : String, target? : String, id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create an anchor element

    article

    fn article(id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create an article element

    aside

    fn aside(id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create an aside element

    attr

    fn attr(value : String) ->
    Attr
    [Unit, String]

    Create static attribute

    body

    fn body(id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create a body element
    fn br(id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])]) ->
    Node
    [Unit, String]

    Create br element

    button

    fn button(disabled? : Bool, id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create a button element

    client

    fn[T : ToJson] client(cref :
    ComponentRef
    [T], children : Array[
    Node
    [Unit, String]], styles? : String) ->
    Node
    [Unit, String]

    Embed a client component with type-safe props

    This is the recommended way to create interactive components in server-rendered HTML. The ComponentRef contains all necessary information (url, props, trigger, wc flag).

    Example:
    // In app/__gen__/types/types.mbt (generated)
    pub fn counter(props: CounterProps) -> @core.ComponentRef[CounterProps] {
    @luna.component_ref("/static/counter.js", props)
    }

    // In server component
    client(
    @types.counter({ initial_count: 42 }),
    [text("Loading...")],
    )

    code

    fn code(id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create code element

    div

    fn div(id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create a div element

    document

    fn document(lang? : String, head_children~ : Array[
    Node
    [Unit, String]], body_children~ : Array[
    Node
    [Unit, String]], body_class? : String, body_id? : String) ->
    Node
    [Unit, String]

    Create a basic HTML document structure

    Example:
    document(
    lang="en",
    head_[
    title("My App"),
    meta(charset="UTF-8"),
    ],
    body_[
    h1([text("Hello!")]),
    ],
    )
    fn em(id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create em element
    fn footer_(id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create a footer element

    form

    fn form(action? : String, http_method? : String, id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create a form element

    fragment

    fn fragment(children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create a fragment (multiple nodes without wrapper)

    generate_preload_tags

    fn generate_preload_tags(urls : Array[String]) -> String

    Generate modulepreload link tags for island scripts

    generate_utility_css

    fn generate_utility_css() -> String

    Generate CSS output (for SSR)
    fn h1(id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create h1 element
    fn h2(id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create h2 element
    fn h3(id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create h3 element
    fn h4(id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create h4 element
    fn h5(id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create h5 element
    fn h6(id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create h6 element
    fn head(id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create a head element

    header_

    fn header_(id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create a header element
    fn hr(id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])]) ->
    Node
    [Unit, String]

    Create hr element

    html

    fn html(lang? : String, id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create an html element

    img

    fn img(src? : String, alt? : String, width? : String, height? : String, id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])]) ->
    Node
    [Unit, String]

    Create img element

    input

    fn input(type_? : String, name? : String, value? : String, placeholder? : String, disabled? : Bool, readonly_? : Bool, required? : Bool, checked? : Bool, id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])]) ->
    Node
    [Unit, String]

    Create an input element

    label

    fn label(for_? : String, id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create a label element
    fn li(id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create li element
    fn link(rel? : String, href? : String, type_? : String, id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])]) ->
    Node
    [Unit, String]

    Create a link element

    main_

    fn main_(id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create a main element

    meta

    fn meta(charset? : String, name? : String, content? : String, http_equiv? : String, id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])]) ->
    Node
    [Unit, String]

    Create a meta element
    fn nav(id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create a nav element
    fn ol(id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create ol element

    outlet

    fn outlet(name~ : String, children : Array[
    Node
    [Unit, String]], id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])]) ->
    Node
    [Unit, String]

    sol-nav.js to replace content during navigation.
    fn p(id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create a p element

    pre

    fn pre(id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create pre element

    render

    fn render(node :
    Node
    [Unit, String]) -> String

    Render a node tree to HTML string

    render_document

    fn render_document(node :
    Node
    [Unit, String]) -> String

    Render a complete HTML document with DOCTYPE

    render_document_with_preloads

    fn render_document_with_preloads(node :
    Node
    [Unit, String]) -> RenderResult

    Render a complete HTML document with DOCTYPE and preloads

    render_with_preloads

    fn render_with_preloads(node :
    Node
    [Unit, String]) -> RenderResult

    Render a node tree to HTML with preload URLs for islands

    script

    fn script(src? : String, type_? : String, defer_? : Bool, async_? : Bool, content? : String, id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])]) ->
    Node
    [Unit, String]

    Create a script element

    script_trusted

    fn script_trusted(content : TrustedScript, type_? : String, id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])]) ->
    Node
    [Unit, String]

    section

    fn section(id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create a section element
    fn sol_link(href~ : String, children : Array[
    Node
    [Unit, String]], id? : String, class? : String, style? : String, prefetch? : Bool, replace? : Bool, attrs? : Array[(String,
    Attr
    [Unit, String])]) ->
    Node
    [Unit, String]

    by sol-nav.js for client-side navigation.

    span

    fn span(id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create a span element

    strong

    fn strong(id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create strong element

    style_

    fn style_(content : String, type_? : String, id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])]) ->
    Node
    [Unit, String]

    Create a style element

    style_trusted

    fn style_trusted(content : TrustedStyle, type_? : String, id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])]) ->
    Node
    [Unit, String]

    svg

    fn svg(width? : String, height? : String, viewBox? : String, xmlns? : String, fill? : String, stroke? : String, role? : String, aria_label? : String, aria_labelledby? : String, aria_describedby? : String, id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create an SVG element

    svg_animate

    fn svg_animate(attributeName? : String, from? : String, to? : String, dur? : String, repeatCount? : String, fill_anim? : String, id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])]) ->
    Node
    [Unit, String]

    Create an SVG animate element

    svg_animate_transform

    fn svg_animate_transform(attributeName? : String, type_? : String, from? : String, to? : String, dur? : String, repeatCount? : String, id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])]) ->
    Node
    [Unit, String]

    Create an SVG animateTransform element

    svg_circle

    fn svg_circle(cx? : String, cy? : String, r? : String, fill? : String, stroke? : String, stroke_width? : String, id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])]) ->
    Node
    [Unit, String]

    Create an SVG circle element

    svg_clip_path

    fn svg_clip_path(id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create an SVG clipPath element

    svg_defs

    fn svg_defs(id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create an SVG defs element

    svg_desc

    fn svg_desc(id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create an SVG desc element for accessibility

    svg_ellipse

    fn svg_ellipse(cx? : String, cy? : String, rx? : String, ry? : String, fill? : String, stroke? : String, stroke_width? : String, id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])]) ->
    Node
    [Unit, String]

    Create an SVG ellipse element

    svg_filter

    fn svg_filter(x? : String, y? : String, width? : String, height? : String, filterUnits? : String, id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create an SVG filter element

    svg_foreign_object

    fn svg_foreign_object(x? : String, y? : String, width? : String, height? : String, id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create an SVG foreignObject element for embedding HTML

    svg_g

    fn svg_g(transform? : String, fill? : String, stroke? : String, opacity? : String, id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create an SVG group element

    svg_image

    fn svg_image(href? : String, x? : String, y? : String, width? : String, height? : String, preserveAspectRatio? : String, id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])]) ->
    Node
    [Unit, String]

    Create an SVG image element

    svg_line

    fn svg_line(x1? : String, y1? : String, x2? : String, y2? : String, stroke? : String, stroke_width? : String, id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])]) ->
    Node
    [Unit, String]

    Create an SVG line element

    svg_linear_gradient

    fn svg_linear_gradient(x1? : String, y1? : String, x2? : String, y2? : String, gradientUnits? : String, id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create an SVG linearGradient element

    svg_mask

    fn svg_mask(x? : String, y? : String, width? : String, height? : String, id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create an SVG mask element

    svg_path

    fn svg_path(d? : String, fill? : String, stroke? : String, stroke_width? : String, stroke_linecap? : String, stroke_linejoin? : String, fill_rule? : String, id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])]) ->
    Node
    [Unit, String]

    Create an SVG path element

    svg_pattern

    fn svg_pattern(x? : String, y? : String, width? : String, height? : String, patternUnits? : String, patternContentUnits? : String, id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create an SVG pattern element

    svg_polygon

    fn svg_polygon(points? : String, fill? : String, stroke? : String, stroke_width? : String, id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])]) ->
    Node
    [Unit, String]

    Create an SVG polygon element

    svg_polyline

    fn svg_polyline(points? : String, fill? : String, stroke? : String, stroke_width? : String, id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])]) ->
    Node
    [Unit, String]

    Create an SVG polyline element

    svg_radial_gradient

    fn svg_radial_gradient(cx? : String, cy? : String, r? : String, fx? : String, fy? : String, gradientUnits? : String, id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create an SVG radialGradient element

    svg_rect

    fn svg_rect(x? : String, y? : String, width? : String, height? : String, rx? : String, ry? : String, fill? : String, stroke? : String, stroke_width? : String, id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])]) ->
    Node
    [Unit, String]

    Create an SVG rect element

    svg_stop

    fn svg_stop(offset? : String, stop_color? : String, stop_opacity? : String, id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])]) ->
    Node
    [Unit, String]

    Create an SVG stop element for gradients

    svg_symbol

    fn svg_symbol(viewBox? : String, id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create an SVG symbol element

    svg_text

    fn svg_text(x? : String, y? : String, dx? : String, dy? : String, text_anchor? : String, dominant_baseline? : String, fill? : String, font_size? : String, font_family? : String, id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create an SVG text element

    svg_title

    fn svg_title(id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create an SVG title element for accessibility

    svg_tspan

    fn svg_tspan(x? : String, y? : String, dx? : String, dy? : String, id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create an SVG tspan element

    svg_use

    fn svg_use(href? : String, x? : String, y? : String, width? : String, height? : String, id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])]) ->
    Node
    [Unit, String]

    Create an SVG use element

    template_outlet

    fn template_outlet(name~ : String, children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create a template element for fragment response Used internally to wrap outlet content in fragment responses.

    template_title

    fn template_title(title : String) ->
    Node
    [Unit, String]

    Create a template element for page title in fragment response

    text

    fn text(content : String) ->
    Node
    [Unit, String]

    Create a text node

    title

    fn title(content : String, id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])]) ->
    Node
    [Unit, String]

    Create a title element

    uactive

    fn uactive(property : String, value : String) -> String

    Active pseudo-class

    uat_lg

    fn uat_lg(property : String, value : String) -> String

    Large breakpoint (min-width: 1024px)

    uat_md

    fn uat_md(property : String, value : String) -> String

    Medium breakpoint (min-width: 768px)

    ucombine

    fn ucombine(classes : Array[String]) -> String

    Combine multiple class names

    ucss

    fn ucss(property : String, value : String) -> String

    Single CSS property-value pair Returns the generated class name

    udark

    fn udark(property : String, value : String) -> String

    Dark mode

    ufocus

    fn ufocus(property : String, value : String) -> String

    Focus pseudo-class

    uhover

    fn uhover(property : String, value : String) -> String

    Hover pseudo-class
    fn ul(id? : String, class? : String, style? : String, attrs? : Array[(String,
    Attr
    [Unit, String])], children : Array[
    Node
    [Unit, String]]) ->
    Node
    [Unit, String]

    Create ul element

    unsafe_trusted_script

    fn unsafe_trusted_script(content : String) -> TrustedScript

    unsafe_trusted_style

    fn unsafe_trusted_style(content : String) -> TrustedStyle

    uon

    fn uon(pseudo : String, property : String, value : String) -> String

    Generic pseudo-class/element handler

    ustyles

    fn ustyles(props : Array[(String, String)]) -> String

    Multiple CSS properties at once Returns space-separated class names

    wc_island

    fn wc_island(name : String, url : String, children : Array[
    Node
    [Unit, String]], styles? : String, state? : String, trigger? :
    TriggerType
    ) ->
    Node
    [Unit, String]

    Create a Web Components island for client-side hydration

    Example:
    wc_island(
    "wc-counter",
    "/static/wc-counter.js",
    [text("Loading...")],
    styles=":host { display: block; }",
    state="{\"count\":0}",
    )