reactive-vscode 0.2.0-beta.6 → 0.2.0-beta.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/dist/index.d.ts +3 -2
- package/dist/index.js +164 -164
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -46,6 +46,7 @@ import { TreeDataProvider } from 'vscode';
|
|
|
46
46
|
import { TreeItem } from 'vscode';
|
|
47
47
|
import { TreeView } from 'vscode';
|
|
48
48
|
import { TreeViewOptions } from 'vscode';
|
|
49
|
+
import { UnwrapNestedRefs } from '@reactive-vscode/reactivity';
|
|
49
50
|
import { Uri } from 'vscode';
|
|
50
51
|
import { ViewBadge } from 'vscode';
|
|
51
52
|
import { ViewColumn } from 'vscode';
|
|
@@ -61,7 +62,7 @@ export declare interface Commands extends Record<string, (...args: any[]) => any
|
|
|
61
62
|
'vscode.open': (uri: Uri) => void;
|
|
62
63
|
}
|
|
63
64
|
|
|
64
|
-
export declare type ConfigObject<C extends object> =
|
|
65
|
+
export declare type ConfigObject<C extends object> = UnwrapNestedRefs<C> & {
|
|
65
66
|
/**
|
|
66
67
|
* Write the configuration value to the workspace.
|
|
67
68
|
*
|
|
@@ -72,7 +73,7 @@ export declare type ConfigObject<C extends object> = ShallowReactive<C & {
|
|
|
72
73
|
* Set the value without updating the workspace.
|
|
73
74
|
*/
|
|
74
75
|
$set: (key: keyof C, value: C[keyof C]) => void;
|
|
75
|
-
}
|
|
76
|
+
};
|
|
76
77
|
|
|
77
78
|
export declare interface ConfigRef<T> extends WritableComputedRef<T> {
|
|
78
79
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { getCurrentScope as L, onScopeDispose as W, shallowRef as l, effectScope as
|
|
1
|
+
import { getCurrentScope as L, onScopeDispose as W, shallowRef as l, effectScope as q, computed as f, reactive as J, toValue as a, watchEffect as m, watch as b, ref as E, shallowReactive as K, toRaw as z, isRef as Y } from "@reactive-vscode/reactivity";
|
|
2
2
|
export * from "@reactive-vscode/reactivity";
|
|
3
|
-
import { workspace as C, commands as k, window as c, debug as V, extensions as R, comments as
|
|
4
|
-
function
|
|
3
|
+
import { workspace as C, commands as k, window as c, debug as V, extensions as R, comments as G, env as T, EventEmitter as F, tasks as D, Uri as Q, languages as X, ColorThemeKind as A, l10n as N } from "vscode";
|
|
4
|
+
function Z(e) {
|
|
5
5
|
return L() ? (W(e), !0) : !1;
|
|
6
6
|
}
|
|
7
|
-
function
|
|
7
|
+
function O(e, t) {
|
|
8
8
|
const n = /* @__PURE__ */ new Map();
|
|
9
9
|
return (...r) => {
|
|
10
10
|
const i = t(...r);
|
|
@@ -12,7 +12,7 @@ function $(e, t) {
|
|
|
12
12
|
return o ? o.refCount++ : (o = {
|
|
13
13
|
data: e(...r),
|
|
14
14
|
refCount: 1
|
|
15
|
-
}, n.set(i, o)),
|
|
15
|
+
}, n.set(i, o)), Z(() => {
|
|
16
16
|
--o.refCount === 0 && n.delete(i);
|
|
17
17
|
}), o.data;
|
|
18
18
|
};
|
|
@@ -21,24 +21,24 @@ function h(e) {
|
|
|
21
21
|
let t;
|
|
22
22
|
return () => t ?? (t = e());
|
|
23
23
|
}
|
|
24
|
-
const
|
|
25
|
-
function ve(e) {
|
|
26
|
-
I.push(e);
|
|
27
|
-
}
|
|
28
|
-
const x = l(null), y = J();
|
|
24
|
+
const $ = [];
|
|
29
25
|
function ge(e) {
|
|
26
|
+
$.push(e);
|
|
27
|
+
}
|
|
28
|
+
const x = l(null), y = q();
|
|
29
|
+
function he(e) {
|
|
30
30
|
return {
|
|
31
|
-
activate: (t) => (x.value = t, y.run(() => (
|
|
31
|
+
activate: (t) => (x.value = t, y.run(() => (I.map((n) => n(t)), e()))),
|
|
32
32
|
deactivate: () => {
|
|
33
|
-
|
|
33
|
+
$.map((t) => t()), y.stop();
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
const
|
|
38
|
-
function
|
|
39
|
-
x.value ? e(x.value) :
|
|
37
|
+
const I = [];
|
|
38
|
+
function P(e) {
|
|
39
|
+
x.value ? e(x.value) : I.push(e);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function _(e, t, n) {
|
|
42
42
|
const r = !e, i = C.getConfiguration(r ? void 0 : e, n);
|
|
43
43
|
function o(d, v) {
|
|
44
44
|
const g = l(v), S = f({
|
|
@@ -47,8 +47,8 @@ function Z(e, t, n) {
|
|
|
47
47
|
g.value = w, i.update(d, w);
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
|
-
return S.update = async (w,
|
|
51
|
-
await i.update(d, w,
|
|
50
|
+
return S.update = async (w, H, U) => {
|
|
51
|
+
await i.update(d, w, H, U), S.value = w;
|
|
52
52
|
}, S.set = (w) => {
|
|
53
53
|
g.value = w;
|
|
54
54
|
}, S;
|
|
@@ -56,7 +56,7 @@ function Z(e, t, n) {
|
|
|
56
56
|
const s = Object.fromEntries(
|
|
57
57
|
Object.keys(t).map((d) => [d, o(d, i.get(d))])
|
|
58
58
|
);
|
|
59
|
-
return
|
|
59
|
+
return P(() => {
|
|
60
60
|
u(C.onDidChangeConfiguration(
|
|
61
61
|
r ? (d) => {
|
|
62
62
|
const v = C.getConfiguration();
|
|
@@ -72,9 +72,9 @@ function Z(e, t, n) {
|
|
|
72
72
|
));
|
|
73
73
|
}), s;
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
const r =
|
|
77
|
-
return
|
|
75
|
+
function me(e, t, n) {
|
|
76
|
+
const r = _(e, t, n);
|
|
77
|
+
return J({
|
|
78
78
|
...r,
|
|
79
79
|
$update(i, o, s, d) {
|
|
80
80
|
return r[i].update(o, s, d);
|
|
@@ -84,10 +84,10 @@ function he(e, t, n) {
|
|
|
84
84
|
}
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function Ce(e, t) {
|
|
88
88
|
const n = l(null), r = [], i = (o) => (...s) => n.value ? n.value[o](...s) : (r.push([o, s]), null);
|
|
89
|
-
return
|
|
90
|
-
n.value =
|
|
89
|
+
return P(() => {
|
|
90
|
+
n.value = se(e, t);
|
|
91
91
|
for (const [o, s] of r)
|
|
92
92
|
n.value[o](...s);
|
|
93
93
|
}), {
|
|
@@ -107,75 +107,75 @@ function me(e, t) {
|
|
|
107
107
|
hide: i("hide")
|
|
108
108
|
};
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function be(e, ...t) {
|
|
111
111
|
return k.executeCommand(e, ...t);
|
|
112
112
|
}
|
|
113
|
-
function
|
|
113
|
+
function ee(e, t = !1) {
|
|
114
114
|
const n = x.value;
|
|
115
115
|
if (!n && !t)
|
|
116
116
|
throw new Error("Cannot get absolute path because the extension is not activated yet");
|
|
117
117
|
return n == null ? void 0 : n.asAbsolutePath(e);
|
|
118
118
|
}
|
|
119
|
-
function
|
|
120
|
-
return f(() =>
|
|
119
|
+
function we(e, t = !1) {
|
|
120
|
+
return f(() => ee(a(e), t));
|
|
121
121
|
}
|
|
122
122
|
function u(e) {
|
|
123
123
|
return (L() ?? y).cleanups.push(e.dispose.bind(e)), e;
|
|
124
124
|
}
|
|
125
|
-
const
|
|
125
|
+
const te = h(() => {
|
|
126
126
|
const e = l(c.activeColorTheme);
|
|
127
127
|
return u(c.onDidChangeActiveColorTheme((t) => {
|
|
128
128
|
e.value = t;
|
|
129
129
|
})), e;
|
|
130
|
-
}),
|
|
130
|
+
}), Te = h(() => {
|
|
131
131
|
const e = l(V.activeDebugSession);
|
|
132
132
|
return u(V.onDidChangeActiveDebugSession((t) => {
|
|
133
133
|
e.value = t;
|
|
134
134
|
})), f(() => e.value);
|
|
135
|
-
}),
|
|
135
|
+
}), ne = h(() => {
|
|
136
136
|
const e = l(c.activeTextEditor);
|
|
137
137
|
return u(c.onDidChangeActiveTextEditor((t) => {
|
|
138
138
|
e.value = t;
|
|
139
139
|
})), e;
|
|
140
140
|
});
|
|
141
|
-
function
|
|
141
|
+
function re(e, t, n) {
|
|
142
142
|
const r = "key" in t ? t : c.createTextEditorDecorationType(t);
|
|
143
143
|
m(() => {
|
|
144
144
|
var i;
|
|
145
145
|
(i = a(e)) == null || i.setDecorations(r, a(n));
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
|
-
function
|
|
149
|
-
const n =
|
|
150
|
-
|
|
148
|
+
function De(e, t) {
|
|
149
|
+
const n = ne();
|
|
150
|
+
re(n, e, t);
|
|
151
151
|
}
|
|
152
|
-
const
|
|
152
|
+
const Se = h(() => {
|
|
153
153
|
const e = l(c.activeNotebookEditor);
|
|
154
154
|
return u(c.onDidChangeActiveNotebookEditor((t) => {
|
|
155
155
|
e.value = t;
|
|
156
156
|
})), e;
|
|
157
|
-
}),
|
|
157
|
+
}), pe = h(() => {
|
|
158
158
|
const e = l(c.activeTerminal);
|
|
159
159
|
return u(c.onDidChangeActiveTerminal((t) => {
|
|
160
160
|
e.value = t;
|
|
161
161
|
})), e;
|
|
162
|
-
}),
|
|
162
|
+
}), xe = h(() => {
|
|
163
163
|
const e = l(R.all);
|
|
164
164
|
return u(R.onDidChange(() => {
|
|
165
165
|
e.value = R.all;
|
|
166
166
|
})), f(() => e.value);
|
|
167
167
|
});
|
|
168
|
-
function
|
|
168
|
+
function ie(e, t) {
|
|
169
169
|
u(k.registerCommand(e, t));
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function Ee(e) {
|
|
172
172
|
for (const [t, n] of Object.entries(e))
|
|
173
|
-
n &&
|
|
173
|
+
n && ie(t, n);
|
|
174
174
|
}
|
|
175
|
-
function
|
|
176
|
-
return u(
|
|
175
|
+
function ke(e, t) {
|
|
176
|
+
return u(G.createCommentController(e, t));
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function M(e) {
|
|
179
179
|
var n;
|
|
180
180
|
const t = l((n = a(e)) == null ? void 0 : n.state);
|
|
181
181
|
return b(e, () => {
|
|
@@ -185,7 +185,7 @@ function j(e) {
|
|
|
185
185
|
r === a(e) && (t.value = r.state);
|
|
186
186
|
})), f(() => t.value);
|
|
187
187
|
}
|
|
188
|
-
function
|
|
188
|
+
function Re(...e) {
|
|
189
189
|
const t = E(null);
|
|
190
190
|
function n() {
|
|
191
191
|
return !!t.value && t.value.exitStatus == null;
|
|
@@ -208,16 +208,16 @@ function ke(...e) {
|
|
|
208
208
|
show: o,
|
|
209
209
|
sendText: i,
|
|
210
210
|
close: s,
|
|
211
|
-
state:
|
|
211
|
+
state: M(t)
|
|
212
212
|
};
|
|
213
213
|
}
|
|
214
|
-
const
|
|
214
|
+
const ye = h(() => {
|
|
215
215
|
const e = l(T.shell);
|
|
216
216
|
return u(T.onDidChangeShell((t) => {
|
|
217
217
|
e.value = t;
|
|
218
218
|
})), f(() => e.value);
|
|
219
219
|
});
|
|
220
|
-
function
|
|
220
|
+
function Ve(e) {
|
|
221
221
|
var n;
|
|
222
222
|
const t = l((n = a(e)) == null ? void 0 : n.getText());
|
|
223
223
|
return m(() => {
|
|
@@ -233,8 +233,8 @@ function p(e, t = []) {
|
|
|
233
233
|
n(r);
|
|
234
234
|
return n;
|
|
235
235
|
}
|
|
236
|
-
function
|
|
237
|
-
const n = Array.isArray(e) ? e : t ?? [], r = u(Array.isArray(e) || e == null ? new
|
|
236
|
+
function ae(e, t = []) {
|
|
237
|
+
const n = Array.isArray(e) ? e : t ?? [], r = u(Array.isArray(e) || e == null ? new F() : e), i = p(r.event, n);
|
|
238
238
|
for (const o of n)
|
|
239
239
|
i(o);
|
|
240
240
|
return {
|
|
@@ -243,11 +243,11 @@ function ie(e, t = []) {
|
|
|
243
243
|
addListener: i
|
|
244
244
|
};
|
|
245
245
|
}
|
|
246
|
-
function
|
|
246
|
+
function Ae(e) {
|
|
247
247
|
return f(() => D.fetchTasks(a(e)));
|
|
248
248
|
}
|
|
249
|
-
function
|
|
250
|
-
return
|
|
249
|
+
function oe(e) {
|
|
250
|
+
return K({
|
|
251
251
|
get scheme() {
|
|
252
252
|
return a(e).scheme;
|
|
253
253
|
},
|
|
@@ -277,14 +277,14 @@ function ae(e) {
|
|
|
277
277
|
}
|
|
278
278
|
});
|
|
279
279
|
}
|
|
280
|
-
function
|
|
281
|
-
return
|
|
280
|
+
function Ne(e) {
|
|
281
|
+
return oe(() => Q.file(a(e)));
|
|
282
282
|
}
|
|
283
|
-
function
|
|
284
|
-
const n = new
|
|
283
|
+
function Le(e, t) {
|
|
284
|
+
const n = new F(), r = l();
|
|
285
285
|
m(() => {
|
|
286
286
|
r.value && n.fire(), r.value = a(t);
|
|
287
|
-
}), u(
|
|
287
|
+
}), u(X.registerFoldingRangeProvider(
|
|
288
288
|
e,
|
|
289
289
|
{
|
|
290
290
|
onDidChangeFoldingRanges: n.event,
|
|
@@ -295,7 +295,7 @@ function Ne(e, t) {
|
|
|
295
295
|
}
|
|
296
296
|
));
|
|
297
297
|
}
|
|
298
|
-
function
|
|
298
|
+
function We(e, t, n, r) {
|
|
299
299
|
const i = u(C.createFileSystemWatcher(e, t, n, r));
|
|
300
300
|
return {
|
|
301
301
|
...i,
|
|
@@ -304,33 +304,33 @@ function Le(e, t, n, r) {
|
|
|
304
304
|
onDidDelete: p(i.onDidDelete)
|
|
305
305
|
};
|
|
306
306
|
}
|
|
307
|
-
const
|
|
308
|
-
const e =
|
|
307
|
+
const Fe = h(() => {
|
|
308
|
+
const e = te();
|
|
309
309
|
return f(() => e.value.kind === A.Dark || e.value.kind === A.HighContrast);
|
|
310
|
-
}),
|
|
310
|
+
}), Oe = h(() => {
|
|
311
311
|
const e = l(T.isTelemetryEnabled);
|
|
312
312
|
return u(T.onDidChangeTelemetryEnabled((t) => {
|
|
313
313
|
e.value = t;
|
|
314
314
|
})), f(() => e.value);
|
|
315
315
|
});
|
|
316
|
-
function
|
|
317
|
-
return f(() => typeof t[0] == "object" ? N.t(a(e),
|
|
316
|
+
function $e(e, ...t) {
|
|
317
|
+
return f(() => typeof t[0] == "object" ? N.t(a(e), z(t[0])) : N.t(a(e), ...t.map(a)));
|
|
318
318
|
}
|
|
319
|
-
const
|
|
319
|
+
const Ie = h(() => {
|
|
320
320
|
const e = l(T.logLevel);
|
|
321
321
|
return u(T.onDidChangeLogLevel((t) => {
|
|
322
322
|
e.value = t;
|
|
323
323
|
})), f(() => e.value);
|
|
324
324
|
});
|
|
325
|
-
function
|
|
325
|
+
function ue(e, t) {
|
|
326
326
|
return u(c.createOutputChannel(e, t));
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function Pe(e) {
|
|
329
329
|
const t = /* @__PURE__ */ new Date(), n = String(t.getFullYear()).padStart(4, "0"), r = String(t.getMonth() + 1).padStart(2, "0"), i = String(t.getDate()).padStart(2, "0"), o = String(t.getHours()).padStart(2, "0"), s = String(t.getMinutes()).padStart(2, "0"), d = String(t.getSeconds()).padStart(2, "0"), v = String(t.getMilliseconds()).padStart(3, "0");
|
|
330
330
|
return `${n}-${r}-${i} ${o}:${s}:${d}.${v} [${e}] `;
|
|
331
331
|
}
|
|
332
|
-
function
|
|
333
|
-
const n = t.outputChannel ??
|
|
332
|
+
function se(e, t = {}) {
|
|
333
|
+
const n = t.outputChannel ?? ue(e), r = (i) => (...o) => {
|
|
334
334
|
var s;
|
|
335
335
|
n.appendLine((((s = t.getPrefix) == null ? void 0 : s.call(t, i)) ?? "") + o.join(" "));
|
|
336
336
|
};
|
|
@@ -348,7 +348,7 @@ function ue(e, t = {}) {
|
|
|
348
348
|
hide: n.hide.bind(n)
|
|
349
349
|
};
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function ce(e) {
|
|
352
352
|
var n;
|
|
353
353
|
const t = l(((n = a(e)) == null ? void 0 : n.selections) ?? []);
|
|
354
354
|
return b(e, () => {
|
|
@@ -367,8 +367,8 @@ function se(e) {
|
|
|
367
367
|
}
|
|
368
368
|
});
|
|
369
369
|
}
|
|
370
|
-
function
|
|
371
|
-
const t =
|
|
370
|
+
function Me(e) {
|
|
371
|
+
const t = ce(e);
|
|
372
372
|
return f({
|
|
373
373
|
get() {
|
|
374
374
|
return t.value[0];
|
|
@@ -378,7 +378,7 @@ function Pe(e) {
|
|
|
378
378
|
}
|
|
379
379
|
});
|
|
380
380
|
}
|
|
381
|
-
function
|
|
381
|
+
function je(e) {
|
|
382
382
|
var n;
|
|
383
383
|
const t = l(((n = a(e)) == null ? void 0 : n.visibleRanges) ?? []);
|
|
384
384
|
return b(e, () => {
|
|
@@ -388,14 +388,14 @@ function Me(e) {
|
|
|
388
388
|
r.notebookEditor === a(e) && (t.value = r.visibleRanges);
|
|
389
389
|
})), f(() => t.value);
|
|
390
390
|
}
|
|
391
|
-
const
|
|
391
|
+
const Be = h(() => {
|
|
392
392
|
const e = l(c.terminals);
|
|
393
393
|
function t() {
|
|
394
394
|
e.value = c.terminals;
|
|
395
395
|
}
|
|
396
396
|
return u(c.onDidOpenTerminal(t)), u(c.onDidCloseTerminal(t)), e;
|
|
397
397
|
});
|
|
398
|
-
function
|
|
398
|
+
function He(e) {
|
|
399
399
|
const t = u(e.id ? c.createStatusBarItem(e.id, e.alignment, e.priority) : c.createStatusBarItem(e.alignment, e.priority));
|
|
400
400
|
function n(r) {
|
|
401
401
|
const i = e[r];
|
|
@@ -411,14 +411,14 @@ function Be(e) {
|
|
|
411
411
|
"accessibilityInformation"
|
|
412
412
|
].forEach(n), t;
|
|
413
413
|
}
|
|
414
|
-
const
|
|
414
|
+
const Ue = h(() => {
|
|
415
415
|
const e = l(D.taskExecutions);
|
|
416
416
|
function t() {
|
|
417
417
|
e.value = D.taskExecutions;
|
|
418
418
|
}
|
|
419
419
|
return u(D.onDidStartTask(t)), u(D.onDidEndTask(t)), f(() => e.value);
|
|
420
420
|
});
|
|
421
|
-
function
|
|
421
|
+
function qe(...e) {
|
|
422
422
|
const t = u(c.createTerminal(...e));
|
|
423
423
|
return {
|
|
424
424
|
terminal: t,
|
|
@@ -437,17 +437,17 @@ function Ue(...e) {
|
|
|
437
437
|
sendText: t.sendText.bind(t),
|
|
438
438
|
show: t.show.bind(t),
|
|
439
439
|
hide: t.hide.bind(t),
|
|
440
|
-
state:
|
|
440
|
+
state: M(t)
|
|
441
441
|
};
|
|
442
442
|
}
|
|
443
|
-
function
|
|
443
|
+
function le(e, t) {
|
|
444
444
|
u(k.registerTextEditorCommand(e, t));
|
|
445
445
|
}
|
|
446
|
-
function
|
|
446
|
+
function Je(e) {
|
|
447
447
|
for (const [t, n] of Object.entries(e))
|
|
448
|
-
|
|
448
|
+
le(t, n);
|
|
449
449
|
}
|
|
450
|
-
function
|
|
450
|
+
function de(e, t) {
|
|
451
451
|
var r;
|
|
452
452
|
const n = l(((r = a(e)) == null ? void 0 : r.selections) ?? []);
|
|
453
453
|
return b(e, () => {
|
|
@@ -467,8 +467,8 @@ function le(e, t) {
|
|
|
467
467
|
}
|
|
468
468
|
});
|
|
469
469
|
}
|
|
470
|
-
function
|
|
471
|
-
const n =
|
|
470
|
+
function Ke(e, t) {
|
|
471
|
+
const n = de(e, t);
|
|
472
472
|
return f({
|
|
473
473
|
get() {
|
|
474
474
|
return n.value[0];
|
|
@@ -478,7 +478,7 @@ function Je(e, t) {
|
|
|
478
478
|
}
|
|
479
479
|
});
|
|
480
480
|
}
|
|
481
|
-
function
|
|
481
|
+
function ze(e) {
|
|
482
482
|
var n;
|
|
483
483
|
const t = l((n = a(e)) == null ? void 0 : n.viewColumn);
|
|
484
484
|
return b(e, () => {
|
|
@@ -488,7 +488,7 @@ function Ke(e) {
|
|
|
488
488
|
r.textEditor === a(e) && (t.value = r.viewColumn);
|
|
489
489
|
})), f(() => t.value);
|
|
490
490
|
}
|
|
491
|
-
function
|
|
491
|
+
function Ye(e) {
|
|
492
492
|
var n;
|
|
493
493
|
const t = l(((n = a(e)) == null ? void 0 : n.visibleRanges) ?? []);
|
|
494
494
|
return b(e, () => {
|
|
@@ -498,21 +498,21 @@ function ze(e) {
|
|
|
498
498
|
r.textEditor === a(e) && (t.value = r.visibleRanges);
|
|
499
499
|
})), f(() => t.value);
|
|
500
500
|
}
|
|
501
|
-
function
|
|
501
|
+
function j(e, t) {
|
|
502
502
|
m(() => {
|
|
503
503
|
const n = a(e);
|
|
504
504
|
n && (n.badge = a(t));
|
|
505
505
|
});
|
|
506
506
|
}
|
|
507
|
-
function
|
|
507
|
+
function B(e, t) {
|
|
508
508
|
m(() => {
|
|
509
509
|
const n = a(e);
|
|
510
510
|
n && (n.title = a(t));
|
|
511
511
|
});
|
|
512
512
|
}
|
|
513
|
-
const
|
|
513
|
+
const Ge = O(
|
|
514
514
|
(e, t, n) => {
|
|
515
|
-
const r =
|
|
515
|
+
const r = ae();
|
|
516
516
|
b(t, () => r.fire()), n != null && n.watchSource && b(n.watchSource, () => r.fire());
|
|
517
517
|
const i = /* @__PURE__ */ new WeakMap(), o = u(c.createTreeView(e, {
|
|
518
518
|
...n,
|
|
@@ -531,11 +531,11 @@ const Ye = $(
|
|
|
531
531
|
}
|
|
532
532
|
}
|
|
533
533
|
}));
|
|
534
|
-
return n != null && n.title &&
|
|
534
|
+
return n != null && n.title && B(o, n.title), n != null && n.badge && j(o, n.badge), o;
|
|
535
535
|
},
|
|
536
536
|
(e) => e
|
|
537
537
|
);
|
|
538
|
-
function
|
|
538
|
+
function Qe(e) {
|
|
539
539
|
var r;
|
|
540
540
|
const t = E((r = a(e)) == null ? void 0 : r.visible);
|
|
541
541
|
function n() {
|
|
@@ -550,24 +550,24 @@ function Ge(e) {
|
|
|
550
550
|
}
|
|
551
551
|
}), m(n), f(() => !!t.value);
|
|
552
552
|
}
|
|
553
|
-
const
|
|
553
|
+
const Xe = h(() => {
|
|
554
554
|
const e = l(c.visibleNotebookEditors);
|
|
555
555
|
return u(c.onDidChangeVisibleNotebookEditors((t) => {
|
|
556
556
|
e.value = t;
|
|
557
557
|
})), e;
|
|
558
|
-
}),
|
|
558
|
+
}), Ze = h(() => {
|
|
559
559
|
const e = l(c.visibleTextEditors);
|
|
560
560
|
return u(c.onDidChangeVisibleTextEditors((t) => {
|
|
561
561
|
e.value = t;
|
|
562
562
|
})), e;
|
|
563
563
|
});
|
|
564
|
-
function
|
|
565
|
-
const r =
|
|
564
|
+
function _e(e, t, n = !0) {
|
|
565
|
+
const r = Y(t) ? t : typeof t == "function" ? f(t) : E(t);
|
|
566
566
|
return m(() => {
|
|
567
567
|
a(n) && k.executeCommand("setContext", e, r.value);
|
|
568
568
|
}), r;
|
|
569
569
|
}
|
|
570
|
-
const
|
|
570
|
+
const et = O(
|
|
571
571
|
(e, t, n) => {
|
|
572
572
|
const r = l(), i = l();
|
|
573
573
|
u(c.registerWebviewViewProvider(
|
|
@@ -595,7 +595,7 @@ const _e = $(
|
|
|
595
595
|
r.value && (r.value.webview.options = a(v));
|
|
596
596
|
});
|
|
597
597
|
}
|
|
598
|
-
n != null && n.title &&
|
|
598
|
+
n != null && n.title && B(r, n.title), n != null && n.badge && j(r, n.badge);
|
|
599
599
|
function d(v) {
|
|
600
600
|
var g;
|
|
601
601
|
return (g = r.value) == null ? void 0 : g.webview.postMessage(v);
|
|
@@ -603,7 +603,7 @@ const _e = $(
|
|
|
603
603
|
return { view: r, context: i, postMessage: d, forceRefresh: s };
|
|
604
604
|
},
|
|
605
605
|
(e) => e
|
|
606
|
-
),
|
|
606
|
+
), tt = h(() => {
|
|
607
607
|
const e = l(c.state);
|
|
608
608
|
return u(c.onDidChangeWindowState((t) => {
|
|
609
609
|
e.value = t;
|
|
@@ -611,79 +611,79 @@ const _e = $(
|
|
|
611
611
|
focused: f(() => e.value.focused),
|
|
612
612
|
active: f(() => e.value.active)
|
|
613
613
|
};
|
|
614
|
-
}),
|
|
614
|
+
}), nt = h(() => {
|
|
615
615
|
const e = l(C.workspaceFolders);
|
|
616
616
|
return u(C.onDidChangeWorkspaceFolders(() => {
|
|
617
617
|
e.value = C.workspaceFolders;
|
|
618
618
|
})), f(() => e.value);
|
|
619
619
|
});
|
|
620
620
|
export {
|
|
621
|
-
|
|
622
|
-
|
|
621
|
+
I as activateCbs,
|
|
622
|
+
O as createKeyedComposable,
|
|
623
623
|
h as createSingletonComposable,
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
624
|
+
$ as deactivateCbs,
|
|
625
|
+
me as defineConfigObject,
|
|
626
|
+
_ as defineConfigs,
|
|
627
|
+
he as defineExtension,
|
|
628
|
+
Ce as defineLogger,
|
|
629
|
+
be as executeCommand,
|
|
630
630
|
x as extensionContext,
|
|
631
631
|
y as extensionScope,
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
632
|
+
Pe as getDefaultLoggerPrefix,
|
|
633
|
+
P as onActivate,
|
|
634
|
+
ge as onDeactivate,
|
|
635
|
+
Z as tryOnScopeDispose,
|
|
636
|
+
we as useAbsolutePath,
|
|
637
|
+
te as useActiveColorTheme,
|
|
638
|
+
Te as useActiveDebugSession,
|
|
639
|
+
De as useActiveEditorDecorations,
|
|
640
|
+
Se as useActiveNotebookEditor,
|
|
641
|
+
pe as useActiveTerminal,
|
|
642
|
+
ne as useActiveTextEditor,
|
|
643
|
+
xe as useAllExtensions,
|
|
644
|
+
ie as useCommand,
|
|
645
|
+
Ee as useCommands,
|
|
646
|
+
ke as useCommentController,
|
|
647
|
+
Re as useControlledTerminal,
|
|
648
|
+
ye as useDefaultShell,
|
|
649
649
|
u as useDisposable,
|
|
650
|
-
|
|
651
|
-
|
|
650
|
+
Ve as useDocumentText,
|
|
651
|
+
re as useEditorDecorations,
|
|
652
652
|
p as useEvent,
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
653
|
+
ae as useEventEmitter,
|
|
654
|
+
Ae as useFetchTasks,
|
|
655
|
+
Ne as useFileUri,
|
|
656
|
+
Le as useFoldingRangeProvider,
|
|
657
|
+
We as useFsWatcher,
|
|
658
|
+
Fe as useIsDarkTheme,
|
|
659
|
+
Oe as useIsTelemetryEnabled,
|
|
660
|
+
$e as useL10nText,
|
|
661
|
+
Ie as useLogLevel,
|
|
662
|
+
se as useLogger,
|
|
663
|
+
Me as useNotebookEditorSelection,
|
|
664
|
+
ce as useNotebookEditorSelections,
|
|
665
|
+
je as useNotebookEditorVisibleRanges,
|
|
666
|
+
Be as useOpenedTerminals,
|
|
667
|
+
ue as useOutputChannel,
|
|
668
|
+
He as useStatusBarItem,
|
|
669
|
+
Ue as useTaskExecutions,
|
|
670
|
+
qe as useTerminal,
|
|
671
|
+
M as useTerminalState,
|
|
672
|
+
le as useTextEditorCommand,
|
|
673
|
+
Je as useTextEditorCommands,
|
|
674
|
+
Ke as useTextEditorSelection,
|
|
675
|
+
de as useTextEditorSelections,
|
|
676
|
+
ze as useTextEditorViewColumn,
|
|
677
|
+
Ye as useTextEditorVisibleRanges,
|
|
678
|
+
Ge as useTreeView,
|
|
679
|
+
oe as useUri,
|
|
680
|
+
j as useViewBadge,
|
|
681
|
+
B as useViewTitle,
|
|
682
|
+
Qe as useViewVisibility,
|
|
683
|
+
Xe as useVisibleNotebookEditors,
|
|
684
|
+
Ze as useVisibleTextEditors,
|
|
685
|
+
_e as useVscodeContext,
|
|
686
|
+
et as useWebviewView,
|
|
687
|
+
tt as useWindowState,
|
|
688
|
+
nt as useWorkspaceFolders
|
|
689
689
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reactive-vscode",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.0-beta.
|
|
4
|
+
"version": "0.2.0-beta.7",
|
|
5
5
|
"description": "Develop VSCode extension with Vue Reactivity API",
|
|
6
6
|
"author": "_Kerman <kermanx@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@types/vscode": "^1.89.0"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@reactive-vscode/reactivity": "0.2.0-beta.
|
|
40
|
+
"@reactive-vscode/reactivity": "0.2.0-beta.7"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/node": "^20.14.2",
|