@pstdio/workbench 0.40.0 → 0.42.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.
- package/dist/extensions.d.ts +354 -28
- package/dist/extensions.js +710 -577
- package/dist/extensions.js.map +1 -1
- package/dist/file-renderer-view-DA77lgiT.js +670 -0
- package/dist/file-renderer-view-DA77lgiT.js.map +1 -0
- package/dist/{index-DLh_fcGT.d.ts → index-BUtrxfUl.d.ts} +315 -223
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2457 -2184
- package/dist/index.js.map +1 -1
- package/dist/{kanban-presentation-Ds4FpmbS.d.ts → kanban-presentation-Wc433DQF.d.ts} +1 -1
- package/dist/navigation-tree-registry-DbTv4Kv7.js +120 -0
- package/dist/navigation-tree-registry-DbTv4Kv7.js.map +1 -0
- package/dist/react-Buqbh5XD.js +10568 -0
- package/dist/react-Buqbh5XD.js.map +1 -0
- package/dist/react.d.ts +90 -14
- package/dist/react.js +2 -2
- package/dist/storage.d.ts +3 -2
- package/dist/storage.js +28 -24
- package/dist/storage.js.map +1 -1
- package/dist/webview-runtime.js +1 -1
- package/dist/{workbench-renderers-DNXWpDWd.js → workbench-renderers-BGXfLY9a.js} +184 -127
- package/dist/workbench-renderers-BGXfLY9a.js.map +1 -0
- package/package.json +5 -7
- package/dist/file-renderer-view-C95GHv9m.js +0 -637
- package/dist/file-renderer-view-C95GHv9m.js.map +0 -1
- package/dist/navigation-tree-registry-DazyPivr.js +0 -106
- package/dist/navigation-tree-registry-DazyPivr.js.map +0 -1
- package/dist/react-NAZBfSZz.js +0 -8912
- package/dist/react-NAZBfSZz.js.map +0 -1
- package/dist/workbench-renderers-DNXWpDWd.js.map +0 -1
package/dist/extensions.js
CHANGED
|
@@ -1,46 +1,56 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as t } from "./navigation-tree-registry-
|
|
3
|
-
import {
|
|
4
|
-
import { ALWAYS_AVAILABLE_WEBVIEW_CAPABILITIES as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { k as e } from "./workbench-renderers-BGXfLY9a.js";
|
|
2
|
+
import { n as t } from "./navigation-tree-registry-DbTv4Kv7.js";
|
|
3
|
+
import { S as n, c as r, dt as i, l as a, u as o } from "./react-Buqbh5XD.js";
|
|
4
|
+
import { ALWAYS_AVAILABLE_WEBVIEW_CAPABILITIES as s, WEBVIEW_DECLARABLE_CAPABILITIES as c, WEBVIEW_HOST_CAPABILITIES as l, WEBVIEW_HOST_CAPABILITY_VERSION as u, WEBVIEW_SCOPED_DECLARABLE_CAPABILITIES as d, commandRefId as f, contributionRefId as p, isLocalizedString as m, isNavigationTarget as h, matchesResourceWhen as g, qualifyNavigationTarget as _, resourceKey as v } from "@pstdio/sdk/extensions";
|
|
5
|
+
import { c as y } from "react/compiler-runtime";
|
|
6
|
+
import { Box as b, Center as x, Stack as S, Text as C } from "@chakra-ui/react";
|
|
7
|
+
import { jsx as w, jsxs as ee } from "react/jsx-runtime";
|
|
8
|
+
import { createElement as T, useEffect as E, useRef as D, useState as te } from "react";
|
|
9
|
+
import { renderBadgeListDisplay as ne } from "@pstdio/ui/kanban-renderer";
|
|
10
|
+
import { host as re } from "rimless";
|
|
11
|
+
//#region ../pstdio-api-contracts/src/extensions/collection-view-legacy.ts
|
|
12
|
+
var ie = (e) => {
|
|
13
|
+
let t = {};
|
|
14
|
+
if (e.conjunction !== "and") return t;
|
|
15
|
+
for (let n of e.rules) t[n.attributeId] || (n.condition === "is-any-of" || n.condition === "has-any-of") && Array.isArray(n.value) && n.value.length > 0 && (t[n.attributeId] = [...n.value]);
|
|
16
|
+
return t;
|
|
17
|
+
}, ae = (e) => e[0] ? { ...e[0] } : {
|
|
18
|
+
attributeId: "manual",
|
|
19
|
+
direction: "asc"
|
|
20
|
+
}, oe = (e) => typeof e == "object" && !!e && "$l10n" in e && typeof e.$l10n == "string", se = /* @__PURE__ */ new Set([...l, ...c]), ce = new Set(d), le = (e) => se.has(e), ue = (e) => ce.has(e), de = (e) => {
|
|
11
21
|
let [t = "", n] = e.split("@"), r = t.indexOf(":");
|
|
12
22
|
return {
|
|
13
23
|
capability: e,
|
|
14
24
|
name: r === -1 ? t : t.slice(0, r),
|
|
15
25
|
scope: r === -1 ? void 0 : t.slice(r + 1),
|
|
16
|
-
version: n === void 0 ?
|
|
26
|
+
version: n === void 0 ? u : Number(n)
|
|
17
27
|
};
|
|
18
|
-
},
|
|
28
|
+
}, fe = (e) => ue(e.name) ? !!e.scope : e.scope === void 0, O = (e) => ({
|
|
19
29
|
capability: e,
|
|
20
30
|
code: "unsupported_webview_capability",
|
|
21
31
|
message: `Unsupported webview capability: ${e}`,
|
|
22
32
|
severity: "error"
|
|
23
|
-
}),
|
|
33
|
+
}), pe = (e, t, n) => ({
|
|
24
34
|
capability: e,
|
|
25
35
|
code: "unsupported_webview_capability_version",
|
|
26
|
-
message: `Unsupported webview capability version: ${t}@${n.toString()} (supported: ${
|
|
36
|
+
message: `Unsupported webview capability version: ${t}@${n.toString()} (supported: ${u.toString()})`,
|
|
27
37
|
severity: "error"
|
|
28
|
-
}),
|
|
38
|
+
}), me = (e) => ({
|
|
29
39
|
capability: e,
|
|
30
40
|
code: "undeclared_webview_capability",
|
|
31
41
|
message: `Webview did not declare host capability: ${e}`,
|
|
32
42
|
severity: "error"
|
|
33
|
-
}),
|
|
43
|
+
}), he = (e, t = {}) => {
|
|
34
44
|
let n = [], r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map();
|
|
35
|
-
for (let e of
|
|
45
|
+
for (let e of s) t[e] && r.add(e);
|
|
36
46
|
for (let a of e ?? []) {
|
|
37
|
-
let e =
|
|
38
|
-
if (!
|
|
47
|
+
let e = de(a);
|
|
48
|
+
if (!le(e.name) || !fe(e)) {
|
|
39
49
|
n.push(O(a));
|
|
40
50
|
continue;
|
|
41
51
|
}
|
|
42
|
-
if (e.version !==
|
|
43
|
-
n.push(
|
|
52
|
+
if (e.version !== u) {
|
|
53
|
+
n.push(pe(a, e.name, e.version));
|
|
44
54
|
continue;
|
|
45
55
|
}
|
|
46
56
|
if (e.name === "clipboard.write") continue;
|
|
@@ -60,28 +70,28 @@ var x = (e) => typeof e == "object" && !!e && "$l10n" in e && typeof e.$l10n ==
|
|
|
60
70
|
allowedScopes: i,
|
|
61
71
|
diagnostics: n
|
|
62
72
|
};
|
|
63
|
-
},
|
|
73
|
+
}, ge = (e) => {
|
|
64
74
|
let t = e.params;
|
|
65
75
|
return typeof t?.mount == "string" && t.mount.length > 0 ? t.mount : void 0;
|
|
66
|
-
},
|
|
67
|
-
let { allowed: t, allowedScopes: n, diagnostics: r } =
|
|
76
|
+
}, _e = (e) => {
|
|
77
|
+
let { allowed: t, allowedScopes: n, diagnostics: r } = he(e.declaredCapabilities, e.capabilities), i = (t) => {
|
|
68
78
|
e.onDiagnostic?.(t);
|
|
69
79
|
}, a = (e) => (i(e), Error(e.message));
|
|
70
80
|
return {
|
|
71
81
|
diagnostics: r,
|
|
72
82
|
async call(r) {
|
|
73
|
-
if (!
|
|
74
|
-
if (
|
|
75
|
-
let e =
|
|
83
|
+
if (!le(r.method) || r.method === "clipboard.write") throw a(O(r.method));
|
|
84
|
+
if (ue(r.method)) {
|
|
85
|
+
let e = ge(r);
|
|
76
86
|
if (!e) throw a(O(r.method));
|
|
77
|
-
if (!n.get(r.method)?.has(e)) throw a(
|
|
78
|
-
} else if (!t.has(r.method)) throw a(
|
|
87
|
+
if (!n.get(r.method)?.has(e)) throw a(me(`${r.method}:${e}`));
|
|
88
|
+
} else if (!t.has(r.method)) throw a(me(r.method));
|
|
79
89
|
let i = e.capabilities[r.method];
|
|
80
90
|
if (!i) throw a(O(r.method));
|
|
81
91
|
return await i(r.params);
|
|
82
92
|
}
|
|
83
93
|
};
|
|
84
|
-
},
|
|
94
|
+
}, ve = (e) => typeof e == "object" && !!e, ye = (e) => {
|
|
85
95
|
try {
|
|
86
96
|
let t = JSON.stringify(e);
|
|
87
97
|
if (typeof t == "string" && t.length > 0) return t;
|
|
@@ -91,21 +101,21 @@ var x = (e) => typeof e == "object" && !!e && "$l10n" in e && typeof e.$l10n ==
|
|
|
91
101
|
} catch {
|
|
92
102
|
return "Unknown error";
|
|
93
103
|
}
|
|
94
|
-
},
|
|
104
|
+
}, be = (e) => {
|
|
95
105
|
if (e instanceof Error) return {
|
|
96
106
|
message: e.message,
|
|
97
107
|
stack: e.stack
|
|
98
108
|
};
|
|
99
109
|
if (typeof e == "string") return { message: e };
|
|
100
|
-
if (
|
|
110
|
+
if (ve(e)) {
|
|
101
111
|
let t = typeof e.message == "string" ? e.message : null, n = typeof e.stack == "string" ? e.stack : void 0;
|
|
102
112
|
return t ? n ? {
|
|
103
113
|
message: t,
|
|
104
114
|
stack: n
|
|
105
|
-
} : { message: t } : { message:
|
|
115
|
+
} : { message: t } : { message: ye(e) };
|
|
106
116
|
}
|
|
107
|
-
return e == null ? { message: "Unknown error" } : { message:
|
|
108
|
-
},
|
|
117
|
+
return e == null ? { message: "Unknown error" } : { message: ye(e) };
|
|
118
|
+
}, xe = (e = []) => e.some((e) => e === "clipboard.write" || e === "clipboard.write@1") ? "fullscreen; clipboard-write" : "fullscreen", k = () => {
|
|
109
119
|
if (typeof document > "u") return {};
|
|
110
120
|
let e = getComputedStyle(document.documentElement), t = {};
|
|
111
121
|
for (let n = 0; n < e.length; n += 1) {
|
|
@@ -113,106 +123,93 @@ var x = (e) => typeof e == "object" && !!e && "$l10n" in e && typeof e.$l10n ==
|
|
|
113
123
|
r.startsWith("--chakra-") && (t[r] = e.getPropertyValue(r).trim());
|
|
114
124
|
}
|
|
115
125
|
return t;
|
|
116
|
-
},
|
|
126
|
+
}, A = (e) => {
|
|
117
127
|
if (typeof document > "u") return e;
|
|
118
128
|
let t = document.documentElement.getAttribute("data-theme");
|
|
119
129
|
if (t === "dark" || t === "light") return t;
|
|
120
130
|
let n = document.documentElement.getAttribute("data-color-mode");
|
|
121
131
|
return n === "dark" || n === "light" ? n : e;
|
|
122
|
-
},
|
|
132
|
+
}, Se = {
|
|
123
133
|
border: 0,
|
|
124
134
|
display: "block",
|
|
125
135
|
flex: "1 1 0%",
|
|
126
136
|
height: "100%",
|
|
127
137
|
minHeight: 0,
|
|
128
138
|
width: "100%"
|
|
129
|
-
},
|
|
139
|
+
}, Ce = {
|
|
130
140
|
display: "flex",
|
|
131
141
|
height: "100%",
|
|
132
142
|
minHeight: 0,
|
|
133
143
|
position: "relative",
|
|
134
144
|
width: "100%"
|
|
135
|
-
},
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
color: "#7a1f12",
|
|
139
|
-
display: "flex",
|
|
140
|
-
inset: 0,
|
|
141
|
-
justifyContent: "center",
|
|
142
|
-
padding: "24px",
|
|
143
|
-
position: "absolute",
|
|
144
|
-
textAlign: "center",
|
|
145
|
-
zIndex: 1
|
|
146
|
-
}, fe = "allow-scripts allow-forms allow-popups", pe = (e) => {
|
|
147
|
-
let { view: t, props: n, theme: r, capabilities: i, hostEvents: a, onReady: o, onError: s, onDiagnostics: c, title: l } = e, u = y(null), d = y(null), f = y(null), p = y(!1), m = y(null), _ = y(n), b = y(r), x = y(i), S = y(a), C = y(t.webview.capabilities), w = y(o), T = y(s), E = y(c), [D, O] = ee(null), [k, A] = ee(0);
|
|
148
|
-
return _.current = n, b.current = r, x.current = i, S.current = a, C.current = t.webview.capabilities, w.current = o, T.current = s, E.current = c, v(() => {
|
|
145
|
+
}, we = "allow-scripts allow-forms allow-popups", Te = (e) => {
|
|
146
|
+
let { view: t, props: n, theme: r, capabilities: i, hostEvents: a, onReady: o, onError: s, onDiagnostics: c, title: l } = e, u = D(null), d = D(null), f = D(!1), p = D(null), m = D(n), h = D(r), g = D(i), _ = D(a), v = D(t.webview.capabilities), y = D(o), b = D(s), x = D(c), [S, C] = te(0);
|
|
147
|
+
return m.current = n, h.current = r, g.current = i, _.current = a, v.current = t.webview.capabilities, y.current = o, b.current = s, x.current = c, E(() => {
|
|
149
148
|
let e = u.current;
|
|
150
149
|
if (!e) return;
|
|
151
150
|
let n = () => {
|
|
152
|
-
|
|
151
|
+
e.contentWindow !== p.current && C((e) => e + 1);
|
|
153
152
|
};
|
|
154
153
|
e.addEventListener("load", n);
|
|
155
|
-
let r = () => e.removeEventListener("load", n)
|
|
156
|
-
if (
|
|
157
|
-
|
|
158
|
-
let
|
|
159
|
-
e.length > 0 &&
|
|
160
|
-
},
|
|
161
|
-
capabilities:
|
|
162
|
-
declaredCapabilities:
|
|
163
|
-
onDiagnostic: (e) =>
|
|
154
|
+
let r = () => e.removeEventListener("load", n);
|
|
155
|
+
if (e.contentWindow === p.current) return r;
|
|
156
|
+
p.current = e.contentWindow;
|
|
157
|
+
let i = t.webview.styles, a = t.webview.moduleUrl, o = (e) => {
|
|
158
|
+
e.length > 0 && x.current?.(e);
|
|
159
|
+
}, s = () => _e({
|
|
160
|
+
capabilities: g.current ?? {},
|
|
161
|
+
declaredCapabilities: v.current,
|
|
162
|
+
onDiagnostic: (e) => o([e])
|
|
164
163
|
});
|
|
165
|
-
s(
|
|
166
|
-
let
|
|
164
|
+
o(s().diagnostics);
|
|
165
|
+
let c = {
|
|
167
166
|
ready: () => {},
|
|
168
167
|
runtimeError: (e) => {
|
|
169
|
-
|
|
168
|
+
b.current?.(e);
|
|
170
169
|
},
|
|
171
|
-
call: async (e) => await
|
|
170
|
+
call: async (e) => await s().call(e)
|
|
172
171
|
};
|
|
173
172
|
return (() => {
|
|
174
|
-
|
|
175
|
-
let n =
|
|
173
|
+
f.current = !1, d.current = null;
|
|
174
|
+
let n = re.connect(e, c);
|
|
176
175
|
e.contentWindow?.location.replace(t.webview.runtimeUrl), n.then(async (n) => {
|
|
177
176
|
if (u.current !== e) return;
|
|
178
177
|
let r = n.remote;
|
|
179
|
-
|
|
180
|
-
moduleUrl:
|
|
181
|
-
styles:
|
|
182
|
-
props:
|
|
183
|
-
theme:
|
|
184
|
-
themeVariables:
|
|
178
|
+
d.current = r, _.current?.bind((e) => r.hostEvent?.(e)), await r.init({
|
|
179
|
+
moduleUrl: a,
|
|
180
|
+
styles: i,
|
|
181
|
+
props: m.current,
|
|
182
|
+
theme: A(h.current),
|
|
183
|
+
themeVariables: k(),
|
|
185
184
|
extensionId: t.extensionId
|
|
186
|
-
}), u.current === e && (
|
|
185
|
+
}), u.current === e && (f.current = !0, y.current?.());
|
|
187
186
|
}).catch((t) => {
|
|
188
|
-
|
|
189
|
-
let n = se(t);
|
|
190
|
-
O(n.message), T.current?.(n);
|
|
187
|
+
u.current === e && b.current?.(be(t));
|
|
191
188
|
});
|
|
192
189
|
})(), r;
|
|
193
190
|
}, [
|
|
194
|
-
|
|
191
|
+
S,
|
|
195
192
|
t.extensionId,
|
|
196
193
|
t.webview.runtimeUrl,
|
|
197
194
|
t.webview.moduleUrl,
|
|
198
195
|
t.webview.styles
|
|
199
|
-
]),
|
|
200
|
-
let e =
|
|
196
|
+
]), E(() => {
|
|
197
|
+
let e = d.current;
|
|
201
198
|
if (e && a) return a.bind((t) => e.hostEvent?.(t)), () => a.unbind();
|
|
202
|
-
}, [a]),
|
|
203
|
-
|
|
204
|
-
}, [n]),
|
|
205
|
-
|
|
206
|
-
theme:
|
|
207
|
-
variables:
|
|
199
|
+
}, [a]), E(() => {
|
|
200
|
+
f.current && d.current?.propsUpdate({ props: n });
|
|
201
|
+
}, [n]), E(() => {
|
|
202
|
+
f.current && d.current?.themeUpdate({
|
|
203
|
+
theme: A(r),
|
|
204
|
+
variables: k()
|
|
208
205
|
});
|
|
209
|
-
}, [r]),
|
|
206
|
+
}, [r]), E(() => {
|
|
210
207
|
if (typeof window > "u" || typeof MutationObserver > "u") return;
|
|
211
208
|
let e = null, t = new MutationObserver(() => {
|
|
212
209
|
e !== null && cancelAnimationFrame(e), e = requestAnimationFrame(() => {
|
|
213
|
-
e = null,
|
|
214
|
-
theme:
|
|
215
|
-
variables:
|
|
210
|
+
e = null, f.current && d.current?.themeUpdate({
|
|
211
|
+
theme: A(h.current),
|
|
212
|
+
variables: k()
|
|
216
213
|
});
|
|
217
214
|
});
|
|
218
215
|
}), n = {
|
|
@@ -227,32 +224,26 @@ var x = (e) => typeof e == "object" && !!e && "$l10n" in e && typeof e.$l10n ==
|
|
|
227
224
|
return t.observe(document.documentElement, n), t.observe(document.body, n), () => {
|
|
228
225
|
t.disconnect(), e !== null && cancelAnimationFrame(e);
|
|
229
226
|
};
|
|
230
|
-
}, []), /* @__PURE__ */
|
|
231
|
-
style:
|
|
232
|
-
children:
|
|
233
|
-
role: "alert",
|
|
234
|
-
style: de,
|
|
235
|
-
children: /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("strong", { children: "Extension view failed to load." }), /* @__PURE__ */ h("div", { children: D })] })
|
|
236
|
-
}) : null, /* @__PURE__ */ h("iframe", {
|
|
227
|
+
}, []), /* @__PURE__ */ w("div", {
|
|
228
|
+
style: Ce,
|
|
229
|
+
children: /* @__PURE__ */ w("iframe", {
|
|
237
230
|
ref: u,
|
|
238
231
|
title: l ?? t.label,
|
|
239
|
-
allow:
|
|
240
|
-
|
|
241
|
-
sandbox: fe,
|
|
232
|
+
allow: xe(t.webview.capabilities),
|
|
233
|
+
sandbox: we,
|
|
242
234
|
style: {
|
|
243
|
-
...
|
|
235
|
+
...Se,
|
|
244
236
|
colorScheme: r
|
|
245
237
|
},
|
|
246
238
|
onError: () => {
|
|
247
|
-
|
|
248
|
-
O(e), T.current?.({ message: e });
|
|
239
|
+
b.current?.({ message: `Failed to load extension runtime at ${t.webview.runtimeUrl}` });
|
|
249
240
|
}
|
|
250
|
-
}, `${
|
|
241
|
+
}, `${S}\n${t.webview.runtimeUrl}\n${t.webview.moduleUrl}`)
|
|
251
242
|
});
|
|
252
|
-
},
|
|
253
|
-
t(`${
|
|
254
|
-
},
|
|
255
|
-
let n = (n) =>
|
|
243
|
+
}, Ee = "[pstdio.extension-host] ", De = (e, t = console.info) => {
|
|
244
|
+
t(`${Ee}${JSON.stringify(e)}`);
|
|
245
|
+
}, Oe = (e, t) => {
|
|
246
|
+
let n = (n) => De({
|
|
256
247
|
extensionId: e.extensionId,
|
|
257
248
|
contributionId: e.id,
|
|
258
249
|
...n
|
|
@@ -270,7 +261,7 @@ var x = (e) => typeof e == "object" && !!e && "$l10n" in e && typeof e.$l10n ==
|
|
|
270
261
|
});
|
|
271
262
|
}
|
|
272
263
|
};
|
|
273
|
-
},
|
|
264
|
+
}, ke = () => {
|
|
274
265
|
let e = null, t = [], n = /* @__PURE__ */ new Set();
|
|
275
266
|
return {
|
|
276
267
|
emit(n) {
|
|
@@ -287,10 +278,63 @@ var x = (e) => typeof e == "object" && !!e && "$l10n" in e && typeof e.$l10n ==
|
|
|
287
278
|
for (let e of n) e();
|
|
288
279
|
}
|
|
289
280
|
};
|
|
290
|
-
},
|
|
281
|
+
}, Ae = (e) => {
|
|
282
|
+
let t = y(20), n, r;
|
|
283
|
+
t[0] === e ? (n = t[1], r = t[2]) : ({view: r, ...n} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
284
|
+
let [i, a] = te(null), o;
|
|
285
|
+
t[3] === r ? o = t[4] : (o = Oe(r), t[3] = r, t[4] = o);
|
|
286
|
+
let s = o, c;
|
|
287
|
+
t[5] === i ? c = t[6] : (c = i ? /* @__PURE__ */ w(x, {
|
|
288
|
+
position: "absolute",
|
|
289
|
+
inset: "0",
|
|
290
|
+
px: "md",
|
|
291
|
+
zIndex: 1,
|
|
292
|
+
bg: "bg",
|
|
293
|
+
children: /* @__PURE__ */ ee(S, {
|
|
294
|
+
gap: "xs",
|
|
295
|
+
maxW: "md",
|
|
296
|
+
textAlign: "center",
|
|
297
|
+
children: [/* @__PURE__ */ w(C, {
|
|
298
|
+
textStyle: "paragraph/S/medium",
|
|
299
|
+
color: "fg.error",
|
|
300
|
+
children: "Extension view failed to load."
|
|
301
|
+
}), /* @__PURE__ */ w(C, {
|
|
302
|
+
textStyle: "paragraph/XS/regular",
|
|
303
|
+
color: "fg.muted",
|
|
304
|
+
children: i
|
|
305
|
+
})]
|
|
306
|
+
})
|
|
307
|
+
}) : null, t[5] = i, t[6] = c);
|
|
308
|
+
let l;
|
|
309
|
+
t[7] === s ? l = t[8] : (l = () => {
|
|
310
|
+
s.onReady(), a(null);
|
|
311
|
+
}, t[7] = s, t[8] = l);
|
|
312
|
+
let u;
|
|
313
|
+
t[9] === s ? u = t[10] : (u = (e) => {
|
|
314
|
+
s.onError(e), a(e.message);
|
|
315
|
+
}, t[9] = s, t[10] = u);
|
|
316
|
+
let d;
|
|
317
|
+
t[11] !== s.onDiagnostics || t[12] !== n || t[13] !== l || t[14] !== u || t[15] !== r ? (d = /* @__PURE__ */ w(Te, {
|
|
318
|
+
view: r,
|
|
319
|
+
...n,
|
|
320
|
+
onReady: l,
|
|
321
|
+
onDiagnostics: s.onDiagnostics,
|
|
322
|
+
onError: u
|
|
323
|
+
}), t[11] = s.onDiagnostics, t[12] = n, t[13] = l, t[14] = u, t[15] = r, t[16] = d) : d = t[16];
|
|
324
|
+
let f;
|
|
325
|
+
return t[17] !== c || t[18] !== d ? (f = /* @__PURE__ */ ee(b, {
|
|
326
|
+
position: "relative",
|
|
327
|
+
width: "100%",
|
|
328
|
+
height: "100%",
|
|
329
|
+
minH: "0",
|
|
330
|
+
display: "flex",
|
|
331
|
+
flexDirection: "column",
|
|
332
|
+
children: [c, d]
|
|
333
|
+
}), t[17] = c, t[18] = d, t[19] = f) : f = t[19], f;
|
|
334
|
+
}, je = "terminal.session", j = (e) => {
|
|
291
335
|
let { terminal: t, hostEvents: n } = e, r = (e) => {
|
|
292
336
|
n.emit({
|
|
293
|
-
scope:
|
|
337
|
+
scope: je,
|
|
294
338
|
payload: e
|
|
295
339
|
});
|
|
296
340
|
};
|
|
@@ -351,7 +395,7 @@ var x = (e) => typeof e == "object" && !!e && "$l10n" in e && typeof e.$l10n ==
|
|
|
351
395
|
}
|
|
352
396
|
}
|
|
353
397
|
};
|
|
354
|
-
},
|
|
398
|
+
}, Me = (e) => {
|
|
355
399
|
if (typeof document > "u") return;
|
|
356
400
|
let t = new KeyboardEvent("keydown", {
|
|
357
401
|
...e,
|
|
@@ -359,7 +403,7 @@ var x = (e) => typeof e == "object" && !!e && "$l10n" in e && typeof e.$l10n ==
|
|
|
359
403
|
cancelable: !0
|
|
360
404
|
});
|
|
361
405
|
document.dispatchEvent(t);
|
|
362
|
-
},
|
|
406
|
+
}, M = (e) => ({
|
|
363
407
|
...e.placement?.placementIdentity ? { "placement.close": (t) => {
|
|
364
408
|
if (t !== void 0 && (typeof t != "object" || !t || Array.isArray(t) || Object.keys(t).length > 0)) throw Error("placement.close takes no parameters; the host supplies the calling placement.");
|
|
365
409
|
e.workbench.closePlacement(e.placement.placementIdentity);
|
|
@@ -392,19 +436,19 @@ var x = (e) => typeof e == "object" && !!e && "$l10n" in e && typeof e.$l10n ==
|
|
|
392
436
|
value: n.value
|
|
393
437
|
};
|
|
394
438
|
},
|
|
395
|
-
"host.dispatchKeyboardEvent": (t) => (e.dispatchKeyboardEvent ??
|
|
396
|
-
...e.hostEvents ? { "terminal.session":
|
|
439
|
+
"host.dispatchKeyboardEvent": (t) => (e.dispatchKeyboardEvent ?? Me)(t),
|
|
440
|
+
...e.hostEvents ? { "terminal.session": j({
|
|
397
441
|
terminal: e.workbench.terminal,
|
|
398
442
|
hostEvents: e.hostEvents
|
|
399
443
|
}) } : {}
|
|
400
|
-
}),
|
|
401
|
-
let n =
|
|
402
|
-
n || (n = /* @__PURE__ */ new Map(),
|
|
444
|
+
}), Ne = () => "light", N = /* @__PURE__ */ new WeakMap(), Pe = (e, t) => {
|
|
445
|
+
let n = N.get(e);
|
|
446
|
+
n || (n = /* @__PURE__ */ new Map(), N.set(e, n));
|
|
403
447
|
let r = t.instanceId, i = n.get(r);
|
|
404
|
-
return i || (i =
|
|
405
|
-
},
|
|
406
|
-
let { context: t, createHostCapabilities: n, createProps: r, createTheme: i =
|
|
407
|
-
return /* @__PURE__ */
|
|
448
|
+
return i || (i = ke(), n.set(r, i)), i;
|
|
449
|
+
}, Fe = (e) => {
|
|
450
|
+
let { context: t, createHostCapabilities: n, createProps: r, createTheme: i = Ne, ownerId: a, title: o, webview: s } = e;
|
|
451
|
+
return /* @__PURE__ */ w(Ae, {
|
|
408
452
|
view: {
|
|
409
453
|
extensionId: a ?? "workbench",
|
|
410
454
|
id: t.webviewId,
|
|
@@ -419,13 +463,9 @@ var x = (e) => typeof e == "object" && !!e && "$l10n" in e && typeof e.$l10n ==
|
|
|
419
463
|
props: r(t),
|
|
420
464
|
theme: i(t),
|
|
421
465
|
capabilities: n(t),
|
|
422
|
-
hostEvents: t.hostEvents
|
|
423
|
-
...ge({
|
|
424
|
-
extensionId: a ?? "workbench",
|
|
425
|
-
id: t.webviewId
|
|
426
|
-
})
|
|
466
|
+
hostEvents: t.hostEvents
|
|
427
467
|
});
|
|
428
|
-
},
|
|
468
|
+
}, P = (e, t = "") => e === void 0 ? t : oe(e) ? e.default ?? e.$l10n : e, Ie = (e, t) => {
|
|
429
469
|
let n = t.commandTargetOf?.(e);
|
|
430
470
|
if (n) return n;
|
|
431
471
|
let r = e.target.command, i = r.extensionId ?? t.extensionId;
|
|
@@ -435,28 +475,49 @@ var x = (e) => typeof e == "object" && !!e && "$l10n" in e && typeof e.$l10n ==
|
|
|
435
475
|
args: e.target.params
|
|
436
476
|
};
|
|
437
477
|
};
|
|
438
|
-
function
|
|
439
|
-
if (!
|
|
440
|
-
return t.extensionId && (e =
|
|
478
|
+
function F(e, t = {}) {
|
|
479
|
+
if (!h(e)) throw Error("Invalid navigation target.");
|
|
480
|
+
return t.extensionId && (e = _(e, t.extensionId, t.projectId)), e.kind === "command" ? Ie(e, t) : e.kind === "href" || e.kind === "page" || e.kind === "panel" ? e : {
|
|
441
481
|
kind: "compound",
|
|
442
|
-
targets: e.targets.map((e) =>
|
|
482
|
+
targets: e.targets.map((e) => F(e, t))
|
|
443
483
|
};
|
|
444
484
|
}
|
|
445
485
|
//#endregion
|
|
446
486
|
//#region src/extensions/host/command-response.ts
|
|
447
|
-
var
|
|
487
|
+
var Le = (e) => {
|
|
448
488
|
let t = e;
|
|
449
489
|
if (!t?.outcome) return e;
|
|
450
490
|
if (t.outcome.status === "success") return t.outcome.value;
|
|
451
491
|
throw Error(t.outcome.reason ?? t.outcome.error?.message ?? "Extension command failed.");
|
|
452
|
-
},
|
|
492
|
+
}, Re = async (e, t, n, r, i) => {
|
|
493
|
+
let a = t.resourceMutation;
|
|
494
|
+
if (!a) return i();
|
|
495
|
+
let o = n?.[a.idParam] ?? r?.resource?.id;
|
|
496
|
+
if (typeof o != "string") return i();
|
|
497
|
+
let s = {
|
|
498
|
+
type: a.resourceType,
|
|
499
|
+
id: o,
|
|
500
|
+
extensionId: t.extensionId,
|
|
501
|
+
projectId: e.projectId
|
|
502
|
+
};
|
|
503
|
+
if (a.kind === "remove" && !await e.workbench.commandPalette.requestConfirmation(P(t.title, "Delete"))) return;
|
|
504
|
+
let c = a.kind === "rename" ? n?.[a.labelParam] : void 0;
|
|
505
|
+
if (a.kind === "rename" && (typeof c != "string" || !c.trim())) return i();
|
|
506
|
+
let l = e.workbench.resources.preview.begin(s, a.kind === "remove" ? { removed: !0 } : { label: c.trim() });
|
|
507
|
+
try {
|
|
508
|
+
let t = await e.workbench.resources.preview.persist(s, i);
|
|
509
|
+
return await l.commit(), t;
|
|
510
|
+
} catch (e) {
|
|
511
|
+
throw l.rollback(), e;
|
|
512
|
+
}
|
|
513
|
+
}, I = (e) => ({
|
|
453
514
|
id: e.id,
|
|
454
515
|
kind: e.kind,
|
|
455
516
|
context: {
|
|
456
517
|
projectId: e.projectId,
|
|
457
518
|
...e.context ?? {}
|
|
458
519
|
}
|
|
459
|
-
}),
|
|
520
|
+
}), L = async (e, t, n = {}) => {
|
|
460
521
|
let r = n.resource, i = await e.executeCommand(t, {
|
|
461
522
|
projectId: e.projectId,
|
|
462
523
|
...n.workspaceId ? { workspaceId: n.workspaceId } : {},
|
|
@@ -466,10 +527,10 @@ var De = (e) => {
|
|
|
466
527
|
source: "dashboard",
|
|
467
528
|
...n.metadata ? { metadata: n.metadata } : {}
|
|
468
529
|
}, n.signal);
|
|
469
|
-
|
|
530
|
+
Le(i);
|
|
470
531
|
let a = i?.outcome;
|
|
471
532
|
if (a?.status === "success") for (let t of a.navigationRequests ?? []) try {
|
|
472
|
-
await e.workbench.navigation.openTarget(
|
|
533
|
+
await e.workbench.navigation.openTarget(F(t));
|
|
473
534
|
} catch (t) {
|
|
474
535
|
e.workbench.notifications.show({
|
|
475
536
|
level: "warning",
|
|
@@ -478,52 +539,69 @@ var De = (e) => {
|
|
|
478
539
|
});
|
|
479
540
|
}
|
|
480
541
|
return i;
|
|
481
|
-
},
|
|
542
|
+
}, R = async (e, t, n = {}) => {
|
|
543
|
+
let r = async () => Le(await L(e, t, n)), i = e.metadata?.commands.find((e) => e.id === t);
|
|
544
|
+
return i ? Re(e, i, n.params, { resource: n.resource }, r) : r();
|
|
545
|
+
}, ze = (e) => typeof e == "object" && !!e && !Array.isArray(e), Be = (e, t) => `${e.extensionId ?? t}.command.${e.id}`, Ve = async (e, t, n) => {
|
|
482
546
|
let { target: r } = n;
|
|
483
547
|
if (r.kind === "command") {
|
|
484
|
-
await
|
|
548
|
+
await R(e, Be(r.target.command, t.extensionId), { params: r.target.params }), e.workbench.commandPaletteResources.refresh();
|
|
485
549
|
return;
|
|
486
550
|
}
|
|
487
|
-
await e.workbench.navigation.openTarget(
|
|
488
|
-
},
|
|
551
|
+
await e.workbench.navigation.openTarget(F(r, { extensionId: t.extensionId }));
|
|
552
|
+
}, He = (e) => {
|
|
553
|
+
if (e.kind === "page" || e.kind === "panel") return e.resource;
|
|
554
|
+
if (e.kind === "compound") return e.targets.find((e) => e.resource)?.resource;
|
|
555
|
+
}, Ue = (e, t, n, r) => ({
|
|
489
556
|
id: `${t.id}:${r.id}`,
|
|
557
|
+
resource: (() => {
|
|
558
|
+
let n = He(r.target);
|
|
559
|
+
return n ? {
|
|
560
|
+
...n,
|
|
561
|
+
projectId: n.projectId ?? e.projectId,
|
|
562
|
+
extensionId: n.extensionId ?? t.extensionId
|
|
563
|
+
} : void 0;
|
|
564
|
+
})(),
|
|
490
565
|
label: r.label,
|
|
491
566
|
description: r.description,
|
|
492
567
|
icon: r.icon,
|
|
493
568
|
keywords: r.keywords,
|
|
494
569
|
group: n,
|
|
495
|
-
activate: () =>
|
|
496
|
-
}),
|
|
570
|
+
activate: () => Ve(e, t, r)
|
|
571
|
+
}), We = (e, t) => {
|
|
497
572
|
let n = [];
|
|
498
573
|
for (let r of t) {
|
|
499
|
-
let t =
|
|
574
|
+
let t = P(r.title, r.id);
|
|
500
575
|
n.push(e.workbench.commandPaletteResources.registerProvider({
|
|
501
576
|
id: r.id,
|
|
502
577
|
title: t,
|
|
503
578
|
refreshEventIds: r.refreshEventIds,
|
|
504
|
-
query: async ({ query: n, limit: i }) => {
|
|
505
|
-
let
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
579
|
+
query: async ({ query: n, limit: i, signal: a }) => {
|
|
580
|
+
let o = e.workbench.getActiveResource(), s = await R(e, r.queryHandlerId, {
|
|
581
|
+
signal: a,
|
|
582
|
+
params: {
|
|
583
|
+
projectId: e.projectId,
|
|
584
|
+
modeId: e.workbench.modes.getActiveModeId(),
|
|
585
|
+
activeResource: o,
|
|
586
|
+
providerId: r.id,
|
|
587
|
+
query: n,
|
|
588
|
+
limit: i
|
|
589
|
+
}
|
|
590
|
+
});
|
|
591
|
+
return ze(s) ? (s.items ?? []).map((n) => Ue(e, r, t, n)) : [];
|
|
514
592
|
}
|
|
515
593
|
}));
|
|
516
594
|
}
|
|
517
595
|
return { dispose() {
|
|
518
596
|
for (let e = n.length - 1; e >= 0; --e) n[e]?.dispose();
|
|
519
597
|
} };
|
|
520
|
-
},
|
|
521
|
-
let
|
|
598
|
+
}, z = (e, t = "") => P(e, t), Ge = (e, t, n) => {
|
|
599
|
+
let r = I({
|
|
522
600
|
id: t.id,
|
|
523
601
|
kind: "renderer",
|
|
524
602
|
projectId: e.projectId,
|
|
525
603
|
context: { controlsRendererId: t.id }
|
|
526
|
-
}),
|
|
604
|
+
}), i = (n, i, a, o) => n ? R(e, n, {
|
|
527
605
|
params: {
|
|
528
606
|
renderer: {
|
|
529
607
|
rendererId: t.id,
|
|
@@ -531,181 +609,184 @@ var De = (e) => {
|
|
|
531
609
|
...a ? { resource: a } : {},
|
|
532
610
|
invocation: { placement: "visible" }
|
|
533
611
|
},
|
|
534
|
-
...
|
|
612
|
+
...i
|
|
535
613
|
},
|
|
536
614
|
resource: a,
|
|
537
615
|
signal: o,
|
|
538
|
-
slot:
|
|
616
|
+
slot: r,
|
|
539
617
|
metadata: { controlsRendererId: t.id }
|
|
540
618
|
}) : Promise.resolve(void 0);
|
|
541
619
|
return e.workbench.views.registerView({
|
|
542
620
|
id: t.id,
|
|
543
|
-
title:
|
|
621
|
+
title: z(t.title, t.id),
|
|
544
622
|
icon: t.icon,
|
|
545
623
|
body: {
|
|
546
624
|
kind: "controls",
|
|
547
|
-
emptyTitle:
|
|
548
|
-
emptyDescription:
|
|
625
|
+
emptyTitle: z(t.emptyTitle, ""),
|
|
626
|
+
emptyDescription: z(t.emptyDescription, ""),
|
|
549
627
|
defaultValues: t.defaultValues,
|
|
550
|
-
executeQuery: async (e,
|
|
551
|
-
let
|
|
628
|
+
executeQuery: async (e, r) => {
|
|
629
|
+
let a = await i(t.queryHandlerId, {}, e ?? n.resolveResource?.(t), r), s = o.safeParse(a);
|
|
552
630
|
if (!s.success) {
|
|
553
631
|
let e = s.error.issues.map((e) => `body.query.${e.path.join(".")}: ${e.message}`).join("; ");
|
|
554
632
|
throw Error(`Extension "${t.extensionId}" view "${t.id}" has invalid controls. Expected serializable control declarations. ${e}`);
|
|
555
633
|
}
|
|
556
634
|
return s.data;
|
|
557
635
|
},
|
|
558
|
-
updateValue: t.valueChangeHandlerId ? ({ controlId: e, value: n, values: r, resource:
|
|
636
|
+
updateValue: t.valueChangeHandlerId ? ({ controlId: e, value: n, values: r, resource: a }) => i(t.valueChangeHandlerId, {
|
|
559
637
|
controlId: e,
|
|
560
638
|
value: n,
|
|
561
639
|
values: r
|
|
562
|
-
},
|
|
563
|
-
apply: t.applyHandlerId ? ({ values: e, resource: n }) =>
|
|
564
|
-
reset: t.resetHandlerId ? ({ controlIds: e, resource: n }) =>
|
|
640
|
+
}, a).then(() => void 0) : void 0,
|
|
641
|
+
apply: t.applyHandlerId ? ({ values: e, resource: n }) => i(t.applyHandlerId, { values: e }, n).then(() => void 0) : void 0,
|
|
642
|
+
reset: t.resetHandlerId ? ({ controlIds: e, resource: n }) => i(t.resetHandlerId, { controlIds: e }, n).then(() => void 0) : void 0
|
|
565
643
|
}
|
|
566
644
|
});
|
|
567
|
-
},
|
|
645
|
+
}, Ke = (e, t, n = {}) => {
|
|
568
646
|
let r = [];
|
|
569
|
-
for (let i of t) r.push(
|
|
647
|
+
for (let i of t) r.push(Ge(e, i, n));
|
|
570
648
|
return { dispose() {
|
|
571
649
|
for (let e = r.length - 1; e >= 0; --e) r[e]?.dispose();
|
|
572
650
|
} };
|
|
573
|
-
},
|
|
574
|
-
if (!e) return;
|
|
575
|
-
let t = (e) => {
|
|
576
|
-
if (e) return Array.isArray(e) ? e.map(z) : z(e);
|
|
577
|
-
};
|
|
578
|
-
return {
|
|
579
|
-
mode: t(e.mode),
|
|
580
|
-
source: e.source,
|
|
581
|
-
viewId: t(e.view),
|
|
582
|
-
resourceType: e.resourceType?.map((e) => e.id),
|
|
583
|
-
metadata: e.metadata
|
|
584
|
-
};
|
|
585
|
-
}, Ie = Fe, V = (e, t, n) => {
|
|
651
|
+
}, B = (e, t, n) => {
|
|
586
652
|
if (e) return Object.fromEntries(Object.entries(e).map(([e, r]) => [e, {
|
|
587
653
|
...r,
|
|
588
|
-
...r.options && !Array.isArray(r.options) ? { options:
|
|
654
|
+
...r.options && !Array.isArray(r.options) ? { options: qe(r.options, n) } : {},
|
|
589
655
|
label: r.label === void 0 ? void 0 : t(r.label, e),
|
|
590
656
|
description: r.description === void 0 ? void 0 : t(r.description)
|
|
591
657
|
}]));
|
|
592
|
-
},
|
|
658
|
+
}, qe = (e, t) => {
|
|
593
659
|
let n = e;
|
|
594
660
|
return {
|
|
595
661
|
valueField: n.valueField,
|
|
596
662
|
labelField: n.labelField,
|
|
597
663
|
params: n.params,
|
|
598
|
-
commandId:
|
|
664
|
+
commandId: f({
|
|
599
665
|
id: n.command.id,
|
|
600
666
|
extensionId: n.command.extensionId ?? t ?? "pstdio"
|
|
601
667
|
})
|
|
602
668
|
};
|
|
603
|
-
},
|
|
669
|
+
}, Je = (e) => e.toolbarActions?.map((t) => ({
|
|
604
670
|
id: t.id,
|
|
605
|
-
label:
|
|
671
|
+
label: P(t.label, t.id),
|
|
606
672
|
icon: t.icon,
|
|
607
673
|
presentation: t.presentation,
|
|
608
674
|
commandId: t.commandId,
|
|
609
675
|
args: t.params,
|
|
610
|
-
params:
|
|
676
|
+
params: B(t.input, P, e.extensionId),
|
|
611
677
|
submitLabel: t.submitLabel,
|
|
612
678
|
disabled: t.disabled,
|
|
613
679
|
when: t.when
|
|
614
|
-
})),
|
|
680
|
+
})), V = (e, t = "") => P(e, t), Ye = (e) => ({
|
|
615
681
|
...e,
|
|
616
|
-
label:
|
|
617
|
-
description: e.description ?
|
|
618
|
-
icon: e.icon ?
|
|
682
|
+
label: V(e.label, e.id),
|
|
683
|
+
description: e.description ? V(e.description) : void 0,
|
|
684
|
+
icon: e.icon ? T(i, {
|
|
619
685
|
name: e.icon,
|
|
620
686
|
size: 14
|
|
621
687
|
}) : void 0
|
|
622
|
-
}),
|
|
688
|
+
}), Xe = (e) => !!(e && typeof e == "object" && Array.isArray(e.rows)), Ze = (e) => ({
|
|
623
689
|
id: e.id,
|
|
624
690
|
values: e.values,
|
|
625
691
|
resource: e.resource ? e.resource : void 0
|
|
626
|
-
}),
|
|
627
|
-
let
|
|
692
|
+
}), Qe = (e, t, n) => {
|
|
693
|
+
let a = r(t), o = /* @__PURE__ */ new WeakMap(), s = I({
|
|
628
694
|
id: t.id,
|
|
629
695
|
kind: "dataTableRenderer",
|
|
630
696
|
projectId: e.projectId,
|
|
631
697
|
context: { dataTableRendererId: t.id }
|
|
632
|
-
}),
|
|
698
|
+
}), c = (n, r, i, a, o) => R(e, n, {
|
|
633
699
|
params: {
|
|
634
700
|
renderer: {
|
|
635
701
|
rendererId: t.id,
|
|
636
702
|
projectId: e.projectId,
|
|
637
|
-
...
|
|
638
|
-
...
|
|
703
|
+
...a ? { modeId: a } : {},
|
|
704
|
+
...i ? { resource: i } : {},
|
|
639
705
|
invocation: { placement: "visible" }
|
|
640
706
|
},
|
|
641
|
-
...
|
|
707
|
+
...r
|
|
642
708
|
},
|
|
643
|
-
resource:
|
|
644
|
-
signal:
|
|
645
|
-
slot:
|
|
709
|
+
resource: i,
|
|
710
|
+
signal: o,
|
|
711
|
+
slot: s,
|
|
646
712
|
metadata: { dataTableRendererId: t.id }
|
|
647
713
|
});
|
|
648
714
|
return e.workbench.views.registerView({
|
|
649
715
|
id: t.id,
|
|
650
|
-
title:
|
|
716
|
+
title: V(t.title, t.id),
|
|
651
717
|
icon: t.icon,
|
|
652
718
|
body: {
|
|
653
719
|
kind: "dataTable",
|
|
654
720
|
resourceKind: t.resourceKind,
|
|
655
|
-
toolbarActions:
|
|
656
|
-
columns: t.columns?.map(
|
|
721
|
+
toolbarActions: Je(t),
|
|
722
|
+
columns: t.columns?.map(Ye),
|
|
657
723
|
initialPageSize: t.initialPageSize,
|
|
658
724
|
pageSizeOptions: t.pageSizeOptions,
|
|
725
|
+
defaultSettings: a.settings,
|
|
726
|
+
defaultFilter: t.defaultFilter,
|
|
727
|
+
defaultSorts: t.defaultSorts,
|
|
728
|
+
defaultViews: a.views.map((e) => ({
|
|
729
|
+
...e,
|
|
730
|
+
title: V(e.title, e.id)
|
|
731
|
+
})),
|
|
732
|
+
defaultActiveViewId: t.defaultActiveViewId,
|
|
733
|
+
viewsProvider: n.createViewsProvider?.(t),
|
|
659
734
|
selectionMode: t.selectionMode,
|
|
660
735
|
selectionActions: t.selectionActions?.map((e) => ({
|
|
661
736
|
id: e.id,
|
|
662
|
-
|
|
663
|
-
|
|
737
|
+
commandId: e.commandId,
|
|
738
|
+
label: V(e.label, e.id),
|
|
739
|
+
icon: e.icon ? T(i, {
|
|
664
740
|
name: e.icon,
|
|
665
741
|
size: 16
|
|
666
742
|
}) : void 0,
|
|
667
743
|
destructive: e.destructive,
|
|
668
|
-
run: (t) =>
|
|
744
|
+
run: (t) => c(e.commandId, { rowIds: t.map((e) => e.id) }).then(() => void 0)
|
|
669
745
|
})),
|
|
670
|
-
emptyTitle: t.emptyTitle ?
|
|
671
|
-
emptyDescription: t.emptyDescription ?
|
|
672
|
-
executeQuery: async ({ resource: e, modeId: r },
|
|
673
|
-
let
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
746
|
+
emptyTitle: t.emptyTitle ? V(t.emptyTitle) : void 0,
|
|
747
|
+
emptyDescription: t.emptyDescription ? V(t.emptyDescription) : void 0,
|
|
748
|
+
executeQuery: async ({ resource: e, modeId: r, filter: i, sorts: a, settings: s }, l) => {
|
|
749
|
+
let u = await c(t.queryHandlerId, {
|
|
750
|
+
filter: i,
|
|
751
|
+
sorts: a,
|
|
752
|
+
settings: s
|
|
753
|
+
}, e, r, l);
|
|
754
|
+
return Xe(u) ? {
|
|
755
|
+
rows: u.rows.map((e) => {
|
|
756
|
+
let r = Ze(e);
|
|
757
|
+
return n.resolveRowResource && (r.resource = n.resolveRowResource(t, e)), o.set(r, e), r;
|
|
678
758
|
}),
|
|
679
|
-
columns:
|
|
759
|
+
columns: u.columns?.map(Ye)
|
|
680
760
|
} : { rows: [] };
|
|
681
761
|
},
|
|
682
762
|
rowActions: t.rowActions?.map((n) => ({
|
|
683
763
|
id: n.id,
|
|
684
|
-
|
|
685
|
-
|
|
764
|
+
commandId: n.commandId,
|
|
765
|
+
label: V(n.label, n.id),
|
|
766
|
+
icon: n.icon ? T(i, {
|
|
686
767
|
name: n.icon,
|
|
687
768
|
size: 16
|
|
688
769
|
}) : void 0,
|
|
689
770
|
destructive: n.destructive,
|
|
690
771
|
run: async (r) => {
|
|
691
|
-
await
|
|
772
|
+
await c(n.commandId, { rowId: r.id }, r.resource), e.workbench.views.refreshView(t.id);
|
|
692
773
|
}
|
|
693
774
|
})),
|
|
694
775
|
onRowActivate: t.rowActivationHandlerId ? async (e) => {
|
|
695
|
-
await
|
|
776
|
+
await c(t.rowActivationHandlerId, { row: o.get(e) ?? e }, e.resource);
|
|
696
777
|
} : void 0
|
|
697
778
|
}
|
|
698
779
|
});
|
|
699
|
-
},
|
|
700
|
-
let
|
|
780
|
+
}, $e = (e, t, n = {}) => {
|
|
781
|
+
let r = t.map((t) => Qe(e, t, n));
|
|
701
782
|
return { dispose() {
|
|
702
|
-
for (let e =
|
|
783
|
+
for (let e = r.length - 1; e >= 0; --e) r[e]?.dispose();
|
|
703
784
|
} };
|
|
704
|
-
},
|
|
785
|
+
}, et = {
|
|
705
786
|
first: 0,
|
|
706
787
|
default: 1,
|
|
707
788
|
last: 2
|
|
708
|
-
},
|
|
789
|
+
}, tt = {
|
|
709
790
|
commands: [],
|
|
710
791
|
commandPaletteContributions: [],
|
|
711
792
|
diagnostics: [],
|
|
@@ -723,7 +804,7 @@ var De = (e) => {
|
|
|
723
804
|
statuses: [],
|
|
724
805
|
settingsPanels: [],
|
|
725
806
|
settingsDefinitions: []
|
|
726
|
-
},
|
|
807
|
+
}, nt = (e) => `workbench.extension.menu.${e.id}`, rt = (e) => `workbench.extension.palette.${e.id}`, it = (e, t) => et[e.placement ?? "default"] * 1e3 + t, at = (e) => e === void 0 ? "" : m(e) ? e.default ?? e.$l10n : e, ot = (e) => {
|
|
727
808
|
let { commandId: t, contribution: n, index: r, resolveString: i, slot: a, when: o } = e;
|
|
728
809
|
return {
|
|
729
810
|
commandId: t,
|
|
@@ -733,21 +814,22 @@ var De = (e) => {
|
|
|
733
814
|
group: a.group ?? n.group,
|
|
734
815
|
args: n.params,
|
|
735
816
|
overflowLabel: a.overflowLabel,
|
|
736
|
-
order:
|
|
817
|
+
order: it(n, r),
|
|
737
818
|
when: o
|
|
738
819
|
};
|
|
739
|
-
},
|
|
820
|
+
}, st = (e) => {
|
|
740
821
|
let { commandId: t, contribution: n, index: r, resolveString: i } = e;
|
|
741
822
|
return {
|
|
742
823
|
commandId: t,
|
|
824
|
+
sourceCommandId: n.commandId,
|
|
743
825
|
label: i(n.label, n.extensionId),
|
|
744
826
|
icon: n.icon,
|
|
745
827
|
group: n.group,
|
|
746
828
|
args: n.params,
|
|
747
|
-
order:
|
|
829
|
+
order: it(n, r)
|
|
748
830
|
};
|
|
749
|
-
},
|
|
750
|
-
let { createCommandId: t =
|
|
831
|
+
}, ct = (e) => {
|
|
832
|
+
let { createCommandId: t = nt, createWhenExpression: n, menuSlotsById: r, menuTargetsById: i, metadata: a, resolveString: o = at } = e, s = [], c = [];
|
|
751
833
|
return a.menuContributions.forEach((e, l) => {
|
|
752
834
|
let u = e.target ? i?.get(e.target) : r.get(e.slotId);
|
|
753
835
|
if (!u) {
|
|
@@ -768,7 +850,7 @@ var De = (e) => {
|
|
|
768
850
|
params: f?.params
|
|
769
851
|
},
|
|
770
852
|
contribution: e,
|
|
771
|
-
menuItem:
|
|
853
|
+
menuItem: ot({
|
|
772
854
|
commandId: d,
|
|
773
855
|
contribution: e,
|
|
774
856
|
index: l,
|
|
@@ -783,8 +865,8 @@ var De = (e) => {
|
|
|
783
865
|
registrations: s,
|
|
784
866
|
unresolved: c
|
|
785
867
|
};
|
|
786
|
-
},
|
|
787
|
-
let { createCommandId: t =
|
|
868
|
+
}, lt = (e) => {
|
|
869
|
+
let { createCommandId: t = rt, metadata: n, resolveString: r = at } = e, i = [];
|
|
788
870
|
return (n.commandPaletteContributions ?? []).forEach((e, a) => {
|
|
789
871
|
let o = t(e), s = n.commands.find((t) => t.id === e.commandId);
|
|
790
872
|
i.push({
|
|
@@ -797,7 +879,7 @@ var De = (e) => {
|
|
|
797
879
|
params: s?.params
|
|
798
880
|
},
|
|
799
881
|
contribution: e,
|
|
800
|
-
menuItem:
|
|
882
|
+
menuItem: st({
|
|
801
883
|
commandId: o,
|
|
802
884
|
contribution: e,
|
|
803
885
|
index: a,
|
|
@@ -806,7 +888,7 @@ var De = (e) => {
|
|
|
806
888
|
targetCommandId: e.commandId
|
|
807
889
|
});
|
|
808
890
|
}), i;
|
|
809
|
-
},
|
|
891
|
+
}, ut = (e) => ({
|
|
810
892
|
id: e.rendererId,
|
|
811
893
|
kind: "renderer",
|
|
812
894
|
context: {
|
|
@@ -816,9 +898,9 @@ var De = (e) => {
|
|
|
816
898
|
resourceId: e.resource.id
|
|
817
899
|
} : {}
|
|
818
900
|
}
|
|
819
|
-
}),
|
|
901
|
+
}), dt = async (e, t, n, r, i = {}, a, o) => {
|
|
820
902
|
let s = r;
|
|
821
|
-
return
|
|
903
|
+
return R(e, n, {
|
|
822
904
|
params: {
|
|
823
905
|
renderer: {
|
|
824
906
|
rendererId: t,
|
|
@@ -830,23 +912,23 @@ var De = (e) => {
|
|
|
830
912
|
},
|
|
831
913
|
resource: s,
|
|
832
914
|
signal: o,
|
|
833
|
-
slot:
|
|
915
|
+
slot: ut({
|
|
834
916
|
projectId: e.projectId,
|
|
835
917
|
rendererId: t,
|
|
836
918
|
resource: s
|
|
837
919
|
}),
|
|
838
920
|
...a ? { metadata: a } : {}
|
|
839
921
|
});
|
|
840
|
-
},
|
|
922
|
+
}, ft = (e) => {
|
|
841
923
|
if (!e || typeof e != "object") return;
|
|
842
924
|
let t = e.revision;
|
|
843
925
|
return typeof t == "string" ? t : void 0;
|
|
844
|
-
},
|
|
926
|
+
}, pt = (e, t) => {
|
|
845
927
|
let n = e.metadata, r = n?.fileRendererOrigin;
|
|
846
928
|
if (!r || typeof r != "object") return;
|
|
847
929
|
let i = r;
|
|
848
930
|
if (typeof i.rendererId != "string" || typeof i.instanceId != "string" || typeof i.operationId != "string") return;
|
|
849
|
-
let a = n?.fileRendererResourceKey, o =
|
|
931
|
+
let a = n?.fileRendererResourceKey, o = ft(t.outcome.value);
|
|
850
932
|
return {
|
|
851
933
|
origin: {
|
|
852
934
|
rendererId: i.rendererId,
|
|
@@ -856,32 +938,32 @@ var De = (e) => {
|
|
|
856
938
|
...typeof a == "string" ? { resourceKey: a } : {},
|
|
857
939
|
...o ? { revision: o } : {}
|
|
858
940
|
};
|
|
859
|
-
},
|
|
941
|
+
}, mt = (e, t) => e.workbench.views.registerView({
|
|
860
942
|
id: t.id,
|
|
861
|
-
title:
|
|
943
|
+
title: P(t.title, t.id),
|
|
862
944
|
icon: t.icon,
|
|
863
945
|
body: {
|
|
864
946
|
kind: "file",
|
|
865
947
|
resourceKind: t.resourceKind,
|
|
866
|
-
load: async (n, r) => await
|
|
948
|
+
load: async (n, r) => await dt(e, t.id, t.loadHandlerId, n, {}, void 0, r) ?? {},
|
|
867
949
|
save: t.saveHandlerId ? async (n, r, i) => {
|
|
868
|
-
let a =
|
|
950
|
+
let a = ft(await dt(e, t.id, t.saveHandlerId, n, { content: r }, {
|
|
869
951
|
...i ? { fileRendererOrigin: i } : {},
|
|
870
|
-
...
|
|
952
|
+
...v(n) ? { fileRendererResourceKey: v(n) } : {}
|
|
871
953
|
}));
|
|
872
954
|
return a ? { revision: a } : void 0;
|
|
873
955
|
} : void 0
|
|
874
956
|
}
|
|
875
|
-
}),
|
|
957
|
+
}), ht = (e) => {
|
|
876
958
|
let t = [];
|
|
877
|
-
for (let n of e.metadata.fileRenderers ?? []) t.push(
|
|
959
|
+
for (let n of e.metadata.fileRenderers ?? []) t.push(mt(e, n));
|
|
878
960
|
return { dispose() {
|
|
879
961
|
for (let e = t.length - 1; e >= 0; --e) t[e]?.dispose();
|
|
880
962
|
} };
|
|
881
|
-
},
|
|
963
|
+
}, gt = (e) => (t) => T(i, {
|
|
882
964
|
name: e ?? "MoreHorizontal",
|
|
883
965
|
...t
|
|
884
|
-
}),
|
|
966
|
+
}), _t = (e, t) => ({
|
|
885
967
|
color: e?.color,
|
|
886
968
|
canDragIn: e?.canDragIn,
|
|
887
969
|
canDragOut: e?.canDragOut,
|
|
@@ -889,12 +971,12 @@ var De = (e) => {
|
|
|
889
971
|
actions: e?.actions?.map((e) => ({
|
|
890
972
|
id: e.id,
|
|
891
973
|
label: t(e.label, e.id),
|
|
892
|
-
icon:
|
|
974
|
+
icon: gt(e.icon)
|
|
893
975
|
}))
|
|
894
|
-
}),
|
|
976
|
+
}), vt = (e, t) => `${t.extensionId ?? e.extensionId}.status.${t.id}`, yt = (e, t) => {
|
|
895
977
|
let n = /* @__PURE__ */ new Map();
|
|
896
978
|
return (r) => {
|
|
897
|
-
let i =
|
|
979
|
+
let i = vt(t, r), a = n.get(i);
|
|
898
980
|
if (a) return a;
|
|
899
981
|
let o = {
|
|
900
982
|
getSnapshot: () => (e.workbench.statuses.getStatuses(i) ?? []).map((e) => ({
|
|
@@ -907,65 +989,66 @@ var De = (e) => {
|
|
|
907
989
|
};
|
|
908
990
|
return n.set(i, o), e.workbench.statuses.load(i).catch(() => void 0), o;
|
|
909
991
|
};
|
|
910
|
-
},
|
|
992
|
+
}, bt = (e, t, n, r, i) => {
|
|
911
993
|
let a = n?.find((e) => e.id === r);
|
|
912
994
|
if (a?.type.kind !== "status") return;
|
|
913
|
-
let o =
|
|
995
|
+
let o = vt(t, a.type.statuses), s = e.workbench.statuses.getStatuses(o)?.find((e) => e.id === i);
|
|
914
996
|
return s ? { color: s.color } : void 0;
|
|
915
|
-
},
|
|
916
|
-
if (e.defaultSettings?.columnGrouping) return e.defaultSettings.columnGrouping;
|
|
917
|
-
let t = e.attributes?.filter((e) => e.type.kind === "status") ?? [];
|
|
918
|
-
return t.length === 1 ? t[0]?.id : void 0;
|
|
919
|
-
}, ft = (e) => typeof e == "object" && !!e && !Array.isArray(e), pt = (e, t, n, r, i, a) => (t ?? []).map((t) => {
|
|
997
|
+
}, xt = (e) => typeof e == "object" && !!e && !Array.isArray(e), St = (e, t, n, r, i, a) => (t ?? []).map((t) => {
|
|
920
998
|
let o = t.display, s = o?.kind === "badge-list" && typeof o.itemsAttributeId == "string" ? {
|
|
921
999
|
kind: "badge-list",
|
|
922
1000
|
itemsAttributeId: o.itemsAttributeId
|
|
923
1001
|
} : void 0;
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
1002
|
+
o && !s && a?.(t.id, o.kind);
|
|
1003
|
+
let c = () => {
|
|
1004
|
+
let { type: e } = t;
|
|
1005
|
+
return e.kind === "status" ? {
|
|
928
1006
|
kind: "enum",
|
|
929
|
-
options: i(
|
|
930
|
-
} :
|
|
931
|
-
...
|
|
932
|
-
options: Array.isArray(
|
|
1007
|
+
options: i(e.statuses)
|
|
1008
|
+
} : e.kind !== "enum" && e.kind !== "enum-multi" ? e : {
|
|
1009
|
+
...e,
|
|
1010
|
+
options: Array.isArray(e.options) ? e.options.map((e) => ({
|
|
933
1011
|
...e,
|
|
934
1012
|
label: n(e.label, e.value)
|
|
935
|
-
})) :
|
|
936
|
-
}
|
|
1013
|
+
})) : e.options
|
|
1014
|
+
};
|
|
1015
|
+
};
|
|
1016
|
+
return r(e, {
|
|
1017
|
+
...t,
|
|
1018
|
+
label: n(t.label, t.id),
|
|
1019
|
+
type: c(),
|
|
937
1020
|
display: s
|
|
938
1021
|
});
|
|
939
|
-
}),
|
|
940
|
-
let o =
|
|
1022
|
+
}), Ct = (e, t, n, r, i = () => [], a) => {
|
|
1023
|
+
let o = St(e, t, n, r, i, a), s = /* @__PURE__ */ new Set();
|
|
941
1024
|
return {
|
|
942
1025
|
source: {
|
|
943
1026
|
getSnapshot: () => o,
|
|
944
1027
|
subscribe: (e) => (s.add(e), () => s.delete(e))
|
|
945
1028
|
},
|
|
946
1029
|
set(t) {
|
|
947
|
-
o =
|
|
1030
|
+
o = St(e, t, n, r, i, a);
|
|
948
1031
|
for (let e of s) e();
|
|
949
1032
|
}
|
|
950
1033
|
};
|
|
951
|
-
},
|
|
1034
|
+
}, wt = (e) => !!(e && typeof e == "object" && typeof e.type == "string" && typeof e.id == "string"), Tt = (e, t) => {
|
|
952
1035
|
let { resource: n } = t;
|
|
953
|
-
if (
|
|
954
|
-
},
|
|
955
|
-
let n =
|
|
1036
|
+
if (wt(n)) return n;
|
|
1037
|
+
}, Et = (e, t) => {
|
|
1038
|
+
let n = Tt(e, t);
|
|
956
1039
|
if (n) return n;
|
|
957
1040
|
if (e.resourceKind) return {
|
|
958
1041
|
type: e.resourceKind,
|
|
959
1042
|
id: t.id,
|
|
960
1043
|
label: t.title
|
|
961
1044
|
};
|
|
962
|
-
},
|
|
1045
|
+
}, Dt = (e, t) => {
|
|
963
1046
|
let n = e, r = t(n);
|
|
964
1047
|
return r === void 0 ? n : {
|
|
965
1048
|
...n,
|
|
966
1049
|
resource: r
|
|
967
1050
|
};
|
|
968
|
-
},
|
|
1051
|
+
}, Ot = (...e) => Object.assign({}, ...e.filter((e) => !!e)), kt = (e) => e && typeof e == "object" && !Array.isArray(e) ? e : void 0, At = (e) => Object.keys(e ?? {}).length > 0, jt = /* @__PURE__ */ new Set([
|
|
969
1052
|
"text",
|
|
970
1053
|
"longtext",
|
|
971
1054
|
"markdown",
|
|
@@ -974,8 +1057,8 @@ var De = (e) => {
|
|
|
974
1057
|
"select",
|
|
975
1058
|
"multi-select",
|
|
976
1059
|
"files"
|
|
977
|
-
]),
|
|
978
|
-
if (!
|
|
1060
|
+
]), Mt = (e, t, n) => {
|
|
1061
|
+
if (!jt.has(t.type)) return;
|
|
979
1062
|
let r = "options" in t && Array.isArray(t.options) ? t.options : [], i = t;
|
|
980
1063
|
return {
|
|
981
1064
|
id: e,
|
|
@@ -993,17 +1076,17 @@ var De = (e) => {
|
|
|
993
1076
|
multiple: t.type === "files" ? i.multiple !== !1 : void 0,
|
|
994
1077
|
accept: t.type === "files" && typeof i.accept == "string" ? i.accept : void 0
|
|
995
1078
|
};
|
|
996
|
-
},
|
|
997
|
-
let r =
|
|
1079
|
+
}, Nt = (e, t) => Object.entries(e.createRow?.params ?? {}).flatMap(([e, n]) => {
|
|
1080
|
+
let r = Mt(e, n, t);
|
|
998
1081
|
return r ? [r] : [];
|
|
999
|
-
}),
|
|
1082
|
+
}), Pt = (e, t) => I({
|
|
1000
1083
|
id: t.id,
|
|
1001
1084
|
kind: "kanbanRenderer",
|
|
1002
1085
|
projectId: e.projectId,
|
|
1003
1086
|
context: { kanbanRendererId: t.id }
|
|
1004
|
-
}),
|
|
1087
|
+
}), H = (e, t, n, r, i, a) => {
|
|
1005
1088
|
let o = i ?? e.workbench.getPrimaryResource();
|
|
1006
|
-
return
|
|
1089
|
+
return R(e, n, {
|
|
1007
1090
|
params: {
|
|
1008
1091
|
renderer: {
|
|
1009
1092
|
rendererId: t.id,
|
|
@@ -1015,33 +1098,33 @@ var De = (e) => {
|
|
|
1015
1098
|
},
|
|
1016
1099
|
resource: o,
|
|
1017
1100
|
signal: a,
|
|
1018
|
-
slot:
|
|
1101
|
+
slot: Pt(e, t),
|
|
1019
1102
|
metadata: { kanbanRendererId: t.id }
|
|
1020
1103
|
});
|
|
1021
|
-
},
|
|
1104
|
+
}, Ft = (e, t) => `workbench.extension.kanbanRenderer.${e.id}.rowAction.${t.id}`, It = (e, t, n) => (t.rowActions ?? []).map((r) => {
|
|
1022
1105
|
let i = e.workbench.commands.getCommand(r.commandId)?.command;
|
|
1023
1106
|
return e.workbench.commands.registerCommand({
|
|
1024
|
-
id:
|
|
1107
|
+
id: Ft(t, r),
|
|
1025
1108
|
label: n(r.label, r.id),
|
|
1026
1109
|
icon: r.icon,
|
|
1027
1110
|
params: i?.params
|
|
1028
|
-
}, { execute: (n, i) =>
|
|
1029
|
-
}),
|
|
1030
|
-
let o =
|
|
1031
|
-
return s &&
|
|
1111
|
+
}, { execute: (n, i) => H(e, t, r.commandId, Ot(kt(n)), i?.resource) });
|
|
1112
|
+
}), Lt = (e, t, n, r, i, a) => {
|
|
1113
|
+
let o = Ft(t, n), s = e.workbench.commands.getCommand(o), c = { rowId: r.id }, l = i ? { resource: i } : void 0, u = a(n.label, n.id);
|
|
1114
|
+
return s && At(s.command.params) ? (e.workbench.commandPalette.requestParams({
|
|
1032
1115
|
record: s,
|
|
1033
1116
|
label: u,
|
|
1034
1117
|
args: c,
|
|
1035
1118
|
context: l
|
|
1036
|
-
}), Promise.resolve()) : s ? e.workbench.commands.executeCommand(s.command.id, c, l).then(() => void 0) :
|
|
1037
|
-
},
|
|
1119
|
+
}), Promise.resolve()) : s ? e.workbench.commands.executeCommand(s.command.id, c, l).then(() => void 0) : H(e, t, n.commandId, c, i).then(() => void 0);
|
|
1120
|
+
}, Rt = (e) => e ? T(i, {
|
|
1038
1121
|
name: e,
|
|
1039
1122
|
size: 16
|
|
1040
|
-
}) : void 0,
|
|
1123
|
+
}) : void 0, zt = (e, t) => {
|
|
1041
1124
|
if (e.createRow) return {
|
|
1042
1125
|
title: t(e.createRow.title, "Create row"),
|
|
1043
1126
|
submitLabel: t(e.createRow.submitLabel, "Create"),
|
|
1044
|
-
fields:
|
|
1127
|
+
fields: Nt(e, t),
|
|
1045
1128
|
labels: {
|
|
1046
1129
|
cancel: t(e.createRow.labels?.cancel, "Cancel"),
|
|
1047
1130
|
properties: t(e.createRow.labels?.properties, "Properties"),
|
|
@@ -1049,20 +1132,20 @@ var De = (e) => {
|
|
|
1049
1132
|
removeFile: t(e.createRow.labels?.removeFile, "Remove file")
|
|
1050
1133
|
}
|
|
1051
1134
|
};
|
|
1052
|
-
},
|
|
1135
|
+
}, Bt = (e, t, n, r, i) => {
|
|
1053
1136
|
if (t.rowActivationHandlerId) return async (n) => {
|
|
1054
1137
|
let a = r(t, n);
|
|
1055
|
-
await
|
|
1138
|
+
await H(e, t, t.rowActivationHandlerId, { row: i(n) }, a);
|
|
1056
1139
|
};
|
|
1057
1140
|
if (n.onRowClick) return (e) => n.onRowClick?.({
|
|
1058
1141
|
record: t,
|
|
1059
1142
|
row: e,
|
|
1060
1143
|
resource: r(t, e)
|
|
1061
1144
|
});
|
|
1062
|
-
},
|
|
1145
|
+
}, Vt = (e, t, n, r) => {
|
|
1063
1146
|
let i = e.createRow;
|
|
1064
1147
|
if (i) return async (a) => {
|
|
1065
|
-
let o =
|
|
1148
|
+
let o = Ot(a.values, i.columnParam ? { [i.columnParam]: a.columnId } : void 0, i.attributesParam ? { [i.attributesParam]: a.attributeValues } : void 0), s = await n(e, i.commandId, o);
|
|
1066
1149
|
if (await t.onAfterCreate?.({
|
|
1067
1150
|
record: e,
|
|
1068
1151
|
created: s,
|
|
@@ -1076,15 +1159,15 @@ var De = (e) => {
|
|
|
1076
1159
|
attributes: c.attributes ?? {}
|
|
1077
1160
|
});
|
|
1078
1161
|
};
|
|
1079
|
-
},
|
|
1162
|
+
}, Ht = (e, t, n, r, i) => {
|
|
1080
1163
|
let a = t.rowActions;
|
|
1081
1164
|
if (a?.length) return (o) => a.map((a) => {
|
|
1082
|
-
let s = i(t, o), c = () =>
|
|
1165
|
+
let s = i(t, o), c = () => Lt(e, t, a, o, s, r);
|
|
1083
1166
|
return {
|
|
1084
1167
|
key: a.id,
|
|
1085
1168
|
label: r(a.label, a.id),
|
|
1086
1169
|
commandId: a.commandId,
|
|
1087
|
-
icon:
|
|
1170
|
+
icon: Rt(a.icon),
|
|
1088
1171
|
onClick: () => n.executeRowAction ? n.executeRowAction({
|
|
1089
1172
|
record: t,
|
|
1090
1173
|
action: a,
|
|
@@ -1094,84 +1177,94 @@ var De = (e) => {
|
|
|
1094
1177
|
}) : c()
|
|
1095
1178
|
};
|
|
1096
1179
|
});
|
|
1097
|
-
},
|
|
1098
|
-
let r = [], i = n.resolveLabel ?? ((e, t) =>
|
|
1180
|
+
}, Ut = (e, t, n = {}) => {
|
|
1181
|
+
let r = [], i = n.resolveLabel ?? ((e, t) => P(e, t)), o = (e, t) => {
|
|
1099
1182
|
let r = t.display?.kind === "badge-list" ? {
|
|
1100
1183
|
...t,
|
|
1101
|
-
render: (e, n) =>
|
|
1184
|
+
render: (e, n) => ne(t, e, n)
|
|
1102
1185
|
} : t;
|
|
1103
1186
|
return n.decorateAttribute?.(e, r) ?? r;
|
|
1104
|
-
},
|
|
1105
|
-
for (let
|
|
1106
|
-
let t =
|
|
1107
|
-
id: `workbench.extension.${
|
|
1187
|
+
}, s = n.resolveRowResource ?? Tt, c = n.resolveRowActionResource ?? Et, l = n.onAfterMutation ?? (() => {}), u = (t, n, r) => H(e, t, n, r).then((e) => (l(t), e));
|
|
1188
|
+
for (let l of t) {
|
|
1189
|
+
let t = yt(e, l), d = Ct(l, l.attributes, i, o, t, (t, n) => e.workbench.notifications.show({
|
|
1190
|
+
id: `workbench.extension.${l.extensionId}.kanban.${l.id}.display.${t}`,
|
|
1108
1191
|
level: "error",
|
|
1109
1192
|
title: "Extension display is not available",
|
|
1110
|
-
message: `Attribute "${t}" in renderer "${
|
|
1111
|
-
})),
|
|
1112
|
-
r.push(...
|
|
1113
|
-
id:
|
|
1114
|
-
title: i(
|
|
1115
|
-
icon:
|
|
1193
|
+
message: `Attribute "${t}" in renderer "${l.id}" uses unknown display kind "${n}".`
|
|
1194
|
+
})), f = l.attributes, p = a(l), m = p.settings.columnGrouping, h = /* @__PURE__ */ new WeakMap(), g, _ = 0, v = (e) => s(l, e), y = Bt(e, l, n, s, (e) => h.get(e) ?? e);
|
|
1195
|
+
r.push(...It(e, l, i)), r.push(e.workbench.views.registerView({
|
|
1196
|
+
id: l.id,
|
|
1197
|
+
title: i(l.title, l.id),
|
|
1198
|
+
icon: l.icon,
|
|
1116
1199
|
body: {
|
|
1117
1200
|
kind: "kanban",
|
|
1118
|
-
resourceKind:
|
|
1119
|
-
toolbarActions:
|
|
1201
|
+
resourceKind: l.resourceKind,
|
|
1202
|
+
toolbarActions: Je(l),
|
|
1203
|
+
listRowActions: () => (l.rowActions ?? []).map((e) => ({
|
|
1204
|
+
commandId: e.commandId,
|
|
1205
|
+
label: i(e.label, e.id)
|
|
1206
|
+
})),
|
|
1120
1207
|
storageScope: e.projectId,
|
|
1121
|
-
attributes:
|
|
1122
|
-
defaultSettings:
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1208
|
+
attributes: d.source,
|
|
1209
|
+
defaultSettings: p.settings,
|
|
1210
|
+
defaultFilter: l.defaultFilter,
|
|
1211
|
+
defaultSorts: l.defaultSorts,
|
|
1212
|
+
viewsProvider: n.createViewsProvider?.(l),
|
|
1213
|
+
defaultViews: p.views.map((e) => ({
|
|
1126
1214
|
...e,
|
|
1127
1215
|
title: i(e.title, e.id)
|
|
1128
1216
|
})),
|
|
1129
|
-
defaultActiveViewId:
|
|
1130
|
-
emptyTitle: i(
|
|
1131
|
-
emptyDescription: i(
|
|
1132
|
-
hideToolbar:
|
|
1133
|
-
createRow:
|
|
1134
|
-
getBoardColumnConfig: (t) =>
|
|
1135
|
-
onRowActivate:
|
|
1217
|
+
defaultActiveViewId: l.defaultActiveViewId,
|
|
1218
|
+
emptyTitle: i(l.emptyTitle, ""),
|
|
1219
|
+
emptyDescription: i(l.emptyDescription, ""),
|
|
1220
|
+
hideToolbar: l.hideToolbar,
|
|
1221
|
+
createRow: zt(l, i),
|
|
1222
|
+
getBoardColumnConfig: (t) => _t(g?.[t] ?? bt(e, l, f, m, t), i),
|
|
1223
|
+
onRowActivate: y,
|
|
1136
1224
|
executeQuery: async (t, n) => {
|
|
1137
|
-
|
|
1138
|
-
let r =
|
|
1139
|
-
settings:
|
|
1140
|
-
|
|
1225
|
+
_ += 1;
|
|
1226
|
+
let r = _, i = await H(e, l, l.queryHandlerId, {
|
|
1227
|
+
settings: {
|
|
1228
|
+
...t.settings,
|
|
1229
|
+
ordering: ae(t.sorts)
|
|
1230
|
+
},
|
|
1231
|
+
filter: t.filter,
|
|
1232
|
+
sorts: t.sorts,
|
|
1233
|
+
filters: ie(t.filter)
|
|
1141
1234
|
}, void 0, n), a = (e) => e.map((e) => {
|
|
1142
|
-
let t =
|
|
1143
|
-
return
|
|
1235
|
+
let t = Dt(e, v);
|
|
1236
|
+
return h.set(t, e), t;
|
|
1144
1237
|
});
|
|
1145
|
-
if (r !==
|
|
1146
|
-
if (
|
|
1147
|
-
if (!
|
|
1148
|
-
let o = i.attributes ??
|
|
1149
|
-
return
|
|
1238
|
+
if (r !== _) return Array.isArray(i) ? a(i) : xt(i) ? a(i.rows ?? []) : [];
|
|
1239
|
+
if (m = t.settings.columnGrouping, Array.isArray(i)) return a(i);
|
|
1240
|
+
if (!xt(i)) return [];
|
|
1241
|
+
let o = i.attributes ?? f;
|
|
1242
|
+
return f = o, d.set(o), g = i.boardColumnConfigs, a(i.rows ?? []);
|
|
1150
1243
|
},
|
|
1151
|
-
onAttributeChange:
|
|
1244
|
+
onAttributeChange: l.attributeChangeHandlerId ? (e, t, n) => u(l, l.attributeChangeHandlerId, {
|
|
1152
1245
|
rowId: e,
|
|
1153
1246
|
attributeId: t,
|
|
1154
1247
|
value: n
|
|
1155
1248
|
}).then(() => void 0) : void 0,
|
|
1156
|
-
onReorder:
|
|
1249
|
+
onReorder: l.reorderHandlerId ? (e, t) => u(l, l.reorderHandlerId, {
|
|
1157
1250
|
rowId: e,
|
|
1158
1251
|
beforeRowId: t
|
|
1159
1252
|
}).then(() => void 0) : void 0,
|
|
1160
|
-
onCreateRow:
|
|
1161
|
-
onColumnAction:
|
|
1162
|
-
await l
|
|
1253
|
+
onCreateRow: Vt(l, n, u, l.rowActivationHandlerId ? y : void 0),
|
|
1254
|
+
onColumnAction: l.columnActionHandlerId ? async (e, t) => {
|
|
1255
|
+
await u(l, l.columnActionHandlerId, {
|
|
1163
1256
|
columnId: e,
|
|
1164
1257
|
actionId: t
|
|
1165
1258
|
});
|
|
1166
1259
|
} : void 0,
|
|
1167
|
-
getRowContextMenuActions:
|
|
1260
|
+
getRowContextMenuActions: Ht(e, l, n, i, c)
|
|
1168
1261
|
}
|
|
1169
1262
|
}));
|
|
1170
1263
|
}
|
|
1171
1264
|
return { dispose() {
|
|
1172
1265
|
for (let e = r.length - 1; e >= 0; --e) r[e]?.dispose();
|
|
1173
1266
|
} };
|
|
1174
|
-
},
|
|
1267
|
+
}, Wt = (e) => ({
|
|
1175
1268
|
id: e.treeId,
|
|
1176
1269
|
kind: "renderer",
|
|
1177
1270
|
context: {
|
|
@@ -1183,7 +1276,7 @@ var De = (e) => {
|
|
|
1183
1276
|
resourceId: e.resource.id
|
|
1184
1277
|
} : {}
|
|
1185
1278
|
}
|
|
1186
|
-
}),
|
|
1279
|
+
}), U = (e, t, n, r) => {
|
|
1187
1280
|
let i = n.resource, a = e.workbench.modes.getActiveModeId();
|
|
1188
1281
|
return {
|
|
1189
1282
|
renderer: {
|
|
@@ -1197,22 +1290,22 @@ var De = (e) => {
|
|
|
1197
1290
|
...n.filter ? { filter: n.filter } : {},
|
|
1198
1291
|
...r ? { node: r } : {}
|
|
1199
1292
|
};
|
|
1200
|
-
},
|
|
1293
|
+
}, W = async (e, t, n, r, i) => {
|
|
1201
1294
|
let a = r.renderer, o = a?.resource;
|
|
1202
|
-
return
|
|
1295
|
+
return R(e, n, {
|
|
1203
1296
|
params: r,
|
|
1204
1297
|
signal: i,
|
|
1205
1298
|
resource: o,
|
|
1206
|
-
slot:
|
|
1299
|
+
slot: Wt({
|
|
1207
1300
|
modeId: a?.modeId,
|
|
1208
1301
|
projectId: e.projectId,
|
|
1209
1302
|
resource: o,
|
|
1210
1303
|
treeId: t.id
|
|
1211
1304
|
})
|
|
1212
1305
|
});
|
|
1213
|
-
},
|
|
1306
|
+
}, Gt = async (e, t, n, r, i) => {
|
|
1214
1307
|
let a = e.workbench.modes.getActiveModeId();
|
|
1215
|
-
return
|
|
1308
|
+
return R(e, n, {
|
|
1216
1309
|
params: {
|
|
1217
1310
|
...r ?? {},
|
|
1218
1311
|
renderer: {
|
|
@@ -1224,7 +1317,7 @@ var De = (e) => {
|
|
|
1224
1317
|
}
|
|
1225
1318
|
},
|
|
1226
1319
|
resource: i,
|
|
1227
|
-
slot:
|
|
1320
|
+
slot: Wt({
|
|
1228
1321
|
modeId: a,
|
|
1229
1322
|
projectId: e.projectId,
|
|
1230
1323
|
resource: i,
|
|
@@ -1232,28 +1325,28 @@ var De = (e) => {
|
|
|
1232
1325
|
}),
|
|
1233
1326
|
metadata: { treeId: t.id }
|
|
1234
1327
|
});
|
|
1235
|
-
},
|
|
1236
|
-
let { ctx: t, getHostTreeHeaderNodes: n, record: r, treeViews: i } = e, a =
|
|
1328
|
+
}, Kt = (e, t) => e.panels.flatMap((e) => [e, ...e.panelMenus ?? []]).filter((e) => e.renderer?.kind === "tree" && e.renderer.id === t.id), qt = (e, t) => t.viewId ? e.find((e) => e.id === t.viewId) : e.length === 1 ? e[0] : void 0, Jt = async (e) => {
|
|
1329
|
+
let { ctx: t, getHostTreeHeaderNodes: n, record: r, treeViews: i } = e, a = qt(i, t);
|
|
1237
1330
|
return !a || !("hostTreeHeader" in a) || a.hostTreeHeader !== "default" ? [] : await n?.({
|
|
1238
1331
|
ctx: t,
|
|
1239
1332
|
record: r,
|
|
1240
1333
|
panel: a
|
|
1241
1334
|
}) ?? [];
|
|
1242
|
-
},
|
|
1243
|
-
let { ctx: t, getHostTreeFooterNodes: n, record: r, treeViews: i } = e, a =
|
|
1335
|
+
}, Yt = async (e) => {
|
|
1336
|
+
let { ctx: t, getHostTreeFooterNodes: n, record: r, treeViews: i } = e, a = qt(i, t);
|
|
1244
1337
|
return !a || !("hostTreeFooter" in a) || a.hostTreeFooter !== "default" ? [] : await n?.({
|
|
1245
1338
|
ctx: t,
|
|
1246
1339
|
record: r,
|
|
1247
1340
|
panel: a
|
|
1248
1341
|
}) ?? [];
|
|
1249
|
-
},
|
|
1342
|
+
}, Xt = (e, t) => e && typeof e == "object" && !Array.isArray(e) ? e : t, Zt = (e) => e && !Array.isArray(e) ? e : void 0, Qt = (e, t) => {
|
|
1250
1343
|
let n = /* @__PURE__ */ new WeakMap(), r = `workbench.extensionTreeRenderer.${t.id}.command`, i = (t) => e.resolveNodeResource?.(t) ?? t, a = (e) => {
|
|
1251
1344
|
if (e.emptyState) return {
|
|
1252
|
-
title:
|
|
1253
|
-
description:
|
|
1345
|
+
title: P(e.emptyState.title),
|
|
1346
|
+
description: P(e.emptyState.description),
|
|
1254
1347
|
icon: e.emptyState.icon
|
|
1255
1348
|
};
|
|
1256
|
-
}, o = (n, i, a) => n ?
|
|
1349
|
+
}, o = (n, i, a) => n ? F(n, {
|
|
1257
1350
|
commandTargetOf: (e) => ({
|
|
1258
1351
|
kind: "command",
|
|
1259
1352
|
commandId: r,
|
|
@@ -1268,33 +1361,34 @@ var De = (e) => {
|
|
|
1268
1361
|
extensionId: t.extensionId,
|
|
1269
1362
|
projectId: e.projectId
|
|
1270
1363
|
}) : void 0, s = (n, r, i) => {
|
|
1271
|
-
let a = n.command ?
|
|
1364
|
+
let a = n.command ? f({
|
|
1272
1365
|
...n.command,
|
|
1273
1366
|
extensionId: n.command.extensionId ?? t.extensionId
|
|
1274
1367
|
}) : void 0;
|
|
1275
1368
|
return {
|
|
1276
1369
|
id: n.id,
|
|
1277
|
-
|
|
1370
|
+
resourceMutation: e.metadata.commands.find((e) => e.id === a)?.resourceMutation,
|
|
1371
|
+
label: P(n.label),
|
|
1278
1372
|
icon: n.icon,
|
|
1279
|
-
args:
|
|
1280
|
-
params:
|
|
1373
|
+
args: Zt(n.params),
|
|
1374
|
+
params: B(n.input, P, t.extensionId),
|
|
1281
1375
|
submitLabel: n.submitLabel,
|
|
1282
1376
|
when: n.when,
|
|
1283
1377
|
disabled: n.disabled,
|
|
1284
1378
|
run: a ? async (o) => {
|
|
1285
|
-
let s =
|
|
1379
|
+
let s = Xt(o, Zt(n.params));
|
|
1286
1380
|
if (n.command?.extensionId === "pstdio") {
|
|
1287
1381
|
await e.workbench.commands.executeCommand(a, s, { resource: r?.resource ?? i.resource });
|
|
1288
1382
|
return;
|
|
1289
1383
|
}
|
|
1290
|
-
await
|
|
1384
|
+
await Gt(e, t, a, s, r?.resource ?? i.resource), i.refresh();
|
|
1291
1385
|
} : void 0
|
|
1292
1386
|
};
|
|
1293
1387
|
}, c = (e, t) => {
|
|
1294
1388
|
let r = {
|
|
1295
1389
|
id: e.id,
|
|
1296
1390
|
selected: e.selected,
|
|
1297
|
-
label:
|
|
1391
|
+
label: P(e.label),
|
|
1298
1392
|
icon: e.icon,
|
|
1299
1393
|
iconColor: e.iconColor,
|
|
1300
1394
|
iconTooltip: e.iconTooltip,
|
|
@@ -1309,7 +1403,9 @@ var De = (e) => {
|
|
|
1309
1403
|
description: e.description,
|
|
1310
1404
|
contextValue: e.contextValue,
|
|
1311
1405
|
hiddenByDefault: e.hiddenByDefault,
|
|
1312
|
-
canHide: e.canHide
|
|
1406
|
+
canHide: e.canHide,
|
|
1407
|
+
canDrag: e.canDrag,
|
|
1408
|
+
canDrop: e.canDrop
|
|
1313
1409
|
};
|
|
1314
1410
|
return n.set(r, e), r;
|
|
1315
1411
|
};
|
|
@@ -1317,7 +1413,7 @@ var De = (e) => {
|
|
|
1317
1413
|
mapNodes: (e, t) => e.map((e) => c(e, t)),
|
|
1318
1414
|
mapSections: (e, t) => e.map((e) => ({
|
|
1319
1415
|
id: e.id,
|
|
1320
|
-
label:
|
|
1416
|
+
label: P(e.label),
|
|
1321
1417
|
actions: e.actions?.map((e) => s(e, void 0, t)),
|
|
1322
1418
|
collapsible: e.collapsible,
|
|
1323
1419
|
emptyState: a(e),
|
|
@@ -1328,90 +1424,99 @@ var De = (e) => {
|
|
|
1328
1424
|
originalNodes: n,
|
|
1329
1425
|
runnerCommandId: r
|
|
1330
1426
|
};
|
|
1331
|
-
},
|
|
1427
|
+
}, G = (e) => Array.isArray(e) && e.every((e) => e && typeof e == "object" && "nodes" in e), $t = (e) => Array.isArray(e) && e.every((e) => e && typeof e == "object" && "id" in e), K = (e, t) => t.length > 0 ? [{
|
|
1332
1428
|
id: e,
|
|
1333
1429
|
nodes: t,
|
|
1334
1430
|
canReorder: !1
|
|
1335
|
-
}] : [],
|
|
1336
|
-
let n =
|
|
1431
|
+
}] : [], en = (e, t) => {
|
|
1432
|
+
let n = Qt(e, t), r = Kt(e.metadata, t), i = e.workbench.commands.registerCommand({
|
|
1337
1433
|
id: n.runnerCommandId,
|
|
1338
|
-
label: `${
|
|
1434
|
+
label: `${P(t.title, t.id)} tree command`
|
|
1339
1435
|
}, { execute: async (n) => {
|
|
1340
|
-
let r = n, i = await
|
|
1436
|
+
let r = n, i = await Gt(e, t, r.commandId, r.params, r.resource);
|
|
1341
1437
|
for (let t of e.workbench.views.listViews()) t.body.kind === "file" && e.workbench.views.refreshView(t.id);
|
|
1342
1438
|
return i;
|
|
1343
1439
|
} }), a = e.workbench.views.registerView({
|
|
1344
1440
|
id: t.id,
|
|
1345
|
-
title:
|
|
1441
|
+
title: P(t.title, t.id),
|
|
1346
1442
|
icon: t.icon,
|
|
1347
1443
|
body: {
|
|
1348
1444
|
kind: "tree",
|
|
1349
1445
|
searchable: t.searchable,
|
|
1350
|
-
searchPlaceholder:
|
|
1446
|
+
searchPlaceholder: P(t.searchPlaceholder, "Search files"),
|
|
1351
1447
|
defaultExpandedNodeIds: t.defaultExpandedNodeIds,
|
|
1352
1448
|
defaultExpandedSectionIds: t.defaultExpandedSectionIds,
|
|
1353
1449
|
getHeader: async (i) => {
|
|
1354
|
-
let a = await
|
|
1450
|
+
let a = await Jt({
|
|
1355
1451
|
ctx: i,
|
|
1356
1452
|
getHostTreeHeaderNodes: e.getHostTreeHeaderNodes,
|
|
1357
1453
|
record: t,
|
|
1358
1454
|
treeViews: r
|
|
1359
1455
|
});
|
|
1360
|
-
if (!t.headerHandlerId) return
|
|
1361
|
-
let o = await
|
|
1362
|
-
return [...
|
|
1456
|
+
if (!t.headerHandlerId) return K(`${t.id}:host-header`, a);
|
|
1457
|
+
let o = await W(e, t, t.headerHandlerId, U(e, t, i), i.signal), s = G(o) ? n.mapSections(o, i) : [];
|
|
1458
|
+
return [...K(`${t.id}:host-header`, a), ...s];
|
|
1363
1459
|
},
|
|
1364
1460
|
getBody: async (r) => {
|
|
1365
|
-
let i = await
|
|
1366
|
-
return
|
|
1461
|
+
let i = await W(e, t, t.bodyHandlerId, U(e, t, r), r.signal);
|
|
1462
|
+
return G(i) ? n.mapSections(i, r) : [];
|
|
1367
1463
|
},
|
|
1368
1464
|
getFooter: async (i) => {
|
|
1369
|
-
let a = await
|
|
1465
|
+
let a = await Yt({
|
|
1370
1466
|
ctx: i,
|
|
1371
1467
|
getHostTreeFooterNodes: e.getHostTreeFooterNodes,
|
|
1372
1468
|
record: t,
|
|
1373
1469
|
treeViews: r
|
|
1374
1470
|
});
|
|
1375
|
-
if (!t.footerHandlerId) return
|
|
1376
|
-
let o = await
|
|
1377
|
-
return [...
|
|
1471
|
+
if (!t.footerHandlerId) return K(`${t.id}:host-footer`, a);
|
|
1472
|
+
let o = await W(e, t, t.footerHandlerId, U(e, t, i), i.signal);
|
|
1473
|
+
return [...G(o) ? n.mapSections(o, i) : [], ...K(`${t.id}:host-footer`, a)];
|
|
1378
1474
|
},
|
|
1475
|
+
moveNode: t.moveHandlerId ? async (r, i, a) => {
|
|
1476
|
+
let o = n.originalNodes.get(r), s = i ? n.originalNodes.get(i) : void 0;
|
|
1477
|
+
!o?.canDrag || i && !s?.canDrop || (await W(e, t, t.moveHandlerId, {
|
|
1478
|
+
...U(e, t, a),
|
|
1479
|
+
source: o,
|
|
1480
|
+
target: s,
|
|
1481
|
+
position: a.position ?? "inside"
|
|
1482
|
+
}), a.refresh());
|
|
1483
|
+
} : void 0,
|
|
1379
1484
|
getChildren: async (r, i) => {
|
|
1380
1485
|
if (!t.childrenHandlerId) return r.children ?? [];
|
|
1381
1486
|
let a = n.originalNodes.get(r);
|
|
1382
1487
|
if (!a) return r.children ?? [];
|
|
1383
|
-
let o = await
|
|
1384
|
-
return
|
|
1488
|
+
let o = await W(e, t, t.childrenHandlerId, U(e, t, i, a), i.signal);
|
|
1489
|
+
return $t(o) ? n.mapNodes(o, i) : [];
|
|
1385
1490
|
}
|
|
1386
1491
|
}
|
|
1387
1492
|
});
|
|
1388
1493
|
return { dispose() {
|
|
1389
1494
|
a.dispose(), i.dispose();
|
|
1390
1495
|
} };
|
|
1391
|
-
},
|
|
1496
|
+
}, tn = (e) => {
|
|
1392
1497
|
let t = [];
|
|
1393
|
-
for (let n of e.metadata.treeRenderers ?? []) t.push(
|
|
1498
|
+
for (let n of e.metadata.treeRenderers ?? []) t.push(en(e, n));
|
|
1394
1499
|
return { dispose() {
|
|
1395
1500
|
for (let e = t.length - 1; e >= 0; --e) t[e]?.dispose();
|
|
1396
1501
|
} };
|
|
1397
|
-
},
|
|
1502
|
+
}, q = (e) => ({
|
|
1398
1503
|
kind: e.kind,
|
|
1399
|
-
id:
|
|
1504
|
+
id: p(e),
|
|
1400
1505
|
extensionId: e.extensionId
|
|
1401
|
-
}),
|
|
1506
|
+
}), nn = (e, t, n) => {
|
|
1402
1507
|
let r = n?.(t.when);
|
|
1403
1508
|
return !r || e.context.matches(r);
|
|
1404
|
-
},
|
|
1509
|
+
}, rn = (e) => ({
|
|
1405
1510
|
id: e.id,
|
|
1406
|
-
label:
|
|
1511
|
+
label: P(e.label, e.id),
|
|
1407
1512
|
icon: e.icon,
|
|
1408
1513
|
canHide: !0,
|
|
1409
1514
|
canReorder: !0,
|
|
1410
|
-
target:
|
|
1411
|
-
}),
|
|
1515
|
+
target: F(e.action, { extensionId: e.extensionId })
|
|
1516
|
+
}), an = (e, n, r) => {
|
|
1412
1517
|
let i = /* @__PURE__ */ new Map();
|
|
1413
1518
|
for (let a of n) {
|
|
1414
|
-
if (!
|
|
1519
|
+
if (!nn(e, a, r)) continue;
|
|
1415
1520
|
let n = a.group || void 0, o = n ? `${a.extensionId}:${n}` : t(a.slot), s = i.get(o) ?? {
|
|
1416
1521
|
id: o,
|
|
1417
1522
|
label: n,
|
|
@@ -1420,68 +1525,86 @@ var De = (e) => {
|
|
|
1420
1525
|
canReorder: !0,
|
|
1421
1526
|
nodes: []
|
|
1422
1527
|
};
|
|
1423
|
-
s.nodes.push(
|
|
1528
|
+
s.nodes.push(rn(a)), i.set(o, s);
|
|
1424
1529
|
}
|
|
1425
1530
|
return [...i.values()];
|
|
1426
|
-
},
|
|
1531
|
+
}, on = (e) => {
|
|
1427
1532
|
let t = /* @__PURE__ */ new Map();
|
|
1428
1533
|
for (let n of e) {
|
|
1429
|
-
let e =
|
|
1534
|
+
let e = q(n.owner), r = `${n.extensionId}:${e.kind}:${e.id}:${n.slot}`;
|
|
1430
1535
|
t.set(r, [...t.get(r) ?? [], n]);
|
|
1431
1536
|
}
|
|
1432
1537
|
return [...t.values()];
|
|
1433
|
-
},
|
|
1538
|
+
}, sn = (e) => [...new Set(e.flatMap((e) => e.group ? [`${e.extensionId}:${e.group}`] : []))], cn = (e) => on(e.metadata.navigationItems).map((t) => {
|
|
1434
1539
|
let n = t[0], r = t.some((e) => e.when?.resourceType?.length || e.when?.metadata);
|
|
1435
1540
|
return e.workbench.navigationTrees.registerContribution({
|
|
1436
|
-
id: `${n.extensionId}.navigation-items.${n.owner.kind}.${
|
|
1437
|
-
owner:
|
|
1541
|
+
id: `${n.extensionId}.navigation-items.${n.owner.kind}.${p(n.owner)}.${n.slot}`,
|
|
1542
|
+
owner: q(n.owner),
|
|
1438
1543
|
sourceExtensionId: n.extensionId,
|
|
1439
1544
|
declarationIndex: e.metadata.navigationItems.indexOf(n),
|
|
1440
1545
|
slot: n.slot,
|
|
1441
|
-
defaultExpandedSectionIds:
|
|
1546
|
+
defaultExpandedSectionIds: sn(t),
|
|
1442
1547
|
...r ? {} : { resolveResource: () => void 0 },
|
|
1443
|
-
getSections: () =>
|
|
1548
|
+
getSections: () => an(e.workbench, t, e.createWhenExpression),
|
|
1549
|
+
listActions: () => t.map((e) => ({
|
|
1550
|
+
label: P(e.label, e.id),
|
|
1551
|
+
category: e.group || void 0,
|
|
1552
|
+
action: F(e.action, { extensionId: e.extensionId })
|
|
1553
|
+
}))
|
|
1444
1554
|
});
|
|
1445
|
-
}),
|
|
1446
|
-
let r =
|
|
1555
|
+
}), ln = (e) => e.metadata.navigationTrees.map((t, n) => {
|
|
1556
|
+
let r = p(t.view);
|
|
1447
1557
|
return e.workbench.navigationTrees.registerContribution({
|
|
1448
1558
|
id: t.id,
|
|
1449
1559
|
idScope: t.id,
|
|
1450
|
-
owner:
|
|
1560
|
+
owner: q(t.owner),
|
|
1451
1561
|
sourceExtensionId: t.extensionId,
|
|
1452
1562
|
declarationIndex: e.metadata.navigationItems.length + n,
|
|
1453
1563
|
slot: t.slot,
|
|
1454
1564
|
viewId: r,
|
|
1455
1565
|
...t.resourceScope === "project" ? { resolveResource: () => void 0 } : {}
|
|
1456
1566
|
});
|
|
1457
|
-
}),
|
|
1567
|
+
}), un = (e) => [...cn(e), ...ln(e)], dn = () => {
|
|
1458
1568
|
if (typeof navigator > "u") return;
|
|
1459
1569
|
let e = `${navigator.platform} ${navigator.userAgent}`.toLowerCase();
|
|
1460
1570
|
if (e.includes("mac")) return "mac";
|
|
1461
1571
|
if (e.includes("win")) return "win";
|
|
1462
1572
|
if (e.includes("linux")) return "linux";
|
|
1463
|
-
},
|
|
1464
|
-
|
|
1573
|
+
}, fn = (e, t = dn()) => (t ? e.platformOverrides?.[t] : void 0) ?? e.key, pn = (e) => e.bindings.map((t) => e.workbench.keybindings.registerKeybinding({
|
|
1574
|
+
sourceExtensionId: t.extensionId,
|
|
1575
|
+
action: F(t.action, { commandIdOf: (e) => e.extensionId ? f({
|
|
1465
1576
|
extensionId: e.extensionId,
|
|
1466
1577
|
id: e.id
|
|
1467
1578
|
}) : void 0 }),
|
|
1468
|
-
keybinding:
|
|
1579
|
+
keybinding: fn(t),
|
|
1469
1580
|
when: e.createWhenExpression?.(t.when)
|
|
1470
|
-
})),
|
|
1581
|
+
})), mn = (e) => {
|
|
1582
|
+
if (!e) return;
|
|
1583
|
+
let t = (e) => {
|
|
1584
|
+
if (e) return Array.isArray(e) ? e.map((e) => p(e)) : p(e);
|
|
1585
|
+
};
|
|
1586
|
+
return {
|
|
1587
|
+
mode: t(e.mode),
|
|
1588
|
+
source: e.source,
|
|
1589
|
+
viewId: t(e.view),
|
|
1590
|
+
resourceType: e.resourceType?.map((e) => e.id),
|
|
1591
|
+
metadata: e.metadata
|
|
1592
|
+
};
|
|
1593
|
+
}, hn = (e, t) => ({
|
|
1471
1594
|
...e,
|
|
1472
1595
|
tab: e.tab && t.createTab ? t.createTab({
|
|
1473
1596
|
...e.tab,
|
|
1474
1597
|
extensionId: t.extensionId,
|
|
1475
1598
|
placementId: t.placementId
|
|
1476
1599
|
}) : void 0
|
|
1477
|
-
}),
|
|
1600
|
+
}), gn = (e, t) => e.kind === "panels" ? e : {
|
|
1478
1601
|
...e,
|
|
1479
1602
|
tab: e.tab && t.createTab ? t.createTab({
|
|
1480
1603
|
...e.tab,
|
|
1481
1604
|
extensionId: t.extensionId,
|
|
1482
1605
|
placementId: t.placementId
|
|
1483
1606
|
}) : void 0
|
|
1484
|
-
},
|
|
1607
|
+
}, _n = (e, t) => e.pages.map((e) => ({
|
|
1485
1608
|
id: e.id,
|
|
1486
1609
|
ref: {
|
|
1487
1610
|
extensionId: e.extensionId,
|
|
@@ -1490,32 +1613,33 @@ var De = (e) => {
|
|
|
1490
1613
|
},
|
|
1491
1614
|
title: e.title,
|
|
1492
1615
|
path: e.path,
|
|
1493
|
-
|
|
1616
|
+
document: e.document,
|
|
1617
|
+
modeId: p(e.mode),
|
|
1494
1618
|
resource: e.resource,
|
|
1495
|
-
main:
|
|
1619
|
+
main: gn(e.main, {
|
|
1496
1620
|
extensionId: e.extensionId,
|
|
1497
1621
|
placementId: `${e.id}.$main`,
|
|
1498
1622
|
createTab: t
|
|
1499
1623
|
}),
|
|
1500
|
-
slots: e.slots.map((n) =>
|
|
1624
|
+
slots: e.slots.map((n) => hn(n, {
|
|
1501
1625
|
extensionId: e.extensionId,
|
|
1502
1626
|
placementId: `${e.id}.${n.id}`,
|
|
1503
1627
|
createTab: t
|
|
1504
1628
|
})),
|
|
1505
1629
|
...e.icon ? { icon: e.icon } : {},
|
|
1506
|
-
...e.parent ? { parentId:
|
|
1507
|
-
})),
|
|
1630
|
+
...e.parent ? { parentId: p(e.parent) } : {}
|
|
1631
|
+
})), J = (e, t) => {
|
|
1508
1632
|
let n = e.pages.flatMap((e) => [...e.main.kind === "view" && e.resource ? [{
|
|
1509
1633
|
...e.resource,
|
|
1510
1634
|
view: e.main.view
|
|
1511
1635
|
}] : [], ...e.slots.flatMap((e) => e.item.kind === "binding" ? [e.item.binding] : [])]);
|
|
1512
|
-
return n.push(...e.placements.flatMap((e) => e.item.kind === "binding" ? [e.item.binding] : [])), n.find((e) =>
|
|
1513
|
-
},
|
|
1636
|
+
return n.push(...e.placements.flatMap((e) => e.item.kind === "binding" ? [e.item.binding] : [])), n.find((e) => p(e.view) === t)?.kinds[0]?.id;
|
|
1637
|
+
}, vn = (e) => e.body.kind === "webview" ? { webview: e.body.webview } : { renderer: {
|
|
1514
1638
|
kind: e.body.kind,
|
|
1515
1639
|
id: e.id
|
|
1516
|
-
} },
|
|
1517
|
-
if (
|
|
1518
|
-
let r = e.views.find((e) => e.id ===
|
|
1640
|
+
} }, yn = (e, t) => e.viewMenus.flatMap((n) => {
|
|
1641
|
+
if (p(n.owner) !== t.id) return [];
|
|
1642
|
+
let r = e.views.find((e) => e.id === p(n.view));
|
|
1519
1643
|
return r ? [{
|
|
1520
1644
|
id: n.id,
|
|
1521
1645
|
extensionId: n.extensionId,
|
|
@@ -1527,22 +1651,22 @@ var De = (e) => {
|
|
|
1527
1651
|
placement: n.placement,
|
|
1528
1652
|
hostTreeHeader: n.hostTreeHeader,
|
|
1529
1653
|
hostTreeFooter: n.hostTreeFooter,
|
|
1530
|
-
...
|
|
1654
|
+
...vn(r)
|
|
1531
1655
|
}] : [];
|
|
1532
|
-
}),
|
|
1533
|
-
let n =
|
|
1656
|
+
}), bn = (e) => e.views.map((t) => {
|
|
1657
|
+
let n = yn(e, t);
|
|
1534
1658
|
return {
|
|
1535
1659
|
id: t.id,
|
|
1536
1660
|
extensionId: t.extensionId,
|
|
1537
1661
|
title: t.title,
|
|
1538
1662
|
icon: t.icon,
|
|
1539
1663
|
panelMenus: n.length > 0 ? n : void 0,
|
|
1540
|
-
...
|
|
1664
|
+
...vn(t)
|
|
1541
1665
|
};
|
|
1542
|
-
}),
|
|
1666
|
+
}), Y = (e) => e?.map(({ command: e, ...t }) => ({
|
|
1543
1667
|
...t,
|
|
1544
|
-
commandId:
|
|
1545
|
-
})),
|
|
1668
|
+
commandId: f(e)
|
|
1669
|
+
})), xn = (e) => e.views.flatMap((t) => {
|
|
1546
1670
|
let n = t.body;
|
|
1547
1671
|
return n.kind === "kanban" ? [{
|
|
1548
1672
|
...n,
|
|
@@ -1550,7 +1674,7 @@ var De = (e) => {
|
|
|
1550
1674
|
extensionId: t.extensionId,
|
|
1551
1675
|
title: t.title,
|
|
1552
1676
|
icon: t.icon,
|
|
1553
|
-
resourceKind:
|
|
1677
|
+
resourceKind: n.resourceKind ?? J(e, t.id),
|
|
1554
1678
|
createRow: n.createRow ? {
|
|
1555
1679
|
title: n.createRow.title,
|
|
1556
1680
|
submitLabel: n.createRow.submitLabel,
|
|
@@ -1558,17 +1682,17 @@ var De = (e) => {
|
|
|
1558
1682
|
params: n.createRow.params,
|
|
1559
1683
|
attributesParam: n.createRow.attributesParam,
|
|
1560
1684
|
labels: n.createRow.labels,
|
|
1561
|
-
commandId:
|
|
1685
|
+
commandId: f(n.createRow.command),
|
|
1562
1686
|
attachments: n.createRow.attachments ? {
|
|
1563
1687
|
resourceParam: n.createRow.attachments.resourceParam,
|
|
1564
1688
|
fileParam: n.createRow.attachments.fileParam,
|
|
1565
|
-
commandId:
|
|
1689
|
+
commandId: f(n.createRow.attachments.command)
|
|
1566
1690
|
} : void 0
|
|
1567
1691
|
} : void 0,
|
|
1568
|
-
rowActions:
|
|
1569
|
-
toolbarActions:
|
|
1692
|
+
rowActions: Y(n.rowActions),
|
|
1693
|
+
toolbarActions: Y(n.toolbarActions)
|
|
1570
1694
|
}] : [];
|
|
1571
|
-
}),
|
|
1695
|
+
}), Sn = (e) => e.views.flatMap((t) => {
|
|
1572
1696
|
let n = t.body;
|
|
1573
1697
|
return n.kind === "dataTable" ? [{
|
|
1574
1698
|
...n,
|
|
@@ -1576,33 +1700,33 @@ var De = (e) => {
|
|
|
1576
1700
|
extensionId: t.extensionId,
|
|
1577
1701
|
title: t.title,
|
|
1578
1702
|
icon: t.icon,
|
|
1579
|
-
resourceKind:
|
|
1580
|
-
selectionActions:
|
|
1581
|
-
rowActions:
|
|
1582
|
-
toolbarActions:
|
|
1703
|
+
resourceKind: n.resourceKind ?? J(e, t.id),
|
|
1704
|
+
selectionActions: Y(n.selectionActions),
|
|
1705
|
+
rowActions: Y(n.rowActions),
|
|
1706
|
+
toolbarActions: Y(n.toolbarActions)
|
|
1583
1707
|
}] : [];
|
|
1584
|
-
}),
|
|
1708
|
+
}), Cn = (e) => e.views.flatMap((t) => t.body.kind === "tree" ? [{
|
|
1585
1709
|
...t.body,
|
|
1586
1710
|
id: t.id,
|
|
1587
1711
|
extensionId: t.extensionId,
|
|
1588
1712
|
title: t.title,
|
|
1589
1713
|
icon: t.icon,
|
|
1590
|
-
resourceKind:
|
|
1591
|
-
}] : []),
|
|
1714
|
+
resourceKind: t.body.resourceKind ?? J(e, t.id)
|
|
1715
|
+
}] : []), wn = (e) => e.views.flatMap((t) => t.body.kind === "file" ? [{
|
|
1592
1716
|
...t.body,
|
|
1593
1717
|
id: t.id,
|
|
1594
1718
|
extensionId: t.extensionId,
|
|
1595
1719
|
title: t.title,
|
|
1596
1720
|
icon: t.icon,
|
|
1597
|
-
resourceKind:
|
|
1598
|
-
}] : []),
|
|
1721
|
+
resourceKind: t.body.resourceKind ?? J(e, t.id)
|
|
1722
|
+
}] : []), Tn = (e) => e.views.flatMap((t) => t.body.kind === "controls" ? [{
|
|
1599
1723
|
...t.body,
|
|
1600
1724
|
id: t.id,
|
|
1601
1725
|
extensionId: t.extensionId,
|
|
1602
1726
|
title: t.title,
|
|
1603
1727
|
icon: t.icon,
|
|
1604
|
-
resourceKind:
|
|
1605
|
-
}] : []),
|
|
1728
|
+
resourceKind: t.body.resourceKind ?? J(e, t.id)
|
|
1729
|
+
}] : []), En = (e) => e.modes.map((e) => ({
|
|
1606
1730
|
id: e.id,
|
|
1607
1731
|
extensionId: e.extensionId,
|
|
1608
1732
|
modeId: e.id,
|
|
@@ -1611,17 +1735,17 @@ var De = (e) => {
|
|
|
1611
1735
|
panelRegions: e.regions,
|
|
1612
1736
|
regionSettings: e.regionSettings,
|
|
1613
1737
|
floatingPanels: e.floatingPanels,
|
|
1614
|
-
...e.defaultTheme ? { defaultTheme:
|
|
1615
|
-
...e.chrome ? { chrome: Object.fromEntries(Object.entries(e.chrome).map(([e, t]) => [e, t !== !1 &&
|
|
1616
|
-
})),
|
|
1617
|
-
let n =
|
|
1738
|
+
...e.defaultTheme ? { defaultTheme: p(e.defaultTheme) } : {},
|
|
1739
|
+
...e.chrome ? { chrome: Object.fromEntries(Object.entries(e.chrome).map(([e, t]) => [e, t !== !1 && p(t)])) } : {}
|
|
1740
|
+
})), Dn = (e, t = {}) => {
|
|
1741
|
+
let n = bn(e);
|
|
1618
1742
|
return {
|
|
1619
1743
|
extensions: e.extensions,
|
|
1620
1744
|
commands: e.commands,
|
|
1621
1745
|
menuContributions: e.menuContributions,
|
|
1622
1746
|
commandPaletteContributions: e.commandPaletteContributions,
|
|
1623
|
-
modes:
|
|
1624
|
-
pages:
|
|
1747
|
+
modes: En(e),
|
|
1748
|
+
pages: _n(e, t.createTab),
|
|
1625
1749
|
placements: e.placements.map((e) => ({
|
|
1626
1750
|
id: e.id,
|
|
1627
1751
|
ref: {
|
|
@@ -1629,7 +1753,7 @@ var De = (e) => {
|
|
|
1629
1753
|
kind: "placement",
|
|
1630
1754
|
id: e.localId
|
|
1631
1755
|
},
|
|
1632
|
-
modeId:
|
|
1756
|
+
modeId: p(e.mode),
|
|
1633
1757
|
item: e.item,
|
|
1634
1758
|
region: e.region,
|
|
1635
1759
|
order: e.order,
|
|
@@ -1663,7 +1787,7 @@ var De = (e) => {
|
|
|
1663
1787
|
})),
|
|
1664
1788
|
settingsSections: e.settingsSections ?? [],
|
|
1665
1789
|
settingsPanels: e.settingsPanels.flatMap((t) => {
|
|
1666
|
-
let n = e.views.find((e) => e.id ===
|
|
1790
|
+
let n = e.views.find((e) => e.id === p(t.view));
|
|
1667
1791
|
return n ? [{
|
|
1668
1792
|
id: t.id,
|
|
1669
1793
|
viewId: n.id,
|
|
@@ -1672,31 +1796,31 @@ var De = (e) => {
|
|
|
1672
1796
|
scope: t.slot.id.includes("global") ? "global" : "project",
|
|
1673
1797
|
title: n.title,
|
|
1674
1798
|
icon: n.icon,
|
|
1675
|
-
section: t.section ?
|
|
1799
|
+
section: t.section ? p(t.section) : void 0
|
|
1676
1800
|
}] : [];
|
|
1677
1801
|
}),
|
|
1678
|
-
kanbanRenderers:
|
|
1679
|
-
dataTableRenderers:
|
|
1802
|
+
kanbanRenderers: xn(e),
|
|
1803
|
+
dataTableRenderers: Sn(e),
|
|
1680
1804
|
commandPaletteResources: e.commandPaletteResources ?? [],
|
|
1681
|
-
treeRenderers:
|
|
1682
|
-
fileRenderers:
|
|
1683
|
-
controlsRenderers:
|
|
1805
|
+
treeRenderers: Cn(e),
|
|
1806
|
+
fileRenderers: wn(e),
|
|
1807
|
+
controlsRenderers: Tn(e),
|
|
1684
1808
|
keybindings: e.keybindings ?? [],
|
|
1685
1809
|
settingsDefinitions: e.settingsDefinitions ?? [],
|
|
1686
1810
|
statuses: e.statuses,
|
|
1687
1811
|
statusBarItems: e.statusBarItems.map((e) => ({
|
|
1688
1812
|
id: e.id,
|
|
1689
1813
|
extensionId: e.extensionId,
|
|
1690
|
-
viewId:
|
|
1814
|
+
viewId: p(e.view),
|
|
1691
1815
|
slot: e.slot.id.endsWith("leading") ? "leading" : "trailing",
|
|
1692
1816
|
order: e.order,
|
|
1693
|
-
when:
|
|
1817
|
+
when: mn(e.when)
|
|
1694
1818
|
})),
|
|
1695
1819
|
diagnostics: e.diagnostics
|
|
1696
1820
|
};
|
|
1697
|
-
},
|
|
1821
|
+
}, On = (e, t, n = {}) => {
|
|
1698
1822
|
e.views.refreshView(t.id, t.kind === "file" ? n : void 0);
|
|
1699
|
-
},
|
|
1823
|
+
}, kn = (e) => {
|
|
1700
1824
|
let t = /* @__PURE__ */ new Map(), n = (e, n) => {
|
|
1701
1825
|
for (let r of new Set(n.refreshEventIds ?? [])) {
|
|
1702
1826
|
let i = t.get(r) ?? [];
|
|
@@ -1711,16 +1835,16 @@ var De = (e) => {
|
|
|
1711
1835
|
refreshEventIds: t.body.refreshEventIds
|
|
1712
1836
|
});
|
|
1713
1837
|
return t;
|
|
1714
|
-
},
|
|
1715
|
-
let t =
|
|
1838
|
+
}, An = (e) => {
|
|
1839
|
+
let t = kn(e.metadata);
|
|
1716
1840
|
return e.subscribe((n) => {
|
|
1717
1841
|
let { id: r, ...i } = n;
|
|
1718
|
-
for (let n of t.get(r) ?? [])
|
|
1842
|
+
for (let n of t.get(r) ?? []) On(e.workbench, n, i);
|
|
1719
1843
|
});
|
|
1720
|
-
},
|
|
1844
|
+
}, jn = (e, t) => {
|
|
1721
1845
|
for (let n of t.views) n.body.kind === "webview" && e.views.getView(n.id) && e.views.refreshView(n.id);
|
|
1722
|
-
},
|
|
1723
|
-
...
|
|
1846
|
+
}, Mn = (e) => (t) => ({
|
|
1847
|
+
...M({
|
|
1724
1848
|
workbench: t.workbench,
|
|
1725
1849
|
placement: t.placement,
|
|
1726
1850
|
hostEvents: t.hostEvents
|
|
@@ -1728,14 +1852,14 @@ var De = (e) => {
|
|
|
1728
1852
|
"navigation.open": (n) => {
|
|
1729
1853
|
let r = n;
|
|
1730
1854
|
if (!r.target) throw Error("navigation.open requires a target.");
|
|
1731
|
-
return t.workbench.navigation.openTarget(
|
|
1855
|
+
return t.workbench.navigation.openTarget(F(r.target, {
|
|
1732
1856
|
extensionId: e.extensionIdForWebview(t.webviewId),
|
|
1733
1857
|
projectId: e.projectId
|
|
1734
1858
|
}));
|
|
1735
1859
|
},
|
|
1736
1860
|
"commands.execute": async (n) => {
|
|
1737
1861
|
let r = n, i = r.resource ?? t.placement.resource;
|
|
1738
|
-
return
|
|
1862
|
+
return L({
|
|
1739
1863
|
...e,
|
|
1740
1864
|
workbench: t.workbench
|
|
1741
1865
|
}, r.commandId, {
|
|
@@ -1743,7 +1867,7 @@ var De = (e) => {
|
|
|
1743
1867
|
...r.workspaceId ? { workspaceId: r.workspaceId } : {},
|
|
1744
1868
|
...r.metadata ? { metadata: r.metadata } : {},
|
|
1745
1869
|
...i ? { resource: i } : {},
|
|
1746
|
-
slot:
|
|
1870
|
+
slot: I({
|
|
1747
1871
|
id: t.webviewId,
|
|
1748
1872
|
kind: e.slotKind,
|
|
1749
1873
|
projectId: e.projectId,
|
|
@@ -1757,79 +1881,79 @@ var De = (e) => {
|
|
|
1757
1881
|
"files.delete": e.files.delete
|
|
1758
1882
|
} : {},
|
|
1759
1883
|
...e.artifacts ? { "artifacts.read": (n) => e.artifacts.read(n, { webviewId: t.webviewId }) } : {}
|
|
1760
|
-
}),
|
|
1761
|
-
title:
|
|
1884
|
+
}), Nn = (e) => ({
|
|
1885
|
+
title: P(e.title) || void 0,
|
|
1762
1886
|
runtimeUrl: e.runtimeUrl,
|
|
1763
1887
|
moduleUrl: e.moduleUrl,
|
|
1764
1888
|
styles: e.styles,
|
|
1765
1889
|
capabilities: e.capabilities
|
|
1766
|
-
}),
|
|
1890
|
+
}), Pn = "extensions", Fn = 1e3, In = 25, Ln = (e) => e === void 0 ? void 0 : e, Rn = (e) => e === "global" ? "user" : "project", zn = (e, t) => t ? (n) => ({
|
|
1767
1891
|
...e(n),
|
|
1768
1892
|
...t(n)
|
|
1769
|
-
}) : e,
|
|
1893
|
+
}) : e, Bn = (e, t) => zn(e.createWebviewHostCapabilities ?? Mn({
|
|
1770
1894
|
artifacts: e.webviewArtifacts,
|
|
1771
1895
|
executeCommand: e.executeCommand,
|
|
1772
1896
|
extensionIdForWebview: (t) => e.metadata.panels.find((e) => e.id === t)?.extensionId,
|
|
1773
1897
|
files: e.webviewFiles,
|
|
1774
1898
|
projectId: e.projectId,
|
|
1775
1899
|
slotKind: t
|
|
1776
|
-
}), e.createWebviewHostCapabilityOverrides),
|
|
1900
|
+
}), e.createWebviewHostCapabilityOverrides), Vn = (e) => e.metadata.panels.flatMap((t) => {
|
|
1777
1901
|
if (!t.webview) return [];
|
|
1778
|
-
let n =
|
|
1902
|
+
let n = Nn(t.webview);
|
|
1779
1903
|
return [e.workbench.views.registerView({
|
|
1780
1904
|
id: t.id,
|
|
1781
|
-
title:
|
|
1905
|
+
title: P(t.title, t.id),
|
|
1782
1906
|
icon: t.icon,
|
|
1783
1907
|
body: {
|
|
1784
1908
|
kind: "react",
|
|
1785
1909
|
render: (r) => {
|
|
1786
1910
|
let i = e.metadata.settingsPanels.some((e) => e.id === r.instance.panelId && e.viewId === t.id) ? "settings" : "panel";
|
|
1787
|
-
return e.renderWebview?.(r) ??
|
|
1911
|
+
return e.renderWebview?.(r) ?? Fe({
|
|
1788
1912
|
context: {
|
|
1789
1913
|
workbench: r.workbench,
|
|
1790
1914
|
webviewId: t.id,
|
|
1791
1915
|
placement: r.instance,
|
|
1792
|
-
hostEvents:
|
|
1916
|
+
hostEvents: Pe(r.workbench, r.instance)
|
|
1793
1917
|
},
|
|
1794
|
-
createHostCapabilities:
|
|
1918
|
+
createHostCapabilities: Bn(e, i),
|
|
1795
1919
|
createProps: e.createWebviewProps ?? (({ placement: e }) => ({
|
|
1796
1920
|
placement: e,
|
|
1797
1921
|
resource: e.resource
|
|
1798
1922
|
})),
|
|
1799
1923
|
createTheme: e.createWebviewTheme,
|
|
1800
1924
|
ownerId: t.extensionId,
|
|
1801
|
-
title:
|
|
1925
|
+
title: P(t.title, t.id),
|
|
1802
1926
|
webview: n
|
|
1803
1927
|
});
|
|
1804
1928
|
}
|
|
1805
1929
|
}
|
|
1806
1930
|
})];
|
|
1807
|
-
}),
|
|
1931
|
+
}), Hn = {
|
|
1808
1932
|
first: 1e6,
|
|
1809
1933
|
default: 0,
|
|
1810
1934
|
last: -1e6
|
|
1811
|
-
},
|
|
1935
|
+
}, Un = (e) => e.metadata.panels.flatMap((e) => e.panelMenus ?? []).map((t, n) => e.workbench.viewMenus.registerViewMenu({
|
|
1812
1936
|
id: t.id,
|
|
1813
1937
|
ownerViewId: t.ownerPanelId,
|
|
1814
1938
|
viewId: t.viewId,
|
|
1815
1939
|
side: t.side,
|
|
1816
|
-
priority:
|
|
1817
|
-
})),
|
|
1940
|
+
priority: Hn[t.placement ?? "default"] - n
|
|
1941
|
+
})), X = (e) => {
|
|
1818
1942
|
if (!e || typeof e != "object" || !("statuses" in e) || !Array.isArray(e.statuses)) throw Error("Status provider returned an invalid response");
|
|
1819
1943
|
return e.statuses;
|
|
1820
|
-
},
|
|
1944
|
+
}, Wn = (e, t) => {
|
|
1821
1945
|
let r = e.metadata.statuses ?? [];
|
|
1822
1946
|
if (r.length === 0) return [];
|
|
1823
1947
|
let i = "workbench.extension-statuses.settings", a = r.map((n, r) => e.workbench.statuses.registerStatusSet({
|
|
1824
1948
|
id: n.id,
|
|
1825
|
-
title:
|
|
1949
|
+
title: P(n.title, n.id),
|
|
1826
1950
|
actions: n.actions?.map((e) => ({
|
|
1827
1951
|
id: e.id,
|
|
1828
|
-
label:
|
|
1952
|
+
label: P(e.label, e.id),
|
|
1829
1953
|
icon: e.icon
|
|
1830
1954
|
})),
|
|
1831
|
-
query: async () =>
|
|
1832
|
-
save: n.saveHandlerId ? async (e) =>
|
|
1955
|
+
query: async () => X(await R(t, n.queryHandlerId, { params: {} })),
|
|
1956
|
+
save: n.saveHandlerId ? async (e) => X(await R(t, n.saveHandlerId, { params: { statuses: e } })) : void 0
|
|
1833
1957
|
}, {
|
|
1834
1958
|
ownerId: n.extensionId,
|
|
1835
1959
|
priority: -r
|
|
@@ -1839,20 +1963,20 @@ var De = (e) => {
|
|
|
1839
1963
|
title: "Statuses",
|
|
1840
1964
|
body: {
|
|
1841
1965
|
kind: "react",
|
|
1842
|
-
render: () =>
|
|
1966
|
+
render: () => T(n, { workbench: e.workbench })
|
|
1843
1967
|
}
|
|
1844
1968
|
})), a.push(e.workbench.settings.registerPanel({
|
|
1845
1969
|
id: "workbench.statuses",
|
|
1846
1970
|
title: "Statuses",
|
|
1847
1971
|
icon: "list-checks",
|
|
1848
1972
|
kind: "view",
|
|
1849
|
-
order:
|
|
1850
|
-
section: e.settingsSectionId ??
|
|
1973
|
+
order: In,
|
|
1974
|
+
section: e.settingsSectionId ?? Pn,
|
|
1851
1975
|
scope: "project",
|
|
1852
1976
|
viewId: i
|
|
1853
1977
|
})), a;
|
|
1854
|
-
},
|
|
1855
|
-
let t = [], n = e.settingsSectionId ??
|
|
1978
|
+
}, Gn = (e) => {
|
|
1979
|
+
let t = [], n = e.settingsSectionId ?? Pn;
|
|
1856
1980
|
e.workbench.settings.getSection(n) || t.push(e.workbench.settings.registerSection({
|
|
1857
1981
|
id: n,
|
|
1858
1982
|
title: e.settingsSectionTitle ?? "Extensions"
|
|
@@ -1860,47 +1984,47 @@ var De = (e) => {
|
|
|
1860
1984
|
let r = [...e.metadata.settingsSections].sort((e, t) => (e.order ?? 0) - (t.order ?? 0) || e.extensionId.localeCompare(t.extensionId) || e.id.localeCompare(t.id));
|
|
1861
1985
|
for (let n of r) t.push(e.workbench.settings.registerSection({
|
|
1862
1986
|
id: n.id,
|
|
1863
|
-
title:
|
|
1987
|
+
title: P(n.title, n.id),
|
|
1864
1988
|
order: n.order,
|
|
1865
1989
|
scope: n.scope
|
|
1866
1990
|
}));
|
|
1867
1991
|
let i = Object.fromEntries((e.metadata.settingsDefinitions ?? []).map((e) => [e.key, {
|
|
1868
1992
|
type: e.type,
|
|
1869
|
-
scope:
|
|
1870
|
-
default:
|
|
1993
|
+
scope: Rn(e.scope),
|
|
1994
|
+
default: Ln(e.default),
|
|
1871
1995
|
enum: e.enum,
|
|
1872
|
-
description:
|
|
1996
|
+
description: P(e.description)
|
|
1873
1997
|
}]));
|
|
1874
1998
|
Object.keys(i).length > 0 && t.push(e.workbench.preferences.registerSchema({ properties: i }));
|
|
1875
1999
|
let a = [...e.metadata.settingsPanels].sort((e, t) => e.extensionId.localeCompare(t.extensionId) || e.id.localeCompare(t.id));
|
|
1876
2000
|
for (let [r, i] of a.entries()) t.push(e.workbench.settings.registerPanel({
|
|
1877
2001
|
id: i.id,
|
|
1878
|
-
title:
|
|
2002
|
+
title: P(i.title, i.id),
|
|
1879
2003
|
icon: i.icon,
|
|
1880
2004
|
kind: "view",
|
|
1881
|
-
order:
|
|
2005
|
+
order: Fn + r,
|
|
1882
2006
|
section: i.section ?? n,
|
|
1883
2007
|
scope: i.scope,
|
|
1884
2008
|
viewId: i.viewId
|
|
1885
2009
|
}));
|
|
1886
2010
|
return t;
|
|
1887
|
-
}, Z = (e) => !(!e || typeof e != "object" || Array.isArray(e)),
|
|
2011
|
+
}, Z = (e) => !(!e || typeof e != "object" || Array.isArray(e)), Kn = (e, t, n) => h(e) ? F(e, {
|
|
1888
2012
|
extensionId: t,
|
|
1889
2013
|
projectId: n
|
|
1890
|
-
}) : void 0,
|
|
2014
|
+
}) : void 0, qn = (e, t, n) => {
|
|
1891
2015
|
if (!Z(e)) return {};
|
|
1892
2016
|
let r = Z(e.indicator) ? {
|
|
1893
2017
|
icon: String(e.indicator.icon ?? ""),
|
|
1894
2018
|
color: typeof e.indicator.color == "string" ? e.indicator.color : void 0,
|
|
1895
|
-
label:
|
|
2019
|
+
label: P(e.indicator.label)
|
|
1896
2020
|
} : void 0, i = Array.isArray(e.menu) ? e.menu.flatMap((e) => !Z(e) || typeof e.id != "string" || !Array.isArray(e.rows) ? [] : [{
|
|
1897
2021
|
id: e.id,
|
|
1898
2022
|
rows: e.rows.flatMap((e) => {
|
|
1899
2023
|
if (!Z(e) || typeof e.id != "string") return [];
|
|
1900
|
-
let r =
|
|
2024
|
+
let r = Kn(e.action, t, n);
|
|
1901
2025
|
return [{
|
|
1902
2026
|
id: e.id,
|
|
1903
|
-
label:
|
|
2027
|
+
label: P(e.label, e.id),
|
|
1904
2028
|
icon: typeof e.icon == "string" ? e.icon : void 0,
|
|
1905
2029
|
iconColor: typeof e.iconColor == "string" ? e.iconColor : void 0,
|
|
1906
2030
|
selected: e.selected === !0,
|
|
@@ -1913,66 +2037,75 @@ var De = (e) => {
|
|
|
1913
2037
|
})
|
|
1914
2038
|
}]) : void 0;
|
|
1915
2039
|
return {
|
|
1916
|
-
label:
|
|
2040
|
+
label: P(e.label),
|
|
1917
2041
|
icon: typeof e.icon == "string" ? e.icon : void 0,
|
|
1918
2042
|
indicator: r?.icon ? r : void 0,
|
|
1919
2043
|
menu: i
|
|
1920
2044
|
};
|
|
1921
|
-
},
|
|
1922
|
-
let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
label: a.resource.label,
|
|
1929
|
-
metadata: a.resource.metadata
|
|
1930
|
-
} : void 0;
|
|
1931
|
-
Promise.resolve(L(e, t.queryHandlerId, {
|
|
1932
|
-
resource: o,
|
|
2045
|
+
}, Jn = (e, t) => {
|
|
2046
|
+
let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Set(), o = new Set(t.refreshEventIds ?? []), s = 0, c = (o) => {
|
|
2047
|
+
r.set(o.instanceId, o);
|
|
2048
|
+
let l = i.get(o.instanceId);
|
|
2049
|
+
if (l) return l;
|
|
2050
|
+
let u = o.resource, d = s, f = Promise.resolve(R(e, t.queryHandlerId, {
|
|
2051
|
+
resource: u,
|
|
1933
2052
|
params: { renderer: {
|
|
1934
2053
|
rendererId: t.placementId,
|
|
1935
2054
|
projectId: e.projectId,
|
|
1936
|
-
...
|
|
2055
|
+
...u ? { resource: u } : {},
|
|
1937
2056
|
invocation: { placement: "visible" }
|
|
1938
2057
|
} }
|
|
1939
|
-
})).then((r) => {
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
2058
|
+
})).then(async (r) => {
|
|
2059
|
+
if (d !== s) {
|
|
2060
|
+
i.delete(o.instanceId), await c(o);
|
|
2061
|
+
return;
|
|
2062
|
+
}
|
|
2063
|
+
n.set(o.instanceId, qn(r, t.extensionId, e.projectId));
|
|
2064
|
+
for (let e of a) e();
|
|
2065
|
+
}).finally(() => {
|
|
2066
|
+
i.get(o.instanceId) === f && i.delete(o.instanceId);
|
|
2067
|
+
});
|
|
2068
|
+
return i.set(o.instanceId, f), f;
|
|
1943
2069
|
};
|
|
1944
2070
|
return {
|
|
1945
2071
|
refreshEvents: t.refreshEventIds,
|
|
1946
2072
|
getSnapshot(e) {
|
|
1947
|
-
return
|
|
2073
|
+
return n.has(e.instanceId) || c(e).catch(() => void 0), n.get(e.instanceId) ?? {};
|
|
1948
2074
|
},
|
|
1949
2075
|
subscribe(t) {
|
|
1950
|
-
|
|
1951
|
-
let
|
|
1952
|
-
|
|
2076
|
+
a.add(t);
|
|
2077
|
+
let n = e.workbench.resources.preview.subscribeRefresh(async (e) => {
|
|
2078
|
+
let t = [...r.values()].filter((t) => t.resource && v(t.resource) === v(e));
|
|
2079
|
+
t.length && (s++, await Promise.all(t.map(c)));
|
|
2080
|
+
}), i = e.subscribeRefreshEvents?.((e) => {
|
|
2081
|
+
if (o.has(e.id)) {
|
|
2082
|
+
s++;
|
|
2083
|
+
for (let e of r.values()) c(e).catch(() => void 0);
|
|
2084
|
+
}
|
|
1953
2085
|
});
|
|
1954
2086
|
return { dispose() {
|
|
1955
|
-
|
|
2087
|
+
a.delete(t), i?.dispose(), n.dispose();
|
|
1956
2088
|
} };
|
|
1957
2089
|
}
|
|
1958
2090
|
};
|
|
1959
|
-
},
|
|
2091
|
+
}, Yn = (e) => {
|
|
1960
2092
|
for (let t = e.length - 1; t >= 0; --t) e[t]?.dispose();
|
|
1961
|
-
}, Q = (e) => e && typeof e == "object" && !Array.isArray(e) ? e : void 0, $ = (e, t, n, r, i) => e.prepareCommandArgs?.(t, n, r, i) ?? n,
|
|
2093
|
+
}, Q = (e) => e && typeof e == "object" && !Array.isArray(e) ? e : void 0, $ = (e, t, n, r, i) => e.prepareCommandArgs?.(t, n, r, i) ?? n, Xn = (e, t) => t.commands.map((t) => e.workbench.commands.registerCommand({
|
|
1962
2094
|
id: t.id,
|
|
1963
|
-
label:
|
|
1964
|
-
description:
|
|
1965
|
-
params:
|
|
2095
|
+
label: P(t.title, t.id),
|
|
2096
|
+
description: P(t.description),
|
|
2097
|
+
params: B(t.params, P, t.extensionId),
|
|
2098
|
+
resourceMutation: t.resourceMutation
|
|
1966
2099
|
}, {
|
|
1967
2100
|
prepareArgs: (n, r, i) => $(e, t.id, n, r, i),
|
|
1968
|
-
execute: (n, r) =>
|
|
2101
|
+
execute: (n, r) => R(e, t.id, {
|
|
1969
2102
|
params: Q(n),
|
|
1970
2103
|
resource: r?.resource,
|
|
1971
2104
|
signal: r?.signal
|
|
1972
2105
|
})
|
|
1973
|
-
})),
|
|
2106
|
+
})), Zn = (e, t) => t?.resource ?? e.workbench.getPrimaryResource(), Qn = (e, t) => {
|
|
1974
2107
|
if (!e.menuSlotsById) return [];
|
|
1975
|
-
let { registrations: n } =
|
|
2108
|
+
let { registrations: n } = ct({
|
|
1976
2109
|
metadata: e.metadata,
|
|
1977
2110
|
menuSlotsById: e.menuSlotsById,
|
|
1978
2111
|
menuTargetsById: e.menuTargetsById,
|
|
@@ -1986,13 +2119,13 @@ var De = (e) => {
|
|
|
1986
2119
|
}));
|
|
1987
2120
|
return (e.menuRegistrations ?? r).flatMap((n) => [e.workbench.commands.registerCommand(n.command, {
|
|
1988
2121
|
prepareArgs: (e, r, i) => $(t, n.targetCommandId, e, r, i),
|
|
1989
|
-
execute: (r, i) =>
|
|
2122
|
+
execute: (r, i) => R(t, n.targetCommandId, {
|
|
1990
2123
|
params: {
|
|
1991
2124
|
...n.contribution.params ?? {},
|
|
1992
2125
|
...Q(r) ?? {}
|
|
1993
2126
|
},
|
|
1994
|
-
resource:
|
|
1995
|
-
slot:
|
|
2127
|
+
resource: Zn(e, i),
|
|
2128
|
+
slot: I({
|
|
1996
2129
|
id: n.contribution.slotId,
|
|
1997
2130
|
kind: "menu",
|
|
1998
2131
|
projectId: e.projectId,
|
|
@@ -2000,75 +2133,75 @@ var De = (e) => {
|
|
|
2000
2133
|
})
|
|
2001
2134
|
})
|
|
2002
2135
|
}), ...n.menuItems.map(({ menuPath: t, menuItem: n }) => e.workbench.layout.registerMenuItem(t, n))]);
|
|
2003
|
-
},
|
|
2136
|
+
}, $n = (t, n) => lt({ metadata: t.metadata }).flatMap((r) => [t.workbench.commands.registerCommand(r.command, {
|
|
2004
2137
|
prepareArgs: (e, t, i) => $(n, r.targetCommandId, e, t, i),
|
|
2005
|
-
execute: (e, i) =>
|
|
2138
|
+
execute: (e, i) => R(n, r.targetCommandId, {
|
|
2006
2139
|
params: {
|
|
2007
2140
|
...r.contribution.params ?? {},
|
|
2008
2141
|
...Q(e) ?? {}
|
|
2009
2142
|
},
|
|
2010
|
-
resource:
|
|
2011
|
-
slot:
|
|
2143
|
+
resource: Zn(t, i),
|
|
2144
|
+
slot: I({
|
|
2012
2145
|
id: "workbench.commandPalette",
|
|
2013
2146
|
kind: "menu",
|
|
2014
2147
|
projectId: t.projectId,
|
|
2015
2148
|
context: { panelId: r.contribution.id }
|
|
2016
2149
|
})
|
|
2017
2150
|
}),
|
|
2018
|
-
isVisible: () =>
|
|
2019
|
-
}), t.workbench.layout.registerMenuItem(e, r.menuItem)]),
|
|
2151
|
+
isVisible: () => g(r.contribution.when, t.workbench.getPrimaryResource()?.type)
|
|
2152
|
+
}), t.workbench.layout.registerMenuItem(e, r.menuItem)]), er = (e, t) => {
|
|
2020
2153
|
let n = t?.mode;
|
|
2021
2154
|
if (!n) return !0;
|
|
2022
2155
|
let r = e.workbench.modes.getActiveModeId() ?? "";
|
|
2023
2156
|
return Array.isArray(n) ? n.includes(r) : n === r;
|
|
2024
|
-
},
|
|
2157
|
+
}, tr = (e) => (e.metadata.statusBarItems ?? []).map((t) => e.workbench.statusBar.registerItem({
|
|
2025
2158
|
id: t.id,
|
|
2026
2159
|
viewId: t.viewId,
|
|
2027
2160
|
slot: t.slot,
|
|
2028
2161
|
order: t.order,
|
|
2029
|
-
isVisible: () =>
|
|
2030
|
-
})),
|
|
2162
|
+
isVisible: () => er(e, t.when)
|
|
2163
|
+
})), nr = (e) => e.metadata.pages.map((t) => e.workbench.pages.registerPage(t)), rr = (e) => e.metadata.resourceKinds.map((t) => e.workbench.resources.registerKind({
|
|
2031
2164
|
kind: t.id,
|
|
2032
|
-
label:
|
|
2165
|
+
label: P(t.label, t.id),
|
|
2033
2166
|
icon: t.icon ?? "FileText"
|
|
2034
|
-
})),
|
|
2167
|
+
})), ir = (e) => e.metadata.modes.map((t) => e.workbench.modes.registerMode({
|
|
2035
2168
|
id: t.modeId,
|
|
2036
|
-
label:
|
|
2169
|
+
label: P(t.label, t.modeId),
|
|
2037
2170
|
panels: t.panelRegions,
|
|
2038
2171
|
regionSettings: t.regionSettings,
|
|
2039
2172
|
floatingPanels: t.floatingPanels,
|
|
2040
2173
|
defaultTheme: t.defaultTheme,
|
|
2041
2174
|
chrome: t.chrome,
|
|
2042
2175
|
activate: () => void 0
|
|
2043
|
-
})),
|
|
2176
|
+
})), ar = (e) => e.metadata.placements.map((t) => e.workbench.modePlacements.registerPlacement(t)), or = (e) => {
|
|
2044
2177
|
let t = {
|
|
2045
2178
|
...e,
|
|
2046
|
-
metadata:
|
|
2179
|
+
metadata: Dn(e.metadata, { createTab: (t) => Jn(e, t) })
|
|
2047
2180
|
}, n = [], r = t;
|
|
2048
2181
|
try {
|
|
2049
|
-
return n.push(...
|
|
2182
|
+
return n.push(...Xn(r, t.metadata)), n.push(...pn({
|
|
2050
2183
|
bindings: t.metadata.keybindings,
|
|
2051
2184
|
createWhenExpression: t.createKeybindingWhenExpression,
|
|
2052
2185
|
workbench: t.workbench
|
|
2053
|
-
})), n.push(...
|
|
2186
|
+
})), n.push(...Qn(t, r)), n.push(...$n(t, r)), n.push(tn({
|
|
2054
2187
|
...t,
|
|
2055
2188
|
resolveNodeResource: t.resolveTreeNodeResource
|
|
2056
|
-
})), n.push(
|
|
2189
|
+
})), n.push(ht(t)), n.push(Ke(r, t.metadata.controlsRenderers ?? [])), n.push(...Vn(t)), n.push(...Gn(t)), n.push(...Wn(t, r)), n.push(Ut(r, t.metadata.kanbanRenderers ?? [], t.kanbanAdapter)), n.push($e(r, t.metadata.dataTableRenderers ?? [], t.dataTableAdapter)), n.push(...Un(t)), n.push(We(r, t.metadata.commandPaletteResources ?? [])), n.push(...un({
|
|
2057
2190
|
createWhenExpression: e.createNavigationWhenExpression,
|
|
2058
2191
|
metadata: e.metadata,
|
|
2059
2192
|
workbench: e.workbench
|
|
2060
|
-
})), e.subscribeRefreshEvents && n.push(
|
|
2193
|
+
})), e.subscribeRefreshEvents && n.push(An({
|
|
2061
2194
|
metadata: e.metadata,
|
|
2062
2195
|
subscribe: e.subscribeRefreshEvents,
|
|
2063
2196
|
workbench: e.workbench
|
|
2064
|
-
})), n.push(...
|
|
2065
|
-
|
|
2197
|
+
})), n.push(...tr(t)), n.push(...rr(t)), n.push(...nr(t)), n.push(...ir(t)), n.push(...ar(t)), { dispose() {
|
|
2198
|
+
Yn(n);
|
|
2066
2199
|
} };
|
|
2067
2200
|
} catch (e) {
|
|
2068
|
-
throw
|
|
2201
|
+
throw Yn(n), e;
|
|
2069
2202
|
}
|
|
2070
2203
|
};
|
|
2071
2204
|
//#endregion
|
|
2072
|
-
export {
|
|
2205
|
+
export { lt as buildWorkbenchExtensionCommandPaletteRegistrations, ct as buildWorkbenchExtensionMenuRegistrations, j as createTerminalSessionCapability, M as createWorkbenchWebviewHostCapabilities, tt as emptyWorkbenchExtensionMetadata, L as executeWorkbenchExtensionCommandResponse, pt as fileRendererRefreshEnvelopeFromCommand, Pe as getBridgeWebviewHostEventPublisher, jn as refreshOpenWorkbenchExtensionWebviews, On as refreshWorkbenchExtensionRenderer, We as registerWorkbenchExtensionCommandPaletteResources, or as registerWorkbenchExtensionContributions, Ke as registerWorkbenchExtensionControlsRenderers, $e as registerWorkbenchExtensionDataTableRenderers, ht as registerWorkbenchExtensionFileRenderers, Ut as registerWorkbenchExtensionKanbanRenderers, An as registerWorkbenchExtensionRendererRefreshEvents, tn as registerWorkbenchExtensionTreeRenderers, Fe as renderBridgeWebviewFrame, F as toWorkbenchNavigationTarget, mn as toWorkbenchWhenExpression };
|
|
2073
2206
|
|
|
2074
2207
|
//# sourceMappingURL=extensions.js.map
|