@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/dist/styles.css
CHANGED
|
@@ -118,9 +118,37 @@
|
|
|
118
118
|
flex: 1 1 auto;
|
|
119
119
|
min-height: 0;
|
|
120
120
|
display: flex;
|
|
121
|
+
flex-direction: column;
|
|
121
122
|
padding: var(--mxc-gap);
|
|
122
123
|
}
|
|
123
124
|
|
|
125
|
+
/* The panes (one pane, or the split tree) under the window-wide strip when there is one. */
|
|
126
|
+
.mxc-layout-panes {
|
|
127
|
+
flex: 1 1 auto;
|
|
128
|
+
min-width: 0;
|
|
129
|
+
min-height: 0;
|
|
130
|
+
display: flex;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/*
|
|
134
|
+
* THE WINDOW STRIP (Chrome split view): a split canvas keeps ONE tab strip
|
|
135
|
+
* across the whole window, above its panes — never one strip per pane.
|
|
136
|
+
*/
|
|
137
|
+
.mxc-window-tabs {
|
|
138
|
+
flex: none;
|
|
139
|
+
display: flex;
|
|
140
|
+
align-items: center;
|
|
141
|
+
gap: 0.25rem;
|
|
142
|
+
min-width: 0;
|
|
143
|
+
height: var(--mxc-header-h, 2.25rem);
|
|
144
|
+
margin-bottom: var(--mxc-gap);
|
|
145
|
+
padding: 0 0.375rem;
|
|
146
|
+
border: 1px solid var(--mxc-border);
|
|
147
|
+
border-radius: var(--mxc-radius);
|
|
148
|
+
background: var(--mxc-header-bg);
|
|
149
|
+
box-sizing: border-box;
|
|
150
|
+
}
|
|
151
|
+
|
|
124
152
|
.mxc-column[data-placement="docked"]:not([data-fullscreen]) > .mxc-layout {
|
|
125
153
|
/* The gap on the left edge is the width handle's room. */
|
|
126
154
|
padding-left: max(var(--mxc-gap), 0px);
|
|
@@ -245,6 +273,11 @@
|
|
|
245
273
|
opacity: 1;
|
|
246
274
|
}
|
|
247
275
|
|
|
276
|
+
/* A pane's name under the window-wide strip (not a tab): keeps icon + ~7 letters + "…". */
|
|
277
|
+
.mxc-pane-title {
|
|
278
|
+
min-width: min(6.25rem, 100%);
|
|
279
|
+
}
|
|
280
|
+
|
|
248
281
|
.mxc-title-icon {
|
|
249
282
|
flex: none;
|
|
250
283
|
width: 0.875rem;
|
|
@@ -288,9 +321,6 @@
|
|
|
288
321
|
gap: 0;
|
|
289
322
|
}
|
|
290
323
|
|
|
291
|
-
.mxc-single-title {
|
|
292
|
-
min-width: 0;
|
|
293
|
-
}
|
|
294
324
|
}
|
|
295
325
|
|
|
296
326
|
.mxc-pane-body {
|
|
@@ -421,12 +451,11 @@
|
|
|
421
451
|
|
|
422
452
|
/*
|
|
423
453
|
* THE STRIP takes the header's free width (flex-basis 0: what it shows never
|
|
424
|
-
* changes how wide it is
|
|
425
|
-
*
|
|
426
|
-
*
|
|
427
|
-
*
|
|
428
|
-
*
|
|
429
|
-
* the active tab's title and that menu.
|
|
454
|
+
* changes how wide it is). Tabs share it evenly — 12rem each with room,
|
|
455
|
+
* shrinking together to a readable floor (--mxc-tab-min: icon + ~10 letters +
|
|
456
|
+
* "…") — and past the floor the tab list scrolls sideways (no scrollbar drawn;
|
|
457
|
+
* wheel, trackpad and the current tab kept in view) beside "All tabs". A tab
|
|
458
|
+
* never shrinks to a sliver and nothing overlaps a control.
|
|
430
459
|
*/
|
|
431
460
|
.mxc-tabstrip {
|
|
432
461
|
flex: 1 1 0;
|
|
@@ -441,10 +470,18 @@
|
|
|
441
470
|
position: relative;
|
|
442
471
|
flex: 0 1 auto;
|
|
443
472
|
min-width: 0;
|
|
473
|
+
height: 100%;
|
|
444
474
|
display: flex;
|
|
445
475
|
align-items: center;
|
|
446
476
|
gap: 0.125rem;
|
|
447
|
-
overflow:
|
|
477
|
+
overflow-x: auto;
|
|
478
|
+
overflow-y: hidden;
|
|
479
|
+
overscroll-behavior-x: contain;
|
|
480
|
+
scrollbar-width: none;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
.mxc-tabs::-webkit-scrollbar {
|
|
484
|
+
display: none;
|
|
448
485
|
}
|
|
449
486
|
|
|
450
487
|
/* "All tabs": a chevron and how many tabs are out of sight. */
|
|
@@ -456,12 +493,6 @@
|
|
|
456
493
|
padding: 0 0.25rem;
|
|
457
494
|
}
|
|
458
495
|
|
|
459
|
-
.mxc-tab-list-count {
|
|
460
|
-
font-size: 0.6875rem;
|
|
461
|
-
line-height: 1;
|
|
462
|
-
font-variant-numeric: tabular-nums;
|
|
463
|
-
}
|
|
464
|
-
|
|
465
496
|
.mxc-tab-list-menu {
|
|
466
497
|
max-height: min(24rem, 70vh);
|
|
467
498
|
overflow-y: auto;
|
|
@@ -484,13 +515,14 @@
|
|
|
484
515
|
|
|
485
516
|
/*
|
|
486
517
|
* TAB DENSITY (Claude Code / Codex): 12.5px text, a 14px icon, 6px side
|
|
487
|
-
* padding,
|
|
488
|
-
*
|
|
518
|
+
* padding, 12rem wide with room. Every tab shrinks evenly (the same basis and
|
|
519
|
+
* shrink) to the same readable floor; the active tab reserves the room of its
|
|
520
|
+
* (always shown) close; a background tab's close is overlaid on hover.
|
|
489
521
|
*/
|
|
490
522
|
.mxc-tab {
|
|
491
523
|
position: relative;
|
|
492
|
-
flex: 0 1
|
|
493
|
-
min-width: var(--mxc-tab-min,
|
|
524
|
+
flex: 0 1 12rem;
|
|
525
|
+
min-width: var(--mxc-tab-min, 120px);
|
|
494
526
|
max-width: 12rem;
|
|
495
527
|
display: flex;
|
|
496
528
|
align-items: center;
|
|
@@ -512,25 +544,13 @@
|
|
|
512
544
|
padding-right: 1.25rem;
|
|
513
545
|
}
|
|
514
546
|
|
|
515
|
-
/*
|
|
516
|
-
* The active tab gets priority width through its higher floor. (Never a
|
|
517
|
-
* flex-shrink below 1: once it is the last tab still shrinking, the flex
|
|
518
|
-
* algorithm hands it only that fraction of the overflow and it runs under
|
|
519
|
-
* the "All tabs" button — measured live on 0.7.0.)
|
|
520
|
-
*/
|
|
547
|
+
/* The active tab: the same width rules as every tab (no flex-shrink of its own — 0.7.0 live: it ran under "All tabs"). */
|
|
521
548
|
.mxc-tab[data-active] {
|
|
522
|
-
min-width: var(--mxc-tab-active-min, 112px);
|
|
523
549
|
background: var(--mxc-tab-active-bg);
|
|
524
550
|
color: var(--mxc-fg);
|
|
525
551
|
box-shadow: var(--mxc-tab-active-shadow);
|
|
526
552
|
}
|
|
527
553
|
|
|
528
|
-
/* The narrowest strip: the active tab is the title, as narrow as it must be (icon + "…"). */
|
|
529
|
-
.mxc-tabstrip[data-compact] .mxc-tab {
|
|
530
|
-
flex: 0 1 auto;
|
|
531
|
-
min-width: 0;
|
|
532
|
-
}
|
|
533
|
-
|
|
534
554
|
.mxc-tab:hover {
|
|
535
555
|
background: var(--mxc-hover);
|
|
536
556
|
}
|
|
@@ -565,22 +585,56 @@
|
|
|
565
585
|
border-radius: 0.125rem;
|
|
566
586
|
}
|
|
567
587
|
|
|
588
|
+
/* A name that does not fit ends in "…" — never clipped mid-letter. */
|
|
568
589
|
.mxc-tab-title {
|
|
569
590
|
flex: 0 1 auto;
|
|
570
591
|
min-width: 0;
|
|
571
592
|
overflow: hidden;
|
|
572
|
-
text-overflow:
|
|
593
|
+
text-overflow: ellipsis;
|
|
573
594
|
white-space: nowrap;
|
|
574
595
|
}
|
|
575
596
|
|
|
576
597
|
/*
|
|
577
|
-
* A
|
|
578
|
-
*
|
|
579
|
-
*
|
|
598
|
+
* A SPLIT drawn as ONE joined tab (Chrome split view): each pane's visible tab
|
|
599
|
+
* is a half of one pill; the focused pane's half reads strongest. The group
|
|
600
|
+
* shrinks like that many tabs and floors at that many tab floors.
|
|
580
601
|
*/
|
|
581
|
-
.mxc-tab
|
|
582
|
-
|
|
583
|
-
|
|
602
|
+
.mxc-tab-group {
|
|
603
|
+
position: relative;
|
|
604
|
+
flex: 0 1 calc(var(--mxc-group-n, 2) * 12rem);
|
|
605
|
+
min-width: calc(var(--mxc-group-n, 2) * var(--mxc-tab-min, 120px));
|
|
606
|
+
display: flex;
|
|
607
|
+
align-items: center;
|
|
608
|
+
height: 1.625rem;
|
|
609
|
+
border-radius: 0.375rem;
|
|
610
|
+
background: var(--mxc-tab-active-bg);
|
|
611
|
+
box-shadow: var(--mxc-tab-active-shadow);
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
.mxc-tab-group > .mxc-tab {
|
|
615
|
+
flex: 1 1 0;
|
|
616
|
+
min-width: 0;
|
|
617
|
+
max-width: none;
|
|
618
|
+
background: transparent;
|
|
619
|
+
box-shadow: none;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
.mxc-tab-group > .mxc-tab[data-active]:hover {
|
|
623
|
+
background: var(--mxc-hover);
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
.mxc-tab-group > .mxc-tab:not([data-current]) {
|
|
627
|
+
color: var(--mxc-muted);
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
.mxc-tab-group > .mxc-tab + .mxc-tab::before {
|
|
631
|
+
content: "";
|
|
632
|
+
position: absolute;
|
|
633
|
+
left: 0;
|
|
634
|
+
top: 0.375rem;
|
|
635
|
+
bottom: 0.375rem;
|
|
636
|
+
width: 1px;
|
|
637
|
+
background: var(--mxc-border);
|
|
584
638
|
}
|
|
585
639
|
|
|
586
640
|
/*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-matrx/canvas",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
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",
|