diff --git a/docs/content/docs/openui-lang/benchmarks.mdx b/docs/content/docs/openui-lang/benchmarks.mdx index e5f6cdc34..b879e0660 100644 --- a/docs/content/docs/openui-lang/benchmarks.mdx +++ b/docs/content/docs/openui-lang/benchmarks.mdx @@ -18,14 +18,16 @@ OpenUI Lang is designed to be token-efficient and streaming-first. This page pre All four formats encode exactly the same UI. Here is the same simple table in each: -**OpenUI Lang** (148 tokens) +**OpenUI Lang** (154 tokens) ```text root = Stack([title, tbl]) title = TextContent("Employees (Sample)", "large-heavy") -tbl = Table(cols, rows) -cols = [Col("Name", "string"), Col("Department", "string"), Col("Salary", "number"), Col("YoY change (%)", "number")] -rows = [["Ava Patel", "Engineering", 132000, 6.5], ["Marcus Lee", "Sales", 98000, 4.2], ["Sofia Ramirez", "Marketing", 105000, 3.1], ["Ethan Brooks", "Finance", 118500, 5.0], ["Nina Chen", "HR", 89000, 2.4]] +tbl = Table([Col("Name", names), Col("Department", departments), Col("Salary", salaries, "number"), Col("YoY change (%)", changes, "number")]) +names = ["Ava Patel", "Marcus Lee", "Sofia Ramirez", "Ethan Brooks", "Nina Chen"] +departments = ["Engineering", "Sales", "Marketing", "Finance", "HR"] +salaries = [132000, 98000, 105000, 118500, 89000] +changes = [6.5, 4.2, 3.1, 5.0, 2.4] ``` **YAML** (316 tokens) diff --git a/docs/content/docs/openui-lang/syntax.mdx b/docs/content/docs/openui-lang/syntax.mdx index b7ce890b2..0c860164c 100644 --- a/docs/content/docs/openui-lang/syntax.mdx +++ b/docs/content/docs/openui-lang/syntax.mdx @@ -58,7 +58,8 @@ cancelBtn = Button("Cancel", "action:cancel", "secondary") | `Buttons` | `Buttons(buttons, direction?)` | | `Tabs` | `Tabs(items)` | | `TabItem` | `TabItem(value, trigger, content)` | -| `Table` | `Table(columns, rows)` | +| `Table` | `Table(columns)` | +| `Col` | `Col(label, data, type?)` | | `BarChart` | `BarChart(labels, series, variant?, xLabel?, yLabel?)` | For full generated signatures, inspect: