deleting interpreter now that we have compiler
This commit is contained in:
parent
60c8f74d50
commit
6f7f06b748
12 changed files with 19 additions and 1677 deletions
16
src/ui.ts
16
src/ui.ts
|
|
@ -1,11 +1,23 @@
|
|||
import type { UIValue, Value } from './types';
|
||||
// import type { UIValue, Value } from './types';
|
||||
export type UIValue =
|
||||
| { kind: 'rect', w: number, h: number, color?: string, strokeColor?: string, strokeWidth?: number, radius?: number }
|
||||
| { kind: 'text', content: string, color?: string }
|
||||
| { kind: 'row', children: UIValue[], gap: number }
|
||||
| { kind: 'column', children: UIValue[], gap: number }
|
||||
| { kind: 'clickable', child: UIValue, event: any }
|
||||
| { kind: 'padding', child: UIValue, amount: number }
|
||||
| { kind: 'positioned', x: number, y: number, child: UIValue }
|
||||
| { kind: 'opacity', child: UIValue, opacity: number }
|
||||
| { kind: 'clip', child: UIValue, w: number, h: number }
|
||||
| { kind: 'stack', children: UIValue[] }
|
||||
| { kind: 'stateful', key: string, focusable: boolean, init: any, update: any, view: any }
|
||||
|
||||
type ClickRegion = {
|
||||
x: number;
|
||||
y: number;
|
||||
width: number;
|
||||
height: number;
|
||||
event: Value;
|
||||
event: any;
|
||||
};
|
||||
|
||||
let clickRegions: ClickRegion[] = [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue