@ai-matrx/canvas 0.7.3 → 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 +20 -0
- package/README.md +2 -2
- package/dist/react.cjs +141 -49
- 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 +141 -49
- package/dist/react.js.map +1 -1
- package/dist/styles.css +97 -39
- 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,16 @@
|
|
|
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;
|
|
524
|
+
/* A definite width (not only a flex-basis) so the tab list's own size counts 12rem per tab. */
|
|
492
525
|
flex: 0 1 auto;
|
|
493
|
-
|
|
526
|
+
width: 12rem;
|
|
527
|
+
min-width: var(--mxc-tab-min, 120px);
|
|
494
528
|
max-width: 12rem;
|
|
495
529
|
display: flex;
|
|
496
530
|
align-items: center;
|
|
@@ -512,25 +546,13 @@
|
|
|
512
546
|
padding-right: 1.25rem;
|
|
513
547
|
}
|
|
514
548
|
|
|
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
|
-
*/
|
|
549
|
+
/* 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
550
|
.mxc-tab[data-active] {
|
|
522
|
-
min-width: var(--mxc-tab-active-min, 112px);
|
|
523
551
|
background: var(--mxc-tab-active-bg);
|
|
524
552
|
color: var(--mxc-fg);
|
|
525
553
|
box-shadow: var(--mxc-tab-active-shadow);
|
|
526
554
|
}
|
|
527
555
|
|
|
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
556
|
.mxc-tab:hover {
|
|
535
557
|
background: var(--mxc-hover);
|
|
536
558
|
}
|
|
@@ -565,22 +587,58 @@
|
|
|
565
587
|
border-radius: 0.125rem;
|
|
566
588
|
}
|
|
567
589
|
|
|
590
|
+
/* A name that does not fit ends in "…" — never clipped mid-letter. */
|
|
568
591
|
.mxc-tab-title {
|
|
569
592
|
flex: 0 1 auto;
|
|
570
593
|
min-width: 0;
|
|
571
594
|
overflow: hidden;
|
|
572
|
-
text-overflow:
|
|
595
|
+
text-overflow: ellipsis;
|
|
573
596
|
white-space: nowrap;
|
|
574
597
|
}
|
|
575
598
|
|
|
576
599
|
/*
|
|
577
|
-
* A
|
|
578
|
-
*
|
|
579
|
-
*
|
|
600
|
+
* A SPLIT drawn as ONE joined tab (Chrome split view): each pane's visible tab
|
|
601
|
+
* is a half of one pill; the focused pane's half reads strongest. The group
|
|
602
|
+
* shrinks like that many tabs and floors at that many tab floors.
|
|
580
603
|
*/
|
|
581
|
-
.mxc-tab
|
|
582
|
-
|
|
583
|
-
|
|
604
|
+
.mxc-tab-group {
|
|
605
|
+
position: relative;
|
|
606
|
+
flex: 0 1 auto;
|
|
607
|
+
width: calc(var(--mxc-group-n, 2) * 12rem);
|
|
608
|
+
min-width: calc(var(--mxc-group-n, 2) * var(--mxc-tab-min, 120px));
|
|
609
|
+
display: flex;
|
|
610
|
+
align-items: center;
|
|
611
|
+
height: 1.625rem;
|
|
612
|
+
border-radius: 0.375rem;
|
|
613
|
+
background: var(--mxc-tab-active-bg);
|
|
614
|
+
box-shadow: var(--mxc-tab-active-shadow);
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
.mxc-tab-group > .mxc-tab {
|
|
618
|
+
flex: 1 1 0;
|
|
619
|
+
width: auto;
|
|
620
|
+
min-width: 0;
|
|
621
|
+
max-width: none;
|
|
622
|
+
background: transparent;
|
|
623
|
+
box-shadow: none;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
.mxc-tab-group > .mxc-tab[data-active]:hover {
|
|
627
|
+
background: var(--mxc-hover);
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
.mxc-tab-group > .mxc-tab:not([data-current]) {
|
|
631
|
+
color: var(--mxc-muted);
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
.mxc-tab-group > .mxc-tab + .mxc-tab::before {
|
|
635
|
+
content: "";
|
|
636
|
+
position: absolute;
|
|
637
|
+
left: 0;
|
|
638
|
+
top: 0.375rem;
|
|
639
|
+
bottom: 0.375rem;
|
|
640
|
+
width: 1px;
|
|
641
|
+
background: var(--mxc-border);
|
|
584
642
|
}
|
|
585
643
|
|
|
586
644
|
/*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-matrx/canvas",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.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",
|