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