Skip to content

Commit 1a403f9

Browse files
committed
feat: update dockview to V4.2.0
1 parent 9003a83 commit 1a403f9

3 files changed

Lines changed: 76 additions & 84 deletions

File tree

src/components/BootstrapBlazor.DockView/wwwroot/css/dockview-bb.css

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -208,24 +208,6 @@
208208
transition-duration: .3s;
209209
}
210210

211-
.ribbon-body.ribbon-body > div,
212-
.bb-dockview .dv-split-view-container,
213-
.bb-dockview .dv-split-view-container .dv-view-container .dv-view {
214-
overflow: initial;
215-
}
216-
217-
.bb-dockview .dv-split-view-container .dv-view-container .dv-view.bb-maximize {
218-
z-index: 99;
219-
}
220-
221-
.bb-dockview .dv-split-view-container .dv-view-container > .dv-view > .dv-groupview:not(.empty) {
222-
overflow: initial !important;
223-
}
224-
225-
.bb-dockview .dv-resize-container .dv-groupview .dv-tabs-and-actions-container {
226-
z-index: 12;
227-
}
228-
229211
.bb-dockview .bb-dockview-btn-wrapper {
230212
cursor: pointer;
231213
float: left;
@@ -288,9 +270,6 @@
288270
.bb-dockview .dv-tabs-and-actions-container:has(.dropdown-item) .dv-scrollbar-horizontal {
289271
display: none;
290272
}
291-
.bb-dockview .dv-scrollable {
292-
width: initial;
293-
}
294273
.bb-dockview .dv-tab.dv-inactive-tab .dv-default-tab .dv-default-tab-action {
295274
visibility: visible;
296275
}

src/components/BootstrapBlazor.DockView/wwwroot/css/dockview.css

Lines changed: 65 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.dv-scrollable {
22
position: relative;
33
overflow: hidden;
4-
width: 100%;
54
}
65
.dv-scrollable .dv-scrollbar-horizontal {
76
position: absolute;
@@ -1024,63 +1023,6 @@
10241023
pointer-events: none;
10251024
background-color: var(--dv-separator-border);
10261025
}
1027-
.dv-dragged {
1028-
transform: translate3d(0px, 0px, 0px); /* forces tab to be drawn on a separate layer (see https://github.com/microsoft/vscode/issues/18733) */
1029-
}
1030-
1031-
.dv-tab {
1032-
flex-shrink: 0;
1033-
}
1034-
.dv-tab:focus-within, .dv-tab:focus {
1035-
position: relative;
1036-
}
1037-
.dv-tab:focus-within::after, .dv-tab:focus::after {
1038-
position: absolute;
1039-
content: "";
1040-
height: 100%;
1041-
width: 100%;
1042-
top: 0px;
1043-
left: 0px;
1044-
pointer-events: none;
1045-
outline: 1px solid var(--dv-tab-divider-color) !important;
1046-
outline-offset: -1px;
1047-
z-index: 5;
1048-
}
1049-
.dv-tab.dv-tab-dragging .dv-default-tab-action {
1050-
background-color: var(--dv-activegroup-visiblepanel-tab-color);
1051-
}
1052-
.dv-tab.dv-active-tab .dv-default-tab .dv-default-tab-action {
1053-
visibility: visible;
1054-
}
1055-
.dv-tab.dv-inactive-tab .dv-default-tab .dv-default-tab-action {
1056-
visibility: hidden;
1057-
}
1058-
.dv-tab.dv-inactive-tab .dv-default-tab:hover .dv-default-tab-action {
1059-
visibility: visible;
1060-
}
1061-
.dv-tab .dv-default-tab {
1062-
position: relative;
1063-
height: 100%;
1064-
display: flex;
1065-
align-items: center;
1066-
white-space: nowrap;
1067-
text-overflow: ellipsis;
1068-
}
1069-
.dv-tab .dv-default-tab .dv-default-tab-content {
1070-
flex-grow: 1;
1071-
margin-right: 4px;
1072-
}
1073-
.dv-tab .dv-default-tab .dv-default-tab-action {
1074-
padding: 4px;
1075-
display: flex;
1076-
align-items: center;
1077-
justify-content: center;
1078-
box-sizing: border-box;
1079-
}
1080-
.dv-tab .dv-default-tab .dv-default-tab-action:hover {
1081-
border-radius: 2px;
1082-
background-color: var(--dv-icon-hover-background-color);
1083-
}
10841026
.dv-watermark {
10851027
display: flex;
10861028
height: 100%;
@@ -1104,7 +1046,7 @@
11041046
.dv-tabs-container {
11051047
display: flex;
11061048
height: 100%;
1107-
overflow: hidden;
1049+
overflow: auto;
11081050
scrollbar-width: thin;
11091051
/* Track */
11101052
/* Handle */
@@ -1130,6 +1072,10 @@
11301072
background: var(--dv-tabs-container-scrollbar-color);
11311073
}
11321074

1075+
.dv-scrollable > .dv-tabs-container {
1076+
overflow: hidden;
1077+
}
1078+
11331079
.dv-tab {
11341080
-webkit-user-drag: element;
11351081
outline: none;
@@ -1166,6 +1112,9 @@
11661112
height: var(--dv-tabs-and-actions-container-height);
11671113
font-size: var(--dv-tabs-and-actions-container-font-size);
11681114
}
1115+
.dv-tabs-and-actions-container.dv-single-tab.dv-full-width-single-tab .dv-scrollable {
1116+
flex-grow: 1;
1117+
}
11691118
.dv-tabs-and-actions-container.dv-single-tab.dv-full-width-single-tab .dv-tabs-container {
11701119
flex-grow: 1;
11711120
}
@@ -1183,4 +1132,61 @@
11831132
}
11841133
.dv-tabs-and-actions-container .dv-right-actions-container {
11851134
display: flex;
1135+
}
1136+
.dv-dragged {
1137+
transform: translate3d(0px, 0px, 0px); /* forces tab to be drawn on a separate layer (see https://github.com/microsoft/vscode/issues/18733) */
1138+
}
1139+
1140+
.dv-tab {
1141+
flex-shrink: 0;
1142+
}
1143+
.dv-tab:focus-within, .dv-tab:focus {
1144+
position: relative;
1145+
}
1146+
.dv-tab:focus-within::after, .dv-tab:focus::after {
1147+
position: absolute;
1148+
content: "";
1149+
height: 100%;
1150+
width: 100%;
1151+
top: 0px;
1152+
left: 0px;
1153+
pointer-events: none;
1154+
outline: 1px solid var(--dv-tab-divider-color) !important;
1155+
outline-offset: -1px;
1156+
z-index: 5;
1157+
}
1158+
.dv-tab.dv-tab-dragging .dv-default-tab-action {
1159+
background-color: var(--dv-activegroup-visiblepanel-tab-color);
1160+
}
1161+
.dv-tab.dv-active-tab .dv-default-tab .dv-default-tab-action {
1162+
visibility: visible;
1163+
}
1164+
.dv-tab.dv-inactive-tab .dv-default-tab .dv-default-tab-action {
1165+
visibility: hidden;
1166+
}
1167+
.dv-tab.dv-inactive-tab .dv-default-tab:hover .dv-default-tab-action {
1168+
visibility: visible;
1169+
}
1170+
.dv-tab .dv-default-tab {
1171+
position: relative;
1172+
height: 100%;
1173+
display: flex;
1174+
align-items: center;
1175+
white-space: nowrap;
1176+
text-overflow: ellipsis;
1177+
}
1178+
.dv-tab .dv-default-tab .dv-default-tab-content {
1179+
flex-grow: 1;
1180+
margin-right: 4px;
1181+
}
1182+
.dv-tab .dv-default-tab .dv-default-tab-action {
1183+
padding: 4px;
1184+
display: flex;
1185+
align-items: center;
1186+
justify-content: center;
1187+
box-sizing: border-box;
1188+
}
1189+
.dv-tab .dv-default-tab .dv-default-tab-action:hover {
1190+
border-radius: 2px;
1191+
background-color: var(--dv-icon-hover-background-color);
11861192
}

src/components/BootstrapBlazor.DockView/wwwroot/js/dockview-core.esm.js

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* dockview-core
3-
* @version 4.1.0
3+
* @version 4.2.0
44
* @link https://github.com/mathuo/dockview
55
* @license MIT
66
*/
@@ -5217,9 +5217,15 @@ class Tabs extends CompositeDisposable {
52175217
this._tabsList = document.createElement('div');
52185218
this._tabsList.className = 'dv-tabs-container dv-horizontal';
52195219
this.showTabsOverflowControl = options.showTabsOverflowControl;
5220-
const scrollbar = new Scrollbar(this._tabsList);
5221-
this._element = scrollbar.element;
5222-
this.addDisposables(this._onOverflowTabsChange, this._observerDisposable, scrollbar, this._onWillShowOverlay, this._onDrop, this._onTabDragStart, addDisposableListener(this.element, 'pointerdown', (event) => {
5220+
if (accessor.options.scrollbars === 'native') {
5221+
this._element = this._tabsList;
5222+
}
5223+
else {
5224+
const scrollbar = new Scrollbar(this._tabsList);
5225+
this._element = scrollbar.element;
5226+
this.addDisposables(scrollbar);
5227+
}
5228+
this.addDisposables(this._onOverflowTabsChange, this._observerDisposable, this._onWillShowOverlay, this._onDrop, this._onTabDragStart, addDisposableListener(this.element, 'pointerdown', (event) => {
52235229
if (event.defaultPrevented) {
52245230
return;
52255231
}
@@ -5644,6 +5650,7 @@ const PROPERTY_KEYS_DOCKVIEW = (() => {
56445650
dndEdges: undefined,
56455651
theme: undefined,
56465652
disableTabsOverflowList: undefined,
5653+
scrollbars: undefined,
56475654
};
56485655
return Object.keys(properties);
56495656
})();

0 commit comments

Comments
 (0)