@ai-matrx/canvas 0.6.0 → 0.6.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/dist/styles.css CHANGED
@@ -258,12 +258,14 @@
258
258
  gap: 0.125rem;
259
259
  }
260
260
 
261
+ /* Nothing leading: no box and no gap of its own — the tabs keep that room; the actions still sit at the end. */
261
262
  .mxc-pane-leading:empty {
262
- min-width: 0.25rem;
263
+ display: none;
263
264
  }
264
265
 
265
266
  .mxc-pane-actions {
266
267
  flex: none;
268
+ margin-left: auto;
267
269
  display: flex;
268
270
  align-items: center;
269
271
  gap: 0.125rem;
@@ -404,13 +406,14 @@
404
406
  /* ── tabs ───────────────────────────────────────────────────────────────── */
405
407
 
406
408
  /*
407
- * THE STRIP takes what the header has: it is as wide as its tabs need (the
408
- * leading slot after it has no basis), so "+" sits right after the last tab
409
- * and only shrinks when the header runs out of room. Past the tabs' minimum
410
- * the strip scrolls, and says so: the clipped edge fades and chevrons appear.
409
+ * THE STRIP takes the header's free width (flex 1): its tabs are laid out in
410
+ * real room, never in the strip's own intrinsic size — browsers undercount a
411
+ * row of text tabs by a few px each, which cut every name ("Quic", "Messa").
412
+ * Past the tabs' minimum the strip scrolls, and says so: the clipped edge
413
+ * fades and chevrons appear.
411
414
  */
412
415
  .mxc-tabstrip {
413
- flex: 0 1 auto;
416
+ flex: 1 1 auto;
414
417
  min-width: 0;
415
418
  display: flex;
416
419
  align-items: center;
@@ -420,7 +423,7 @@
420
423
  .mxc-tabs {
421
424
  /* The tabs' offset parent, so "keep the active tab in view" measures in strip coordinates. */
422
425
  position: relative;
423
- flex: 0 1 auto;
426
+ flex: 1 1 auto;
424
427
  min-width: 0;
425
428
  display: flex;
426
429
  align-items: center;
@@ -458,8 +461,9 @@
458
461
  * padding. A tab is as wide as its name (up to 12rem); tabs shrink evenly
459
462
  * only when the header is out of room, to a 4.5rem floor (a tab is never
460
463
  * squeezed to three letters), then the strip scrolls. The active tab keeps
461
- * icon + ~10 letters. Every tab reserves the room of its close, so a name is
462
- * never under the button; the close shows on hover, the active tab and focus.
464
+ * icon + ~10 letters and reserves the room of its (always shown) close, so
465
+ * its name is never under the button. A background tab's close costs no
466
+ * width: on hover it is overlaid and the name's end fades under it.
463
467
  */
464
468
  .mxc-tab {
465
469
  position: relative;
@@ -468,9 +472,9 @@
468
472
  max-width: 12rem;
469
473
  display: flex;
470
474
  align-items: center;
471
- gap: 0.3125rem;
475
+ gap: 0.25rem;
472
476
  height: 1.625rem;
473
- padding: 0 1.375rem 0 0.375rem;
477
+ padding: 0 0.375rem;
474
478
  border-radius: 0.375rem;
475
479
  font-size: 0.78125rem;
476
480
  line-height: 1rem;
@@ -481,9 +485,9 @@
481
485
  box-sizing: border-box;
482
486
  }
483
487
 
484
- /* A tab without a close (BrowserTabs with no onClose) keeps even padding. */
485
- .mxc-tab:not(:has(> .mxc-tab-close)) {
486
- padding-right: 0.375rem;
488
+ /* The active tab always shows its close: its room is reserved. */
489
+ .mxc-tab[data-active]:has(> .mxc-tab-close) {
490
+ padding-right: 1.25rem;
487
491
  }
488
492
 
489
493
  .mxc-tab[data-active] {
@@ -531,10 +535,24 @@
531
535
  flex: 0 1 auto;
532
536
  min-width: 0;
533
537
  overflow: hidden;
534
- text-overflow: ellipsis;
538
+ /* Never an ellipsis: system fonts overflow their intrinsic width by a fraction of a pixel. */
539
+ text-overflow: clip;
535
540
  white-space: nowrap;
536
541
  }
537
542
 
543
+ /* A name that is really cut (data-truncated, measured) fades at its end. */
544
+ .mxc-tab[data-truncated] .mxc-tab-title {
545
+ -webkit-mask-image: linear-gradient(to left, transparent 0, #000 0.75rem);
546
+ mask-image: linear-gradient(to left, transparent 0, #000 0.75rem);
547
+ }
548
+
549
+ /* A background tab's close is overlaid while shown: the name's end fades under it. */
550
+ .mxc-tab:not([data-active]):hover:has(> .mxc-tab-close) .mxc-tab-title,
551
+ .mxc-tab:not([data-active]):focus-within:has(> .mxc-tab-close) .mxc-tab-title {
552
+ -webkit-mask-image: linear-gradient(to left, transparent 1.125rem, #000 1.875rem);
553
+ mask-image: linear-gradient(to left, transparent 1.125rem, #000 1.875rem);
554
+ }
555
+
538
556
  .mxc-tab-note {
539
557
  flex: none;
540
558
  font-size: 0.6875rem;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-matrx/canvas",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "The AI Matrx canvas: a docked right-hand column with split panes, tabs, full screen, a kind registry, Redux-compatible state and persistence.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",