@ai-ecoverse/slicc-spectrum 1.62.0 → 1.62.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 +1 -1
- package/dist/slicc-ui.js +189 -101
- package/dist/slicc-ui.js.map +3 -3
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -150,7 +150,7 @@ Text is Adobe Clean Spectrum VF, falling back to Adobe Clean, and code is Spectr
|
|
|
150
150
|
| `<slicc-settings>` | Theme, the model and thinking level for new cones, composer and diff preferences, and accounts to connect, reconnect or disconnect. An account whose status is `signing-in` (or a non-API-key account while its `connect` is pending) reads “Signing in…”; when the port has `cancel(id)`, its row offers Cancel (`data-action="cancel-sign-in"`), and the rejected `connect` that follows shows no error. Accounts with `group: 'mcp'` (MCP servers) get their own **MCP servers** heading (`.accounts[data-group=mcp]`). An `api-key` account asks for its `secret`: “{provider} API key” by default, “{provider} token” for `secret: 'token'`; when it is `expired` it reads **API key rejected** or **Token rejected**. An MCP server with `auth: 'oauth'` signs in in a pop-up: its button reads **Sign in**, and it reads **Needs sign-in** when `disconnected` and **Sign-in expired** when `expired`. With a `vault` port, **Secrets** (`<slicc-secrets>`) follows.
|
|
151
151
|
| `<slicc-secrets>` | Settings › Secrets from the model's `vault`: never a value, a placeholder or a value field. A head with **Locked** or **Unlocked**, the lock mode and a vault button (**Unlock** or **Open the vault**); waiting requests under **Waiting for you** (`[data-request]`, the agent's `prompt` shown as plain text under "From the agent, not checked by SLICC:", capped at 200 characters, with **Answer in the vault**); unacknowledged `PolicyNotice`s as alerts (`[data-notice]`, each widening in a sentence, **Acknowledge**, `data-action="acknowledge"`); the secrets (`li[data-secret][data-state]`, with `[data-rules]`, `[data-exits]`, `[data-exec]` and how often programs were given it today ("at least" while older activity on the same day isn't loaded), `[data-source]`, `[data-used]`, `[data-expires]`, and **Replace value**, **Sign in again** or **Manage**) or `[data-empty]`; where the rules live (`[data-policy]`); **Import…** and **Export…**; and **Activity** (`ol.audit li[data-seq][data-type]`, **Only reveals to programs**, `data-action="reveals"`, and **Show older**, `data-action="older"`, paging with `audit(before)`). The section's `data-vault` is `locked`, `unlocked` or `loading`. A popup the browser blocked shows how to allow it (`[data-popup=blocked]`), a done one which secret was saved (`[data-popup=done]`). |
|
|
152
152
|
| `<slicc-vault-button>` | Places `vault.button()`'s element (the vault's own button frame), posts its `config` (`ButtonConfig` plus `theme`) once the button is `ready`, takes the reported `size` (with the focus-ring `inset` as negative margin) and `label` (as its title), moves focus to the control before or after it when the frame reports `focus` (`previous` or `next`), and fires `vault-popup` (bubbles, composed) with each `popup` event's `{ intent, state, result? }`. |
|
|
153
|
-
| `<slicc-updates>` | Install / Update: component states, version changes, last checks, download and link counts, action buttons, failures with Retry, and collapsible install logs. Opens at boot until the agent is ready without failures. Background updates stay in the header's update status; new failures reopen the panel, and after a reload into a boot that isn't ready yet such a panel closes once the agent is ready. Every automatic close is saved to the layout. When the port offers packages, an Optional packages section lists them below as compact rows, each with its state, version, download size, requirements, commands, progress, errors and Install log; packages never count in the header or keep the panel open at boot. Packages the user added or pinned with pnpm show up in their own Your packages section below it, with a Pinned or Added light, their version against seven's, and Unpin or Remove. Also available through View and the rails. |
|
|
153
|
+
| `<slicc-updates>` | Install / Update: component states, version changes, last checks, download and link counts, action buttons, failures with Retry, and collapsible install logs. Opens at boot until the agent is ready without failures. Background updates stay in the header's update status; new failures reopen the panel, and after a reload into a boot that isn't ready yet such a panel closes once the agent is ready. Every automatic close is saved to the layout. When the port offers packages, an Optional packages section lists them below as compact rows, each with its state, version, download size, requirements, commands, progress, errors and Install log; packages never count in the header or keep the panel open at boot. Packages the user added or pinned with pnpm show up in their own Your packages section below it, with a neutral Pinned light (a hold, not a success) or a positive Added light, their version against seven's, and Unpin or Remove. Also available through View and the rails. |
|
|
154
154
|
| `<slicc-memory>` | What agents remember, per scope (everyone, a cone or a role), grouped by section: search, filter by tag, expand, edit, add and forget. Free text outside an entry shows “From MEMORY.md”. |
|
|
155
155
|
| `<slicc-monitor>` | The live monitor: vitals with sparklines (active agents, spend, budget, fullest context), alerts, and the topology (cones and scoops, terminals, tabs, pending changes, sprinkles, tray followers). Each section (`li.section[data-id]`) shows its count and an attention badge, and opens its surface with **Open** where one exists (`agents`, `terminals` and `processes` → terminal, `tabs`, `changes`). A section with rows expands into them with its toggle (`.toggle`, `aria-expanded`; `data-open` on the section): collapsed by default, expanded while a row is `warn` or `error`, until the user toggles it. Each row (`li.row[data-status]`, `data-id` from the row's `id`) shows a status light (blue active, gray idle, orange warn, red error, with the status spoken), the name, the meta line and its badges, indented by `depth` (`data-depth`, up to 6). |
|
|
156
156
|
| `<slicc-freezer>` | Every conversation in the session, from `frozen()`: cones, scoops and agent runs, each with a kind badge, live ones first with a Live light, then the newest first. A live row offers **Open**, which selects that agent; a stopped one offers **Thaw** and **Remove**, which deletes its working folders after a confirmation. A thawed scoop or agent run keeps its row, which says what it was thawed as. **Delete cone**, in the agents list (or <kbd>Delete</kbd> on a cone's row) and the header's cone picker, stops a cone after a confirmation; `/freeze` does it at once. Either way its conversation stays here, and a row without a `kind` counts as a cone. |
|
package/dist/slicc-ui.js
CHANGED
|
@@ -14081,6 +14081,20 @@ function deepActive(root2) {
|
|
|
14081
14081
|
}
|
|
14082
14082
|
var scrollback = 1 << 18;
|
|
14083
14083
|
var laid = ({ width, height }) => width > 0 && height > 0;
|
|
14084
|
+
function settled(element2) {
|
|
14085
|
+
return new Promise((resolve2) => {
|
|
14086
|
+
let last = "";
|
|
14087
|
+
const frame = () => {
|
|
14088
|
+
if (!element2.isConnected) return;
|
|
14089
|
+
const { width, height } = element2.getBoundingClientRect();
|
|
14090
|
+
const size4 = `${width}x${height}`;
|
|
14091
|
+
if (laid({ width, height }) && size4 === last) return resolve2();
|
|
14092
|
+
last = size4;
|
|
14093
|
+
requestAnimationFrame(frame);
|
|
14094
|
+
};
|
|
14095
|
+
requestAnimationFrame(frame);
|
|
14096
|
+
});
|
|
14097
|
+
}
|
|
14084
14098
|
var ended = { write() {
|
|
14085
14099
|
}, resize() {
|
|
14086
14100
|
}, close() {
|
|
@@ -14286,7 +14300,7 @@ var SliccTerminalPanel = class extends ThemedElement {
|
|
|
14286
14300
|
const backend = keep(model.terminals, info.id);
|
|
14287
14301
|
terminal.backend = {
|
|
14288
14302
|
open: async (sink) => {
|
|
14289
|
-
await this.#placed(info.id);
|
|
14303
|
+
await this.#placed(info.id, terminal);
|
|
14290
14304
|
terminal.fit();
|
|
14291
14305
|
return backend.open(sink, { cols: terminal.cols, rows: terminal.rows });
|
|
14292
14306
|
}
|
|
@@ -14306,17 +14320,18 @@ var SliccTerminalPanel = class extends ThemedElement {
|
|
|
14306
14320
|
);
|
|
14307
14321
|
return terminal;
|
|
14308
14322
|
}
|
|
14309
|
-
#placed(id) {
|
|
14323
|
+
#placed(id, screen) {
|
|
14310
14324
|
const host4 = this.getRootNode().host;
|
|
14311
14325
|
const panel = host4?.localName === "slicc-dock" ? host4.api.getPanel(terminalPanel(id)) : void 0;
|
|
14312
|
-
if (!panel
|
|
14313
|
-
|
|
14326
|
+
if (!panel) return Promise.resolve();
|
|
14327
|
+
const sized = laid(panel.api) ? Promise.resolve() : new Promise((resolve2) => {
|
|
14314
14328
|
const watch = panel.api.onDidDimensionsChange((size4) => {
|
|
14315
14329
|
if (!laid(size4)) return;
|
|
14316
14330
|
watch.dispose();
|
|
14317
14331
|
resolve2();
|
|
14318
14332
|
});
|
|
14319
14333
|
});
|
|
14334
|
+
return sized.then(() => settled(screen));
|
|
14320
14335
|
}
|
|
14321
14336
|
#request() {
|
|
14322
14337
|
this.dispatchEvent(new CustomEvent("new-terminal", { bubbles: true, composed: true }));
|
|
@@ -21509,7 +21524,7 @@ var packageActions = {
|
|
|
21509
21524
|
};
|
|
21510
21525
|
function packageLight(item2) {
|
|
21511
21526
|
if (item2.pin && item2.state === "installed")
|
|
21512
|
-
return
|
|
21527
|
+
return item2.pin.base === null ? ["positive", "Added"] : ["neutral", "Pinned"];
|
|
21513
21528
|
if (item2.pin?.base && item2.state === "removing") return ["info", "Unpinning"];
|
|
21514
21529
|
return packageStates[item2.state];
|
|
21515
21530
|
}
|
|
@@ -21534,7 +21549,7 @@ function requiresText(item2, all2) {
|
|
|
21534
21549
|
return parts2.length ? parts2.join("; ") : null;
|
|
21535
21550
|
}
|
|
21536
21551
|
var snapshot = (items) => new Map(items.map(({ id, state: state3, error }) => [id, { state: state3, error }]));
|
|
21537
|
-
function
|
|
21552
|
+
function settled2(failures, before, after) {
|
|
21538
21553
|
return new Map(
|
|
21539
21554
|
[...failures].filter(([id]) => {
|
|
21540
21555
|
const was = before.get(id);
|
|
@@ -21843,7 +21858,7 @@ var SliccUpdates = class extends ModelElement {
|
|
|
21843
21858
|
const subscriptions = [
|
|
21844
21859
|
port.on("items", (items) => {
|
|
21845
21860
|
const next = snapshot(items);
|
|
21846
|
-
this.failures =
|
|
21861
|
+
this.failures = settled2(this.failures, previous, next);
|
|
21847
21862
|
previous = next;
|
|
21848
21863
|
this.requestUpdate();
|
|
21849
21864
|
})
|
|
@@ -21854,7 +21869,7 @@ var SliccUpdates = class extends ModelElement {
|
|
|
21854
21869
|
...subscriptions,
|
|
21855
21870
|
port.on("packages", (items) => {
|
|
21856
21871
|
const next = snapshot(items);
|
|
21857
|
-
this.problems =
|
|
21872
|
+
this.problems = settled2(this.problems, packages, next);
|
|
21858
21873
|
packages = next;
|
|
21859
21874
|
this.requestUpdate();
|
|
21860
21875
|
})
|
|
@@ -55121,16 +55136,24 @@ var OverflowObserver = class extends CompositeDisposable {
|
|
|
55121
55136
|
}
|
|
55122
55137
|
};
|
|
55123
55138
|
function watchElementResize(element2, cb) {
|
|
55139
|
+
const pendingFrames = /* @__PURE__ */ new Set();
|
|
55124
55140
|
const observer = new ResizeObserver((entires) => {
|
|
55125
|
-
|
|
55141
|
+
let ran = false;
|
|
55142
|
+
let frame;
|
|
55143
|
+
frame = requestAnimationFrame(() => {
|
|
55144
|
+
ran = true;
|
|
55145
|
+
if (frame !== void 0) pendingFrames.delete(frame);
|
|
55126
55146
|
const firstEntry = entires[0];
|
|
55127
55147
|
cb(firstEntry);
|
|
55128
55148
|
});
|
|
55149
|
+
if (!ran) pendingFrames.add(frame);
|
|
55129
55150
|
});
|
|
55130
55151
|
observer.observe(element2);
|
|
55131
55152
|
return { dispose: () => {
|
|
55132
55153
|
observer.unobserve(element2);
|
|
55133
55154
|
observer.disconnect();
|
|
55155
|
+
for (const frame of pendingFrames) cancelAnimationFrame(frame);
|
|
55156
|
+
pendingFrames.clear();
|
|
55134
55157
|
} };
|
|
55135
55158
|
}
|
|
55136
55159
|
var removeClasses = (element2, ...classes) => {
|
|
@@ -63603,16 +63626,21 @@ var TabsContainer = class extends CompositeDisposable {
|
|
|
63603
63626
|
y: event2.clientY,
|
|
63604
63627
|
zIndex: (relativeParent === null || relativeParent === void 0 ? void 0 : relativeParent.style.zIndex) ? `calc(${relativeParent.style.zIndex} * 2)` : void 0
|
|
63605
63628
|
};
|
|
63606
|
-
const context = this.createOverflowRenderContext(root2, anchor);
|
|
63629
|
+
const { context, rowRenderers } = this.createOverflowRenderContext(root2, anchor);
|
|
63607
63630
|
const advancedOverflow = this.accessor.advancedOverflowService;
|
|
63608
|
-
|
|
63609
|
-
|
|
63610
|
-
|
|
63611
|
-
|
|
63612
|
-
|
|
63613
|
-
|
|
63614
|
-
|
|
63615
|
-
|
|
63631
|
+
try {
|
|
63632
|
+
if (advancedOverflow) advancedOverflow.renderOverflow({
|
|
63633
|
+
group: this.group,
|
|
63634
|
+
overflowTabs: [...this._overflowTabs],
|
|
63635
|
+
overflowTabGroups: [...this._overflowTabGroups],
|
|
63636
|
+
pinnedOverflowTabs: [...this._overflowPinnedTabs],
|
|
63637
|
+
context
|
|
63638
|
+
});
|
|
63639
|
+
else context.open(this.renderFreeOverflowList(context));
|
|
63640
|
+
} catch (err) {
|
|
63641
|
+
rowRenderers.dispose();
|
|
63642
|
+
throw err;
|
|
63643
|
+
}
|
|
63616
63644
|
}));
|
|
63617
63645
|
}
|
|
63618
63646
|
/**
|
|
@@ -63633,6 +63661,7 @@ var TabsContainer = class extends CompositeDisposable {
|
|
|
63633
63661
|
if (overflowGroupSet.has(tg.id)) for (const pid of tg.panelIds) panelToGroup.set(pid, tg);
|
|
63634
63662
|
}
|
|
63635
63663
|
const popup2 = () => this.accessor.getPopupServiceForGroup(this.group);
|
|
63664
|
+
const rowRenderers = new CompositeDisposable();
|
|
63636
63665
|
const buildGroupHeader = (tg) => {
|
|
63637
63666
|
const groupHeader = document.createElement("div");
|
|
63638
63667
|
groupHeader.className = "dv-tabs-overflow-group-header";
|
|
@@ -63662,69 +63691,87 @@ var TabsContainer = class extends CompositeDisposable {
|
|
|
63662
63691
|
return groupHeader;
|
|
63663
63692
|
};
|
|
63664
63693
|
return {
|
|
63665
|
-
|
|
63666
|
-
|
|
63667
|
-
|
|
63668
|
-
|
|
63669
|
-
|
|
63670
|
-
|
|
63671
|
-
|
|
63672
|
-
|
|
63673
|
-
|
|
63674
|
-
|
|
63675
|
-
|
|
63676
|
-
|
|
63677
|
-
|
|
63678
|
-
|
|
63679
|
-
|
|
63680
|
-
|
|
63681
|
-
|
|
63682
|
-
|
|
63683
|
-
|
|
63684
|
-
|
|
63685
|
-
|
|
63686
|
-
|
|
63687
|
-
|
|
63688
|
-
|
|
63689
|
-
|
|
63690
|
-
|
|
63691
|
-
|
|
63692
|
-
|
|
63693
|
-
|
|
63694
|
-
|
|
63695
|
-
|
|
63696
|
-
|
|
63697
|
-
|
|
63698
|
-
|
|
63699
|
-
|
|
63700
|
-
block: "nearest",
|
|
63701
|
-
inline: "nearest"
|
|
63694
|
+
context: {
|
|
63695
|
+
overflowGroupIdForPanel: (panelId) => {
|
|
63696
|
+
var _panelToGroup$get;
|
|
63697
|
+
return (_panelToGroup$get = panelToGroup.get(panelId)) === null || _panelToGroup$get === void 0 ? void 0 : _panelToGroup$get.id;
|
|
63698
|
+
},
|
|
63699
|
+
buildGroupHeader: (tabGroupId) => {
|
|
63700
|
+
const tg = groupById.get(tabGroupId);
|
|
63701
|
+
if (!tg || !overflowGroupSet.has(tg.id)) return;
|
|
63702
|
+
return buildGroupHeader(tg);
|
|
63703
|
+
},
|
|
63704
|
+
buildPinnedHeader: () => {
|
|
63705
|
+
const header = document.createElement("div");
|
|
63706
|
+
header.className = "dv-tabs-overflow-group-header dv-tabs-overflow-pinned-header";
|
|
63707
|
+
const glyph = createPinButton();
|
|
63708
|
+
glyph.classList.add("dv-tabs-overflow-pinned-icon");
|
|
63709
|
+
header.appendChild(glyph);
|
|
63710
|
+
const labelSpan = document.createElement("span");
|
|
63711
|
+
labelSpan.className = "dv-tabs-overflow-group-label";
|
|
63712
|
+
labelSpan.textContent = "Pinned";
|
|
63713
|
+
header.appendChild(labelSpan);
|
|
63714
|
+
return header;
|
|
63715
|
+
},
|
|
63716
|
+
buildRow: (panelId) => {
|
|
63717
|
+
const panel = this.group.panels.find((p17) => p17.id === panelId);
|
|
63718
|
+
if (!panel) return;
|
|
63719
|
+
const tab = this.tabs.tabs.find((t88) => t88.panel.id === panelId);
|
|
63720
|
+
const tg = panelToGroup.get(panelId);
|
|
63721
|
+
const tabComponent = panel.view.createTabRenderer("headerOverflow");
|
|
63722
|
+
let rowDisposed = false;
|
|
63723
|
+
const disposeRow = Disposable.from(() => {
|
|
63724
|
+
if (!rowDisposed) {
|
|
63725
|
+
var _tabComponent$dispose;
|
|
63726
|
+
rowDisposed = true;
|
|
63727
|
+
(_tabComponent$dispose = tabComponent.dispose) === null || _tabComponent$dispose === void 0 || _tabComponent$dispose.call(tabComponent);
|
|
63728
|
+
}
|
|
63702
63729
|
});
|
|
63703
|
-
|
|
63704
|
-
|
|
63705
|
-
|
|
63706
|
-
|
|
63707
|
-
|
|
63708
|
-
|
|
63709
|
-
|
|
63710
|
-
|
|
63711
|
-
|
|
63712
|
-
|
|
63713
|
-
|
|
63714
|
-
|
|
63730
|
+
if (rowRenderers.isDisposed) disposeRow.dispose();
|
|
63731
|
+
else rowRenderers.addDisposables(disposeRow);
|
|
63732
|
+
const child = tabComponent.element;
|
|
63733
|
+
const wrapper = document.createElement("div");
|
|
63734
|
+
toggleClass(wrapper, "dv-tab", true);
|
|
63735
|
+
toggleClass(wrapper, "dv-active-tab", panel.api.isActive);
|
|
63736
|
+
toggleClass(wrapper, "dv-inactive-tab", !panel.api.isActive);
|
|
63737
|
+
if (tg) toggleClass(wrapper, "dv-tab--grouped", true);
|
|
63738
|
+
const doActivate = () => {
|
|
63739
|
+
if (tg === null || tg === void 0 ? void 0 : tg.collapsed) tg.expand();
|
|
63740
|
+
tab === null || tab === void 0 || tab.element.scrollIntoView({
|
|
63741
|
+
block: "nearest",
|
|
63742
|
+
inline: "nearest"
|
|
63743
|
+
});
|
|
63744
|
+
this.accessor.withOrigin("user", () => panel.api.setActive());
|
|
63745
|
+
};
|
|
63746
|
+
wrapper.addEventListener("click", (event2) => {
|
|
63715
63747
|
popup2().close();
|
|
63748
|
+
if (event2.defaultPrevented) return;
|
|
63716
63749
|
doActivate();
|
|
63717
|
-
}
|
|
63718
|
-
|
|
63719
|
-
|
|
63720
|
-
|
|
63721
|
-
|
|
63750
|
+
});
|
|
63751
|
+
wrapper.appendChild(child);
|
|
63752
|
+
return {
|
|
63753
|
+
element: wrapper,
|
|
63754
|
+
panel,
|
|
63755
|
+
activate: () => {
|
|
63756
|
+
popup2().close();
|
|
63757
|
+
doActivate();
|
|
63758
|
+
},
|
|
63759
|
+
dispose: () => {
|
|
63760
|
+
rowRenderers.removeDisposable(disposeRow);
|
|
63761
|
+
disposeRow.dispose();
|
|
63762
|
+
}
|
|
63763
|
+
};
|
|
63764
|
+
},
|
|
63765
|
+
open: (body4) => {
|
|
63766
|
+
popup2().openPopover(body4, anchor, { onClose: () => rowRenderers.dispose() });
|
|
63767
|
+
},
|
|
63768
|
+
close: () => popup2().close(),
|
|
63769
|
+
focusTrigger: () => {
|
|
63770
|
+
root2.tabIndex = -1;
|
|
63771
|
+
root2.focus();
|
|
63772
|
+
}
|
|
63722
63773
|
},
|
|
63723
|
-
|
|
63724
|
-
focusTrigger: () => {
|
|
63725
|
-
root2.tabIndex = -1;
|
|
63726
|
-
root2.focus();
|
|
63727
|
-
}
|
|
63774
|
+
rowRenderers
|
|
63728
63775
|
};
|
|
63729
63776
|
}
|
|
63730
63777
|
/**
|
|
@@ -64638,6 +64685,7 @@ var DockviewGroupPanelModel = class extends CompositeDisposable {
|
|
|
64638
64685
|
this.tabsContainer.setRightActionsElement(element2);
|
|
64639
64686
|
}
|
|
64640
64687
|
setActive(isGroupActive, force = false) {
|
|
64688
|
+
if (this.isDisposed) return;
|
|
64641
64689
|
if (!force && this.isActive === isGroupActive) return;
|
|
64642
64690
|
this._isGroupActive = isGroupActive;
|
|
64643
64691
|
toggleClass(this.container, "dv-active-group", isGroupActive);
|
|
@@ -67291,13 +67339,14 @@ var ContextMenuController = class {
|
|
|
67291
67339
|
* menu passes the `tabGroup`. No-op when no renderer could be created (no
|
|
67292
67340
|
* factory configured, or the factory declined the component).
|
|
67293
67341
|
*/
|
|
67294
|
-
appendComponentItem(menuEl, item2, identity, group, close) {
|
|
67342
|
+
appendComponentItem(menuEl, item2, identity, group, close, renderers) {
|
|
67295
67343
|
var _this$accessor$option4, _this$accessor$option5;
|
|
67296
67344
|
const renderer = (_this$accessor$option4 = (_this$accessor$option5 = this.accessor.options).createContextMenuItemComponent) === null || _this$accessor$option4 === void 0 ? void 0 : _this$accessor$option4.call(_this$accessor$option5, {
|
|
67297
67345
|
id: nextContextMenuItemId(),
|
|
67298
67346
|
component: item2.component
|
|
67299
67347
|
});
|
|
67300
67348
|
if (!renderer) return;
|
|
67349
|
+
renderers.addDisposables(renderer);
|
|
67301
67350
|
renderer.init(_objectSpread2(_objectSpread2({}, identity), {}, {
|
|
67302
67351
|
group,
|
|
67303
67352
|
api: this.accessor.api,
|
|
@@ -67357,9 +67406,9 @@ var ContextMenuController = class {
|
|
|
67357
67406
|
* default row; an item carrying none of the three renders nothing. Shared
|
|
67358
67407
|
* by both menus, which differ only in `identity`.
|
|
67359
67408
|
*/
|
|
67360
|
-
appendConfigItem(menuEl, item2, identity, group, close) {
|
|
67409
|
+
appendConfigItem(menuEl, item2, identity, group, close, renderers) {
|
|
67361
67410
|
if (item2.element) menuEl.appendChild(item2.element);
|
|
67362
|
-
else if (item2.component) this.appendComponentItem(menuEl, item2, identity, group, close);
|
|
67411
|
+
else if (item2.component) this.appendComponentItem(menuEl, item2, identity, group, close, renderers);
|
|
67363
67412
|
else if (item2.label) menuEl.appendChild(buildItem(item2.label, close, () => {
|
|
67364
67413
|
var _item$action;
|
|
67365
67414
|
return (_item$action = item2.action) === null || _item$action === void 0 ? void 0 : _item$action.call(item2);
|
|
@@ -67371,22 +67420,28 @@ var ContextMenuController = class {
|
|
|
67371
67420
|
event2.preventDefault();
|
|
67372
67421
|
const popupService = this.accessor.getPopupServiceForGroup(group);
|
|
67373
67422
|
const close = () => popupService.close();
|
|
67423
|
+
const renderers = new CompositeDisposable();
|
|
67374
67424
|
const menuEl = document.createElement("div");
|
|
67375
67425
|
menuEl.className = "dv-context-menu";
|
|
67376
67426
|
menuEl.setAttribute("role", "menu");
|
|
67377
|
-
|
|
67378
|
-
|
|
67379
|
-
|
|
67380
|
-
|
|
67427
|
+
try {
|
|
67428
|
+
for (const item2 of items) {
|
|
67429
|
+
if (isItemConfig(item2)) {
|
|
67430
|
+
this.appendConfigItem(menuEl, item2, { panel }, group, close, renderers);
|
|
67431
|
+
continue;
|
|
67432
|
+
}
|
|
67433
|
+
const el = this.buildBuiltInTabItem(item2, panel, group, close);
|
|
67434
|
+
if (el) menuEl.appendChild(el);
|
|
67381
67435
|
}
|
|
67382
|
-
|
|
67383
|
-
|
|
67436
|
+
} catch (err) {
|
|
67437
|
+
renderers.dispose();
|
|
67438
|
+
throw err;
|
|
67384
67439
|
}
|
|
67385
67440
|
popupService.openPopover(menuEl, {
|
|
67386
67441
|
x: event2.clientX,
|
|
67387
67442
|
y: event2.clientY,
|
|
67388
67443
|
zIndex: popoverZIndexFor(event2.target, group)
|
|
67389
|
-
});
|
|
67444
|
+
}, { onClose: () => renderers.dispose() });
|
|
67390
67445
|
}
|
|
67391
67446
|
showForChip(tabGroup, group, event2) {
|
|
67392
67447
|
if (!this.accessor.options.getTabGroupChipContextMenuItems) return;
|
|
@@ -67400,22 +67455,28 @@ var ContextMenuController = class {
|
|
|
67400
67455
|
event2.preventDefault();
|
|
67401
67456
|
const popupService = this.accessor.getPopupServiceForGroup(group);
|
|
67402
67457
|
const close = () => popupService.close();
|
|
67458
|
+
const renderers = new CompositeDisposable();
|
|
67403
67459
|
const menuEl = document.createElement("div");
|
|
67404
67460
|
menuEl.className = "dv-context-menu";
|
|
67405
67461
|
menuEl.setAttribute("role", "menu");
|
|
67406
|
-
|
|
67407
|
-
|
|
67408
|
-
|
|
67409
|
-
|
|
67410
|
-
|
|
67411
|
-
|
|
67412
|
-
|
|
67413
|
-
|
|
67462
|
+
try {
|
|
67463
|
+
for (const item2 of items) if (item2 === "separator") menuEl.appendChild(buildSeparator());
|
|
67464
|
+
else if (item2 === "rename") menuEl.appendChild(buildRenameInput(tabGroup));
|
|
67465
|
+
else if (item2 === "colorPicker") menuEl.appendChild(buildColorPicker(tabGroup, this.accessor.tabGroupColorPalette));
|
|
67466
|
+
else if (item2 === "collapse") menuEl.appendChild(this.buildCollapseItem(tabGroup, close));
|
|
67467
|
+
else if (item2 === "close") menuEl.appendChild(buildItem("Close All", close, () => {
|
|
67468
|
+
group.panels.filter((p17) => tabGroup.containsPanel(p17.id)).forEach((p17) => p17.api.close());
|
|
67469
|
+
}));
|
|
67470
|
+
else if (isItemConfig(item2)) this.appendConfigItem(menuEl, item2, { tabGroup }, group, close, renderers);
|
|
67471
|
+
} catch (err) {
|
|
67472
|
+
renderers.dispose();
|
|
67473
|
+
throw err;
|
|
67474
|
+
}
|
|
67414
67475
|
popupService.openPopover(menuEl, {
|
|
67415
67476
|
x: event2.clientX,
|
|
67416
67477
|
y: event2.clientY,
|
|
67417
67478
|
zIndex: popoverZIndexFor(event2.target, group)
|
|
67418
|
-
});
|
|
67479
|
+
}, { onClose: () => renderers.dispose() });
|
|
67419
67480
|
}
|
|
67420
67481
|
};
|
|
67421
67482
|
var ContextMenuModule = defineModule({
|
|
@@ -67633,6 +67694,7 @@ var OverlayRenderContainer = class extends CompositeDisposable {
|
|
|
67633
67694
|
const observerDisposable = new MutableDisposable();
|
|
67634
67695
|
const correctLayerPosition = () => {
|
|
67635
67696
|
if (panel.api.location.type === "floating") queueMicrotask(() => {
|
|
67697
|
+
if (disposable.isDisposed) return;
|
|
67636
67698
|
const floatingGroup = this.accessor.getFloatingWindowForGroup(panel.api.group);
|
|
67637
67699
|
if (!floatingGroup) return;
|
|
67638
67700
|
const element2 = floatingGroup.overlay.element;
|
|
@@ -67831,7 +67893,7 @@ var PopupService = class extends CompositeDisposable {
|
|
|
67831
67893
|
newRoot.prepend(this._element);
|
|
67832
67894
|
this._root = newRoot;
|
|
67833
67895
|
}
|
|
67834
|
-
openPopover(element2, position) {
|
|
67896
|
+
openPopover(element2, position, options) {
|
|
67835
67897
|
var _position$zIndex;
|
|
67836
67898
|
this.close();
|
|
67837
67899
|
const wrapper = this._window.document.createElement("div");
|
|
@@ -67846,14 +67908,14 @@ var PopupService = class extends CompositeDisposable {
|
|
|
67846
67908
|
this._element.appendChild(wrapper);
|
|
67847
67909
|
this._active = wrapper;
|
|
67848
67910
|
const POINTERDOWN_GRACE_MS = 200;
|
|
67849
|
-
this._activeDisposable.value = createDismissableLayer({
|
|
67911
|
+
this._activeDisposable.value = new CompositeDisposable(createDismissableLayer({
|
|
67850
67912
|
window: this._window,
|
|
67851
67913
|
onDismiss: () => this.close(),
|
|
67852
67914
|
elements: () => this._active ? [this._active] : [],
|
|
67853
67915
|
keys: ["Enter"],
|
|
67854
67916
|
pointerDownGraceMs: POINTERDOWN_GRACE_MS,
|
|
67855
67917
|
resize: true
|
|
67856
|
-
});
|
|
67918
|
+
}), (options === null || options === void 0 ? void 0 : options.onClose) ? Disposable.from(options.onClose) : Disposable.NONE);
|
|
67857
67919
|
this._window.requestAnimationFrame(() => {
|
|
67858
67920
|
shiftAbsoluteElementIntoView(wrapper, this._root);
|
|
67859
67921
|
});
|
|
@@ -69142,7 +69204,9 @@ var DockviewComponent = class extends BaseGrid {
|
|
|
69142
69204
|
this._onWillDrop = new Emitter2();
|
|
69143
69205
|
this.onWillDrop = this._onWillDrop.event;
|
|
69144
69206
|
this._mutationDepth = 0;
|
|
69207
|
+
this._syncMutationDepth = 0;
|
|
69145
69208
|
this._pendingLocationChanges = /* @__PURE__ */ new Map();
|
|
69209
|
+
this._openingPopoutWindows = /* @__PURE__ */ new Set();
|
|
69146
69210
|
this._origin = "user";
|
|
69147
69211
|
this._originDepth = 0;
|
|
69148
69212
|
this._onWillMutateLayout = new Emitter2();
|
|
@@ -69226,6 +69290,10 @@ var DockviewComponent = class extends BaseGrid {
|
|
|
69226
69290
|
});
|
|
69227
69291
|
}));
|
|
69228
69292
|
this.popupService = new PopupService(this.element);
|
|
69293
|
+
this.addDisposables(this.popupService, Disposable.from(() => {
|
|
69294
|
+
for (const opening2 of this._openingPopoutWindows) opening2.dispose();
|
|
69295
|
+
this._openingPopoutWindows.clear();
|
|
69296
|
+
}));
|
|
69229
69297
|
this._api = new DockviewApi(this);
|
|
69230
69298
|
this.disableResizing = true;
|
|
69231
69299
|
this.element.remove();
|
|
@@ -69370,9 +69438,15 @@ var DockviewComponent = class extends BaseGrid {
|
|
|
69370
69438
|
const popoutWindowDisposable = new CompositeDisposable(_window, _window.onDidClose(() => {
|
|
69371
69439
|
popoutWindowDisposable.dispose();
|
|
69372
69440
|
}));
|
|
69441
|
+
this._openingPopoutWindows.add(popoutWindowDisposable);
|
|
69373
69442
|
const openError = getPopoutUrlError(popoutUrl);
|
|
69374
69443
|
return (openError ? Promise.resolve(null) : _window.open()).then((popoutContainer) => {
|
|
69375
69444
|
var _options$referenceGro, _options$overridePopo4;
|
|
69445
|
+
this._openingPopoutWindows.delete(popoutWindowDisposable);
|
|
69446
|
+
if (this.isDisposed) {
|
|
69447
|
+
popoutWindowDisposable.dispose();
|
|
69448
|
+
return false;
|
|
69449
|
+
}
|
|
69376
69450
|
if (_window.isDisposed) {
|
|
69377
69451
|
const failure2 = _window.failure;
|
|
69378
69452
|
if (failure2 && !this.isDisposed) {
|
|
@@ -69556,6 +69630,7 @@ var DockviewComponent = class extends BaseGrid {
|
|
|
69556
69630
|
for (const { panel, from } of movedPanels) this.fireDidMovePanel(panel, from);
|
|
69557
69631
|
return true;
|
|
69558
69632
|
}).catch((err) => {
|
|
69633
|
+
this._openingPopoutWindows.delete(popoutWindowDisposable);
|
|
69559
69634
|
console.error("dockview: failed to create popout.", err);
|
|
69560
69635
|
return false;
|
|
69561
69636
|
});
|
|
@@ -70079,6 +70154,7 @@ var DockviewComponent = class extends BaseGrid {
|
|
|
70079
70154
|
group.dispose();
|
|
70080
70155
|
this._groups.delete(group.id);
|
|
70081
70156
|
this._onDidRemoveGroup.fire(group);
|
|
70157
|
+
this.activateFallbackGroupIfRemoved(group);
|
|
70082
70158
|
});
|
|
70083
70159
|
}
|
|
70084
70160
|
setEdgeGroupCollapsed(group, collapsed) {
|
|
@@ -70251,10 +70327,12 @@ var DockviewComponent = class extends BaseGrid {
|
|
|
70251
70327
|
const record = this._groups.get(temporaryGroup.api.id);
|
|
70252
70328
|
this._groups.delete(temporaryGroup.api.id);
|
|
70253
70329
|
temporaryGroupDisposables.push(Disposable.from(() => {
|
|
70330
|
+
var _this$headerActionsSe2;
|
|
70254
70331
|
this.movingLock(() => {
|
|
70255
70332
|
for (const panel of temporaryGroup.panels.slice()) temporaryGroup.model.removePanel(panel);
|
|
70256
70333
|
});
|
|
70257
70334
|
record === null || record === void 0 || record.disposable.dispose();
|
|
70335
|
+
(_this$headerActionsSe2 = this.headerActionsService) === null || _this$headerActionsSe2 === void 0 || _this$headerActionsSe2.disposeGroup(temporaryGroup);
|
|
70258
70336
|
temporaryGroup.dispose();
|
|
70259
70337
|
}));
|
|
70260
70338
|
return temporaryGroup;
|
|
@@ -70873,9 +70951,12 @@ var DockviewComponent = class extends BaseGrid {
|
|
|
70873
70951
|
*/
|
|
70874
70952
|
mutation(kind, func) {
|
|
70875
70953
|
const close = this.openMutation(kind);
|
|
70954
|
+
this._syncMutationDepth++;
|
|
70876
70955
|
try {
|
|
70877
70956
|
return func();
|
|
70878
70957
|
} finally {
|
|
70958
|
+
this._syncMutationDepth--;
|
|
70959
|
+
if (this._syncMutationDepth === 0) this.releaseDisposedActiveGroup();
|
|
70879
70960
|
close();
|
|
70880
70961
|
}
|
|
70881
70962
|
}
|
|
@@ -70922,6 +71003,7 @@ var DockviewComponent = class extends BaseGrid {
|
|
|
70922
71003
|
return () => {
|
|
70923
71004
|
this._mutationDepth--;
|
|
70924
71005
|
if (this._mutationDepth === 0) {
|
|
71006
|
+
this.releaseDisposedActiveGroup();
|
|
70925
71007
|
this.flushLocationChanges();
|
|
70926
71008
|
this._onDidMutateLayout.fire({
|
|
70927
71009
|
kind,
|
|
@@ -70930,6 +71012,11 @@ var DockviewComponent = class extends BaseGrid {
|
|
|
70930
71012
|
}
|
|
70931
71013
|
};
|
|
70932
71014
|
}
|
|
71015
|
+
/** Covers removals with `skipActive` that disposed the active group. */
|
|
71016
|
+
releaseDisposedActiveGroup() {
|
|
71017
|
+
var _this$_activeGroup;
|
|
71018
|
+
if (!this.isDisposed && ((_this$_activeGroup = this._activeGroup) === null || _this$_activeGroup === void 0 ? void 0 : _this$_activeGroup.model.isDisposed)) this.activateFallbackGroupIfRemoved(this._activeGroup);
|
|
71019
|
+
}
|
|
70933
71020
|
/**
|
|
70934
71021
|
* Coalesce a panel's `onDidLocationChange` to the end of the enclosing
|
|
70935
71022
|
* transaction, or fire it immediately when no transaction is in flight.
|
|
@@ -71058,7 +71145,7 @@ var DockviewComponent = class extends BaseGrid {
|
|
|
71058
71145
|
skipSetActiveGroup: true
|
|
71059
71146
|
}));
|
|
71060
71147
|
if (!removedPanel) throw new Error(`dockview: No panel with id ${sourceItemId}`);
|
|
71061
|
-
if (!options.keepEmptyGroups && sourceGroup.model.size === 0) this.doRemoveGroup(sourceGroup, { skipActive: true });
|
|
71148
|
+
if (!options.keepEmptyGroups && sourceGroup.model.size === 0 && sourceGroup !== destinationGroup) this.doRemoveGroup(sourceGroup, { skipActive: true });
|
|
71062
71149
|
const isDestinationGroupEmpty = destinationGroup.model.size === 0;
|
|
71063
71150
|
this.movingLock(() => {
|
|
71064
71151
|
var _options$skipSetActiv;
|
|
@@ -71192,6 +71279,7 @@ var DockviewComponent = class extends BaseGrid {
|
|
|
71192
71279
|
const from = options.from.group;
|
|
71193
71280
|
const to = options.to.group;
|
|
71194
71281
|
const target = options.to.position;
|
|
71282
|
+
if (target === "center" && from === to) return;
|
|
71195
71283
|
let source = from;
|
|
71196
71284
|
let mergedPanels;
|
|
71197
71285
|
if (target === "center") {
|
|
@@ -81176,7 +81264,7 @@ lit-html/static.js:
|
|
|
81176
81264
|
dockview-core/dist/package/main.esm.mjs:
|
|
81177
81265
|
(**
|
|
81178
81266
|
* dockview-core
|
|
81179
|
-
* @version 8.4.
|
|
81267
|
+
* @version 8.4.1
|
|
81180
81268
|
* @link https://github.com/dockview/dockview
|
|
81181
81269
|
* @license MIT
|
|
81182
81270
|
*)
|