dockview-vue 5.0.0 → 5.2.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.
@@ -136,6 +136,7 @@ class VueHeaderActionsRenderer extends AbstractVueRenderer {
136
136
  super(component, parent);
137
137
  __publicField(this, "_renderDisposable");
138
138
  __publicField(this, "_mutableDisposable", new dockviewCore.DockviewMutableDisposable());
139
+ __publicField(this, "_baseProps");
139
140
  this.group = group;
140
141
  }
141
142
  get element() {
@@ -143,33 +144,26 @@ class VueHeaderActionsRenderer extends AbstractVueRenderer {
143
144
  }
144
145
  init(props) {
145
146
  var _a;
147
+ this._baseProps = props;
146
148
  this._mutableDisposable.value = new dockviewCore.DockviewCompositeDisposable(
147
149
  this.group.model.onDidAddPanel(() => {
148
- this.updatePanels();
150
+ this.updateProps();
149
151
  }),
150
152
  this.group.model.onDidRemovePanel(() => {
151
- this.updatePanels();
153
+ this.updateProps();
152
154
  }),
153
155
  this.group.model.onDidActivePanelChange(() => {
154
- this.updateActivePanel();
156
+ this.updateProps();
155
157
  }),
156
158
  props.api.onDidActiveChange(() => {
157
- this.updateGroupActive();
159
+ this.updateProps();
158
160
  })
159
161
  );
160
- const enrichedProps = {
161
- ...props,
162
- panels: this.group.model.panels,
163
- activePanel: this.group.model.activePanel,
164
- isGroupActive: this.group.api.isActive,
165
- group: this.group,
166
- headerPosition: this.group.model.headerPosition
167
- };
168
162
  (_a = this._renderDisposable) == null ? void 0 : _a.dispose();
169
163
  this._renderDisposable = mountVueComponent(
170
164
  this.component,
171
165
  this.parent,
172
- { params: enrichedProps },
166
+ { params: this.buildEnrichedProps() },
173
167
  this.element
174
168
  );
175
169
  }
@@ -178,23 +172,19 @@ class VueHeaderActionsRenderer extends AbstractVueRenderer {
178
172
  this._mutableDisposable.dispose();
179
173
  (_a = this._renderDisposable) == null ? void 0 : _a.dispose();
180
174
  }
181
- updatePanels() {
182
- var _a;
183
- (_a = this._renderDisposable) == null ? void 0 : _a.update({
184
- params: { panels: this.group.model.panels }
185
- });
186
- }
187
- updateActivePanel() {
188
- var _a;
189
- (_a = this._renderDisposable) == null ? void 0 : _a.update({
190
- params: { activePanel: this.group.model.activePanel }
191
- });
175
+ buildEnrichedProps() {
176
+ return {
177
+ ...this._baseProps,
178
+ panels: this.group.model.panels,
179
+ activePanel: this.group.model.activePanel,
180
+ isGroupActive: this.group.api.isActive,
181
+ group: this.group,
182
+ headerPosition: this.group.model.headerPosition
183
+ };
192
184
  }
193
- updateGroupActive() {
185
+ updateProps() {
194
186
  var _a;
195
- (_a = this._renderDisposable) == null ? void 0 : _a.update({
196
- params: { isGroupActive: this.group.api.isActive }
197
- });
187
+ (_a = this._renderDisposable) == null ? void 0 : _a.update({ params: this.buildEnrichedProps() });
198
188
  }
199
189
  }
200
190
  class VuePart {
@@ -246,6 +236,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
246
236
  theme: {},
247
237
  disableTabsOverflowList: { type: Boolean },
248
238
  scrollbars: {},
239
+ tabAnimation: {},
249
240
  watermarkComponent: {},
250
241
  defaultTabComponent: {},
251
242
  rightHeaderActionsComponent: {},
@@ -135,6 +135,7 @@ class VueHeaderActionsRenderer extends AbstractVueRenderer {
135
135
  super(component, parent);
136
136
  __publicField(this, "_renderDisposable");
137
137
  __publicField(this, "_mutableDisposable", new DockviewMutableDisposable());
138
+ __publicField(this, "_baseProps");
138
139
  this.group = group;
139
140
  }
140
141
  get element() {
@@ -142,33 +143,26 @@ class VueHeaderActionsRenderer extends AbstractVueRenderer {
142
143
  }
143
144
  init(props) {
144
145
  var _a;
146
+ this._baseProps = props;
145
147
  this._mutableDisposable.value = new DockviewCompositeDisposable(
146
148
  this.group.model.onDidAddPanel(() => {
147
- this.updatePanels();
149
+ this.updateProps();
148
150
  }),
149
151
  this.group.model.onDidRemovePanel(() => {
150
- this.updatePanels();
152
+ this.updateProps();
151
153
  }),
152
154
  this.group.model.onDidActivePanelChange(() => {
153
- this.updateActivePanel();
155
+ this.updateProps();
154
156
  }),
155
157
  props.api.onDidActiveChange(() => {
156
- this.updateGroupActive();
158
+ this.updateProps();
157
159
  })
158
160
  );
159
- const enrichedProps = {
160
- ...props,
161
- panels: this.group.model.panels,
162
- activePanel: this.group.model.activePanel,
163
- isGroupActive: this.group.api.isActive,
164
- group: this.group,
165
- headerPosition: this.group.model.headerPosition
166
- };
167
161
  (_a = this._renderDisposable) == null ? void 0 : _a.dispose();
168
162
  this._renderDisposable = mountVueComponent(
169
163
  this.component,
170
164
  this.parent,
171
- { params: enrichedProps },
165
+ { params: this.buildEnrichedProps() },
172
166
  this.element
173
167
  );
174
168
  }
@@ -177,23 +171,19 @@ class VueHeaderActionsRenderer extends AbstractVueRenderer {
177
171
  this._mutableDisposable.dispose();
178
172
  (_a = this._renderDisposable) == null ? void 0 : _a.dispose();
179
173
  }
180
- updatePanels() {
181
- var _a;
182
- (_a = this._renderDisposable) == null ? void 0 : _a.update({
183
- params: { panels: this.group.model.panels }
184
- });
185
- }
186
- updateActivePanel() {
187
- var _a;
188
- (_a = this._renderDisposable) == null ? void 0 : _a.update({
189
- params: { activePanel: this.group.model.activePanel }
190
- });
174
+ buildEnrichedProps() {
175
+ return {
176
+ ...this._baseProps,
177
+ panels: this.group.model.panels,
178
+ activePanel: this.group.model.activePanel,
179
+ isGroupActive: this.group.api.isActive,
180
+ group: this.group,
181
+ headerPosition: this.group.model.headerPosition
182
+ };
191
183
  }
192
- updateGroupActive() {
184
+ updateProps() {
193
185
  var _a;
194
- (_a = this._renderDisposable) == null ? void 0 : _a.update({
195
- params: { isGroupActive: this.group.api.isActive }
196
- });
186
+ (_a = this._renderDisposable) == null ? void 0 : _a.update({ params: this.buildEnrichedProps() });
197
187
  }
198
188
  }
199
189
  class VuePart {
@@ -245,6 +235,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
245
235
  theme: {},
246
236
  disableTabsOverflowList: { type: Boolean },
247
237
  scrollbars: {},
238
+ tabAnimation: {},
248
239
  watermarkComponent: {},
249
240
  defaultTabComponent: {},
250
241
  rightHeaderActionsComponent: {},
@@ -136,6 +136,7 @@ var __publicField = (obj, key, value) => {
136
136
  super(component, parent);
137
137
  __publicField(this, "_renderDisposable");
138
138
  __publicField(this, "_mutableDisposable", new dockviewCore.DockviewMutableDisposable());
139
+ __publicField(this, "_baseProps");
139
140
  this.group = group;
140
141
  }
141
142
  get element() {
@@ -143,33 +144,26 @@ var __publicField = (obj, key, value) => {
143
144
  }
144
145
  init(props) {
145
146
  var _a;
147
+ this._baseProps = props;
146
148
  this._mutableDisposable.value = new dockviewCore.DockviewCompositeDisposable(
147
149
  this.group.model.onDidAddPanel(() => {
148
- this.updatePanels();
150
+ this.updateProps();
149
151
  }),
150
152
  this.group.model.onDidRemovePanel(() => {
151
- this.updatePanels();
153
+ this.updateProps();
152
154
  }),
153
155
  this.group.model.onDidActivePanelChange(() => {
154
- this.updateActivePanel();
156
+ this.updateProps();
155
157
  }),
156
158
  props.api.onDidActiveChange(() => {
157
- this.updateGroupActive();
159
+ this.updateProps();
158
160
  })
159
161
  );
160
- const enrichedProps = {
161
- ...props,
162
- panels: this.group.model.panels,
163
- activePanel: this.group.model.activePanel,
164
- isGroupActive: this.group.api.isActive,
165
- group: this.group,
166
- headerPosition: this.group.model.headerPosition
167
- };
168
162
  (_a = this._renderDisposable) == null ? void 0 : _a.dispose();
169
163
  this._renderDisposable = mountVueComponent(
170
164
  this.component,
171
165
  this.parent,
172
- { params: enrichedProps },
166
+ { params: this.buildEnrichedProps() },
173
167
  this.element
174
168
  );
175
169
  }
@@ -178,23 +172,19 @@ var __publicField = (obj, key, value) => {
178
172
  this._mutableDisposable.dispose();
179
173
  (_a = this._renderDisposable) == null ? void 0 : _a.dispose();
180
174
  }
181
- updatePanels() {
182
- var _a;
183
- (_a = this._renderDisposable) == null ? void 0 : _a.update({
184
- params: { panels: this.group.model.panels }
185
- });
186
- }
187
- updateActivePanel() {
188
- var _a;
189
- (_a = this._renderDisposable) == null ? void 0 : _a.update({
190
- params: { activePanel: this.group.model.activePanel }
191
- });
175
+ buildEnrichedProps() {
176
+ return {
177
+ ...this._baseProps,
178
+ panels: this.group.model.panels,
179
+ activePanel: this.group.model.activePanel,
180
+ isGroupActive: this.group.api.isActive,
181
+ group: this.group,
182
+ headerPosition: this.group.model.headerPosition
183
+ };
192
184
  }
193
- updateGroupActive() {
185
+ updateProps() {
194
186
  var _a;
195
- (_a = this._renderDisposable) == null ? void 0 : _a.update({
196
- params: { isGroupActive: this.group.api.isActive }
197
- });
187
+ (_a = this._renderDisposable) == null ? void 0 : _a.update({ params: this.buildEnrichedProps() });
198
188
  }
199
189
  }
200
190
  class VuePart {
@@ -246,6 +236,7 @@ var __publicField = (obj, key, value) => {
246
236
  theme: {},
247
237
  disableTabsOverflowList: { type: Boolean },
248
238
  scrollbars: {},
239
+ tabAnimation: {},
249
240
  watermarkComponent: {},
250
241
  defaultTabComponent: {},
251
242
  rightHeaderActionsComponent: {},
@@ -611,7 +611,7 @@
611
611
  transform: translate3d(0, 0, 0);
612
612
  backface-visibility: hidden;
613
613
  contain: layout paint;
614
- transition: opacity var(--dv-transition-duration) ease-in, transform var(--dv-transition-duration) ease-out;
614
+ transition: opacity var(--dv-transition-duration) ease-in, top var(--dv-transition-duration) ease-out, left var(--dv-transition-duration) ease-out, width var(--dv-transition-duration) ease-out, height var(--dv-transition-duration) ease-out;
615
615
  }
616
616
  .dv-drop-target {
617
617
  position: relative;
@@ -1145,6 +1145,10 @@
1145
1145
  .dv-tabs-overflow-dropdown-default > svg {
1146
1146
  transform: rotate(90deg);
1147
1147
  }
1148
+ .dv-tabs-overflow-dropdown-default:hover {
1149
+ border-radius: 2px;
1150
+ background-color: var(--dv-icon-hover-background-color);
1151
+ }
1148
1152
  .dv-tabs-container {
1149
1153
  display: flex;
1150
1154
  height: 100%;
@@ -1203,7 +1207,26 @@
1203
1207
  font-size: var(--dv-tab-font-size);
1204
1208
  margin: var(--dv-tab-margin);
1205
1209
  }
1210
+ .dv-tab.dv-tab--shifting {
1211
+ will-change: margin-left;
1212
+ transition: transform var(--dv-transition-duration, 200ms) ease-out, margin-left var(--dv-transition-duration, 200ms) ease-out;
1213
+ }
1214
+ .dv-tab.dv-tab--dragging {
1215
+ width: 0 !important;
1216
+ min-width: 0 !important;
1217
+ padding: 0 !important;
1218
+ margin: 0 !important;
1219
+ overflow: hidden;
1220
+ opacity: 0;
1221
+ pointer-events: none;
1222
+ transition: width var(--dv-transition-duration, 200ms) ease-out, padding var(--dv-transition-duration, 200ms) ease-out, margin var(--dv-transition-duration, 200ms) ease-out, opacity var(--dv-transition-duration, 200ms) ease-out;
1223
+ }
1206
1224
 
1225
+ @media (prefers-reduced-motion: reduce) {
1226
+ .dv-tab {
1227
+ transition: none !important;
1228
+ }
1229
+ }
1207
1230
  .dv-tabs-container-vertical .dv-tab {
1208
1231
  padding: 0.5rem 0.25rem;
1209
1232
  }
@@ -1211,6 +1234,7 @@
1211
1234
  .dv-tabs-overflow-container {
1212
1235
  flex-direction: column;
1213
1236
  height: unset;
1237
+ font-size: var(--dv-tabs-and-actions-container-font-size);
1214
1238
  max-height: min(50vh, 400px);
1215
1239
  overflow-y: auto;
1216
1240
  border: 1px solid var(--dv-tab-divider-color);
@@ -37,13 +37,13 @@ export declare class VueHeaderActionsRenderer extends AbstractVueRenderer implem
37
37
  private readonly group;
38
38
  private _renderDisposable;
39
39
  private readonly _mutableDisposable;
40
+ private _baseProps;
40
41
  get element(): HTMLElement;
41
42
  constructor(component: VueComponent, parent: ComponentInternalInstance, group: DockviewGroupPanel);
42
43
  init(props: IGroupHeaderProps): void;
43
44
  dispose(): void;
44
- private updatePanels;
45
- private updateActivePanel;
46
- private updateGroupActive;
45
+ private buildEnrichedProps;
46
+ private updateProps;
47
47
  }
48
48
  export declare class VuePart<T extends Record<string, any> = any> {
49
49
  private readonly element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dockview-vue",
3
- "version": "5.0.0",
3
+ "version": "5.2.0",
4
4
  "description": "Vue 3 docking layout manager — tabs, groups, grids, splitviews, drag and drop, floating panels",
5
5
  "keywords": [
6
6
  "splitview",
@@ -66,7 +66,7 @@
66
66
  "format:check": "prettier --check 'src/**/*.{ts,tsx,js,jsx,vue}'"
67
67
  },
68
68
  "dependencies": {
69
- "dockview-core": "^5.0.0"
69
+ "dockview-core": "^5.2.0"
70
70
  },
71
71
  "peerDependencies": {
72
72
  "vue": "^3.4.0"