@adecore/ui 0.50.5 → 0.50.7
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/FileIcon.js +66 -30
- package/dist/file-icon.d.ts +2 -0
- package/dist/file-icon.js +8 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/theme.css +29 -1
- package/dist/workspace/PaneBar.js +2 -2
- package/dist/workspace/TabStrip.js +1 -1
- package/package.json +1 -1
- package/src/FileIcon.tsx +7 -1
- package/src/file-icon.ts +11 -0
- package/src/index.ts +1 -1
- package/src/theme.css +29 -1
- package/src/workspace/PaneBar.tsx +2 -2
- package/src/workspace/TabStrip.tsx +1 -1
package/dist/FileIcon.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { useInsertionEffect } from 'react';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
|
-
import { fileIconFor, mountFileIconSprite } from './file-icon.js';
|
|
4
|
+
import { fileIconFor, fileIconOverrideFor, mountFileIconSprite } from './file-icon.js';
|
|
5
5
|
/*
|
|
6
6
|
* The one place the library steps outside Lucide. The glyphs are Seti's, and so are their colors: a
|
|
7
7
|
* TypeScript blue is the mark of the file type, not a theme choice. Decorative like every other icon here.
|
|
8
8
|
*/
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
10
|
export function FileIcon(t0) {
|
|
11
|
-
const $ = _c(
|
|
11
|
+
const $ = _c(20);
|
|
12
12
|
const {
|
|
13
13
|
path,
|
|
14
14
|
size: t1,
|
|
@@ -25,50 +25,86 @@ export function FileIcon(t0) {
|
|
|
25
25
|
}
|
|
26
26
|
useInsertionEffect(mountFileIconSprite, t2);
|
|
27
27
|
let t3;
|
|
28
|
-
if ($[1] !==
|
|
29
|
-
t3 =
|
|
30
|
-
$[1] =
|
|
28
|
+
if ($[1] !== path) {
|
|
29
|
+
t3 = fileIconOverrideFor(path);
|
|
30
|
+
$[1] = path;
|
|
31
31
|
$[2] = t3;
|
|
32
32
|
} else {
|
|
33
33
|
t3 = $[2];
|
|
34
34
|
}
|
|
35
|
+
const own = t3;
|
|
36
|
+
if (own !== null) {
|
|
37
|
+
let t4;
|
|
38
|
+
if ($[3] !== className) {
|
|
39
|
+
t4 = clsx("file-icon", className);
|
|
40
|
+
$[3] = className;
|
|
41
|
+
$[4] = t4;
|
|
42
|
+
} else {
|
|
43
|
+
t4 = $[4];
|
|
44
|
+
}
|
|
45
|
+
let t5;
|
|
46
|
+
if ($[5] !== own || $[6] !== size || $[7] !== t4) {
|
|
47
|
+
t5 = /*#__PURE__*/_jsx("img", {
|
|
48
|
+
src: own,
|
|
49
|
+
alt: "",
|
|
50
|
+
width: size,
|
|
51
|
+
height: size,
|
|
52
|
+
className: t4
|
|
53
|
+
});
|
|
54
|
+
$[5] = own;
|
|
55
|
+
$[6] = size;
|
|
56
|
+
$[7] = t4;
|
|
57
|
+
$[8] = t5;
|
|
58
|
+
} else {
|
|
59
|
+
t5 = $[8];
|
|
60
|
+
}
|
|
61
|
+
return t5;
|
|
62
|
+
}
|
|
35
63
|
let t4;
|
|
36
|
-
if ($[
|
|
37
|
-
t4 =
|
|
38
|
-
$[
|
|
39
|
-
$[
|
|
64
|
+
if ($[9] !== className) {
|
|
65
|
+
t4 = clsx("file-icon", className);
|
|
66
|
+
$[9] = className;
|
|
67
|
+
$[10] = t4;
|
|
40
68
|
} else {
|
|
41
|
-
t4 = $[
|
|
69
|
+
t4 = $[10];
|
|
42
70
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
});
|
|
49
|
-
$[5] = t5;
|
|
50
|
-
$[6] = t6;
|
|
71
|
+
let t5;
|
|
72
|
+
if ($[11] !== path) {
|
|
73
|
+
t5 = fileIconFor(path);
|
|
74
|
+
$[11] = path;
|
|
75
|
+
$[12] = t5;
|
|
51
76
|
} else {
|
|
52
|
-
|
|
77
|
+
t5 = $[12];
|
|
53
78
|
}
|
|
79
|
+
const t6 = `#${t5}`;
|
|
54
80
|
let t7;
|
|
55
|
-
if ($[
|
|
56
|
-
t7 = /*#__PURE__*/_jsx("
|
|
81
|
+
if ($[13] !== t6) {
|
|
82
|
+
t7 = /*#__PURE__*/_jsx("use", {
|
|
83
|
+
href: t6
|
|
84
|
+
});
|
|
85
|
+
$[13] = t6;
|
|
86
|
+
$[14] = t7;
|
|
87
|
+
} else {
|
|
88
|
+
t7 = $[14];
|
|
89
|
+
}
|
|
90
|
+
let t8;
|
|
91
|
+
if ($[15] !== ref || $[16] !== size || $[17] !== t4 || $[18] !== t7) {
|
|
92
|
+
t8 = /*#__PURE__*/_jsx("svg", {
|
|
57
93
|
ref: ref,
|
|
58
|
-
className:
|
|
94
|
+
className: t4,
|
|
59
95
|
width: size,
|
|
60
96
|
height: size,
|
|
61
97
|
viewBox: "0 0 16 16",
|
|
62
98
|
"aria-hidden": true,
|
|
63
|
-
children:
|
|
99
|
+
children: t7
|
|
64
100
|
});
|
|
65
|
-
$[
|
|
66
|
-
$[
|
|
67
|
-
$[
|
|
68
|
-
$[
|
|
69
|
-
$[
|
|
101
|
+
$[15] = ref;
|
|
102
|
+
$[16] = size;
|
|
103
|
+
$[17] = t4;
|
|
104
|
+
$[18] = t7;
|
|
105
|
+
$[19] = t8;
|
|
70
106
|
} else {
|
|
71
|
-
|
|
107
|
+
t8 = $[19];
|
|
72
108
|
}
|
|
73
|
-
return
|
|
109
|
+
return t8;
|
|
74
110
|
}
|
package/dist/file-icon.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { type FileTreeIconConfig } from '@pierre/trees';
|
|
2
2
|
export declare const FILE_TREE_ICONS: FileTreeIconConfig;
|
|
3
3
|
export declare const fileIconFor: (path: string) => string;
|
|
4
|
+
export declare function setFileIconOverride(next: ((path: string) => string | null) | null): void;
|
|
5
|
+
export declare function fileIconOverrideFor(path: string): string | null;
|
|
4
6
|
export declare const mountFileIconSprite: () => void;
|
package/dist/file-icon.js
CHANGED
|
@@ -24,6 +24,14 @@ const resolveIcon = (...args) => {
|
|
|
24
24
|
* generic file icon: the tree marks a folder with its chevron, not a glyph.
|
|
25
25
|
*/
|
|
26
26
|
export const fileIconFor = path => resolveIcon('file-tree-icon-file', path).name;
|
|
27
|
+
let override = null;
|
|
28
|
+
/* What an app knows better about a file's icon: the address of an svg, or null for the icon this set has. */
|
|
29
|
+
export function setFileIconOverride(next) {
|
|
30
|
+
override = next;
|
|
31
|
+
}
|
|
32
|
+
export function fileIconOverrideFor(path) {
|
|
33
|
+
return override?.(path) ?? null;
|
|
34
|
+
}
|
|
27
35
|
/* The tree carries the sprite into its own shadow root, out of reach of anything that draws an
|
|
28
36
|
icon next to it, so the document gets a copy of the same sheet to point `<use>` at. */
|
|
29
37
|
export const mountFileIconSprite = () => {
|
package/dist/index.d.ts
CHANGED
|
@@ -73,7 +73,7 @@ export { ZoomControls, type ZoomControlsProps, type ZoomLabels, type ZoomSelecti
|
|
|
73
73
|
export { copyText, readClipboardText } from './clipboard.ts';
|
|
74
74
|
export { messageOf } from './error-message.ts';
|
|
75
75
|
export type { ResetKeys } from './error-boundary.ts';
|
|
76
|
-
export { FILE_TREE_ICONS } from './file-icon.ts';
|
|
76
|
+
export { FILE_TREE_ICONS, setFileIconOverride } from './file-icon.ts';
|
|
77
77
|
export { cameThroughPortal, isInFloatingLayer } from './floating.ts';
|
|
78
78
|
export { LoadedComponent, lazyDialog, lazyNamed, onLazyOpenError } from './lazy.tsx';
|
|
79
79
|
export type { LazyComponent } from './lazy.tsx';
|
package/dist/index.js
CHANGED
|
@@ -69,7 +69,7 @@ export { Wipe } from "./Wipe.js";
|
|
|
69
69
|
export { ZoomControls } from "./ZoomControls.js";
|
|
70
70
|
export { copyText, readClipboardText } from './clipboard.js';
|
|
71
71
|
export { messageOf } from './error-message.js';
|
|
72
|
-
export { FILE_TREE_ICONS } from './file-icon.js';
|
|
72
|
+
export { FILE_TREE_ICONS, setFileIconOverride } from './file-icon.js';
|
|
73
73
|
export { cameThroughPortal, isInFloatingLayer } from './floating.js';
|
|
74
74
|
export { LoadedComponent, lazyDialog, lazyNamed, onLazyOpenError } from "./lazy.js";
|
|
75
75
|
export { LazyBoundary } from "./LazyBoundary.js";
|
package/dist/theme.css
CHANGED
|
@@ -825,6 +825,8 @@
|
|
|
825
825
|
own edge and shadow; those two sit a step darker, in the well behind it. */
|
|
826
826
|
.ade-workspace {
|
|
827
827
|
--workspace-well: color-mix(in srgb, var(--surface) 70%, var(--surface-sunken));
|
|
828
|
+
/* What shows beyond the sheet's rounded corners. */
|
|
829
|
+
--workspace-ground: var(--workspace-well);
|
|
828
830
|
display: flex;
|
|
829
831
|
width: 100%;
|
|
830
832
|
height: 100%;
|
|
@@ -841,18 +843,39 @@
|
|
|
841
843
|
flex: 1;
|
|
842
844
|
min-width: 0;
|
|
843
845
|
min-height: 0;
|
|
844
|
-
|
|
846
|
+
/* No rounded clip: Chromium leaves tiles of a scaled canvas inside one unpainted while it zooms. The
|
|
847
|
+
corners are drawn over the content instead. */
|
|
845
848
|
border-radius: 0 12px 12px 0;
|
|
846
849
|
/* The surface its regions draw, so no lighter ground shows where the rounded edge cuts them. Roomy shows its gaps in it. */
|
|
847
850
|
background: var(--surface);
|
|
848
851
|
box-shadow: 0 0 0 1px var(--border), var(--sheet-shadow);
|
|
849
852
|
}
|
|
853
|
+
.ade-workspace-sheet::before, .ade-workspace-sheet::after {
|
|
854
|
+
content: "";
|
|
855
|
+
position: absolute;
|
|
856
|
+
right: 0;
|
|
857
|
+
z-index: 1;
|
|
858
|
+
width: 12px;
|
|
859
|
+
height: 12px;
|
|
860
|
+
pointer-events: none;
|
|
861
|
+
}
|
|
862
|
+
/* The arc, its hairline just outside it, and the ground beyond, as the box shadow draws them along the straight edges. */
|
|
863
|
+
.ade-workspace-sheet::before {
|
|
864
|
+
top: 0;
|
|
865
|
+
background: radial-gradient(circle at 0 100%, transparent 11px, var(--border) 12px, var(--workspace-ground) 13px);
|
|
866
|
+
}
|
|
867
|
+
.ade-workspace-sheet::after {
|
|
868
|
+
bottom: 0;
|
|
869
|
+
background: radial-gradient(circle at 0 0, transparent 11px, var(--border) 12px, var(--workspace-ground) 13px);
|
|
870
|
+
}
|
|
850
871
|
.ade-workspace-center {
|
|
851
872
|
display: flex;
|
|
852
873
|
flex: 1;
|
|
853
874
|
min-width: 0;
|
|
854
875
|
min-height: 0;
|
|
855
876
|
flex-direction: column;
|
|
877
|
+
/* Keeps what the content stacks under the sheet's corners. */
|
|
878
|
+
isolation: isolate;
|
|
856
879
|
}
|
|
857
880
|
.ade-workspace-sidebar, .ade-workspace-side-panel {
|
|
858
881
|
flex: none;
|
|
@@ -885,6 +908,8 @@
|
|
|
885
908
|
.ade-workspace[data-layout="roomy"] > .ade-workspace-sheet { box-shadow: 0 0 0 1px var(--border); }
|
|
886
909
|
/* Roomy's panes round their own corners, so the sheet's corner on the window's bottom stays square. */
|
|
887
910
|
.ade-workspace[data-layout="roomy"] > .ade-workspace-sheet { border-bottom-right-radius: 0; }
|
|
911
|
+
.ade-workspace[data-layout="roomy"] > .ade-workspace-sheet::after { display: none; }
|
|
912
|
+
.ade-workspace[data-layout="roomy"] { --workspace-ground: var(--separator); }
|
|
888
913
|
.ade-workspace[data-layout="roomy"] > .ade-workspace-sheet > .ade-workspace-center { gap: 8px; }
|
|
889
914
|
.ade-workspace[data-layout="roomy"] > .ade-workspace-sheet > .ade-workspace-sidebar:not([data-auto]) { margin-right: 8px; }
|
|
890
915
|
.ade-workspace[data-layout="roomy"] > .ade-workspace-side-panel:not([data-auto]) { margin-left: 8px; }
|
|
@@ -1039,6 +1064,9 @@
|
|
|
1039
1064
|
outline-offset: -2px;
|
|
1040
1065
|
white-space: nowrap;
|
|
1041
1066
|
}
|
|
1067
|
+
/* Only the label gives way; an icon, a detail or a mark keeps its size. */
|
|
1068
|
+
.ade-document-tab-open > * { flex-shrink: 0; }
|
|
1069
|
+
.ade-document-tab-open > .ade-document-tab-label { flex-shrink: 1; min-width: 0; }
|
|
1042
1070
|
.ade-document-tab-close { opacity: 0; }
|
|
1043
1071
|
.ade-document-tab:is(:hover, :focus-within, [data-active]) .ade-document-tab-close { opacity: 1; }
|
|
1044
1072
|
.ade-document-tab[data-detail] .ade-document-tab-open { max-width: 200px; }
|
|
@@ -249,7 +249,7 @@ export function PaneBar(t0) {
|
|
|
249
249
|
}
|
|
250
250
|
const t13 = tabs ? "min-w-24 self-stretch" : "min-w-5";
|
|
251
251
|
const t14 = inContainer ? tabs ? "-ml-1" : "pl-2" : !tabs && "pl-1";
|
|
252
|
-
const t15 = tabs ||
|
|
252
|
+
const t15 = !inContainer && (tabs || folded || !hasActions) ? "grow" : "shrink-100";
|
|
253
253
|
let t16;
|
|
254
254
|
if ($[38] !== t13 || $[39] !== t14 || $[40] !== t15) {
|
|
255
255
|
t16 = clsx("ade-pane-title flex items-center gap-2", t13, t14, t15);
|
|
@@ -276,7 +276,7 @@ export function PaneBar(t0) {
|
|
|
276
276
|
const t18 = !separate && actionsPart;
|
|
277
277
|
let t19;
|
|
278
278
|
if ($[45] !== folded || $[46] !== hasActions || $[47] !== inContainer || $[48] !== tabs) {
|
|
279
|
-
t19 = inContainer &&
|
|
279
|
+
t19 = inContainer && (tabs || folded || !hasActions) && /*#__PURE__*/_jsx("span", {
|
|
280
280
|
"aria-hidden": "true",
|
|
281
281
|
className: "grow self-stretch"
|
|
282
282
|
});
|
package/package.json
CHANGED
package/src/FileIcon.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useInsertionEffect, type Ref } from 'react';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
|
-
import { fileIconFor, mountFileIconSprite } from './file-icon.ts';
|
|
3
|
+
import { fileIconFor, fileIconOverrideFor, mountFileIconSprite } from './file-icon.ts';
|
|
4
4
|
|
|
5
5
|
export interface FileIconProps {
|
|
6
6
|
/* Absolute or relative; only the last segment decides which icon this is. */
|
|
@@ -19,6 +19,12 @@ export function FileIcon({ path, size = 16, className, ref }: FileIconProps) {
|
|
|
19
19
|
// Before the browser paints, so a `<use>` never points at a symbol that is not in the document yet.
|
|
20
20
|
useInsertionEffect(mountFileIconSprite, []);
|
|
21
21
|
|
|
22
|
+
const own = fileIconOverrideFor(path);
|
|
23
|
+
|
|
24
|
+
if (own !== null) {
|
|
25
|
+
return <img src={own} alt="" width={size} height={size} className={clsx('file-icon', className)} />;
|
|
26
|
+
}
|
|
27
|
+
|
|
22
28
|
return (
|
|
23
29
|
<svg ref={ref} className={clsx('file-icon', className)} width={size} height={size} viewBox="0 0 16 16" aria-hidden>
|
|
24
30
|
<use href={`#${fileIconFor(path)}`} />
|
package/src/file-icon.ts
CHANGED
|
@@ -29,6 +29,17 @@ const resolveIcon: ReturnType<typeof createFileTreeIconResolver>['resolveIcon']
|
|
|
29
29
|
*/
|
|
30
30
|
export const fileIconFor = (path: string): string => resolveIcon('file-tree-icon-file', path).name;
|
|
31
31
|
|
|
32
|
+
let override: ((path: string) => string | null) | null = null;
|
|
33
|
+
|
|
34
|
+
/* What an app knows better about a file's icon: the address of an svg, or null for the icon this set has. */
|
|
35
|
+
export function setFileIconOverride(next: ((path: string) => string | null) | null): void {
|
|
36
|
+
override = next;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function fileIconOverrideFor(path: string): string | null {
|
|
40
|
+
return override?.(path) ?? null;
|
|
41
|
+
}
|
|
42
|
+
|
|
32
43
|
/* The tree carries the sprite into its own shadow root, out of reach of anything that draws an
|
|
33
44
|
icon next to it, so the document gets a copy of the same sheet to point `<use>` at. */
|
|
34
45
|
export const mountFileIconSprite = (): void => {
|
package/src/index.ts
CHANGED
|
@@ -92,7 +92,7 @@ export { ZoomControls, type ZoomControlsProps, type ZoomLabels, type ZoomSelecti
|
|
|
92
92
|
export { copyText, readClipboardText } from './clipboard.ts';
|
|
93
93
|
export { messageOf } from './error-message.ts';
|
|
94
94
|
export type { ResetKeys } from './error-boundary.ts';
|
|
95
|
-
export { FILE_TREE_ICONS } from './file-icon.ts';
|
|
95
|
+
export { FILE_TREE_ICONS, setFileIconOverride } from './file-icon.ts';
|
|
96
96
|
export { cameThroughPortal, isInFloatingLayer } from './floating.ts';
|
|
97
97
|
export { LoadedComponent, lazyDialog, lazyNamed, onLazyOpenError } from './lazy.tsx';
|
|
98
98
|
export type { LazyComponent } from './lazy.tsx';
|
package/src/theme.css
CHANGED
|
@@ -825,6 +825,8 @@
|
|
|
825
825
|
own edge and shadow; those two sit a step darker, in the well behind it. */
|
|
826
826
|
.ade-workspace {
|
|
827
827
|
--workspace-well: color-mix(in srgb, var(--surface) 70%, var(--surface-sunken));
|
|
828
|
+
/* What shows beyond the sheet's rounded corners. */
|
|
829
|
+
--workspace-ground: var(--workspace-well);
|
|
828
830
|
display: flex;
|
|
829
831
|
width: 100%;
|
|
830
832
|
height: 100%;
|
|
@@ -841,18 +843,39 @@
|
|
|
841
843
|
flex: 1;
|
|
842
844
|
min-width: 0;
|
|
843
845
|
min-height: 0;
|
|
844
|
-
|
|
846
|
+
/* No rounded clip: Chromium leaves tiles of a scaled canvas inside one unpainted while it zooms. The
|
|
847
|
+
corners are drawn over the content instead. */
|
|
845
848
|
border-radius: 0 12px 12px 0;
|
|
846
849
|
/* The surface its regions draw, so no lighter ground shows where the rounded edge cuts them. Roomy shows its gaps in it. */
|
|
847
850
|
background: var(--surface);
|
|
848
851
|
box-shadow: 0 0 0 1px var(--border), var(--sheet-shadow);
|
|
849
852
|
}
|
|
853
|
+
.ade-workspace-sheet::before, .ade-workspace-sheet::after {
|
|
854
|
+
content: "";
|
|
855
|
+
position: absolute;
|
|
856
|
+
right: 0;
|
|
857
|
+
z-index: 1;
|
|
858
|
+
width: 12px;
|
|
859
|
+
height: 12px;
|
|
860
|
+
pointer-events: none;
|
|
861
|
+
}
|
|
862
|
+
/* The arc, its hairline just outside it, and the ground beyond, as the box shadow draws them along the straight edges. */
|
|
863
|
+
.ade-workspace-sheet::before {
|
|
864
|
+
top: 0;
|
|
865
|
+
background: radial-gradient(circle at 0 100%, transparent 11px, var(--border) 12px, var(--workspace-ground) 13px);
|
|
866
|
+
}
|
|
867
|
+
.ade-workspace-sheet::after {
|
|
868
|
+
bottom: 0;
|
|
869
|
+
background: radial-gradient(circle at 0 0, transparent 11px, var(--border) 12px, var(--workspace-ground) 13px);
|
|
870
|
+
}
|
|
850
871
|
.ade-workspace-center {
|
|
851
872
|
display: flex;
|
|
852
873
|
flex: 1;
|
|
853
874
|
min-width: 0;
|
|
854
875
|
min-height: 0;
|
|
855
876
|
flex-direction: column;
|
|
877
|
+
/* Keeps what the content stacks under the sheet's corners. */
|
|
878
|
+
isolation: isolate;
|
|
856
879
|
}
|
|
857
880
|
.ade-workspace-sidebar, .ade-workspace-side-panel {
|
|
858
881
|
flex: none;
|
|
@@ -885,6 +908,8 @@
|
|
|
885
908
|
.ade-workspace[data-layout="roomy"] > .ade-workspace-sheet { box-shadow: 0 0 0 1px var(--border); }
|
|
886
909
|
/* Roomy's panes round their own corners, so the sheet's corner on the window's bottom stays square. */
|
|
887
910
|
.ade-workspace[data-layout="roomy"] > .ade-workspace-sheet { border-bottom-right-radius: 0; }
|
|
911
|
+
.ade-workspace[data-layout="roomy"] > .ade-workspace-sheet::after { display: none; }
|
|
912
|
+
.ade-workspace[data-layout="roomy"] { --workspace-ground: var(--separator); }
|
|
888
913
|
.ade-workspace[data-layout="roomy"] > .ade-workspace-sheet > .ade-workspace-center { gap: 8px; }
|
|
889
914
|
.ade-workspace[data-layout="roomy"] > .ade-workspace-sheet > .ade-workspace-sidebar:not([data-auto]) { margin-right: 8px; }
|
|
890
915
|
.ade-workspace[data-layout="roomy"] > .ade-workspace-side-panel:not([data-auto]) { margin-left: 8px; }
|
|
@@ -1039,6 +1064,9 @@
|
|
|
1039
1064
|
outline-offset: -2px;
|
|
1040
1065
|
white-space: nowrap;
|
|
1041
1066
|
}
|
|
1067
|
+
/* Only the label gives way; an icon, a detail or a mark keeps its size. */
|
|
1068
|
+
.ade-document-tab-open > * { flex-shrink: 0; }
|
|
1069
|
+
.ade-document-tab-open > .ade-document-tab-label { flex-shrink: 1; min-width: 0; }
|
|
1042
1070
|
.ade-document-tab-close { opacity: 0; }
|
|
1043
1071
|
.ade-document-tab:is(:hover, :focus-within, [data-active]) .ade-document-tab-close { opacity: 1; }
|
|
1044
1072
|
.ade-document-tab[data-detail] .ade-document-tab-open { max-width: 200px; }
|
|
@@ -221,7 +221,7 @@ export function PaneBar({
|
|
|
221
221
|
stands before it: 16 pixels, of which the gap brings 8 and a tab 12 of its own. */
|
|
222
222
|
inContainer ? (tabs ? '-ml-1' : 'pl-2') : !tabs && 'pl-1',
|
|
223
223
|
// A weight rather than `shrink`, since controls whose labels truncate shrink as well.
|
|
224
|
-
tabs ||
|
|
224
|
+
!inContainer && (tabs || folded || !hasActions) ? 'grow' : 'shrink-100'
|
|
225
225
|
)}
|
|
226
226
|
>
|
|
227
227
|
{title}
|
|
@@ -229,7 +229,7 @@ export function PaneBar({
|
|
|
229
229
|
{accessory}
|
|
230
230
|
{!separate && actionsPart}
|
|
231
231
|
{/* The room the title leaves in a container, which the window drags by. */}
|
|
232
|
-
{inContainer &&
|
|
232
|
+
{inContainer && (tabs || folded || !hasActions) && <span aria-hidden="true" className="grow self-stretch" />}
|
|
233
233
|
{trailing}
|
|
234
234
|
{onClose && (
|
|
235
235
|
<CloseButton label={closeLabel ?? t('workspace.closePane')} kbd={closeShortcut} size="sm" className="cursor-default" onClick={onClose} />
|
|
@@ -382,7 +382,7 @@ export function DocumentTab({ item, onClose, closeShortcut, onDoubleClick, onDra
|
|
|
382
382
|
}}
|
|
383
383
|
>
|
|
384
384
|
{item.icon}
|
|
385
|
-
<span className="truncate">{item.label}</span>
|
|
385
|
+
<span className="ade-document-tab-label truncate">{item.label}</span>
|
|
386
386
|
{item.detail}
|
|
387
387
|
{item.attention}
|
|
388
388
|
{item.unsaved && (
|