@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/CHANGELOG.md +12 -0
- package/dist/react.cjs +29 -12
- package/dist/react.cjs.map +1 -1
- package/dist/react.js +33 -15
- package/dist/react.js.map +1 -1
- package/dist/styles.css +33 -15
- package/package.json +1 -1
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
|
-
|
|
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
|
|
408
|
-
*
|
|
409
|
-
*
|
|
410
|
-
* the strip scrolls, and says so: the clipped edge
|
|
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:
|
|
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:
|
|
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
|
|
462
|
-
* never under the button
|
|
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.
|
|
475
|
+
gap: 0.25rem;
|
|
472
476
|
height: 1.625rem;
|
|
473
|
-
padding: 0
|
|
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
|
-
/*
|
|
485
|
-
.mxc-tab:
|
|
486
|
-
padding-right:
|
|
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
|
-
|
|
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.
|
|
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",
|