wcl_wdoc 0.11.2-alpha

WCL documentation format — build structured docs with WCL, render to HTML
    export let widget_phone_landscape = (b) => {
        let w = attr_or(b, "width", 340)
        let h = attr_or(b, "height", 190)
        let title = attr_or(b, "title", "App")
        let status = attr_or(b, "status_text", "9:41")
        let header_fill = attr_or(b, "header_fill", "var(--color-link)")
        let surface_fill = attr_or(b, "surface_fill", "var(--color-bg)")
        let border_stroke = attr_or(b, "border_stroke", "var(--color-nav-border)")
        let border_width = attr_or(b, "border_width", 3)
        let radius = attr_or(b, "radius", 20)
        let header_label_fill = attr_or(b, "header_label_fill", "#fff")
        let status_fill = attr_or(b, "status_fill", "currentColor")
        let indicator_fill = attr_or(b, "indicator_fill", "var(--color-nav-border)")
        [
            { kind = "rect", x = 0, y = 0, width = w, height = h, rx = radius,
              fill = surface_fill, stroke = border_stroke, stroke_width = border_width },
            { kind = "circle", x = 7, y = (h - 6) / 2, r = 3, fill = indicator_fill },
            { kind = "text", x = 20, y = 6, width = 60, height = 18,
              content = status, font_size = 10, anchor = "start", fill = status_fill },
            { kind = "rect", x = 14, y = 30, width = w - 42, height = 38, fill = header_fill },
            { kind = "text", x = 14, y = 30, width = w - 42, height = 38,
              content = title, font_size = 15, fill = header_label_fill },
            { kind = "rect", x = w - 16, y = (h - 72) / 2, width = 4, height = 72,
              rx = 2, fill = indicator_fill }
        ]
    }