@ai-matrx/canvas 0.8.0 → 0.8.1
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 +9 -1
- package/dist/react.cjs +2 -1
- package/dist/react.cjs.map +1 -1
- package/dist/react.js +2 -1
- package/dist/react.js.map +1 -1
- package/dist/styles.css +6 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.8.1
|
|
4
|
+
|
|
5
|
+
Live check of 0.8.0 (1440px, canvas expanded, 5 tabs): a 1428px window strip drew 127px tabs — a `flex-basis` alone let the tab list size itself to the names.
|
|
6
|
+
|
|
7
|
+
- Every tab now has a definite `width: 12rem` (`flex: 0 1 auto`), a joined split tab `n × 12rem`: with room, tabs are 12rem; short of room they shrink evenly to the 120px floor, then scroll.
|
|
8
|
+
- Keeping the current tab in view brings a split's joined tab into view whole, not only its current half.
|
|
9
|
+
- Consumer action: none.
|
|
10
|
+
|
|
3
11
|
## 0.8.0
|
|
4
12
|
|
|
5
13
|
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
14
|
|
|
7
15
|
- **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:
|
|
16
|
+
- **Tabs shrink evenly to a readable floor, then scroll.** Every tab: 12rem with room, 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
17
|
- **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
18
|
|
|
11
19
|
### Consumer action
|
package/dist/react.cjs
CHANGED
|
@@ -3295,8 +3295,9 @@ function TabStrip({
|
|
|
3295
3295
|
if (!el || !activeItemId) return;
|
|
3296
3296
|
const tab = [...el.querySelectorAll("[data-mxc-tab]")].find((node) => node.dataset.mxcTab === activeItemId);
|
|
3297
3297
|
if (!tab) return;
|
|
3298
|
+
const target = tab.closest(".mxc-tab-group") ?? tab;
|
|
3298
3299
|
const box = el.getBoundingClientRect();
|
|
3299
|
-
const rect =
|
|
3300
|
+
const rect = target.getBoundingClientRect();
|
|
3300
3301
|
if (rect.left < box.left) el.scrollLeft -= box.left - rect.left;
|
|
3301
3302
|
else if (rect.right > box.right) el.scrollLeft += rect.right - box.right;
|
|
3302
3303
|
}, [activeItemId, width, tabs.length]);
|