Skip to content

Commit 70d73af

Browse files
committed
Merge origin/main
2 parents 7fb1065 + 98437a0 commit 70d73af

66 files changed

Lines changed: 3573 additions & 577 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/guide/layout.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ ui.row({ gap: 1 }, [
167167

168168
Rezi clips rendering to each widget’s allocated rect. Overflow is handled per-widget:
169169

170-
- `ui.text` supports `textOverflow: "clip" | "ellipsis"` (and `maxWidth`)
170+
- `ui.text` supports `textOverflow: "clip" | "ellipsis" | "middle"` (and `maxWidth`)
171171
- Containers clip their children to the padded/bordered content area
172172

173173
Example: ellipsis truncation

docs/recipes/data-table.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ await app.start();
8989
## Explanation
9090

9191
- Filter state is kept in `state.filter` and applied before passing data to the table.
92-
- Sorting is handled by the table (it emits `onSort(column, direction)` and you store that in state).
92+
- Sorting is handled by the table (click a sortable header, or focus the header and press Enter; it emits `onSort(column, direction)` and you store that in state).
9393
- Selection is stored as row keys and updated via `onSelectionChange`.
9494

9595
## Related

docs/widgets/dropdown.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ ui.dropdown({
2323
## Behavior
2424

2525
- **Arrow keys** navigate items. **Enter** selects the highlighted item.
26+
- The current selection is visually highlighted.
2627
- **Mouse click** on an item selects it and fires the `onSelect` callback.
27-
- **Clicking outside** the dropdown closes it (via the layer backdrop).
28+
- **Clicking outside** the dropdown closes it (calls `onClose`).
2829

2930
## Notes
3031

3132
- Use `anchorId` to position the dropdown relative to an element in the layout tree.
3233
- Render dropdowns inside `ui.layers(...)` so they stack above base UI.
33-

docs/widgets/file-tree-explorer.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ ui.fileTreeExplorer({
3636
| `onContextMenu` | `(node) => void` | - | Context menu callback |
3737
| `renderNode` | `(node, depth, state) => VNode` | - | Custom renderer |
3838

39+
## Behavior
40+
41+
- **Arrow keys** navigate. **Enter** activates the focused node.
42+
- **Right click** on a node calls `onContextMenu(node)` when provided.
43+
3944
## Notes
4045

4146
- `FileNode` includes `name`, `path`, `type`, and optional `children` and `status`.

docs/widgets/layer.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ui.layer({
1818
| Prop | Type | Default | Description |
1919
|------|------|---------|-------------|
2020
| `id` | `string` | **required** | Layer identifier |
21-
| `zIndex` | `number` | insertion order | Higher values render on top |
21+
| `zIndex` | `number` | insertion order | Higher values render on top (clamped for deterministic ordering) |
2222
| `backdrop` | `"none" \| "dim" \| "opaque"` | `"none"` | Backdrop behind the layer |
2323
| `modal` | `boolean` | `false` | Block input to lower layers |
2424
| `closeOnEscape` | `boolean` | `true` | Close on Escape key |
@@ -33,7 +33,9 @@ ui.layer({
3333
## Notes
3434

3535
- Use [`Layers`](layers.md) to manage stacking order and modals.
36+
- `zIndex` is truncated to an integer and clamped to the safe range (`±9,007,199,253`) so very large values don't break ordering.
3637
- `BackdropStyle` values: `"none"`, `"dim"`, `"opaque"`.
38+
- Backdrops are rendered behind the layer. `"dim"` uses a light shade pattern; `"opaque"` clears the area behind the layer to the theme background color.
3739

3840
## Related
3941

docs/widgets/layers.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ ui.layers([
1717
- Child order defines z-order: later children render on top.
1818
- Use [`Layer`](layer.md) for explicit z-index or custom backdrops.
1919
- Layers enable deterministic hit testing and focus management across overlaps.
20+
- Backdrops (from [`Modal`](modal.md) and [`Layer`](layer.md)) render behind the active overlay(s) and stack in draw order.
2021

2122
## Related
2223

docs/widgets/modal.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ ui.layers([
2929
| `title` | `string` | - | Optional modal header title |
3030
| `content` | `VNode` | **required** | Main modal body |
3131
| `actions` | `VNode[]` | `[]` | Action row (typically buttons) |
32-
| `width` | `number \| "auto"` | `"auto"` | Preferred modal width |
32+
| `width` | `number \| "auto"` | `~70%` | Preferred modal width |
3333
| `maxWidth` | `number` | - | Maximum width constraint |
3434
| `backdrop` | `"none" \| "dim" \| "opaque"` | `"dim"` | Backdrop style |
3535
| `closeOnBackdrop` | `boolean` | `true` | Close when clicking backdrop |
@@ -67,6 +67,8 @@ ui.modal({
6767

6868
- Modals are rendered by conditionally including them in the tree (there is no `open` prop).
6969
- Render modals inside `ui.layers(...)` so they stack above base content.
70+
- Backdrops are rendered behind the modal. `"dim"` uses a light shade pattern; `"opaque"` clears the area behind the modal to the theme background color.
71+
- `width: "auto"` sizes to content/actions and is clamped by `maxWidth` and the viewport.
7072

7173
## Related
7274

docs/widgets/panel-group.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ ui.panelGroup(
99
{
1010
id: "panel-group",
1111
direction: "horizontal",
12-
autoSaveId: "main-layout",
1312
},
1413
[
1514
ui.resizablePanel({ defaultSize: 25 }, [Sidebar()]),
@@ -24,12 +23,11 @@ ui.panelGroup(
2423
|------|------|---------|-------------|
2524
| `id` | `string` | **required** | Group identifier |
2625
| `direction` | `"horizontal" \| "vertical"` | **required** | Layout direction |
27-
| `autoSaveId` | `string` | - | App-level key for persisting layout (core does not persist) |
2826

2927
## Notes
3028

31-
- `PanelGroup` distributes space evenly when sizes are not provided.
32-
- `ResizablePanel` size hints are preserved but not applied by core layout.
29+
- `PanelGroup` distributes space based on `ResizablePanel` size hints (with equal distribution when unspecified).
30+
- `ResizablePanel` size hints are interpreted as percentages of the group's width/height (based on `direction`).
3331
- Use [`SplitPane`](split-pane.md) for draggable resizing.
3432

3533
## Related

docs/widgets/resizable-panel.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ ui.panelGroup(
1818

1919
| Prop | Type | Default | Description |
2020
|------|------|---------|-------------|
21-
| `defaultSize` | `number` | auto | Initial size (percent or cells, based on parent) |
22-
| `minSize` | `number` | - | Minimum size |
23-
| `maxSize` | `number` | - | Maximum size |
21+
| `defaultSize` | `number` | auto | Initial size (percentage of the parent axis) |
22+
| `minSize` | `number` | - | Minimum size (percentage) |
23+
| `maxSize` | `number` | - | Maximum size (percentage) |
2424
| `collapsible` | `boolean` | `false` | Allow collapsing the panel |
2525

2626
## Notes
2727

2828
- `ResizablePanel` should contain exactly one child widget.
29-
- `PanelGroup` distributes space evenly; size hints on `ResizablePanel` are preserved as metadata but not applied by core layout.
29+
- `PanelGroup` uses `defaultSize`/`minSize`/`maxSize` as sizing hints along its primary axis.
3030
- For draggable sizing, use [`SplitPane`](split-pane.md).

docs/widgets/split-pane.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,16 @@ Dividers between panels can be dragged with the mouse to resize:
4444

4545
The hit area for dividers extends 1 cell on each side of the divider for easier grabbing.
4646

47+
### Collapse
48+
49+
When `collapsible: true`:
50+
51+
- A panel index in `collapsed` is laid out at its minimum size (`minSizes[index]` or `0`).
52+
- **Double-click** near a divider to toggle collapse:
53+
- Click just to the **left/top** of a divider to target the panel on that side
54+
- Click just to the **right/bottom** of a divider to target the other panel
55+
- Use `onCollapse(index, collapsed)` to update your `collapsed` list (controlled state).
56+
4757
## Notes
4858

4959
- `sizes` length should match the number of child panels.

0 commit comments

Comments
 (0)