feat(ui): ludic.ui grows toward HTML, CSS and React (Phase 0.U1-U4)
- Natives: ui_native(tag, measure, draw) makes an element the program draws itself; ui_fire runs its on-<event> with event.value. input, select and textarea have simple defaults. - React: - keyed <each>, <let>, <provide> context through components, <fragment>; - named slots, default props on <component>; - on-mount / on-unmount; - inline text inside text elements. - CSS: - custom properties and var(); - position relative/absolute/fixed with insets and z-index; - em/rem/vw/vh and @media; - wrapping text and ellipsis, overflow; - + and ~ combinators, :nth-child(an+b), :checked, :active. - Developing: errors with file:line, ui_errors(), ui_reload() keeping state, and an inspector-style ui_dump. - view fields infer the type of a literal or a named function's result. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
66a2bc2214
commit
637d07400e
39 changed files with 42012 additions and 40795 deletions
|
|
@ -11,7 +11,7 @@ export property UiSel {
|
|||
pargs: []string = null
|
||||
nots: []UiSel = null
|
||||
prev: UiSel = null
|
||||
comb: int = 0 # 0: prev is an ancestor, 1: prev is the parent
|
||||
comb: int = 0 # prev is: 0 an ancestor, 1 the parent, 2 the sibling before, 3 any sibling before
|
||||
}
|
||||
function sel_new() -> UiSel {
|
||||
let s = new UiSel
|
||||
|
|
@ -36,6 +36,14 @@ function sel_parse(src: string, err: []string) -> UiSel {
|
|||
comb = 1
|
||||
continue
|
||||
}
|
||||
if rd_op(r, "+") {
|
||||
comb = 2
|
||||
continue
|
||||
}
|
||||
if rd_op(r, "~") {
|
||||
comb = 3
|
||||
continue
|
||||
}
|
||||
let c = sel_compound(r)
|
||||
c.prev = cur
|
||||
c.comb = comb
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue