@ai-ecoverse/slicc-spectrum 1.107.0 → 1.107.2
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/README.md +4 -3
- package/dist/{chunk-57NDK5DC.js → chunk-AI3R2QZY.js} +2539 -2514
- package/dist/chunk-AI3R2QZY.js.map +7 -0
- package/dist/slicc-ui.js +258 -141
- package/dist/slicc-ui.js.map +3 -3
- package/package.json +7 -7
- package/dist/chunk-57NDK5DC.js.map +0 -7
package/dist/slicc-ui.js
CHANGED
|
@@ -37401,6 +37401,7 @@ var SliccChat = class _SliccChat extends ThemedElement {
|
|
|
37401
37401
|
];
|
|
37402
37402
|
}
|
|
37403
37403
|
#stuck = true;
|
|
37404
|
+
#card = null;
|
|
37404
37405
|
#last = 0;
|
|
37405
37406
|
#height = 0;
|
|
37406
37407
|
#input = Number.NEGATIVE_INFINITY;
|
|
@@ -37456,12 +37457,12 @@ var SliccChat = class _SliccChat extends ThemedElement {
|
|
|
37456
37457
|
this.#more();
|
|
37457
37458
|
const log = this.#log();
|
|
37458
37459
|
if (!this.#stuck && log.scrollHeight <= log.clientHeight) this.#follow();
|
|
37459
|
-
else this.#pin();
|
|
37460
|
+
else this.#pin(false);
|
|
37460
37461
|
});
|
|
37461
37462
|
#fitted;
|
|
37462
37463
|
#fit = new ResizeObserver(([entry]) => {
|
|
37463
37464
|
this.style.setProperty("--composer-height", `${entry.target.offsetHeight}px`);
|
|
37464
|
-
this.#pin();
|
|
37465
|
+
this.#pin(false);
|
|
37465
37466
|
});
|
|
37466
37467
|
#log() {
|
|
37467
37468
|
return this.renderRoot.querySelector(".log");
|
|
@@ -37476,13 +37477,24 @@ var SliccChat = class _SliccChat extends ThemedElement {
|
|
|
37476
37477
|
#bottom() {
|
|
37477
37478
|
return this.#gap() <= this.#slack();
|
|
37478
37479
|
}
|
|
37479
|
-
#pin() {
|
|
37480
|
+
#pin(end = true) {
|
|
37480
37481
|
if (!this.#stuck) return;
|
|
37481
37482
|
const log = this.#log();
|
|
37482
|
-
|
|
37483
|
+
const card2 = log.querySelector("swc-conversation-thread")?.lastElementChild ?? null;
|
|
37484
|
+
const held2 = !end && card2 !== null && card2 === this.#card;
|
|
37485
|
+
this.#card = card2;
|
|
37486
|
+
log.scrollTop = held2 ? this.#head(log, card2) : log.scrollHeight;
|
|
37483
37487
|
this.#last = log.scrollTop;
|
|
37484
37488
|
this.#height = log.scrollHeight;
|
|
37485
37489
|
}
|
|
37490
|
+
#head(log, card2) {
|
|
37491
|
+
if (this.model?.agent.busy(this.#id())) return log.scrollHeight;
|
|
37492
|
+
const box = card2.getBoundingClientRect();
|
|
37493
|
+
const below = log.firstElementChild.getBoundingClientRect().bottom - box.bottom;
|
|
37494
|
+
const top = box.top - log.getBoundingClientRect().top - log.clientTop + log.scrollTop;
|
|
37495
|
+
if (below > 1 || top < log.scrollTop - 1) return log.scrollHeight;
|
|
37496
|
+
return top - (Number.parseFloat(getComputedStyle(log).paddingBlockStart) || 0);
|
|
37497
|
+
}
|
|
37486
37498
|
#follow() {
|
|
37487
37499
|
this.#stuck = true;
|
|
37488
37500
|
this.behind = false;
|
|
@@ -37530,7 +37542,7 @@ var SliccChat = class _SliccChat extends ThemedElement {
|
|
|
37530
37542
|
this.behind = false;
|
|
37531
37543
|
} else if (!this.#stuck) this.behind = true;
|
|
37532
37544
|
this.requestUpdate();
|
|
37533
|
-
void this.updateComplete.then(() => this.#pin());
|
|
37545
|
+
void this.updateComplete.then(() => this.#pin(jump));
|
|
37534
37546
|
}
|
|
37535
37547
|
#observe() {
|
|
37536
37548
|
const log = this.#log();
|
|
@@ -39546,6 +39558,7 @@ var SliccTray = class extends ModelElement {
|
|
|
39546
39558
|
}
|
|
39547
39559
|
swc-status-light {
|
|
39548
39560
|
align-self: center;
|
|
39561
|
+
white-space: nowrap;
|
|
39549
39562
|
}
|
|
39550
39563
|
.chip .followers {
|
|
39551
39564
|
display: inline-flex;
|
|
@@ -39554,6 +39567,7 @@ var SliccTray = class extends ModelElement {
|
|
|
39554
39567
|
}
|
|
39555
39568
|
:host([compact]) .chip .detail,
|
|
39556
39569
|
:host([compact]) .usage,
|
|
39570
|
+
:host([narrow]) .chip .spare,
|
|
39557
39571
|
:host([narrow]) .usage .window {
|
|
39558
39572
|
display: none;
|
|
39559
39573
|
}
|
|
@@ -39587,7 +39601,8 @@ var SliccTray = class extends ModelElement {
|
|
|
39587
39601
|
const refused3 = refusedNow(model.follow?.state());
|
|
39588
39602
|
const connection = `${connectionLabel[status2.connection]}${refused3 ? ", can\u2019t follow" : ""}`;
|
|
39589
39603
|
const followers = `${status2.followers.length} ${status2.followers.length === 1 ? "follower" : "followers"}`;
|
|
39590
|
-
const
|
|
39604
|
+
const live = status2.connection === "live";
|
|
39605
|
+
const light = live ? status2.name : b`<span class="spare">${status2.name}, </span>${connection}`;
|
|
39591
39606
|
const budget = shownBudget(status2);
|
|
39592
39607
|
return b`${this.#item(
|
|
39593
39608
|
"chip",
|
|
@@ -39597,7 +39612,7 @@ var SliccTray = class extends ModelElement {
|
|
|
39597
39612
|
<swc-status-light size="s" variant=${refused3 ? "neutral" : connectionVariant[status2.connection]}>
|
|
39598
39613
|
<span class="detail">${light}</span>
|
|
39599
39614
|
</swc-status-light>
|
|
39600
|
-
<span class
|
|
39615
|
+
<span class=${live ? "detail muted followers" : "detail muted followers spare"}><swc-icon-user-group size="s"></swc-icon-user-group>${status2.followers.length}</span>
|
|
39601
39616
|
</span>`,
|
|
39602
39617
|
() => this.#open("network", "sync")
|
|
39603
39618
|
)}
|
|
@@ -48645,7 +48660,7 @@ var SliccApp = class extends ThemedElement {
|
|
|
48645
48660
|
flex: 1;
|
|
48646
48661
|
}
|
|
48647
48662
|
:host([screen='tablet']) header sp-picker {
|
|
48648
|
-
min-width: calc(var(--swc-spacing-400) *
|
|
48663
|
+
min-width: calc(var(--swc-spacing-400) * 3);
|
|
48649
48664
|
}
|
|
48650
48665
|
:host([screen='tablet']) header sp-action-menu {
|
|
48651
48666
|
flex-shrink: 0;
|
|
@@ -51732,7 +51747,7 @@ var SliccDiffPanel = class extends ThemedElement {
|
|
|
51732
51747
|
// src/app/lucide.ts
|
|
51733
51748
|
var library = null;
|
|
51734
51749
|
function load2() {
|
|
51735
|
-
library ??= import("./chunk-
|
|
51750
|
+
library ??= import("./chunk-AI3R2QZY.js");
|
|
51736
51751
|
return library;
|
|
51737
51752
|
}
|
|
51738
51753
|
function pascal(name) {
|
|
@@ -57346,8 +57361,9 @@ var ViewItem = class {
|
|
|
57346
57361
|
if (visible2 === this.visible) return;
|
|
57347
57362
|
if (visible2) {
|
|
57348
57363
|
var _this$_cachedVisibleS;
|
|
57349
|
-
|
|
57364
|
+
const cachedVisibleSize = (_this$_cachedVisibleS = this._cachedVisibleSize) !== null && _this$_cachedVisibleS !== void 0 ? _this$_cachedVisibleS : 0;
|
|
57350
57365
|
this._cachedVisibleSize = void 0;
|
|
57366
|
+
this.size = clamp(cachedVisibleSize, this.viewMinimumSize, this.viewMaximumSize);
|
|
57351
57367
|
} else {
|
|
57352
57368
|
this._cachedVisibleSize = typeof size4 === "number" ? size4 : this.size;
|
|
57353
57369
|
this.size = 0;
|
|
@@ -57462,6 +57478,15 @@ var Splitview = class {
|
|
|
57462
57478
|
get margin() {
|
|
57463
57479
|
return this._margin;
|
|
57464
57480
|
}
|
|
57481
|
+
/**
|
|
57482
|
+
* The size each visible view gives up to the margins: `n` visible views
|
|
57483
|
+
* are separated by `n - 1` margins, spread evenly over the `n`.
|
|
57484
|
+
*/
|
|
57485
|
+
get marginShare() {
|
|
57486
|
+
let visibleViewCount = 0;
|
|
57487
|
+
for (const item2 of this.viewItems) if (item2.visible) visibleViewCount++;
|
|
57488
|
+
return this.marginShareFor(visibleViewCount);
|
|
57489
|
+
}
|
|
57465
57490
|
set margin(value) {
|
|
57466
57491
|
this._margin = value;
|
|
57467
57492
|
toggleClass(this.element, "dv-splitview-has-margin", value !== 0);
|
|
@@ -57754,6 +57779,7 @@ var Splitview = class {
|
|
|
57754
57779
|
const previousSize = Math.max(this.size, this._contentSize);
|
|
57755
57780
|
this.size = size4;
|
|
57756
57781
|
this.orthogonalSize = orthogonalSize;
|
|
57782
|
+
if (!this._proportions) this.saveProportions();
|
|
57757
57783
|
if (this.proportions) {
|
|
57758
57784
|
let total = 0;
|
|
57759
57785
|
for (let i25 = 0; i25 < this.viewItems.length; i25++) {
|
|
@@ -57810,7 +57836,10 @@ var Splitview = class {
|
|
|
57810
57836
|
}
|
|
57811
57837
|
}
|
|
57812
57838
|
saveProportions() {
|
|
57813
|
-
if (this.proportionalLayout
|
|
57839
|
+
if (!this.proportionalLayout) return;
|
|
57840
|
+
let contentSize = 0;
|
|
57841
|
+
for (const item2 of this.viewItems) contentSize += item2.size;
|
|
57842
|
+
if (contentSize > 0) this._proportions = this.viewItems.map((i25) => i25.visible ? i25.size / contentSize : void 0);
|
|
57814
57843
|
}
|
|
57815
57844
|
/**
|
|
57816
57845
|
* Margin explain:
|
|
@@ -57832,7 +57861,7 @@ var Splitview = class {
|
|
|
57832
57861
|
this.updateSashEnablement();
|
|
57833
57862
|
if (this.viewItems.length === 0) return;
|
|
57834
57863
|
const sashCount = Math.max(0, visibleViewCount - 1);
|
|
57835
|
-
const marginReducedSize = this.
|
|
57864
|
+
const marginReducedSize = this.marginShareFor(visibleViewCount);
|
|
57836
57865
|
let totalLeftOffset = 0;
|
|
57837
57866
|
const viewLeftOffsets = [];
|
|
57838
57867
|
const sashWidth = 4;
|
|
@@ -57862,9 +57891,13 @@ var Splitview = class {
|
|
|
57862
57891
|
view.setContainerGeometry("width", "");
|
|
57863
57892
|
view.setContainerGeometry("left", "");
|
|
57864
57893
|
}
|
|
57865
|
-
view.view.layout(
|
|
57894
|
+
view.view.layout(size4, this._orthogonalSize);
|
|
57866
57895
|
});
|
|
57867
57896
|
}
|
|
57897
|
+
marginShareFor(visibleViewCount) {
|
|
57898
|
+
const sashCount = Math.max(0, visibleViewCount - 1);
|
|
57899
|
+
return this._margin * sashCount / Math.max(1, visibleViewCount);
|
|
57900
|
+
}
|
|
57868
57901
|
findFirstSnapIndex(indexes) {
|
|
57869
57902
|
for (const index2 of indexes) {
|
|
57870
57903
|
const viewItem = this.viewItems[index2];
|
|
@@ -59451,9 +59484,13 @@ var DockviewApi = class {
|
|
|
59451
59484
|
}
|
|
59452
59485
|
/**
|
|
59453
59486
|
* Remove a panel given the panel object.
|
|
59487
|
+
*
|
|
59488
|
+
* `removeEmptyGroup` overrides the `closeEmptyGroups` option for this
|
|
59489
|
+
* call: `false` keeps the group if the panel was its last one, `true`
|
|
59490
|
+
* removes it.
|
|
59454
59491
|
*/
|
|
59455
|
-
removePanel(panel) {
|
|
59456
|
-
this.component.withOrigin("api", () => this.component.removePanel(panel));
|
|
59492
|
+
removePanel(panel, options2) {
|
|
59493
|
+
this.component.withOrigin("api", () => this.component.removePanel(panel, options2));
|
|
59457
59494
|
}
|
|
59458
59495
|
/**
|
|
59459
59496
|
* Add a group and return the created object.
|
|
@@ -62045,6 +62082,7 @@ var PROPERTY_KEYS_DOCKVIEW = (() => {
|
|
|
62045
62082
|
dndStrategy: void 0,
|
|
62046
62083
|
className: void 0,
|
|
62047
62084
|
noPanelsOverlay: void 0,
|
|
62085
|
+
closeEmptyGroups: void 0,
|
|
62048
62086
|
dndEdges: void 0,
|
|
62049
62087
|
dropPositionResolver: void 0,
|
|
62050
62088
|
dndCompass: void 0,
|
|
@@ -66475,7 +66513,7 @@ var DockviewGroupPanelModel = class extends CompositeDisposable {
|
|
|
66475
66513
|
});
|
|
66476
66514
|
return;
|
|
66477
66515
|
}
|
|
66478
|
-
if (this.tabsContainer.indexOf(data.panelId) !== -1 && this.tabsContainer.size === 1) return;
|
|
66516
|
+
if (this.tabsContainer.indexOf(data.panelId) !== -1 && this.tabsContainer.size === 1 && this.accessor.options.closeEmptyGroups !== false) return;
|
|
66479
66517
|
const { groupId, panelId } = data;
|
|
66480
66518
|
if (this.id === groupId && !position2) {
|
|
66481
66519
|
if (this.tabsContainer.indexOf(panelId) === index2) return;
|
|
@@ -66700,6 +66738,7 @@ var DockviewGroupPanelApiImpl = class extends GridviewPanelApiImpl {
|
|
|
66700
66738
|
constructor(id, accessor) {
|
|
66701
66739
|
super(id, "__dockviewgroup__");
|
|
66702
66740
|
this.accessor = accessor;
|
|
66741
|
+
this._isApplyingSize = false;
|
|
66703
66742
|
this._onDidLocationChange = new Emitter2();
|
|
66704
66743
|
this.onDidLocationChange = this._onDidLocationChange.event;
|
|
66705
66744
|
this._onDidActivePanelChange = new Emitter2();
|
|
@@ -66712,14 +66751,29 @@ var DockviewGroupPanelApiImpl = class extends GridviewPanelApiImpl {
|
|
|
66712
66751
|
this.onDidHeaderDirectionChange = this._onDidHeaderDirectionChange.event;
|
|
66713
66752
|
this.addDisposables(this._onDidLocationChange, this._onDidActivePanelChange, this._onDidCollapsedChange, this._onDidPeekChange, this._onDidHeaderDirectionChange, this._onDidVisibilityChange.event((event2) => {
|
|
66714
66753
|
if (event2.isVisible && this._pendingSize) {
|
|
66715
|
-
|
|
66754
|
+
const pendingSize = this._pendingSize;
|
|
66716
66755
|
this._pendingSize = void 0;
|
|
66756
|
+
super.setSize(pendingSize);
|
|
66717
66757
|
}
|
|
66758
|
+
}), this.onDidDimensionsChange((event2) => {
|
|
66759
|
+
var _this$_reportedSize, _this$_reportedSize2;
|
|
66760
|
+
const moved2 = event2.width !== ((_this$_reportedSize = this._reportedSize) === null || _this$_reportedSize === void 0 ? void 0 : _this$_reportedSize.width) || event2.height !== ((_this$_reportedSize2 = this._reportedSize) === null || _this$_reportedSize2 === void 0 ? void 0 : _this$_reportedSize2.height);
|
|
66761
|
+
this._reportedSize = {
|
|
66762
|
+
width: event2.width,
|
|
66763
|
+
height: event2.height
|
|
66764
|
+
};
|
|
66765
|
+
if (moved2 && this.isVisible && !this._isApplyingSize) this._pendingSize = void 0;
|
|
66718
66766
|
}));
|
|
66719
66767
|
}
|
|
66720
66768
|
setSize(event2) {
|
|
66721
|
-
this._pendingSize = _objectSpread2({}, event2);
|
|
66722
|
-
|
|
66769
|
+
if (typeof event2.width === "number" || typeof event2.height === "number") this._pendingSize = _objectSpread2({}, event2);
|
|
66770
|
+
const wasApplyingSize = this._isApplyingSize;
|
|
66771
|
+
this._isApplyingSize = true;
|
|
66772
|
+
try {
|
|
66773
|
+
super.setSize(event2);
|
|
66774
|
+
} finally {
|
|
66775
|
+
this._isApplyingSize = wasApplyingSize;
|
|
66776
|
+
}
|
|
66723
66777
|
}
|
|
66724
66778
|
close() {
|
|
66725
66779
|
if (!this._group) return;
|
|
@@ -69586,6 +69640,19 @@ var DropTargetAnchorContainer = class extends CompositeDisposable {
|
|
|
69586
69640
|
return el;
|
|
69587
69641
|
}
|
|
69588
69642
|
};
|
|
69643
|
+
var EDGE_POSITIONS = [
|
|
69644
|
+
"left",
|
|
69645
|
+
"right",
|
|
69646
|
+
"top",
|
|
69647
|
+
"bottom"
|
|
69648
|
+
];
|
|
69649
|
+
function isHorizontal(position2) {
|
|
69650
|
+
return position2 === "left" || position2 === "right";
|
|
69651
|
+
}
|
|
69652
|
+
var UNBOUNDED_AXIS = {
|
|
69653
|
+
marginShare: 0,
|
|
69654
|
+
size: Number.POSITIVE_INFINITY
|
|
69655
|
+
};
|
|
69589
69656
|
var EdgeGroupView = class {
|
|
69590
69657
|
/**
|
|
69591
69658
|
* The effective (pre-gap) collapsed size: the measured tab-strip size when
|
|
@@ -69597,7 +69664,7 @@ var EdgeGroupView = class {
|
|
|
69597
69664
|
}
|
|
69598
69665
|
get minimumSize() {
|
|
69599
69666
|
if (this._isCollapsed) return this.collapsedSize;
|
|
69600
|
-
return this._baseMinimumSize !== void 0 ? this._baseMinimumSize + this.
|
|
69667
|
+
return this._baseMinimumSize !== void 0 ? this._baseMinimumSize + this._axis.marginShare : this._effectiveBaseCollapsed + 50 + this._axis.marginShare;
|
|
69601
69668
|
}
|
|
69602
69669
|
get maximumSize() {
|
|
69603
69670
|
return this._isCollapsed ? this.collapsedSize : this._expandedMaximumSize;
|
|
@@ -69614,10 +69681,10 @@ var EdgeGroupView = class {
|
|
|
69614
69681
|
}
|
|
69615
69682
|
/** Without the gap share. */
|
|
69616
69683
|
get lastExpandedContentSize() {
|
|
69617
|
-
return this._lastExpandedSize - this.
|
|
69684
|
+
return this._lastExpandedSize - this._axis.marginShare;
|
|
69618
69685
|
}
|
|
69619
69686
|
get collapsedSize() {
|
|
69620
|
-
return this._effectiveBaseCollapsed + this.
|
|
69687
|
+
return this._effectiveBaseCollapsed + this._axis.marginShare;
|
|
69621
69688
|
}
|
|
69622
69689
|
/** The user-configured (pre-gap) geometry constraints, for serialization.
|
|
69623
69690
|
* These are the raw values passed to `addEdgeGroup`, unlike the effective
|
|
@@ -69632,13 +69699,14 @@ var EdgeGroupView = class {
|
|
|
69632
69699
|
get configuredCollapsedSize() {
|
|
69633
69700
|
return this._baseCollapsedSize;
|
|
69634
69701
|
}
|
|
69635
|
-
constructor(options2, group, orientation,
|
|
69702
|
+
constructor(options2, group, orientation, axis = UNBOUNDED_AXIS) {
|
|
69636
69703
|
var _options$collapsedSiz, _options$maximumSize, _options$initialSize;
|
|
69637
69704
|
this._onDidChange = new Emitter2();
|
|
69638
69705
|
this.onDidChange = this._onDidChange.event;
|
|
69639
69706
|
this.snap = false;
|
|
69640
69707
|
this.priority = "low";
|
|
69641
69708
|
this._isCollapsed = false;
|
|
69709
|
+
this._isVisible = true;
|
|
69642
69710
|
this._tabSizeDisposables = new CompositeDisposable();
|
|
69643
69711
|
this._group = group;
|
|
69644
69712
|
this._orientation = orientation;
|
|
@@ -69646,7 +69714,7 @@ var EdgeGroupView = class {
|
|
|
69646
69714
|
group.element.dataset.testid = `dv-edge-group-${options2.id}`;
|
|
69647
69715
|
this._baseCollapsedSize = (_options$collapsedSiz = options2.collapsedSize) !== null && _options$collapsedSiz !== void 0 ? _options$collapsedSiz : 35;
|
|
69648
69716
|
this._baseMinimumSize = options2.minimumSize;
|
|
69649
|
-
this.
|
|
69717
|
+
this._axis = axis;
|
|
69650
69718
|
this._expandedMaximumSize = (_options$maximumSize = options2.maximumSize) !== null && _options$maximumSize !== void 0 ? _options$maximumSize : Number.POSITIVE_INFINITY;
|
|
69651
69719
|
this._lastExpandedSize = (_options$initialSize = options2.initialSize) !== null && _options$initialSize !== void 0 ? _options$initialSize : 200;
|
|
69652
69720
|
if (options2.collapsed) {
|
|
@@ -69679,7 +69747,7 @@ var EdgeGroupView = class {
|
|
|
69679
69747
|
if (this._isCollapsed) this._onDidChange.fire({ size: this.collapsedSize });
|
|
69680
69748
|
}
|
|
69681
69749
|
layout(size4, orthogonalSize) {
|
|
69682
|
-
if (!this._isCollapsed) this._lastExpandedSize = size4 + this.
|
|
69750
|
+
if (!this._isCollapsed && this._isVisible && this._axis.size > 0) this._lastExpandedSize = size4 + this._axis.marginShare;
|
|
69683
69751
|
if (this._orientation === "horizontal") this._group.layout(size4, orthogonalSize);
|
|
69684
69752
|
else this._group.layout(orthogonalSize, size4);
|
|
69685
69753
|
}
|
|
@@ -69688,26 +69756,25 @@ var EdgeGroupView = class {
|
|
|
69688
69756
|
this._isCollapsed = collapsed;
|
|
69689
69757
|
this._group.element.classList.toggle("dv-edge-collapsed", collapsed);
|
|
69690
69758
|
}
|
|
69691
|
-
setVisible(
|
|
69759
|
+
setVisible(visible2) {
|
|
69760
|
+
this._isVisible = visible2;
|
|
69692
69761
|
}
|
|
69693
69762
|
/**
|
|
69694
|
-
*
|
|
69695
|
-
*
|
|
69696
|
-
*
|
|
69763
|
+
* Set the expanded size without triggering a layout: from serialized
|
|
69764
|
+
* state (before setCollapsed(true) during fromJSON, so that expanding
|
|
69765
|
+
* restores the right size) or from an explicit resize.
|
|
69697
69766
|
*/
|
|
69698
69767
|
restoreExpandedSize(size4) {
|
|
69699
69768
|
this._lastExpandedSize = size4;
|
|
69700
69769
|
}
|
|
69701
69770
|
/**
|
|
69702
|
-
* Apply a new base (pre-gap) collapsed size
|
|
69703
|
-
*
|
|
69704
|
-
*
|
|
69705
|
-
* measured tab size (if any) continues to win over the base collapsed size.
|
|
69771
|
+
* Apply a new base (pre-gap) collapsed size and base minimum size after a
|
|
69772
|
+
* theme change. Base values come from the original config. A live measured
|
|
69773
|
+
* tab size (if any) continues to win over the base collapsed size.
|
|
69706
69774
|
*/
|
|
69707
|
-
updateSizing(baseCollapsedSize, baseMinimumSize
|
|
69775
|
+
updateSizing(baseCollapsedSize, baseMinimumSize) {
|
|
69708
69776
|
this._baseCollapsedSize = baseCollapsedSize;
|
|
69709
69777
|
this._baseMinimumSize = baseMinimumSize;
|
|
69710
|
-
this._gapAdd = gapAdd;
|
|
69711
69778
|
}
|
|
69712
69779
|
dispose() {
|
|
69713
69780
|
this._tabSizeDisposables.dispose();
|
|
@@ -69806,13 +69873,20 @@ var MiddleColumnView = class {
|
|
|
69806
69873
|
const index2 = position2 === "top" ? this._topIndex : this._bottomIndex;
|
|
69807
69874
|
if (index2 !== void 0) this._splitview.resizeView(index2, size4);
|
|
69808
69875
|
}
|
|
69809
|
-
/** The inner splitview
|
|
69810
|
-
get
|
|
69811
|
-
return this._splitview
|
|
69876
|
+
/** The inner splitview, as the axis its edge views read. */
|
|
69877
|
+
get axis() {
|
|
69878
|
+
return this._splitview;
|
|
69812
69879
|
}
|
|
69813
69880
|
updateMargin(gap) {
|
|
69814
69881
|
this._splitview.margin = gap;
|
|
69815
69882
|
}
|
|
69883
|
+
/** Disables the sashes of the top/bottom edge groups. */
|
|
69884
|
+
get disabled() {
|
|
69885
|
+
return this._splitview.disabled;
|
|
69886
|
+
}
|
|
69887
|
+
set disabled(value) {
|
|
69888
|
+
this._splitview.disabled = value;
|
|
69889
|
+
}
|
|
69816
69890
|
dispose() {
|
|
69817
69891
|
this._onDidChange.dispose();
|
|
69818
69892
|
this._splitview.dispose();
|
|
@@ -69848,8 +69922,6 @@ var ShellManager = class {
|
|
|
69848
69922
|
const width = Math.round(entry.contentRect.width);
|
|
69849
69923
|
const height = Math.round(entry.contentRect.height);
|
|
69850
69924
|
if (width === this._currentWidth && height === this._currentHeight) return;
|
|
69851
|
-
this._currentWidth = width;
|
|
69852
|
-
this._currentHeight = height;
|
|
69853
69925
|
this.layout(width, height);
|
|
69854
69926
|
}), this._outerSplitview, this._middleColumn, centerView);
|
|
69855
69927
|
}
|
|
@@ -69857,6 +69929,18 @@ var ShellManager = class {
|
|
|
69857
69929
|
return this._shellElement;
|
|
69858
69930
|
}
|
|
69859
69931
|
/**
|
|
69932
|
+
* The dock's `locked` option. The edge groups are resized with the sashes
|
|
69933
|
+
* of the shell's own splitviews (left/right in the outer one, top/bottom
|
|
69934
|
+
* in the middle column), so locking disables both.
|
|
69935
|
+
*/
|
|
69936
|
+
get locked() {
|
|
69937
|
+
return this._outerSplitview.disabled;
|
|
69938
|
+
}
|
|
69939
|
+
set locked(value) {
|
|
69940
|
+
this._outerSplitview.disabled = value;
|
|
69941
|
+
this._middleColumn.disabled = value;
|
|
69942
|
+
}
|
|
69943
|
+
/**
|
|
69860
69944
|
* Add an edge group view at the given position. The view wraps the
|
|
69861
69945
|
* provided group element inside the shell's splitview layout.
|
|
69862
69946
|
* Throws if a group at this position is already registered.
|
|
@@ -69864,14 +69948,7 @@ var ShellManager = class {
|
|
|
69864
69948
|
addEdgeView(position2, options2, group) {
|
|
69865
69949
|
if (this.hasEdgeGroup(position2)) throw new Error(`dockview: edge group already registered at position '${position2}'`);
|
|
69866
69950
|
this._viewConfigs.set(position2, options2);
|
|
69867
|
-
const
|
|
69868
|
-
const innerN = 1 + (this._viewConfigs.has("top") ? 1 : 0) + (this._viewConfigs.has("bottom") ? 1 : 0);
|
|
69869
|
-
const outerGapAdd = outerN > 1 ? this._gap * (outerN - 1) / outerN : 0;
|
|
69870
|
-
const innerGapAdd = innerN > 1 ? this._gap * (innerN - 1) / innerN : 0;
|
|
69871
|
-
const isHorizontal = position2 === "left" || position2 === "right";
|
|
69872
|
-
const gapAdd = isHorizontal ? outerGapAdd : innerGapAdd;
|
|
69873
|
-
const orientation = isHorizontal ? "horizontal" : "vertical";
|
|
69874
|
-
const view = new EdgeGroupView(_objectSpread2({ collapsedSize: this._defaultCollapsedSize }, options2), group, orientation, gapAdd);
|
|
69951
|
+
const view = new EdgeGroupView(_objectSpread2({ collapsedSize: this._defaultCollapsedSize }, options2), group, isHorizontal(position2) ? "horizontal" : "vertical", this._axisFor(position2));
|
|
69875
69952
|
const initialSize = view.isCollapsed ? view.collapsedSize : view.lastExpandedSize;
|
|
69876
69953
|
switch (position2) {
|
|
69877
69954
|
case "left":
|
|
@@ -69900,7 +69977,7 @@ var ShellManager = class {
|
|
|
69900
69977
|
}
|
|
69901
69978
|
this._disposables.addDisposables(view);
|
|
69902
69979
|
if (!view.isCollapsed && !this._canResize(position2)) this._pendingSizes.set(position2, initialSize);
|
|
69903
|
-
this.
|
|
69980
|
+
this._relayout();
|
|
69904
69981
|
return view;
|
|
69905
69982
|
}
|
|
69906
69983
|
/**
|
|
@@ -69922,6 +69999,8 @@ var ShellManager = class {
|
|
|
69922
69999
|
this.layout(width, height);
|
|
69923
70000
|
}
|
|
69924
70001
|
layout(width, height) {
|
|
70002
|
+
this._currentWidth = width;
|
|
70003
|
+
this._currentHeight = height;
|
|
69925
70004
|
this._outerSplitview.layout(width, height);
|
|
69926
70005
|
this._flushPendingSizes();
|
|
69927
70006
|
}
|
|
@@ -69931,34 +70010,53 @@ var ShellManager = class {
|
|
|
69931
70010
|
* and tab-strip dimensions.
|
|
69932
70011
|
*/
|
|
69933
70012
|
updateTheme(gap, defaultCollapsedSize) {
|
|
69934
|
-
var _this$_leftView, _this$_rightView, _this$_topView, _this$_bottomView;
|
|
69935
70013
|
this._gap = gap;
|
|
69936
70014
|
this._defaultCollapsedSize = defaultCollapsedSize;
|
|
69937
|
-
const outerN = 1 + (this._viewConfigs.has("left") ? 1 : 0) + (this._viewConfigs.has("right") ? 1 : 0);
|
|
69938
|
-
const innerN = 1 + (this._viewConfigs.has("top") ? 1 : 0) + (this._viewConfigs.has("bottom") ? 1 : 0);
|
|
69939
|
-
const outerGapAdd = outerN > 1 ? gap * (outerN - 1) / outerN : 0;
|
|
69940
|
-
const innerGapAdd = innerN > 1 ? gap * (innerN - 1) / innerN : 0;
|
|
69941
70015
|
this._outerSplitview.margin = gap;
|
|
69942
70016
|
this._middleColumn.updateMargin(gap);
|
|
69943
|
-
|
|
69944
|
-
|
|
69945
|
-
|
|
69946
|
-
|
|
69947
|
-
|
|
69948
|
-
|
|
69949
|
-
|
|
69950
|
-
|
|
69951
|
-
|
|
69952
|
-
|
|
69953
|
-
|
|
69954
|
-
|
|
69955
|
-
|
|
69956
|
-
|
|
69957
|
-
|
|
69958
|
-
|
|
69959
|
-
|
|
70017
|
+
this._applyThemeSizing();
|
|
70018
|
+
this._relayout();
|
|
70019
|
+
}
|
|
70020
|
+
/** Whether the other edge of `position`'s axis holds a view. */
|
|
70021
|
+
_hasSiblingOn(position2) {
|
|
70022
|
+
return isHorizontal(position2) ? this._leftView !== void 0 && this._rightView !== void 0 : this._topView !== void 0 && this._bottomView !== void 0;
|
|
70023
|
+
}
|
|
70024
|
+
/** The splitview `position`'s view sits in, as its edge axis. */
|
|
70025
|
+
_axisFor(position2) {
|
|
70026
|
+
return isHorizontal(position2) ? this._outerSplitview : this._middleColumn.axis;
|
|
70027
|
+
}
|
|
70028
|
+
/** Re-derive every edge view's base sizing from its original config and
|
|
70029
|
+
* the current defaults. */
|
|
70030
|
+
_applyThemeSizing() {
|
|
70031
|
+
for (const position2 of EDGE_POSITIONS) {
|
|
70032
|
+
const view = this._getView(position2);
|
|
70033
|
+
const baseCfg = this._viewConfigs.get(position2);
|
|
70034
|
+
if (view && baseCfg) {
|
|
70035
|
+
var _baseCfg$collapsedSiz;
|
|
70036
|
+
view.updateSizing((_baseCfg$collapsedSiz = baseCfg.collapsedSize) !== null && _baseCfg$collapsedSiz !== void 0 ? _baseCfg$collapsedSiz : this._defaultCollapsedSize, baseCfg.minimumSize);
|
|
70037
|
+
}
|
|
70038
|
+
}
|
|
70039
|
+
}
|
|
70040
|
+
/**
|
|
70041
|
+
* Lay the shell out again at its current size, once it has one. The
|
|
70042
|
+
* splitviews clamp every view to its current constraints, which is how a
|
|
70043
|
+
* collapsed strip or a group at its minimum follows a moved gap share.
|
|
70044
|
+
*/
|
|
70045
|
+
_relayout() {
|
|
69960
70046
|
if (this._currentWidth > 0 && this._currentHeight > 0) this.layout(this._currentWidth, this._currentHeight);
|
|
69961
70047
|
}
|
|
70048
|
+
/** The view's slot in its splitview: its laid-out size plus the gap share. */
|
|
70049
|
+
_slotSize(position2) {
|
|
70050
|
+
switch (position2) {
|
|
70051
|
+
case "left":
|
|
70052
|
+
return this._leftIndex === void 0 ? 0 : this._outerSplitview.getViewSize(this._leftIndex);
|
|
70053
|
+
case "right":
|
|
70054
|
+
return this._rightIndex === void 0 ? 0 : this._outerSplitview.getViewSize(this._rightIndex);
|
|
70055
|
+
case "top":
|
|
70056
|
+
case "bottom":
|
|
70057
|
+
return this._middleColumn.getViewSize(position2);
|
|
70058
|
+
}
|
|
70059
|
+
}
|
|
69962
70060
|
removeEdgeView(position2) {
|
|
69963
70061
|
const view = this._getView(position2);
|
|
69964
70062
|
if (!view) return;
|
|
@@ -69988,7 +70086,7 @@ var ShellManager = class {
|
|
|
69988
70086
|
view.dispose();
|
|
69989
70087
|
this._viewConfigs.delete(position2);
|
|
69990
70088
|
this._pendingSizes.delete(position2);
|
|
69991
|
-
this.
|
|
70089
|
+
this._relayout();
|
|
69992
70090
|
}
|
|
69993
70091
|
hasEdgeGroup(position2) {
|
|
69994
70092
|
switch (position2) {
|
|
@@ -70003,6 +70101,7 @@ var ShellManager = class {
|
|
|
70003
70101
|
}
|
|
70004
70102
|
}
|
|
70005
70103
|
setEdgeGroupVisible(position2, visible2) {
|
|
70104
|
+
const changes2 = this._getView(position2) !== void 0 && visible2 !== this.isEdgeGroupVisible(position2);
|
|
70006
70105
|
switch (position2) {
|
|
70007
70106
|
case "left":
|
|
70008
70107
|
if (this._leftIndex !== void 0) this._outerSplitview.setViewVisible(this._leftIndex, visible2);
|
|
@@ -70015,6 +70114,7 @@ var ShellManager = class {
|
|
|
70015
70114
|
this._middleColumn.setViewVisible(position2, visible2);
|
|
70016
70115
|
break;
|
|
70017
70116
|
}
|
|
70117
|
+
if (changes2 && this._gap > 0 && this._hasSiblingOn(position2)) this._relayout();
|
|
70018
70118
|
if (visible2) this._flushPendingSizes();
|
|
70019
70119
|
}
|
|
70020
70120
|
isEdgeGroupVisible(position2) {
|
|
@@ -70065,8 +70165,7 @@ var ShellManager = class {
|
|
|
70065
70165
|
/** A resize lands only on a visible view (a hidden one is pinned to zero)
|
|
70066
70166
|
* whose splitview has extent to distribute. */
|
|
70067
70167
|
_canResize(position2) {
|
|
70068
|
-
|
|
70069
|
-
return (position2 === "left" || position2 === "right" ? this._outerSplitview.size : this._middleColumn.axisSize) > 0;
|
|
70168
|
+
return this.isEdgeGroupVisible(position2) && this._axisFor(position2).size > 0;
|
|
70070
70169
|
}
|
|
70071
70170
|
_resizeView(position2, size4) {
|
|
70072
70171
|
switch (position2) {
|
|
@@ -70115,59 +70214,48 @@ var ShellManager = class {
|
|
|
70115
70214
|
}
|
|
70116
70215
|
toJSON() {
|
|
70117
70216
|
const edgeGroups = {};
|
|
70118
|
-
const
|
|
70119
|
-
|
|
70120
|
-
|
|
70121
|
-
|
|
70122
|
-
|
|
70123
|
-
|
|
70124
|
-
if (view.isCollapsed) return view.lastExpandedSize;
|
|
70125
|
-
const pending = this._pendingSizes.get(position2);
|
|
70126
|
-
if (pending !== void 0) return pending;
|
|
70127
|
-
if (!isVisible) return cachedVisibleSize !== null && cachedVisibleSize !== void 0 ? cachedVisibleSize : view.lastExpandedSize;
|
|
70128
|
-
return liveSize;
|
|
70129
|
-
};
|
|
70130
|
-
if (this._leftView && this._leftIndex !== void 0) {
|
|
70131
|
-
const visible2 = this._outerSplitview.isViewVisible(this._leftIndex);
|
|
70132
|
-
edgeGroups.left = _objectSpread2({
|
|
70133
|
-
size: expandedSize(this._leftView, "left", visible2, this._outerSplitview.getViewSize(this._leftIndex), this._outerSplitview.getViewCachedVisibleSize(this._leftIndex)),
|
|
70134
|
-
visible: visible2,
|
|
70135
|
-
collapsed: this._leftView.isCollapsed || void 0
|
|
70136
|
-
}, constraints(this._leftView));
|
|
70137
|
-
}
|
|
70138
|
-
if (this._rightView && this._rightIndex !== void 0) {
|
|
70139
|
-
const visible2 = this._outerSplitview.isViewVisible(this._rightIndex);
|
|
70140
|
-
edgeGroups.right = _objectSpread2({
|
|
70141
|
-
size: expandedSize(this._rightView, "right", visible2, this._outerSplitview.getViewSize(this._rightIndex), this._outerSplitview.getViewCachedVisibleSize(this._rightIndex)),
|
|
70217
|
+
for (const position2 of EDGE_POSITIONS) {
|
|
70218
|
+
const view = this._getView(position2);
|
|
70219
|
+
if (!view) continue;
|
|
70220
|
+
const visible2 = this.isEdgeGroupVisible(position2);
|
|
70221
|
+
edgeGroups[position2] = {
|
|
70222
|
+
size: this._expandedSize(view, position2, visible2),
|
|
70142
70223
|
visible: visible2,
|
|
70143
|
-
collapsed:
|
|
70144
|
-
|
|
70224
|
+
collapsed: view.isCollapsed || void 0,
|
|
70225
|
+
minimumSize: view.configuredMinimumSize,
|
|
70226
|
+
maximumSize: Number.isFinite(view.configuredMaximumSize) ? view.configuredMaximumSize : void 0,
|
|
70227
|
+
collapsedSize: view.configuredCollapsedSize
|
|
70228
|
+
};
|
|
70145
70229
|
}
|
|
70146
|
-
|
|
70147
|
-
|
|
70148
|
-
|
|
70149
|
-
|
|
70150
|
-
|
|
70151
|
-
|
|
70152
|
-
|
|
70230
|
+
return edgeGroups;
|
|
70231
|
+
}
|
|
70232
|
+
/** The size to restore the group to. An expanded-but-hidden group has a
|
|
70233
|
+
* slot of 0, so fall back to its cached visible size (then
|
|
70234
|
+
* lastExpandedSize); otherwise re-showing snaps to minimumSize. */
|
|
70235
|
+
_expandedSize(view, position2, visible2) {
|
|
70236
|
+
if (view.isCollapsed) return view.lastExpandedSize;
|
|
70237
|
+
const pending = this._pendingSizes.get(position2);
|
|
70238
|
+
if (pending !== void 0) return pending;
|
|
70239
|
+
if (!visible2) {
|
|
70240
|
+
var _this$_cachedVisibleS;
|
|
70241
|
+
return (_this$_cachedVisibleS = this._cachedVisibleSize(position2)) !== null && _this$_cachedVisibleS !== void 0 ? _this$_cachedVisibleS : view.lastExpandedSize;
|
|
70153
70242
|
}
|
|
70154
|
-
|
|
70155
|
-
|
|
70156
|
-
|
|
70157
|
-
|
|
70158
|
-
|
|
70159
|
-
|
|
70160
|
-
|
|
70243
|
+
return this._slotSize(position2);
|
|
70244
|
+
}
|
|
70245
|
+
/** The slot a hidden view had when it was last visible. */
|
|
70246
|
+
_cachedVisibleSize(position2) {
|
|
70247
|
+
switch (position2) {
|
|
70248
|
+
case "left":
|
|
70249
|
+
return this._leftIndex === void 0 ? void 0 : this._outerSplitview.getViewCachedVisibleSize(this._leftIndex);
|
|
70250
|
+
case "right":
|
|
70251
|
+
return this._rightIndex === void 0 ? void 0 : this._outerSplitview.getViewCachedVisibleSize(this._rightIndex);
|
|
70252
|
+
case "top":
|
|
70253
|
+
case "bottom":
|
|
70254
|
+
return this._middleColumn.getViewCachedVisibleSize(position2);
|
|
70161
70255
|
}
|
|
70162
|
-
return edgeGroups;
|
|
70163
70256
|
}
|
|
70164
70257
|
fromJSON(data) {
|
|
70165
|
-
for (const position2 of
|
|
70166
|
-
"left",
|
|
70167
|
-
"right",
|
|
70168
|
-
"top",
|
|
70169
|
-
"bottom"
|
|
70170
|
-
]) {
|
|
70258
|
+
for (const position2 of EDGE_POSITIONS) {
|
|
70171
70259
|
var _state$collapsed;
|
|
70172
70260
|
const state2 = data[position2];
|
|
70173
70261
|
const view = this._getView(position2);
|
|
@@ -70868,6 +70956,7 @@ var DockviewComponent = class extends BaseGrid {
|
|
|
70868
70956
|
this.disableResizing = true;
|
|
70869
70957
|
this.element.remove();
|
|
70870
70958
|
this._shellManager = new ShellManager(container, this.element, (w7, h10) => this._layoutFromShell(w7, h10), (_options$theme$gap2 = (_options$theme2 = options2.theme) === null || _options$theme2 === void 0 ? void 0 : _options$theme2.gap) !== null && _options$theme$gap2 !== void 0 ? _options$theme$gap2 : 0, (_options$theme3 = options2.theme) === null || _options$theme3 === void 0 ? void 0 : _options$theme3.edgeGroupCollapsedSize);
|
|
70959
|
+
this._shellManager.locked = !!options2.locked;
|
|
70871
70960
|
this.popupService.updateRoot(this._shellManager.element);
|
|
70872
70961
|
this._shellThemeClassnames = new Classnames(this._shellManager.element);
|
|
70873
70962
|
this.rootDropTargetContainer = new DropTargetAnchorContainer(this._shellManager.element, { disabled: true });
|
|
@@ -70972,7 +71061,7 @@ var DockviewComponent = class extends BaseGrid {
|
|
|
70972
71061
|
const service = assertModule(this._popoutWindowService, "PopoutWindow", "api.addPopoutGroup");
|
|
70973
71062
|
if (!service) return Promise.resolve(false);
|
|
70974
71063
|
if (itemToPopout instanceof DockviewGroupPanel && itemToPopout.model.location.type === "edge") return Promise.resolve(false);
|
|
70975
|
-
if (itemToPopout instanceof DockviewPanel && itemToPopout.group.size === 1) return this.addPopoutGroup(itemToPopout.group, options2);
|
|
71064
|
+
if (itemToPopout instanceof DockviewPanel && itemToPopout.group.size === 1 && this.closeEmptyGroups) return this.addPopoutGroup(itemToPopout.group, options2);
|
|
70976
71065
|
const theme3 = getDockviewTheme(this.gridview.element);
|
|
70977
71066
|
const element2 = this.element;
|
|
70978
71067
|
function getBox() {
|
|
@@ -71057,7 +71146,8 @@ var DockviewComponent = class extends BaseGrid {
|
|
|
71057
71146
|
const overlayRenderContainer = new OverlayRenderContainer(gready, this);
|
|
71058
71147
|
group.model.renderContainer = overlayRenderContainer;
|
|
71059
71148
|
const popoutGridview = (_options$overridePopo4 = options2 === null || options2 === void 0 ? void 0 : options2.overridePopoutGridview) !== null && _options$overridePopo4 !== void 0 ? _options$overridePopo4 : this.createNestedGridview();
|
|
71060
|
-
if (
|
|
71149
|
+
if (options2 === null || options2 === void 0 ? void 0 : options2.overridePopoutGridview) popoutGridview.locked = this.gridview.locked;
|
|
71150
|
+
else popoutGridview.addView(group, Sizing.Distribute, [0]);
|
|
71061
71151
|
popoutGridview.element.style.width = "100%";
|
|
71062
71152
|
popoutGridview.element.style.height = "100%";
|
|
71063
71153
|
popoutGridview.layout(_window.window.innerWidth, _window.window.innerHeight);
|
|
@@ -71426,8 +71516,35 @@ var DockviewComponent = class extends BaseGrid {
|
|
|
71426
71516
|
});
|
|
71427
71517
|
for (const { panel, from } of movedPanels) this.fireDidMovePanel(panel, from);
|
|
71428
71518
|
}
|
|
71519
|
+
/** The `closeEmptyGroups` option: remove a group once it empties. */
|
|
71520
|
+
get closeEmptyGroups() {
|
|
71521
|
+
return this.options.closeEmptyGroups !== false;
|
|
71522
|
+
}
|
|
71523
|
+
/** Whether a move leaves its emptied source group in place. */
|
|
71524
|
+
keepEmptyGroups(options2) {
|
|
71525
|
+
var _options$keepEmptyGro;
|
|
71526
|
+
return (_options$keepEmptyGro = options2.keepEmptyGroups) !== null && _options$keepEmptyGro !== void 0 ? _options$keepEmptyGro : !this.closeEmptyGroups;
|
|
71527
|
+
}
|
|
71429
71528
|
removeGroupIfEmpty(group) {
|
|
71430
|
-
if (group.model.size === 0) this.doRemoveGroup(group, { skipActive: true });
|
|
71529
|
+
if (group.model.size === 0 && this.closeEmptyGroups) this.doRemoveGroup(group, { skipActive: true });
|
|
71530
|
+
}
|
|
71531
|
+
/**
|
|
71532
|
+
* Locks the main grid, the shell whose splitviews host the edge groups,
|
|
71533
|
+
* and the nested gridviews of floating and popout windows. The base
|
|
71534
|
+
* setter stops at the main grid; `updateOptions` reaches this override.
|
|
71535
|
+
*/
|
|
71536
|
+
get locked() {
|
|
71537
|
+
return this.gridview.locked;
|
|
71538
|
+
}
|
|
71539
|
+
set locked(value) {
|
|
71540
|
+
this.gridview.locked = value;
|
|
71541
|
+
if (this._shellManager) this._shellManager.locked = value;
|
|
71542
|
+
for (const gridview of this.nestedGridviews()) gridview.locked = value;
|
|
71543
|
+
}
|
|
71544
|
+
/** The gridviews hosted by open floating and popout windows. */
|
|
71545
|
+
nestedGridviews() {
|
|
71546
|
+
var _this$_popoutWindowSe9, _this$_popoutWindowSe10;
|
|
71547
|
+
return [...this.floatingGroups.map((floating) => floating.gridview), ...((_this$_popoutWindowSe9 = (_this$_popoutWindowSe10 = this._popoutWindowService) === null || _this$_popoutWindowSe10 === void 0 ? void 0 : _this$_popoutWindowSe10.entries) !== null && _this$_popoutWindowSe9 !== void 0 ? _this$_popoutWindowSe9 : []).map((entry) => entry.gridview)];
|
|
71431
71548
|
}
|
|
71432
71549
|
/**
|
|
71433
71550
|
* Build an empty gridview configured to match the main grid's styling and
|
|
@@ -71436,7 +71553,7 @@ var DockviewComponent = class extends BaseGrid {
|
|
|
71436
71553
|
*/
|
|
71437
71554
|
createNestedGridview(orientation = "HORIZONTAL") {
|
|
71438
71555
|
var _this$options$theme$g, _this$options$theme2;
|
|
71439
|
-
return new Gridview(this.gridview.proportionalLayout, this.options.hideBorders ? { separatorBorder: "transparent" } : void 0, orientation,
|
|
71556
|
+
return new Gridview(this.gridview.proportionalLayout, this.options.hideBorders ? { separatorBorder: "transparent" } : void 0, orientation, this.gridview.locked, (_this$options$theme$g = (_this$options$theme2 = this.options.theme) === null || _this$options$theme2 === void 0 ? void 0 : _this$options$theme2.gap) !== null && _this$options$theme$g !== void 0 ? _this$options$theme$g : 0);
|
|
71440
71557
|
}
|
|
71441
71558
|
/**
|
|
71442
71559
|
* Wrap a (populated) floating gridview in an overlay window: title bar /
|
|
@@ -71514,10 +71631,8 @@ var DockviewComponent = class extends BaseGrid {
|
|
|
71514
71631
|
const newDndStrategy = this.options.dndStrategy;
|
|
71515
71632
|
if (oldDisableDnd !== newDisableDnd || oldDndStrategy !== newDndStrategy) this.updateDragAndDropState();
|
|
71516
71633
|
if ("proportionalLayout" in options2) {
|
|
71517
|
-
var _this$_popoutWindowSe9, _this$_popoutWindowSe10;
|
|
71518
71634
|
const proportionalLayout = this.gridview.proportionalLayout;
|
|
71519
|
-
for (const
|
|
71520
|
-
for (const entry of (_this$_popoutWindowSe9 = (_this$_popoutWindowSe10 = this._popoutWindowService) === null || _this$_popoutWindowSe10 === void 0 ? void 0 : _this$_popoutWindowSe10.entries) !== null && _this$_popoutWindowSe9 !== void 0 ? _this$_popoutWindowSe9 : []) entry.gridview.proportionalLayout = proportionalLayout;
|
|
71635
|
+
for (const gridview of this.nestedGridviews()) gridview.proportionalLayout = proportionalLayout;
|
|
71521
71636
|
}
|
|
71522
71637
|
if ("theme" in options2) this.updateTheme();
|
|
71523
71638
|
if ("createRightHeaderActionComponent" in options2 || "createLeftHeaderActionComponent" in options2 || "createPrefixHeaderActionComponent" in options2) {
|
|
@@ -71586,7 +71701,7 @@ var DockviewComponent = class extends BaseGrid {
|
|
|
71586
71701
|
const resizeDisposable = group.onDidChange((event2) => {
|
|
71587
71702
|
var _this$_shellManager3;
|
|
71588
71703
|
if (!event2) return;
|
|
71589
|
-
const size4 = position2
|
|
71704
|
+
const size4 = isHorizontal(position2) ? event2.width : event2.height;
|
|
71590
71705
|
if (typeof size4 !== "number") return;
|
|
71591
71706
|
(_this$_shellManager3 = this._shellManager) === null || _this$_shellManager3 === void 0 || _this$_shellManager3.resizeEdgeGroup(position2, size4);
|
|
71592
71707
|
});
|
|
@@ -72181,9 +72296,12 @@ var DockviewComponent = class extends BaseGrid {
|
|
|
72181
72296
|
}
|
|
72182
72297
|
closeAllGroups() {
|
|
72183
72298
|
this.mutation("remove", () => {
|
|
72184
|
-
|
|
72185
|
-
|
|
72186
|
-
|
|
72299
|
+
const groups2 = Array.from(this._groups.values()).map((_7) => _7.value);
|
|
72300
|
+
for (const group of groups2) {
|
|
72301
|
+
if (!this._groups.has(group.id)) continue;
|
|
72302
|
+
group.model.closeAllPanels();
|
|
72303
|
+
const keepLast = this.options.noPanelsOverlay === "emptyGroup" && this._groups.size === 1;
|
|
72304
|
+
if (!this.closeEmptyGroups && !keepLast && this._groups.has(group.id) && group.model.size === 0) this.removeGroup(group, { skipActive: true });
|
|
72187
72305
|
}
|
|
72188
72306
|
});
|
|
72189
72307
|
}
|
|
@@ -72308,7 +72426,7 @@ var DockviewComponent = class extends BaseGrid {
|
|
|
72308
72426
|
this.mutation("remove", () => {
|
|
72309
72427
|
var _options$removeEmptyG;
|
|
72310
72428
|
return this._doRemovePanel(panel, {
|
|
72311
|
-
removeEmptyGroup: (_options$removeEmptyG = options2 === null || options2 === void 0 ? void 0 : options2.removeEmptyGroup) !== null && _options$removeEmptyG !== void 0 ? _options$removeEmptyG :
|
|
72429
|
+
removeEmptyGroup: (_options$removeEmptyG = options2 === null || options2 === void 0 ? void 0 : options2.removeEmptyGroup) !== null && _options$removeEmptyG !== void 0 ? _options$removeEmptyG : this.closeEmptyGroups,
|
|
72312
72430
|
skipDispose: options2 === null || options2 === void 0 ? void 0 : options2.skipDispose,
|
|
72313
72431
|
skipSetActiveGroup: options2 === null || options2 === void 0 ? void 0 : options2.skipSetActiveGroup
|
|
72314
72432
|
});
|
|
@@ -72464,7 +72582,7 @@ var DockviewComponent = class extends BaseGrid {
|
|
|
72464
72582
|
if (!(options2 === null || options2 === void 0 ? void 0 : options2.skipDispose)) {
|
|
72465
72583
|
if (!(options2 === null || options2 === void 0 ? void 0 : options2.skipPopoutAssociated)) {
|
|
72466
72584
|
const refGroup = selectedGroup.referenceGroup ? this.getPanel(selectedGroup.referenceGroup) : void 0;
|
|
72467
|
-
if ((refGroup === null || refGroup === void 0 ? void 0 : refGroup.panels.length) === 0) this.removeGroup(refGroup);
|
|
72585
|
+
if ((refGroup === null || refGroup === void 0 ? void 0 : refGroup.panels.length) === 0 && (this.closeEmptyGroups || !refGroup.api.isVisible)) this.removeGroup(refGroup);
|
|
72468
72586
|
}
|
|
72469
72587
|
selectedGroup.popoutGroup.dispose();
|
|
72470
72588
|
this._groups.delete(group.id);
|
|
@@ -72715,7 +72833,7 @@ var DockviewComponent = class extends BaseGrid {
|
|
|
72715
72833
|
skipSetActiveGroup: true
|
|
72716
72834
|
}));
|
|
72717
72835
|
if (!removedPanel) throw new Error(`dockview: No panel with id ${sourceItemId}`);
|
|
72718
|
-
if (!
|
|
72836
|
+
if (!this.keepEmptyGroups(options2) && sourceGroup.model.size === 0 && sourceGroup !== destinationGroup) this.doRemoveGroup(sourceGroup, { skipActive: true });
|
|
72719
72837
|
const isDestinationGroupEmpty = destinationGroup.model.size === 0;
|
|
72720
72838
|
this.movingLock(() => {
|
|
72721
72839
|
var _options$skipSetActiv;
|
|
@@ -72731,7 +72849,7 @@ var DockviewComponent = class extends BaseGrid {
|
|
|
72731
72849
|
const destinationGridview = this.getGridviewForGroup(destinationGroup);
|
|
72732
72850
|
const referenceLocation = getGridLocation(destinationGroup.element);
|
|
72733
72851
|
const targetLocation = getRelativeLocation(destinationGridview.orientation, referenceLocation, destinationTarget);
|
|
72734
|
-
if (sourceGroup.size < 2) {
|
|
72852
|
+
if (sourceGroup.size < 2 && !this.keepEmptyGroups(options2)) {
|
|
72735
72853
|
const [targetParentLocation, to] = tail(targetLocation);
|
|
72736
72854
|
if (sourceGroup.api.location.type === "grid" && destinationGridview === this.gridview) {
|
|
72737
72855
|
const [sourceParentLocation, from] = tail(getGridLocation(sourceGroup.element));
|
|
@@ -72832,7 +72950,7 @@ var DockviewComponent = class extends BaseGrid {
|
|
|
72832
72950
|
const dropLocation = getRelativeLocation(this.gridview.orientation, referenceLocation, destinationTarget);
|
|
72833
72951
|
targetGroup = this.createGroupAtLocation(dropLocation, this.dropSizing(referenceLocation));
|
|
72834
72952
|
}
|
|
72835
|
-
if (!
|
|
72953
|
+
if (!this.keepEmptyGroups(options2) && sourceGroup.model.size === 0 && sourceGroup !== targetGroup) this.doRemoveGroup(sourceGroup, { skipActive: true });
|
|
72836
72954
|
addPanelsToGroup(targetGroup);
|
|
72837
72955
|
}
|
|
72838
72956
|
moveGroup(options2) {
|
|
@@ -73151,13 +73269,12 @@ var DockviewComponent = class extends BaseGrid {
|
|
|
73151
73269
|
return location2.length % 2 == 1 ? rootOrientation : orthogonal(rootOrientation);
|
|
73152
73270
|
}
|
|
73153
73271
|
updateTheme() {
|
|
73154
|
-
var _this$_options$theme, _this$_shellThemeClas, _theme$gap, _this$
|
|
73272
|
+
var _this$_options$theme, _this$_shellThemeClas, _theme$gap, _this$_shellManager5, _theme$edgeGroupColla, _theme$tabGroupIndica;
|
|
73155
73273
|
const theme3 = (_this$_options$theme = this._options.theme) !== null && _this$_options$theme !== void 0 ? _this$_options$theme : themeAbyss;
|
|
73156
73274
|
(_this$_shellThemeClas = this._shellThemeClassnames) === null || _this$_shellThemeClas === void 0 || _this$_shellThemeClas.setClassNames(theme3.className);
|
|
73157
73275
|
const gap = (_theme$gap = theme3.gap) !== null && _theme$gap !== void 0 ? _theme$gap : 0;
|
|
73158
73276
|
this.gridview.margin = gap;
|
|
73159
|
-
for (const
|
|
73160
|
-
for (const entry of (_this$_popoutWindowSe25 = (_this$_popoutWindowSe26 = this._popoutWindowService) === null || _this$_popoutWindowSe26 === void 0 ? void 0 : _this$_popoutWindowSe26.entries) !== null && _this$_popoutWindowSe25 !== void 0 ? _this$_popoutWindowSe25 : []) entry.gridview.margin = gap;
|
|
73277
|
+
for (const gridview of this.nestedGridviews()) gridview.margin = gap;
|
|
73161
73278
|
(_this$_shellManager5 = this._shellManager) === null || _this$_shellManager5 === void 0 || _this$_shellManager5.updateTheme(gap, (_theme$edgeGroupColla = theme3.edgeGroupCollapsedSize) !== null && _theme$edgeGroupColla !== void 0 ? _theme$edgeGroupColla : 35);
|
|
73162
73279
|
if (theme3.dndOverlayBorder === void 0) {
|
|
73163
73280
|
var _this$_shellManager6;
|
|
@@ -83143,7 +83260,7 @@ lit-html/static.js:
|
|
|
83143
83260
|
dockview-core/dist/package/main.esm.mjs:
|
|
83144
83261
|
(**
|
|
83145
83262
|
* dockview-core
|
|
83146
|
-
* @version 8.
|
|
83263
|
+
* @version 8.6.0
|
|
83147
83264
|
* @link https://github.com/dockview/dockview
|
|
83148
83265
|
* @license MIT
|
|
83149
83266
|
*)
|