reactive-vscode 0.2.6 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +109 -108
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +540 -502
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,367 +1,405 @@
|
|
|
1
|
-
import { getCurrentScope as
|
|
1
|
+
import { getCurrentScope as z, onScopeDispose as M, effectScope as K, shallowRef as g, computed as h, reactive as _, toValue as s, watchEffect as C, watch as D, ref as x, shallowReactive as ee, toRaw as te, isRef as ne } from "@reactive-vscode/reactivity";
|
|
2
2
|
export * from "@reactive-vscode/reactivity";
|
|
3
|
-
import { workspace as
|
|
4
|
-
function
|
|
5
|
-
return
|
|
3
|
+
import { workspace as S, commands as I, window as f, debug as j, extensions as O, comments as ie, env as p, EventEmitter as Q, tasks as k, Uri as ae, languages as re, ColorThemeKind as H, l10n as B } from "vscode";
|
|
4
|
+
function se(e) {
|
|
5
|
+
return z() ? (M(e), !0) : !1;
|
|
6
6
|
}
|
|
7
|
-
function
|
|
7
|
+
function U(e, t) {
|
|
8
8
|
const n = /* @__PURE__ */ new Map();
|
|
9
|
-
return (...
|
|
10
|
-
const
|
|
11
|
-
let
|
|
12
|
-
return
|
|
13
|
-
data: e(...
|
|
9
|
+
return (...i) => {
|
|
10
|
+
const a = t(...i);
|
|
11
|
+
let u = n.get(a);
|
|
12
|
+
return u ? u.refCount++ : (u = {
|
|
13
|
+
data: e(...i),
|
|
14
14
|
refCount: 1
|
|
15
|
-
}, n.set(
|
|
16
|
-
--
|
|
17
|
-
}),
|
|
15
|
+
}, n.set(a, u)), se(() => {
|
|
16
|
+
--u.refCount === 0 && n.delete(a);
|
|
17
|
+
}), u.data;
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function w(e) {
|
|
21
21
|
let t;
|
|
22
|
-
return () => t
|
|
22
|
+
return () => t !== void 0 ? t : t = K(!0).run(e);
|
|
23
23
|
}
|
|
24
|
-
const
|
|
25
|
-
function
|
|
26
|
-
|
|
24
|
+
const q = [];
|
|
25
|
+
function Te(e) {
|
|
26
|
+
q.push(e);
|
|
27
27
|
}
|
|
28
|
-
const R =
|
|
29
|
-
function
|
|
28
|
+
const R = g(null), $ = K();
|
|
29
|
+
function Se(e) {
|
|
30
30
|
return {
|
|
31
|
-
activate: (t) => (R.value = t,
|
|
31
|
+
activate: (t) => (R.value = t, $.run(() => (Y.map((n) => n(t)), e(t)))),
|
|
32
32
|
deactivate: () => {
|
|
33
|
-
|
|
33
|
+
q.map((t) => t()), $.stop();
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
const
|
|
38
|
-
function
|
|
39
|
-
R.value ? e(R.value) :
|
|
40
|
-
}
|
|
41
|
-
function
|
|
42
|
-
const
|
|
43
|
-
function
|
|
44
|
-
const
|
|
45
|
-
get: () =>
|
|
46
|
-
set: (
|
|
47
|
-
|
|
37
|
+
const Y = [];
|
|
38
|
+
function G(e) {
|
|
39
|
+
R.value ? e(R.value) : Y.push(e);
|
|
40
|
+
}
|
|
41
|
+
function ue(e, t, n) {
|
|
42
|
+
const i = !e, a = S.getConfiguration(i ? void 0 : e, n);
|
|
43
|
+
function u(c, l) {
|
|
44
|
+
const v = g(l), b = h({
|
|
45
|
+
get: () => v.value,
|
|
46
|
+
set: (d) => {
|
|
47
|
+
v.value = d, a.update(c, d);
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
|
-
return
|
|
51
|
-
await
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
},
|
|
50
|
+
return b.update = async (d, m, T) => {
|
|
51
|
+
await a.update(c, d, m, T), b.value = d;
|
|
52
|
+
}, b.set = (d) => {
|
|
53
|
+
v.value = d;
|
|
54
|
+
}, b;
|
|
55
55
|
}
|
|
56
|
-
const
|
|
57
|
-
Object.keys(t).map((
|
|
56
|
+
const r = Object.fromEntries(
|
|
57
|
+
Object.keys(t).map((c) => [c, u(c, a.get(c))])
|
|
58
58
|
);
|
|
59
|
-
return
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
const
|
|
63
|
-
for (const
|
|
64
|
-
|
|
65
|
-
} : (
|
|
66
|
-
if (!
|
|
59
|
+
return G(() => {
|
|
60
|
+
o(S.onDidChangeConfiguration(
|
|
61
|
+
i ? (c) => {
|
|
62
|
+
const l = S.getConfiguration();
|
|
63
|
+
for (const v in t)
|
|
64
|
+
c.affectsConfiguration(v) && r[v].set(l.get(v));
|
|
65
|
+
} : (c) => {
|
|
66
|
+
if (!c.affectsConfiguration(e))
|
|
67
67
|
return;
|
|
68
|
-
const
|
|
69
|
-
for (const
|
|
70
|
-
|
|
68
|
+
const l = S.getConfiguration(e);
|
|
69
|
+
for (const v in t)
|
|
70
|
+
c.affectsConfiguration(`${e}.${v}`) && r[v].set(l.get(v));
|
|
71
71
|
}
|
|
72
72
|
));
|
|
73
|
-
}),
|
|
74
|
-
}
|
|
75
|
-
function
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
$update(i, s, c, o) {
|
|
80
|
-
return a[i].update(s, c, o);
|
|
73
|
+
}), r;
|
|
74
|
+
}
|
|
75
|
+
function xe(e, t, n) {
|
|
76
|
+
const i = ue(e, t, n), a = {}, u = _({
|
|
77
|
+
$update(r, c, l, v) {
|
|
78
|
+
return i[r].update(c, l, v);
|
|
81
79
|
},
|
|
82
|
-
$set(
|
|
83
|
-
return
|
|
80
|
+
$set(r, c) {
|
|
81
|
+
return i[r].set(c);
|
|
84
82
|
}
|
|
85
83
|
});
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
84
|
+
for (const r in t) {
|
|
85
|
+
const c = r.split(".");
|
|
86
|
+
let l = "", v = a, b = u;
|
|
87
|
+
for (const m of c.slice(0, -1)) {
|
|
88
|
+
l = l ? `${l}.${m}` : m;
|
|
89
|
+
const T = v = v[m] || (v[m] = {});
|
|
90
|
+
if (b[m])
|
|
91
|
+
b = b[m];
|
|
92
|
+
else {
|
|
93
|
+
const L = {};
|
|
94
|
+
Object.defineProperty(b, m, {
|
|
95
|
+
enumerable: !0,
|
|
96
|
+
get() {
|
|
97
|
+
return L;
|
|
98
|
+
},
|
|
99
|
+
set(Z) {
|
|
100
|
+
function N(P, W, y) {
|
|
101
|
+
if (P)
|
|
102
|
+
for (const A in P)
|
|
103
|
+
N(P[A], W ? `${W}.${A}` : A, y == null ? void 0 : y[A]);
|
|
104
|
+
else
|
|
105
|
+
i[W].value = y;
|
|
106
|
+
}
|
|
107
|
+
N(T, l, Z);
|
|
108
|
+
}
|
|
109
|
+
}), b = L;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
const d = c[c.length - 1];
|
|
113
|
+
v[d] = null, Object.defineProperty(b, d, {
|
|
114
|
+
enumerable: !0,
|
|
115
|
+
get() {
|
|
116
|
+
return i[r].value;
|
|
117
|
+
},
|
|
118
|
+
set(m) {
|
|
119
|
+
i[r].value = m;
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
return u;
|
|
124
|
+
}
|
|
125
|
+
function Ee(e, t) {
|
|
126
|
+
const n = g(null), i = [], a = (u) => (...r) => n.value ? n.value[u](...r) : (i.push([u, r]), null);
|
|
127
|
+
return G(() => {
|
|
128
|
+
n.value = he(e, t);
|
|
129
|
+
for (const [u, r] of i)
|
|
130
|
+
n.value[u](...r);
|
|
93
131
|
}), {
|
|
94
132
|
logger: n,
|
|
95
|
-
outputChannel:
|
|
96
|
-
var
|
|
97
|
-
return (
|
|
133
|
+
outputChannel: h(() => {
|
|
134
|
+
var u;
|
|
135
|
+
return (u = n.value) == null ? void 0 : u.outputChannel;
|
|
98
136
|
}),
|
|
99
|
-
info:
|
|
100
|
-
warn:
|
|
101
|
-
error:
|
|
102
|
-
append:
|
|
103
|
-
appendLine:
|
|
104
|
-
replace:
|
|
105
|
-
clear:
|
|
106
|
-
show:
|
|
107
|
-
hide:
|
|
137
|
+
info: a("info"),
|
|
138
|
+
warn: a("warn"),
|
|
139
|
+
error: a("error"),
|
|
140
|
+
append: a("append"),
|
|
141
|
+
appendLine: a("appendLine"),
|
|
142
|
+
replace: a("replace"),
|
|
143
|
+
clear: a("clear"),
|
|
144
|
+
show: a("show"),
|
|
145
|
+
hide: a("hide")
|
|
108
146
|
};
|
|
109
147
|
}
|
|
110
|
-
function
|
|
111
|
-
return
|
|
148
|
+
function pe(e, ...t) {
|
|
149
|
+
return I.executeCommand(e, ...t);
|
|
112
150
|
}
|
|
113
|
-
function
|
|
151
|
+
function ce(e, t = !1) {
|
|
114
152
|
const n = R.value;
|
|
115
153
|
if (!n && !t)
|
|
116
154
|
throw new Error("Cannot get absolute path because the extension is not activated yet");
|
|
117
155
|
return n == null ? void 0 : n.asAbsolutePath(e);
|
|
118
156
|
}
|
|
119
|
-
function
|
|
120
|
-
return
|
|
157
|
+
function ke(e, t = !1) {
|
|
158
|
+
return h(() => ce(s(e), t));
|
|
121
159
|
}
|
|
122
|
-
function
|
|
123
|
-
return (
|
|
160
|
+
function o(e) {
|
|
161
|
+
return (z() ?? $).cleanups.push(e.dispose.bind(e)), e;
|
|
124
162
|
}
|
|
125
|
-
const
|
|
126
|
-
const e =
|
|
127
|
-
return
|
|
163
|
+
const oe = w(() => {
|
|
164
|
+
const e = g(f.activeColorTheme);
|
|
165
|
+
return o(f.onDidChangeActiveColorTheme((t) => {
|
|
128
166
|
e.value = t;
|
|
129
167
|
})), e;
|
|
130
|
-
}),
|
|
131
|
-
const e =
|
|
132
|
-
return
|
|
168
|
+
}), Re = w(() => {
|
|
169
|
+
const e = g(j.activeDebugSession);
|
|
170
|
+
return o(j.onDidChangeActiveDebugSession((t) => {
|
|
133
171
|
e.value = t;
|
|
134
|
-
})),
|
|
135
|
-
}),
|
|
136
|
-
const e =
|
|
137
|
-
return
|
|
172
|
+
})), h(() => e.value);
|
|
173
|
+
}), le = w(() => {
|
|
174
|
+
const e = g(f.activeTextEditor);
|
|
175
|
+
return o(f.onDidChangeActiveTextEditor((t) => {
|
|
138
176
|
e.value = t;
|
|
139
177
|
})), e;
|
|
140
178
|
});
|
|
141
|
-
function
|
|
179
|
+
function de(e) {
|
|
142
180
|
var n;
|
|
143
|
-
const t =
|
|
144
|
-
return
|
|
145
|
-
var
|
|
146
|
-
t.value = (
|
|
147
|
-
}),
|
|
148
|
-
|
|
181
|
+
const t = g((n = s(e)) == null ? void 0 : n.getText());
|
|
182
|
+
return C(() => {
|
|
183
|
+
var i;
|
|
184
|
+
t.value = (i = s(e)) == null ? void 0 : i.getText();
|
|
185
|
+
}), o(S.onDidChangeTextDocument((i) => {
|
|
186
|
+
i.document === s(e) && (t.value = i.document.getText());
|
|
149
187
|
})), t;
|
|
150
188
|
}
|
|
151
|
-
function
|
|
189
|
+
function fe(e, t, n, i = {}) {
|
|
152
190
|
const {
|
|
153
|
-
updateOn:
|
|
154
|
-
} =
|
|
155
|
-
const
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
typeof n == "function" ? await n(
|
|
191
|
+
updateOn: a = ["effect", "documentChanged"]
|
|
192
|
+
} = i, u = "key" in t ? t : o(f.createTextEditorDecorationType(t)), r = async () => {
|
|
193
|
+
const l = s(e);
|
|
194
|
+
l && l.setDecorations(
|
|
195
|
+
u,
|
|
196
|
+
typeof n == "function" ? await n(l) : s(n)
|
|
159
197
|
);
|
|
160
|
-
},
|
|
161
|
-
var
|
|
162
|
-
return (
|
|
198
|
+
}, c = a.includes("documentChanged") ? de(() => {
|
|
199
|
+
var l;
|
|
200
|
+
return (l = s(e)) == null ? void 0 : l.document;
|
|
163
201
|
}) : null;
|
|
164
|
-
return
|
|
165
|
-
|
|
166
|
-
}) :
|
|
202
|
+
return a.includes("effect") ? C(async () => {
|
|
203
|
+
c == null || c.value, await r();
|
|
204
|
+
}) : c && D(c, r), {
|
|
167
205
|
/**
|
|
168
206
|
* Manually trigger the decoration update.
|
|
169
207
|
*/
|
|
170
|
-
update:
|
|
208
|
+
update: r
|
|
171
209
|
};
|
|
172
210
|
}
|
|
173
|
-
function
|
|
174
|
-
const n =
|
|
175
|
-
|
|
211
|
+
function ye(e, t) {
|
|
212
|
+
const n = le();
|
|
213
|
+
fe(n, e, t);
|
|
176
214
|
}
|
|
177
|
-
const
|
|
178
|
-
const e =
|
|
179
|
-
return
|
|
215
|
+
const Ae = w(() => {
|
|
216
|
+
const e = g(f.activeNotebookEditor);
|
|
217
|
+
return o(f.onDidChangeActiveNotebookEditor((t) => {
|
|
180
218
|
e.value = t;
|
|
181
219
|
})), e;
|
|
182
|
-
}),
|
|
183
|
-
const e =
|
|
184
|
-
return
|
|
220
|
+
}), Ve = w(() => {
|
|
221
|
+
const e = g(f.activeTerminal);
|
|
222
|
+
return o(f.onDidChangeActiveTerminal((t) => {
|
|
185
223
|
e.value = t;
|
|
186
224
|
})), e;
|
|
187
|
-
}),
|
|
188
|
-
const e =
|
|
189
|
-
return
|
|
190
|
-
e.value =
|
|
191
|
-
})),
|
|
225
|
+
}), Ie = w(() => {
|
|
226
|
+
const e = g(O.all);
|
|
227
|
+
return o(O.onDidChange(() => {
|
|
228
|
+
e.value = O.all;
|
|
229
|
+
})), h(() => e.value);
|
|
192
230
|
});
|
|
193
|
-
function
|
|
194
|
-
|
|
231
|
+
function ve(e, t) {
|
|
232
|
+
o(I.registerCommand(e, t));
|
|
195
233
|
}
|
|
196
|
-
function
|
|
234
|
+
function Pe(e) {
|
|
197
235
|
for (const [t, n] of Object.entries(e))
|
|
198
|
-
n &&
|
|
236
|
+
n && ve(t, n);
|
|
199
237
|
}
|
|
200
|
-
function
|
|
201
|
-
return
|
|
238
|
+
function We(e, t) {
|
|
239
|
+
return o(ie.createCommentController(e, t));
|
|
202
240
|
}
|
|
203
|
-
function
|
|
241
|
+
function J(e) {
|
|
204
242
|
var n;
|
|
205
|
-
const t =
|
|
243
|
+
const t = g((n = s(e)) == null ? void 0 : n.state);
|
|
206
244
|
return D(e, () => {
|
|
207
|
-
var
|
|
208
|
-
t.value = (
|
|
209
|
-
}),
|
|
210
|
-
|
|
211
|
-
})),
|
|
245
|
+
var i;
|
|
246
|
+
t.value = (i = s(e)) == null ? void 0 : i.state;
|
|
247
|
+
}), o(f.onDidChangeTerminalState((i) => {
|
|
248
|
+
i === s(e) && (t.value = i.state);
|
|
249
|
+
})), h(() => t.value);
|
|
212
250
|
}
|
|
213
|
-
function
|
|
251
|
+
function Oe(...e) {
|
|
214
252
|
const t = x(null);
|
|
215
253
|
function n() {
|
|
216
254
|
return !!t.value && t.value.exitStatus == null;
|
|
217
255
|
}
|
|
218
|
-
function
|
|
219
|
-
return n() ? t.value : t.value =
|
|
256
|
+
function i() {
|
|
257
|
+
return n() ? t.value : t.value = f.createTerminal(...e);
|
|
220
258
|
}
|
|
221
|
-
function
|
|
222
|
-
|
|
259
|
+
function a(c) {
|
|
260
|
+
i().sendText(c);
|
|
223
261
|
}
|
|
224
|
-
function
|
|
225
|
-
|
|
262
|
+
function u() {
|
|
263
|
+
i().show();
|
|
226
264
|
}
|
|
227
|
-
function
|
|
265
|
+
function r() {
|
|
228
266
|
n() && (t.value.sendText(""), t.value.dispose(), t.value = null);
|
|
229
267
|
}
|
|
230
|
-
return
|
|
268
|
+
return M(r), {
|
|
231
269
|
terminal: t,
|
|
232
270
|
getIsActive: n,
|
|
233
|
-
show:
|
|
234
|
-
sendText:
|
|
235
|
-
close:
|
|
236
|
-
state:
|
|
271
|
+
show: u,
|
|
272
|
+
sendText: a,
|
|
273
|
+
close: r,
|
|
274
|
+
state: J(t)
|
|
237
275
|
};
|
|
238
276
|
}
|
|
239
|
-
const
|
|
240
|
-
const e =
|
|
241
|
-
return
|
|
277
|
+
const $e = w(() => {
|
|
278
|
+
const e = g(p.shell);
|
|
279
|
+
return o(p.onDidChangeShell((t) => {
|
|
242
280
|
e.value = t;
|
|
243
|
-
})),
|
|
281
|
+
})), h(() => e.value);
|
|
244
282
|
});
|
|
245
283
|
function E(e, t) {
|
|
246
|
-
const n = (
|
|
247
|
-
|
|
284
|
+
const n = (i, a, u) => {
|
|
285
|
+
o(e(i, a, u));
|
|
248
286
|
};
|
|
249
|
-
return t == null || t.forEach((
|
|
287
|
+
return t == null || t.forEach((i) => n(i)), n;
|
|
250
288
|
}
|
|
251
|
-
function
|
|
252
|
-
const n = Array.isArray(e) ? e : t ?? [],
|
|
253
|
-
for (const
|
|
254
|
-
|
|
289
|
+
function V(e, t = []) {
|
|
290
|
+
const n = Array.isArray(e) ? e : t ?? [], i = o(Array.isArray(e) || e == null ? new Q() : e), a = E(i.event, n);
|
|
291
|
+
for (const u of n)
|
|
292
|
+
a(u);
|
|
255
293
|
return {
|
|
256
|
-
event:
|
|
257
|
-
fire:
|
|
258
|
-
addListener:
|
|
294
|
+
event: i.event,
|
|
295
|
+
fire: i.fire.bind(i),
|
|
296
|
+
addListener: a
|
|
259
297
|
};
|
|
260
298
|
}
|
|
261
|
-
async function
|
|
299
|
+
async function Me(e) {
|
|
262
300
|
const t = R.value.secrets, n = x(await t.get(e));
|
|
263
|
-
return n.set = async (
|
|
264
|
-
n.value =
|
|
301
|
+
return n.set = async (i) => {
|
|
302
|
+
n.value = i, await t.store(e, i);
|
|
265
303
|
}, n.remove = async () => {
|
|
266
304
|
n.value = void 0, await t.delete(e);
|
|
267
|
-
},
|
|
268
|
-
|
|
269
|
-
})), D(n, (
|
|
270
|
-
|
|
305
|
+
}, o(t.onDidChange(async (i) => {
|
|
306
|
+
i.key === e && (n.value = await t.get(e));
|
|
307
|
+
})), D(n, (i) => {
|
|
308
|
+
i === void 0 ? t.delete(e) : t.store(e, i);
|
|
271
309
|
}), n;
|
|
272
310
|
}
|
|
273
|
-
function
|
|
274
|
-
return
|
|
311
|
+
function Fe(e) {
|
|
312
|
+
return h(() => k.fetchTasks(s(e)));
|
|
275
313
|
}
|
|
276
|
-
function
|
|
277
|
-
return
|
|
314
|
+
function Le(e) {
|
|
315
|
+
return h(() => ae.file(s(e)));
|
|
278
316
|
}
|
|
279
|
-
function
|
|
280
|
-
const n = new
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
}),
|
|
317
|
+
function Ne(e, t) {
|
|
318
|
+
const n = new Q(), i = g();
|
|
319
|
+
C(() => {
|
|
320
|
+
i.value && n.fire(), i.value = s(t);
|
|
321
|
+
}), o(re.registerFoldingRangeProvider(
|
|
284
322
|
e,
|
|
285
323
|
{
|
|
286
324
|
onDidChangeFoldingRanges: n.event,
|
|
287
|
-
provideFoldingRanges(
|
|
288
|
-
var
|
|
289
|
-
return (
|
|
325
|
+
provideFoldingRanges(a, u, r) {
|
|
326
|
+
var c;
|
|
327
|
+
return (c = i.value) == null ? void 0 : c.call(i, a, u, r);
|
|
290
328
|
}
|
|
291
329
|
}
|
|
292
330
|
));
|
|
293
331
|
}
|
|
294
|
-
function
|
|
295
|
-
const
|
|
296
|
-
const
|
|
297
|
-
return Array.isArray(
|
|
332
|
+
function je(e, t, n, i) {
|
|
333
|
+
const a = ee(/* @__PURE__ */ new Map()), u = V(), r = V(), c = V(), l = h(() => {
|
|
334
|
+
const d = s(e);
|
|
335
|
+
return Array.isArray(d) ? d : d instanceof Set ? Array.from(d) : [d];
|
|
298
336
|
});
|
|
299
|
-
function
|
|
300
|
-
const
|
|
301
|
-
for (const [
|
|
302
|
-
|
|
303
|
-
for (const
|
|
304
|
-
if (!
|
|
305
|
-
const
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
337
|
+
function v() {
|
|
338
|
+
const d = l.value;
|
|
339
|
+
for (const [m, T] of a)
|
|
340
|
+
d.includes(m) || (T.dispose(), a.delete(m));
|
|
341
|
+
for (const m of d)
|
|
342
|
+
if (!a.has(m)) {
|
|
343
|
+
const T = S.createFileSystemWatcher(
|
|
344
|
+
m,
|
|
345
|
+
s(t) || !1,
|
|
346
|
+
s(n) || !1,
|
|
347
|
+
s(i) || !1
|
|
310
348
|
);
|
|
311
|
-
|
|
349
|
+
T.onDidCreate(u.fire), T.onDidChange(r.fire), T.onDidDelete(c.fire), a.set(m, T);
|
|
312
350
|
}
|
|
313
351
|
}
|
|
314
|
-
function
|
|
315
|
-
for (const
|
|
316
|
-
|
|
317
|
-
|
|
352
|
+
function b() {
|
|
353
|
+
for (const d of a.values())
|
|
354
|
+
d.dispose();
|
|
355
|
+
a.clear();
|
|
318
356
|
}
|
|
319
|
-
return
|
|
357
|
+
return v(), D(l, v), D(
|
|
320
358
|
() => [
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
359
|
+
s(t),
|
|
360
|
+
s(n),
|
|
361
|
+
s(i)
|
|
324
362
|
],
|
|
325
363
|
() => {
|
|
326
|
-
|
|
364
|
+
b(), v();
|
|
327
365
|
}
|
|
328
|
-
),
|
|
329
|
-
watchers:
|
|
330
|
-
onDidCreate:
|
|
331
|
-
onDidChange:
|
|
332
|
-
onDidDelete:
|
|
366
|
+
), M(b), {
|
|
367
|
+
watchers: a,
|
|
368
|
+
onDidCreate: u.event,
|
|
369
|
+
onDidChange: r.event,
|
|
370
|
+
onDidDelete: c.event
|
|
333
371
|
};
|
|
334
372
|
}
|
|
335
|
-
const
|
|
336
|
-
const e =
|
|
337
|
-
return
|
|
338
|
-
}),
|
|
339
|
-
const e =
|
|
340
|
-
return
|
|
373
|
+
const He = w(() => {
|
|
374
|
+
const e = oe();
|
|
375
|
+
return h(() => e.value.kind === H.Dark || e.value.kind === H.HighContrast);
|
|
376
|
+
}), Be = w(() => {
|
|
377
|
+
const e = g(p.isTelemetryEnabled);
|
|
378
|
+
return o(p.onDidChangeTelemetryEnabled((t) => {
|
|
341
379
|
e.value = t;
|
|
342
|
-
})),
|
|
380
|
+
})), h(() => e.value);
|
|
343
381
|
});
|
|
344
|
-
function
|
|
345
|
-
return
|
|
382
|
+
function ze(e, ...t) {
|
|
383
|
+
return h(() => typeof t[0] == "object" ? B.t(s(e), te(t[0])) : B.t(s(e), ...t.map(s)));
|
|
346
384
|
}
|
|
347
|
-
function
|
|
348
|
-
return
|
|
385
|
+
function ge(e, t) {
|
|
386
|
+
return o(f.createOutputChannel(e, t));
|
|
349
387
|
}
|
|
350
|
-
function
|
|
351
|
-
const t = /* @__PURE__ */ new Date(), n = String(t.getFullYear()).padStart(4, "0"),
|
|
352
|
-
return `${n}-${
|
|
388
|
+
function Ke(e) {
|
|
389
|
+
const t = /* @__PURE__ */ new Date(), n = String(t.getFullYear()).padStart(4, "0"), i = String(t.getMonth() + 1).padStart(2, "0"), a = String(t.getDate()).padStart(2, "0"), u = String(t.getHours()).padStart(2, "0"), r = String(t.getMinutes()).padStart(2, "0"), c = String(t.getSeconds()).padStart(2, "0"), l = String(t.getMilliseconds()).padStart(3, "0");
|
|
390
|
+
return `${n}-${i}-${a} ${u}:${r}:${c}.${l} [${e}] `;
|
|
353
391
|
}
|
|
354
|
-
function
|
|
355
|
-
const n = t.outputChannel ??
|
|
356
|
-
var
|
|
357
|
-
n.appendLine((((
|
|
392
|
+
function he(e, t = {}) {
|
|
393
|
+
const n = t.outputChannel ?? ge(e), i = (a) => (...u) => {
|
|
394
|
+
var r;
|
|
395
|
+
n.appendLine((((r = t.getPrefix) == null ? void 0 : r.call(t, a)) ?? "") + u.join(" "));
|
|
358
396
|
};
|
|
359
397
|
return {
|
|
360
398
|
outputChannel: n,
|
|
361
|
-
createLoggerFunc:
|
|
362
|
-
info:
|
|
363
|
-
warn:
|
|
364
|
-
error:
|
|
399
|
+
createLoggerFunc: i,
|
|
400
|
+
info: i("INFO"),
|
|
401
|
+
warn: i("WARN"),
|
|
402
|
+
error: i("ERROR"),
|
|
365
403
|
append: n.append.bind(n),
|
|
366
404
|
appendLine: n.appendLine.bind(n),
|
|
367
405
|
replace: n.replace.bind(n),
|
|
@@ -370,34 +408,34 @@ function ue(e, t = {}) {
|
|
|
370
408
|
hide: n.hide.bind(n)
|
|
371
409
|
};
|
|
372
410
|
}
|
|
373
|
-
const
|
|
374
|
-
const e =
|
|
375
|
-
return
|
|
411
|
+
const Qe = w(() => {
|
|
412
|
+
const e = g(p.logLevel);
|
|
413
|
+
return o(p.onDidChangeLogLevel((t) => {
|
|
376
414
|
e.value = t;
|
|
377
|
-
})),
|
|
415
|
+
})), h(() => e.value);
|
|
378
416
|
});
|
|
379
|
-
function
|
|
417
|
+
function me(e) {
|
|
380
418
|
var n;
|
|
381
|
-
const t =
|
|
419
|
+
const t = g(((n = s(e)) == null ? void 0 : n.selections) ?? []);
|
|
382
420
|
return D(e, () => {
|
|
383
|
-
var
|
|
384
|
-
t.value = ((
|
|
385
|
-
}),
|
|
386
|
-
|
|
387
|
-
})),
|
|
421
|
+
var i;
|
|
422
|
+
t.value = ((i = s(e)) == null ? void 0 : i.selections) ?? [];
|
|
423
|
+
}), o(f.onDidChangeNotebookEditorSelection((i) => {
|
|
424
|
+
i.notebookEditor === s(e) && (t.value = i.selections);
|
|
425
|
+
})), h({
|
|
388
426
|
get() {
|
|
389
427
|
return t.value;
|
|
390
428
|
},
|
|
391
|
-
set(
|
|
392
|
-
t.value =
|
|
393
|
-
const
|
|
394
|
-
|
|
429
|
+
set(i) {
|
|
430
|
+
t.value = i;
|
|
431
|
+
const a = s(e);
|
|
432
|
+
a && (a.selections = i);
|
|
395
433
|
}
|
|
396
434
|
});
|
|
397
435
|
}
|
|
398
|
-
function
|
|
399
|
-
const t =
|
|
400
|
-
return
|
|
436
|
+
function Ue(e) {
|
|
437
|
+
const t = me(e);
|
|
438
|
+
return h({
|
|
401
439
|
get() {
|
|
402
440
|
return t.value[0];
|
|
403
441
|
},
|
|
@@ -406,25 +444,25 @@ function Ne(e) {
|
|
|
406
444
|
}
|
|
407
445
|
});
|
|
408
446
|
}
|
|
409
|
-
function
|
|
447
|
+
function qe(e) {
|
|
410
448
|
var n;
|
|
411
|
-
const t =
|
|
449
|
+
const t = g(((n = s(e)) == null ? void 0 : n.visibleRanges) ?? []);
|
|
412
450
|
return D(e, () => {
|
|
413
|
-
var
|
|
414
|
-
t.value = ((
|
|
415
|
-
}),
|
|
416
|
-
|
|
417
|
-
})),
|
|
451
|
+
var i;
|
|
452
|
+
t.value = ((i = s(e)) == null ? void 0 : i.visibleRanges) ?? [];
|
|
453
|
+
}), o(f.onDidChangeNotebookEditorVisibleRanges((i) => {
|
|
454
|
+
i.notebookEditor === s(e) && (t.value = i.visibleRanges);
|
|
455
|
+
})), h(() => t.value);
|
|
418
456
|
}
|
|
419
|
-
const
|
|
420
|
-
const e =
|
|
457
|
+
const Ye = w(() => {
|
|
458
|
+
const e = g(f.terminals);
|
|
421
459
|
function t() {
|
|
422
|
-
e.value =
|
|
460
|
+
e.value = f.terminals;
|
|
423
461
|
}
|
|
424
|
-
return
|
|
462
|
+
return o(f.onDidOpenTerminal(t)), o(f.onDidCloseTerminal(t)), e;
|
|
425
463
|
});
|
|
426
|
-
function
|
|
427
|
-
const t =
|
|
464
|
+
function Ge(e = {}) {
|
|
465
|
+
const t = o(f.createQuickPick()), n = E(t.onDidChangeActive), i = E(t.onDidChangeSelection), a = E(t.onDidAccept), u = E(t.onDidHide), r = E(t.onDidTriggerButton), c = E(t.onDidChangeValue);
|
|
428
466
|
[
|
|
429
467
|
"items",
|
|
430
468
|
"buttons",
|
|
@@ -439,32 +477,32 @@ function Be(e = {}) {
|
|
|
439
477
|
"matchOnDescription",
|
|
440
478
|
"matchOnDetail",
|
|
441
479
|
"keepScrollPosition"
|
|
442
|
-
].forEach((
|
|
443
|
-
e[
|
|
480
|
+
].forEach((d) => {
|
|
481
|
+
e[d] && C(() => t[d] = s(e[d]));
|
|
444
482
|
}), e.value && (t.value = e.value);
|
|
445
|
-
const
|
|
446
|
-
|
|
447
|
-
const
|
|
448
|
-
n((
|
|
449
|
-
const
|
|
450
|
-
return
|
|
483
|
+
const l = g(t.value);
|
|
484
|
+
c((d) => l.value = d), e.activeItems && (t.activeItems = e.activeItems);
|
|
485
|
+
const v = g(t.activeItems);
|
|
486
|
+
n((d) => v.value = d), e.selectedItems && (t.selectedItems = e.selectedItems);
|
|
487
|
+
const b = g(t.selectedItems);
|
|
488
|
+
return i((d) => b.value = d), {
|
|
451
489
|
...t,
|
|
452
490
|
onDidChangeActive: n,
|
|
453
|
-
onDidChangeSelection:
|
|
454
|
-
onDidAccept:
|
|
455
|
-
onDidHide:
|
|
456
|
-
onDidTriggerButton:
|
|
457
|
-
onDidChangeValue:
|
|
458
|
-
value:
|
|
459
|
-
activeItems:
|
|
460
|
-
selectedItems:
|
|
491
|
+
onDidChangeSelection: i,
|
|
492
|
+
onDidAccept: a,
|
|
493
|
+
onDidHide: u,
|
|
494
|
+
onDidTriggerButton: r,
|
|
495
|
+
onDidChangeValue: c,
|
|
496
|
+
value: l,
|
|
497
|
+
activeItems: v,
|
|
498
|
+
selectedItems: b
|
|
461
499
|
};
|
|
462
500
|
}
|
|
463
|
-
function
|
|
464
|
-
const t =
|
|
465
|
-
function n(
|
|
466
|
-
const
|
|
467
|
-
|
|
501
|
+
function Je(e) {
|
|
502
|
+
const t = o(e.id ? f.createStatusBarItem(e.id, e.alignment, e.priority) : f.createStatusBarItem(e.alignment, e.priority));
|
|
503
|
+
function n(i) {
|
|
504
|
+
const a = e[i];
|
|
505
|
+
a != null && C(() => t[i] = s(a));
|
|
468
506
|
}
|
|
469
507
|
return [
|
|
470
508
|
"name",
|
|
@@ -476,15 +514,15 @@ function ze(e) {
|
|
|
476
514
|
"accessibilityInformation"
|
|
477
515
|
].forEach(n), t;
|
|
478
516
|
}
|
|
479
|
-
const
|
|
480
|
-
const e =
|
|
517
|
+
const Xe = w(() => {
|
|
518
|
+
const e = g(k.taskExecutions);
|
|
481
519
|
function t() {
|
|
482
520
|
e.value = k.taskExecutions;
|
|
483
521
|
}
|
|
484
|
-
return
|
|
522
|
+
return o(k.onDidStartTask(t)), o(k.onDidEndTask(t)), h(() => e.value);
|
|
485
523
|
});
|
|
486
|
-
function
|
|
487
|
-
const t =
|
|
524
|
+
function Ze(...e) {
|
|
525
|
+
const t = o(f.createTerminal(...e));
|
|
488
526
|
return {
|
|
489
527
|
terminal: t,
|
|
490
528
|
get name() {
|
|
@@ -505,177 +543,177 @@ function Qe(...e) {
|
|
|
505
543
|
sendText: t.sendText.bind(t),
|
|
506
544
|
show: t.show.bind(t),
|
|
507
545
|
hide: t.hide.bind(t),
|
|
508
|
-
state:
|
|
546
|
+
state: J(t)
|
|
509
547
|
};
|
|
510
548
|
}
|
|
511
|
-
function
|
|
512
|
-
|
|
549
|
+
function be(e, t) {
|
|
550
|
+
o(I.registerTextEditorCommand(e, t));
|
|
513
551
|
}
|
|
514
|
-
function
|
|
552
|
+
function _e(e) {
|
|
515
553
|
for (const [t, n] of Object.entries(e))
|
|
516
|
-
|
|
554
|
+
be(t, n);
|
|
517
555
|
}
|
|
518
|
-
function
|
|
519
|
-
var
|
|
520
|
-
const n =
|
|
556
|
+
function we(e, t) {
|
|
557
|
+
var i;
|
|
558
|
+
const n = g(((i = s(e)) == null ? void 0 : i.selections) ?? []);
|
|
521
559
|
return D(e, () => {
|
|
522
|
-
var
|
|
523
|
-
n.value = ((
|
|
524
|
-
}),
|
|
525
|
-
const
|
|
526
|
-
|
|
527
|
-
})),
|
|
560
|
+
var a;
|
|
561
|
+
n.value = ((a = s(e)) == null ? void 0 : a.selections) ?? [];
|
|
562
|
+
}), o(f.onDidChangeTextEditorSelection((a) => {
|
|
563
|
+
const u = s(e), r = s(t);
|
|
564
|
+
a.textEditor === u && (!r || r.includes(a.kind)) && (n.value = a.selections);
|
|
565
|
+
})), h({
|
|
528
566
|
get() {
|
|
529
567
|
return n.value;
|
|
530
568
|
},
|
|
531
|
-
set(
|
|
532
|
-
n.value =
|
|
533
|
-
const
|
|
534
|
-
|
|
569
|
+
set(a) {
|
|
570
|
+
n.value = a;
|
|
571
|
+
const u = s(e);
|
|
572
|
+
u && (u.selections = a);
|
|
535
573
|
}
|
|
536
574
|
});
|
|
537
575
|
}
|
|
538
|
-
function
|
|
539
|
-
const n =
|
|
540
|
-
return
|
|
576
|
+
function et(e, t) {
|
|
577
|
+
const n = we(e, t);
|
|
578
|
+
return h({
|
|
541
579
|
get() {
|
|
542
580
|
return n.value[0];
|
|
543
581
|
},
|
|
544
|
-
set(
|
|
545
|
-
n.value = n.value.toSpliced(0, 1,
|
|
582
|
+
set(i) {
|
|
583
|
+
n.value = n.value.toSpliced(0, 1, i);
|
|
546
584
|
}
|
|
547
585
|
});
|
|
548
586
|
}
|
|
549
|
-
function
|
|
587
|
+
function tt(e) {
|
|
550
588
|
var n;
|
|
551
|
-
const t =
|
|
589
|
+
const t = g((n = s(e)) == null ? void 0 : n.viewColumn);
|
|
552
590
|
return D(e, () => {
|
|
553
|
-
var
|
|
554
|
-
t.value = (
|
|
555
|
-
}),
|
|
556
|
-
|
|
557
|
-
})),
|
|
591
|
+
var i;
|
|
592
|
+
t.value = (i = s(e)) == null ? void 0 : i.viewColumn;
|
|
593
|
+
}), o(f.onDidChangeTextEditorViewColumn((i) => {
|
|
594
|
+
i.textEditor === s(e) && (t.value = i.viewColumn);
|
|
595
|
+
})), h(() => t.value);
|
|
558
596
|
}
|
|
559
|
-
function
|
|
597
|
+
function nt(e) {
|
|
560
598
|
var n;
|
|
561
|
-
const t =
|
|
599
|
+
const t = g(((n = s(e)) == null ? void 0 : n.visibleRanges) ?? []);
|
|
562
600
|
return D(e, () => {
|
|
563
|
-
var
|
|
564
|
-
t.value = ((
|
|
565
|
-
}),
|
|
566
|
-
|
|
567
|
-
})),
|
|
568
|
-
}
|
|
569
|
-
function
|
|
570
|
-
|
|
571
|
-
const n =
|
|
572
|
-
n && (n.badge =
|
|
601
|
+
var i;
|
|
602
|
+
t.value = ((i = s(e)) == null ? void 0 : i.visibleRanges) ?? [];
|
|
603
|
+
}), o(f.onDidChangeTextEditorVisibleRanges((i) => {
|
|
604
|
+
i.textEditor === s(e) && (t.value = i.visibleRanges);
|
|
605
|
+
})), h(() => t.value);
|
|
606
|
+
}
|
|
607
|
+
function X(e, t) {
|
|
608
|
+
C(() => {
|
|
609
|
+
const n = s(e);
|
|
610
|
+
n && (n.badge = s(t));
|
|
573
611
|
});
|
|
574
612
|
}
|
|
575
|
-
function
|
|
576
|
-
|
|
577
|
-
const n =
|
|
578
|
-
n && (n.title =
|
|
613
|
+
function F(e, t) {
|
|
614
|
+
C(() => {
|
|
615
|
+
const n = s(e);
|
|
616
|
+
n && (n.title = s(t));
|
|
579
617
|
});
|
|
580
618
|
}
|
|
581
|
-
const
|
|
619
|
+
const it = U(
|
|
582
620
|
(e, t, n) => {
|
|
583
|
-
const
|
|
584
|
-
D(t, () =>
|
|
585
|
-
const
|
|
621
|
+
const i = V();
|
|
622
|
+
D(t, () => i.fire()), n != null && n.watchSource && D(n.watchSource, () => i.fire());
|
|
623
|
+
const a = /* @__PURE__ */ new WeakMap(), u = o(f.createTreeView(e, {
|
|
586
624
|
...n,
|
|
587
625
|
treeDataProvider: {
|
|
588
626
|
...n,
|
|
589
|
-
onDidChangeTreeData:
|
|
590
|
-
getTreeItem(
|
|
591
|
-
return
|
|
627
|
+
onDidChangeTreeData: i.event,
|
|
628
|
+
getTreeItem(r) {
|
|
629
|
+
return r.treeItem;
|
|
592
630
|
},
|
|
593
|
-
getChildren(
|
|
594
|
-
var
|
|
595
|
-
return
|
|
631
|
+
getChildren(r) {
|
|
632
|
+
var c;
|
|
633
|
+
return r ? ((c = r.children) == null || c.forEach((l) => a.set(l, r)), r.children) : s(t);
|
|
596
634
|
},
|
|
597
|
-
getParent(
|
|
598
|
-
return
|
|
635
|
+
getParent(r) {
|
|
636
|
+
return a.get(r);
|
|
599
637
|
}
|
|
600
638
|
}
|
|
601
639
|
}));
|
|
602
|
-
return n != null && n.title &&
|
|
640
|
+
return n != null && n.title && F(u, n.title), n != null && n.badge && X(u, n.badge), u;
|
|
603
641
|
},
|
|
604
642
|
(e) => e
|
|
605
643
|
);
|
|
606
|
-
function
|
|
607
|
-
var
|
|
608
|
-
const t = x((
|
|
644
|
+
function at(e) {
|
|
645
|
+
var i;
|
|
646
|
+
const t = x((i = s(e)) == null ? void 0 : i.visible);
|
|
609
647
|
function n() {
|
|
610
|
-
var
|
|
611
|
-
t.value = (
|
|
648
|
+
var a;
|
|
649
|
+
t.value = (a = s(e)) == null ? void 0 : a.visible;
|
|
612
650
|
}
|
|
613
|
-
return
|
|
614
|
-
const
|
|
615
|
-
if (
|
|
616
|
-
const
|
|
617
|
-
|
|
651
|
+
return C((a) => {
|
|
652
|
+
const u = s(e);
|
|
653
|
+
if (u) {
|
|
654
|
+
const r = u.onDidChangeVisibility(n);
|
|
655
|
+
a(() => r.dispose());
|
|
618
656
|
}
|
|
619
|
-
}),
|
|
657
|
+
}), C(n), h(() => !!t.value);
|
|
620
658
|
}
|
|
621
|
-
const
|
|
622
|
-
const e =
|
|
623
|
-
return
|
|
659
|
+
const rt = w(() => {
|
|
660
|
+
const e = g(f.visibleNotebookEditors);
|
|
661
|
+
return o(f.onDidChangeVisibleNotebookEditors((t) => {
|
|
624
662
|
e.value = t;
|
|
625
663
|
})), e;
|
|
626
|
-
}),
|
|
627
|
-
const e =
|
|
628
|
-
return
|
|
664
|
+
}), st = w(() => {
|
|
665
|
+
const e = g(f.visibleTextEditors);
|
|
666
|
+
return o(f.onDidChangeVisibleTextEditors((t) => {
|
|
629
667
|
e.value = t;
|
|
630
668
|
})), e;
|
|
631
669
|
});
|
|
632
|
-
function
|
|
633
|
-
const
|
|
634
|
-
return
|
|
635
|
-
|
|
636
|
-
}),
|
|
637
|
-
}
|
|
638
|
-
function
|
|
639
|
-
const
|
|
670
|
+
function ut(e, t, n = !0) {
|
|
671
|
+
const i = ne(t) ? t : typeof t == "function" ? h(t) : x(t);
|
|
672
|
+
return C(() => {
|
|
673
|
+
s(n) && I.executeCommand("setContext", e, i.value);
|
|
674
|
+
}), i;
|
|
675
|
+
}
|
|
676
|
+
function ct(e, t, n, i, a) {
|
|
677
|
+
const u = g(), r = o(f.createWebviewPanel(
|
|
640
678
|
e,
|
|
641
|
-
|
|
642
|
-
|
|
679
|
+
s(t),
|
|
680
|
+
i,
|
|
643
681
|
{
|
|
644
|
-
enableFindWidget:
|
|
645
|
-
retainContextWhenHidden:
|
|
646
|
-
...
|
|
682
|
+
enableFindWidget: a == null ? void 0 : a.enableFindWidget,
|
|
683
|
+
retainContextWhenHidden: a == null ? void 0 : a.retainContextWhenHidden,
|
|
684
|
+
...s(a == null ? void 0 : a.webviewOptions)
|
|
647
685
|
}
|
|
648
686
|
));
|
|
649
|
-
|
|
650
|
-
const
|
|
651
|
-
function
|
|
652
|
-
|
|
687
|
+
a != null && a.onDidReceiveMessage && r.webview.onDidReceiveMessage(a.onDidReceiveMessage);
|
|
688
|
+
const c = x(0);
|
|
689
|
+
function l() {
|
|
690
|
+
c.value++;
|
|
653
691
|
}
|
|
654
|
-
if (
|
|
655
|
-
|
|
656
|
-
}),
|
|
657
|
-
const
|
|
658
|
-
|
|
659
|
-
|
|
692
|
+
if (C(() => {
|
|
693
|
+
r.webview.html = `${s(n)}<!--${c.value}-->`;
|
|
694
|
+
}), a != null && a.webviewOptions) {
|
|
695
|
+
const m = a.webviewOptions;
|
|
696
|
+
C(() => {
|
|
697
|
+
r.webview.options = s(m);
|
|
660
698
|
});
|
|
661
699
|
}
|
|
662
|
-
|
|
663
|
-
function
|
|
664
|
-
return
|
|
700
|
+
F(r, t);
|
|
701
|
+
function v(m) {
|
|
702
|
+
return r.webview.postMessage(m);
|
|
665
703
|
}
|
|
666
|
-
const
|
|
667
|
-
return
|
|
668
|
-
|
|
669
|
-
})), { panel:
|
|
704
|
+
const b = x(r.active), d = x(r.visible);
|
|
705
|
+
return o(r.onDidChangeViewState(() => {
|
|
706
|
+
b.value = r.active, d.value = r.visible;
|
|
707
|
+
})), { panel: r, context: u, active: b, visible: d, postMessage: v, forceRefresh: l };
|
|
670
708
|
}
|
|
671
|
-
const
|
|
709
|
+
const ot = U(
|
|
672
710
|
(e, t, n) => {
|
|
673
|
-
const
|
|
674
|
-
|
|
711
|
+
const i = g(), a = g();
|
|
712
|
+
o(f.registerWebviewViewProvider(
|
|
675
713
|
e,
|
|
676
714
|
{
|
|
677
|
-
resolveWebviewView(
|
|
678
|
-
|
|
715
|
+
resolveWebviewView(l, v) {
|
|
716
|
+
i.value = l, a.value = v, n != null && n.onDidReceiveMessage && l.webview.onDidReceiveMessage(n.onDidReceiveMessage);
|
|
679
717
|
}
|
|
680
718
|
},
|
|
681
719
|
{
|
|
@@ -684,109 +722,109 @@ const nt = N(
|
|
|
684
722
|
}
|
|
685
723
|
}
|
|
686
724
|
));
|
|
687
|
-
const
|
|
688
|
-
function
|
|
689
|
-
|
|
725
|
+
const u = x(0);
|
|
726
|
+
function r() {
|
|
727
|
+
u.value++;
|
|
690
728
|
}
|
|
691
|
-
if (
|
|
692
|
-
|
|
729
|
+
if (C(() => {
|
|
730
|
+
i.value && (i.value.webview.html = `${s(t)}<!--${u.value}-->`);
|
|
693
731
|
}), n != null && n.webviewOptions) {
|
|
694
|
-
const
|
|
695
|
-
|
|
696
|
-
|
|
732
|
+
const l = n.webviewOptions;
|
|
733
|
+
C(() => {
|
|
734
|
+
i.value && (i.value.webview.options = s(l));
|
|
697
735
|
});
|
|
698
736
|
}
|
|
699
|
-
n != null && n.title &&
|
|
700
|
-
function
|
|
701
|
-
var
|
|
702
|
-
return (
|
|
737
|
+
n != null && n.title && F(i, n.title), n != null && n.badge && X(i, n.badge);
|
|
738
|
+
function c(l) {
|
|
739
|
+
var v;
|
|
740
|
+
return (v = i.value) == null ? void 0 : v.webview.postMessage(l);
|
|
703
741
|
}
|
|
704
|
-
return { view:
|
|
742
|
+
return { view: i, context: a, postMessage: c, forceRefresh: r };
|
|
705
743
|
},
|
|
706
744
|
(e) => e
|
|
707
|
-
),
|
|
708
|
-
const e =
|
|
709
|
-
return
|
|
745
|
+
), lt = w(() => {
|
|
746
|
+
const e = g(f.state);
|
|
747
|
+
return o(f.onDidChangeWindowState((t) => {
|
|
710
748
|
e.value = t;
|
|
711
749
|
})), {
|
|
712
|
-
focused:
|
|
713
|
-
active:
|
|
750
|
+
focused: h(() => e.value.focused),
|
|
751
|
+
active: h(() => e.value.active)
|
|
714
752
|
};
|
|
715
|
-
}),
|
|
716
|
-
const e =
|
|
717
|
-
return
|
|
718
|
-
e.value =
|
|
719
|
-
})),
|
|
753
|
+
}), dt = w(() => {
|
|
754
|
+
const e = g(S.workspaceFolders);
|
|
755
|
+
return o(S.onDidChangeWorkspaceFolders(() => {
|
|
756
|
+
e.value = S.workspaceFolders;
|
|
757
|
+
})), h(() => e.value);
|
|
720
758
|
});
|
|
721
759
|
export {
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
760
|
+
Y as activateCbs,
|
|
761
|
+
U as createKeyedComposable,
|
|
762
|
+
w as createSingletonComposable,
|
|
763
|
+
q as deactivateCbs,
|
|
764
|
+
xe as defineConfigObject,
|
|
765
|
+
ue as defineConfigs,
|
|
766
|
+
Se as defineExtension,
|
|
767
|
+
Ee as defineLogger,
|
|
768
|
+
pe as executeCommand,
|
|
731
769
|
R as extensionContext,
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
770
|
+
$ as extensionScope,
|
|
771
|
+
Ke as getDefaultLoggerPrefix,
|
|
772
|
+
G as onActivate,
|
|
773
|
+
Te as onDeactivate,
|
|
774
|
+
se as tryOnScopeDispose,
|
|
775
|
+
ke as useAbsolutePath,
|
|
776
|
+
oe as useActiveColorTheme,
|
|
777
|
+
Re as useActiveDebugSession,
|
|
778
|
+
ye as useActiveEditorDecorations,
|
|
779
|
+
Ae as useActiveNotebookEditor,
|
|
780
|
+
Ve as useActiveTerminal,
|
|
781
|
+
le as useActiveTextEditor,
|
|
782
|
+
Ie as useAllExtensions,
|
|
783
|
+
ve as useCommand,
|
|
784
|
+
Pe as useCommands,
|
|
785
|
+
We as useCommentController,
|
|
786
|
+
Oe as useControlledTerminal,
|
|
787
|
+
$e as useDefaultShell,
|
|
788
|
+
o as useDisposable,
|
|
789
|
+
de as useDocumentText,
|
|
790
|
+
fe as useEditorDecorations,
|
|
753
791
|
E as useEvent,
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
+
V as useEventEmitter,
|
|
793
|
+
Me as useExtensionSecret,
|
|
794
|
+
Fe as useFetchTasks,
|
|
795
|
+
Le as useFileUri,
|
|
796
|
+
Ne as useFoldingRangeProvider,
|
|
797
|
+
je as useFsWatcher,
|
|
798
|
+
He as useIsDarkTheme,
|
|
799
|
+
Be as useIsTelemetryEnabled,
|
|
800
|
+
ze as useL10nText,
|
|
801
|
+
Qe as useLogLevel,
|
|
802
|
+
he as useLogger,
|
|
803
|
+
Ue as useNotebookEditorSelection,
|
|
804
|
+
me as useNotebookEditorSelections,
|
|
805
|
+
qe as useNotebookEditorVisibleRanges,
|
|
806
|
+
Ye as useOpenedTerminals,
|
|
807
|
+
ge as useOutputChannel,
|
|
808
|
+
Ge as useQuickPick,
|
|
809
|
+
Je as useStatusBarItem,
|
|
810
|
+
Xe as useTaskExecutions,
|
|
811
|
+
Ze as useTerminal,
|
|
812
|
+
J as useTerminalState,
|
|
813
|
+
be as useTextEditorCommand,
|
|
814
|
+
_e as useTextEditorCommands,
|
|
815
|
+
et as useTextEditorSelection,
|
|
816
|
+
we as useTextEditorSelections,
|
|
817
|
+
tt as useTextEditorViewColumn,
|
|
818
|
+
nt as useTextEditorVisibleRanges,
|
|
819
|
+
it as useTreeView,
|
|
820
|
+
X as useViewBadge,
|
|
821
|
+
F as useViewTitle,
|
|
822
|
+
at as useViewVisibility,
|
|
823
|
+
rt as useVisibleNotebookEditors,
|
|
824
|
+
st as useVisibleTextEditors,
|
|
825
|
+
ut as useVscodeContext,
|
|
826
|
+
ct as useWebviewPanel,
|
|
827
|
+
ot as useWebviewView,
|
|
828
|
+
lt as useWindowState,
|
|
829
|
+
dt as useWorkspaceFolders
|
|
792
830
|
};
|