Rewrite the launcher in MoonBit (old code moves to legacy/) (#1)
This commit was merged in pull request #1.
This commit is contained in:
1 parent
7d2bf5996f
commit
2fa7bd745b
150 files changed
+8319
-462
No files matched your search
@@ -0,0 +1,45 @@
|
||||
// Generated using `moon info`, DON'T EDIT IT
|
||||
package "experiments/launcher/vdom"
|
||||
|
||||
// Values
|
||||
pub fn cls_if(String, Bool) -> String
|
||||
|
||||
pub fn[M] el(String, key? : Int32, classes? : Array[String], attrs? : Array[(String, String)], props? : Array[(String, String)], style? : String, handlers? : Handlers[M], children? : Array[Node[M]]) -> Node[M]
|
||||
|
||||
pub fn[M] text(String) -> Node[M]
|
||||
|
||||
pub fn[M] to_html(Node[M], indent? : Int32) -> String
|
||||
|
||||
// Errors
|
||||
|
||||
// Types and methods
|
||||
pub(all) struct Element[M] {
|
||||
tag : String
|
||||
key : Int32
|
||||
classes : Array[String]
|
||||
attrs : Array[(String, String)]
|
||||
props : Array[(String, String)]
|
||||
style : String
|
||||
handlers : Handlers[M]
|
||||
children : Array[Node[M]]
|
||||
}
|
||||
|
||||
pub(all) struct Handlers[M] {
|
||||
down : M?
|
||||
tap : M?
|
||||
press : M?
|
||||
enter : M?
|
||||
escape : M?
|
||||
input : ((String) -> M)?
|
||||
}
|
||||
pub fn[M] Handlers::is_empty(Self[M]) -> Bool
|
||||
pub fn[M] Handlers::none() -> Self[M]
|
||||
|
||||
pub(all) enum Node[M] {
|
||||
Text(String)
|
||||
El(Element[M])
|
||||
}
|
||||
|
||||
// Type aliases
|
||||
|
||||
// Traits
|
||||
Reference in new issue
Block a user