wip(0.S2): migrate - a var nothing writes becomes a let; a state is keyed by its module, directory or program, so every program's plan agrees; paths normalized; program states named SceneDemoState / scene_demo_st; the LSP reads state, mut and entry/handler parameters

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-25 15:31:34 +03:00
parent 3eda72e8c2
commit 5ffe50ed02
463 changed files with 72045 additions and 67421 deletions

View file

@ -5,12 +5,12 @@ program UiCalc {
numbers float
const STYLE: string = "<style>.a { width: min(300px, 50vw) }\n.b { width: max(10px, calc(5em + 2px)) }\n.c { width: clamp(50px, 10vw, 100px) }\n.d { height: calc(clamp(1px, 2em, 20px) + 1px) }\n.box { width: 300px; height: 200px; position: relative }\n.p { position: absolute; left: 50%; top: calc(25% + 10px); width: 20px; height: 20px }\n.q { position: absolute; right: calc(10% - 5px); bottom: 50%; width: 20px; height: 20px }\n.r { position: relative; left: 10%; width: 20px; height: 20px }</style>"
const BODY: string = "<screen name='c'><div class='a'/><div class='b'/><div class='c'/><div class='d'/><div class='box'><div class='p'/><div class='q'/><div class='r'/></div></screen>"
entry (ui_st: mut UiState) {
ui_backend(ui_st, new UiBackend)
ui_load_text(ui_st, "<ui>" + STYLE + BODY + "</ui>", "c.xml")
ui_show(ui_st, "c", null, 0.0, 0.0, 400.0, 600.0)
let r: UiNode = ui_nodes(ui_st, "c", null)
ui_place(ui_st, r, 0.0, 0.0, 400.0, 600.0)
entry {
ui_backend(new UiBackend)
ui_load_text("<ui>" + STYLE + BODY + "</ui>", "c.xml")
ui_show("c", null, 0.0, 0.0, 400.0, 600.0)
let r: UiNode = ui_nodes("c", null)
ui_place(r, 0.0, 0.0, 400.0, 600.0)
let box = r.children[4]
let p = box.children[0]
let q = box.children[1]