@ai-matrx/canvas 0.7.2 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/README.md +3 -3
- package/dist/index.cjs +5 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +145 -50
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +34 -15
- package/dist/react.d.ts +34 -15
- package/dist/react.js +145 -50
- package/dist/react.js.map +1 -1
- package/dist/styles.css +94 -40
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.8.0
|
|
4
|
+
|
|
5
|
+
Owner feedback (Arman, 2026-10-03), a split canvas: tabs read "The Shap" | "Agent con" | an icon sliver | "+" — "when there is a split, the tabs should not get split like this."
|
|
6
|
+
|
|
7
|
+
- **A split keeps ONE window-wide tab strip** (Chrome split view). `CanvasColumn` draws `CanvasWindowTabs` above the panes whenever the layout is a split (side by side, stacked or down): every pane's tabs in one row, the panes' visible tabs drawn as ONE joined tab (the focused pane's half strongest), one "+" that opens in the focused pane. Pane headers keep Back/Forward, a draggable title, kind controls, menu, expand and close — no strip of their own. Phones are unchanged (one presented pane whose strip carries every tab).
|
|
8
|
+
- **Tabs shrink evenly to a readable floor, then scroll.** Every tab: `flex: 0 1 12rem`, floor `CANVAS_TAB_MIN_WIDTH` 120px (icon + ~10 letters + "…"); a cut name always ends in an ellipsis (never clipped). Past the floor the tab list scrolls sideways — wheel and trackpad, the current tab kept in view, no drawn scrollbar — and "All tabs (N)" stays.
|
|
9
|
+
- **Removed:** the icon-sliver compact mode (`data-compact`), the windowed `fitCanvasTabs`, `CANVAS_ACTIVE_TAB_MIN_WIDTH`, and the hidden-count badge on "All tabs". **Added:** `CanvasWindowTabs`, `canvasTabsOverflow`, `planCanvasTabStrip`, types `CanvasStripTab` / `CanvasStripEntry`.
|
|
10
|
+
|
|
11
|
+
### Consumer action
|
|
12
|
+
|
|
13
|
+
- None for hosts that render `<CanvasColumn/>`. A host that imported `fitCanvasTabs` or `CANVAS_ACTIVE_TAB_MIN_WIDTH` (none known) uses `canvasTabsOverflow` / `CANVAS_TAB_MIN_WIDTH`.
|
|
14
|
+
|
|
15
|
+
## 0.7.3
|
|
16
|
+
|
|
17
|
+
Census on 0.7.2 (40 web routes, 1440px window, chat open, canvas 360/640/900): with a 900px canvas the page beside it was 56px and route headers were 29-67px wide.
|
|
18
|
+
|
|
19
|
+
- **The canvas shrinks first, to a usable page.** `CANVAS_WEB_LAYOUT_RULES.centreMinWidth` 420 -> 600: a remembered or dragged width gives way (down to `minWidth`) so the content beside the canvas keeps 600px.
|
|
20
|
+
|
|
21
|
+
### Consumer action
|
|
22
|
+
|
|
23
|
+
- A host whose canvas shares the window with a sidebar or a docked panel passes `regionWidth` (the width right of the page's left edge) to `CanvasProvider`; without it the 600px is measured against the whole window and the page beside the canvas can still be crushed.
|
|
24
|
+
|
|
3
25
|
## 0.7.2
|
|
4
26
|
|
|
5
27
|
Measured live on 0.7.1 (phone 375px; a 363px canvas after a reload):
|
package/README.md
CHANGED
|
@@ -67,9 +67,9 @@ Navigating to something already open elsewhere focuses it there (a launcher tab
|
|
|
67
67
|
|
|
68
68
|
**Forward.** After Back the header also shows Forward (`selectCanvasCanGoForward`); it returns the same live body Back left. A navigate somewhere new ends the forward trail. Shortcut data `canvas.back` / `canvas.forward` (⌘[ / ⌘]) is for a desktop host; browsers own those keys.
|
|
69
69
|
|
|
70
|
-
**The strip
|
|
70
|
+
**The strip** (Chrome's model). Tabs share the strip evenly — 12rem each with room — and shrink together to one readable floor, icon + ~10 letters + "…" (`CANVAS_TAB_MIN_WIDTH`, 120px); a cut name always ends in an ellipsis and every tab's tooltip is its full name. Past the floor the tab list scrolls sideways (wheel, trackpad; the current tab is kept in view) and "All tabs (N)" lists every tab (`canvasTabsOverflow` is the rule). A tab never shrinks to an icon sliver and nothing in the header overlaps another control.
|
|
71
71
|
|
|
72
|
-
**Splits.** A side-by-side split whose panes would be narrower than `paneMinWidth` (web: `CANVAS_PANE_MIN_WIDTH`, 280px) renders stacked; the tree is unchanged.
|
|
72
|
+
**Splits.** A split canvas keeps ONE window-wide tab strip above its panes (`CanvasWindowTabs`), never one per pane: every pane's tabs are in it, the panes' visible tabs are drawn as ONE joined tab (the focused pane's half strongest; `planCanvasTabStrip`), and its "+" opens in the focused pane. Each pane header keeps its own Back/Forward, title, kind controls and menu. A side-by-side split whose panes would be narrower than `paneMinWidth` (web: `CANVAS_PANE_MIN_WIDTH`, 280px) renders stacked under the same one strip; the tree is unchanged.
|
|
73
73
|
|
|
74
74
|
**Phones** (`CANVAS_PHONE_MAX_WIDTH`, 767px): the column presents ONE pane — the focused one when it holds a tab, else the first that does (`selectCanvasPresentedPaneId`) — whose strip carries every pane's tabs; choosing a tab from another pane presents that pane. The pane menu offers no Split. The layout tree is untouched, so a wider screen gets its split back.
|
|
75
75
|
|
|
@@ -149,7 +149,7 @@ toggleKind(controller, { kind: "terminal" }); // absent → open · behind → f
|
|
|
149
149
|
|---|---|---|
|
|
150
150
|
| `defaultWidth` | 640 | `{ fraction: 0.36 }` |
|
|
151
151
|
| `minWidth` | 360 | 360 |
|
|
152
|
-
| `centreMinWidth` (the canvas shrinks first) |
|
|
152
|
+
| `centreMinWidth` (the canvas shrinks first) | 600 | 520 |
|
|
153
153
|
| `stackSplit` (split down: first pane's share) | 0.5 | 0.7 |
|
|
154
154
|
| `sideSplit` | 0.5 | 0.5 |
|
|
155
155
|
| `paneMinWidth` (narrower side-by-side panes stack) | 0 (never) | 360 |
|
package/dist/index.cjs
CHANGED
|
@@ -1119,7 +1119,11 @@ var CANVAS_PANE_MIN_WIDTH = 280;
|
|
|
1119
1119
|
var CANVAS_WEB_LAYOUT_RULES = {
|
|
1120
1120
|
defaultWidth: CANVAS_DEFAULT_WIDTH,
|
|
1121
1121
|
minWidth: CANVAS_MIN_WIDTH,
|
|
1122
|
-
|
|
1122
|
+
// The page beside the canvas keeps room for its route header (title, mode switch,
|
|
1123
|
+
// the shell's own controls): a 2026-10-03 census of 40 routes found headers 29-67px
|
|
1124
|
+
// wide at 420 with a 900px canvas. Hosts pass `regionWidth` so this is the PAGE's
|
|
1125
|
+
// width, not the window's.
|
|
1126
|
+
centreMinWidth: 600,
|
|
1123
1127
|
// Split down 70/30 like the desktop: what opens below (notifications, a feed) is the smaller pane.
|
|
1124
1128
|
stackSplit: 0.7,
|
|
1125
1129
|
sideSplit: 0.5,
|