reactive-vscode 0.2.2 → 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 +353 -319
- 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,45 +316,45 @@ function We(e, t, n, a) {
|
|
|
316
316
|
v.dispose();
|
|
317
317
|
i.clear();
|
|
318
318
|
}
|
|
319
|
-
return
|
|
319
|
+
return C(f, h), C(
|
|
320
320
|
() => [
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
321
|
+
r(t),
|
|
322
|
+
r(n),
|
|
323
|
+
r(a)
|
|
324
324
|
],
|
|
325
325
|
() => {
|
|
326
|
-
w(),
|
|
326
|
+
w(), h();
|
|
327
327
|
}
|
|
328
|
-
),
|
|
328
|
+
), W(w), {
|
|
329
329
|
watchers: i,
|
|
330
|
-
onDidCreate:
|
|
331
|
-
onDidChange:
|
|
332
|
-
onDidDelete:
|
|
330
|
+
onDidCreate: u.event,
|
|
331
|
+
onDidChange: c.event,
|
|
332
|
+
onDidDelete: o.event
|
|
333
333
|
};
|
|
334
334
|
}
|
|
335
|
-
const
|
|
335
|
+
const Pe = m(() => {
|
|
336
336
|
const e = ne();
|
|
337
|
-
return g(() => e.value.kind ===
|
|
338
|
-
}),
|
|
339
|
-
const e = d(
|
|
340
|
-
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) => {
|
|
341
341
|
e.value = t;
|
|
342
342
|
})), g(() => e.value);
|
|
343
343
|
});
|
|
344
|
-
function
|
|
345
|
-
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)));
|
|
346
346
|
}
|
|
347
|
-
function
|
|
348
|
-
return
|
|
347
|
+
function ue(e, t) {
|
|
348
|
+
return s(l.createOutputChannel(e, t));
|
|
349
349
|
}
|
|
350
|
-
function
|
|
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"),
|
|
352
|
-
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}] `;
|
|
353
353
|
}
|
|
354
|
-
function
|
|
355
|
-
const n = t.outputChannel ??
|
|
356
|
-
var
|
|
357
|
-
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(" "));
|
|
358
358
|
};
|
|
359
359
|
return {
|
|
360
360
|
outputChannel: n,
|
|
@@ -370,33 +370,33 @@ function ue(e, t = {}) {
|
|
|
370
370
|
hide: n.hide.bind(n)
|
|
371
371
|
};
|
|
372
372
|
}
|
|
373
|
-
const
|
|
374
|
-
const e = d(
|
|
375
|
-
return
|
|
373
|
+
const Le = m(() => {
|
|
374
|
+
const e = d(p.logLevel);
|
|
375
|
+
return s(p.onDidChangeLogLevel((t) => {
|
|
376
376
|
e.value = t;
|
|
377
377
|
})), g(() => e.value);
|
|
378
378
|
});
|
|
379
|
-
function
|
|
379
|
+
function oe(e) {
|
|
380
380
|
var n;
|
|
381
|
-
const t = d(((n =
|
|
382
|
-
return
|
|
381
|
+
const t = d(((n = r(e)) == null ? void 0 : n.selections) ?? []);
|
|
382
|
+
return C(e, () => {
|
|
383
383
|
var a;
|
|
384
|
-
t.value = ((a =
|
|
385
|
-
}),
|
|
386
|
-
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);
|
|
387
387
|
})), g({
|
|
388
388
|
get() {
|
|
389
389
|
return t.value;
|
|
390
390
|
},
|
|
391
391
|
set(a) {
|
|
392
392
|
t.value = a;
|
|
393
|
-
const i =
|
|
393
|
+
const i = r(e);
|
|
394
394
|
i && (i.selections = a);
|
|
395
395
|
}
|
|
396
396
|
});
|
|
397
397
|
}
|
|
398
|
-
function
|
|
399
|
-
const t =
|
|
398
|
+
function Ne(e) {
|
|
399
|
+
const t = oe(e);
|
|
400
400
|
return g({
|
|
401
401
|
get() {
|
|
402
402
|
return t.value[0];
|
|
@@ -406,25 +406,25 @@ function Me(e) {
|
|
|
406
406
|
}
|
|
407
407
|
});
|
|
408
408
|
}
|
|
409
|
-
function
|
|
409
|
+
function He(e) {
|
|
410
410
|
var n;
|
|
411
|
-
const t = d(((n =
|
|
412
|
-
return
|
|
411
|
+
const t = d(((n = r(e)) == null ? void 0 : n.visibleRanges) ?? []);
|
|
412
|
+
return C(e, () => {
|
|
413
413
|
var a;
|
|
414
|
-
t.value = ((a =
|
|
415
|
-
}),
|
|
416
|
-
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);
|
|
417
417
|
})), g(() => t.value);
|
|
418
418
|
}
|
|
419
|
-
const
|
|
419
|
+
const je = m(() => {
|
|
420
420
|
const e = d(l.terminals);
|
|
421
421
|
function t() {
|
|
422
422
|
e.value = l.terminals;
|
|
423
423
|
}
|
|
424
|
-
return
|
|
424
|
+
return s(l.onDidOpenTerminal(t)), s(l.onDidCloseTerminal(t)), e;
|
|
425
425
|
});
|
|
426
|
-
function
|
|
427
|
-
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);
|
|
428
428
|
[
|
|
429
429
|
"items",
|
|
430
430
|
"buttons",
|
|
@@ -440,31 +440,31 @@ function He(e = {}) {
|
|
|
440
440
|
"matchOnDetail",
|
|
441
441
|
"keepScrollPosition"
|
|
442
442
|
].forEach((v) => {
|
|
443
|
-
e[v] &&
|
|
443
|
+
e[v] && b(() => t[v] = r(e[v]));
|
|
444
444
|
}), e.value && (t.value = e.value);
|
|
445
445
|
const f = d(t.value);
|
|
446
|
-
|
|
447
|
-
const
|
|
448
|
-
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);
|
|
449
449
|
const w = d(t.selectedItems);
|
|
450
450
|
return a((v) => w.value = v), {
|
|
451
451
|
...t,
|
|
452
452
|
onDidChangeActive: n,
|
|
453
453
|
onDidChangeSelection: a,
|
|
454
454
|
onDidAccept: i,
|
|
455
|
-
onDidHide:
|
|
456
|
-
onDidTriggerButton:
|
|
457
|
-
onDidChangeValue:
|
|
455
|
+
onDidHide: u,
|
|
456
|
+
onDidTriggerButton: c,
|
|
457
|
+
onDidChangeValue: o,
|
|
458
458
|
value: f,
|
|
459
|
-
activeItems:
|
|
459
|
+
activeItems: h,
|
|
460
460
|
selectedItems: w
|
|
461
461
|
};
|
|
462
462
|
}
|
|
463
463
|
function ze(e) {
|
|
464
|
-
const t =
|
|
464
|
+
const t = s(e.id ? l.createStatusBarItem(e.id, e.alignment, e.priority) : l.createStatusBarItem(e.alignment, e.priority));
|
|
465
465
|
function n(a) {
|
|
466
466
|
const i = e[a];
|
|
467
|
-
i != null &&
|
|
467
|
+
i != null && b(() => t[a] = r(i));
|
|
468
468
|
}
|
|
469
469
|
return [
|
|
470
470
|
"name",
|
|
@@ -476,15 +476,15 @@ function ze(e) {
|
|
|
476
476
|
"accessibilityInformation"
|
|
477
477
|
].forEach(n), t;
|
|
478
478
|
}
|
|
479
|
-
const Ke =
|
|
480
|
-
const e = d(
|
|
479
|
+
const Ke = m(() => {
|
|
480
|
+
const e = d(k.taskExecutions);
|
|
481
481
|
function t() {
|
|
482
|
-
e.value =
|
|
482
|
+
e.value = k.taskExecutions;
|
|
483
483
|
}
|
|
484
|
-
return
|
|
484
|
+
return s(k.onDidStartTask(t)), s(k.onDidEndTask(t)), g(() => e.value);
|
|
485
485
|
});
|
|
486
486
|
function Qe(...e) {
|
|
487
|
-
const t =
|
|
487
|
+
const t = s(l.createTerminal(...e));
|
|
488
488
|
return {
|
|
489
489
|
terminal: t,
|
|
490
490
|
get name() {
|
|
@@ -502,11 +502,11 @@ function Qe(...e) {
|
|
|
502
502
|
sendText: t.sendText.bind(t),
|
|
503
503
|
show: t.show.bind(t),
|
|
504
504
|
hide: t.hide.bind(t),
|
|
505
|
-
state:
|
|
505
|
+
state: z(t)
|
|
506
506
|
};
|
|
507
507
|
}
|
|
508
508
|
function le(e, t) {
|
|
509
|
-
|
|
509
|
+
s(A.registerTextEditorCommand(e, t));
|
|
510
510
|
}
|
|
511
511
|
function Ue(e) {
|
|
512
512
|
for (const [t, n] of Object.entries(e))
|
|
@@ -514,21 +514,21 @@ function Ue(e) {
|
|
|
514
514
|
}
|
|
515
515
|
function de(e, t) {
|
|
516
516
|
var a;
|
|
517
|
-
const n = d(((a =
|
|
518
|
-
return
|
|
517
|
+
const n = d(((a = r(e)) == null ? void 0 : a.selections) ?? []);
|
|
518
|
+
return C(e, () => {
|
|
519
519
|
var i;
|
|
520
|
-
n.value = ((i =
|
|
521
|
-
}),
|
|
522
|
-
const
|
|
523
|
-
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);
|
|
524
524
|
})), g({
|
|
525
525
|
get() {
|
|
526
526
|
return n.value;
|
|
527
527
|
},
|
|
528
528
|
set(i) {
|
|
529
529
|
n.value = i;
|
|
530
|
-
const
|
|
531
|
-
|
|
530
|
+
const u = r(e);
|
|
531
|
+
u && (u.selections = i);
|
|
532
532
|
}
|
|
533
533
|
});
|
|
534
534
|
}
|
|
@@ -545,101 +545,134 @@ function qe(e, t) {
|
|
|
545
545
|
}
|
|
546
546
|
function Ye(e) {
|
|
547
547
|
var n;
|
|
548
|
-
const t = d((n =
|
|
549
|
-
return
|
|
548
|
+
const t = d((n = r(e)) == null ? void 0 : n.viewColumn);
|
|
549
|
+
return C(e, () => {
|
|
550
550
|
var a;
|
|
551
|
-
t.value = (a =
|
|
552
|
-
}),
|
|
553
|
-
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);
|
|
554
554
|
})), g(() => t.value);
|
|
555
555
|
}
|
|
556
556
|
function Ge(e) {
|
|
557
557
|
var n;
|
|
558
|
-
const t = d(((n =
|
|
559
|
-
return
|
|
558
|
+
const t = d(((n = r(e)) == null ? void 0 : n.visibleRanges) ?? []);
|
|
559
|
+
return C(e, () => {
|
|
560
560
|
var a;
|
|
561
|
-
t.value = ((a =
|
|
562
|
-
}),
|
|
563
|
-
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);
|
|
564
564
|
})), g(() => t.value);
|
|
565
565
|
}
|
|
566
|
-
function
|
|
567
|
-
|
|
568
|
-
const n =
|
|
569
|
-
n && (n.badge =
|
|
566
|
+
function K(e, t) {
|
|
567
|
+
b(() => {
|
|
568
|
+
const n = r(e);
|
|
569
|
+
n && (n.badge = r(t));
|
|
570
570
|
});
|
|
571
571
|
}
|
|
572
|
-
function
|
|
573
|
-
|
|
574
|
-
const n =
|
|
575
|
-
n && (n.title =
|
|
572
|
+
function O(e, t) {
|
|
573
|
+
b(() => {
|
|
574
|
+
const n = r(e);
|
|
575
|
+
n && (n.title = r(t));
|
|
576
576
|
});
|
|
577
577
|
}
|
|
578
|
-
const Je =
|
|
578
|
+
const Je = N(
|
|
579
579
|
(e, t, n) => {
|
|
580
|
-
const a =
|
|
581
|
-
|
|
582
|
-
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, {
|
|
583
583
|
...n,
|
|
584
584
|
treeDataProvider: {
|
|
585
585
|
...n,
|
|
586
586
|
onDidChangeTreeData: a.event,
|
|
587
|
-
getTreeItem(
|
|
588
|
-
return
|
|
587
|
+
getTreeItem(c) {
|
|
588
|
+
return c.treeItem;
|
|
589
589
|
},
|
|
590
|
-
getChildren(
|
|
591
|
-
var
|
|
592
|
-
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);
|
|
593
593
|
},
|
|
594
|
-
getParent(
|
|
595
|
-
return i.get(
|
|
594
|
+
getParent(c) {
|
|
595
|
+
return i.get(c);
|
|
596
596
|
}
|
|
597
597
|
}
|
|
598
598
|
}));
|
|
599
|
-
return n != null && n.title &&
|
|
599
|
+
return n != null && n.title && O(u, n.title), n != null && n.badge && K(u, n.badge), u;
|
|
600
600
|
},
|
|
601
601
|
(e) => e
|
|
602
602
|
);
|
|
603
603
|
function Xe(e) {
|
|
604
604
|
var a;
|
|
605
|
-
const t =
|
|
605
|
+
const t = S((a = r(e)) == null ? void 0 : a.visible);
|
|
606
606
|
function n() {
|
|
607
607
|
var i;
|
|
608
|
-
t.value = (i =
|
|
608
|
+
t.value = (i = r(e)) == null ? void 0 : i.visible;
|
|
609
609
|
}
|
|
610
|
-
return
|
|
611
|
-
const
|
|
612
|
-
if (
|
|
613
|
-
const
|
|
614
|
-
i(() =>
|
|
610
|
+
return b((i) => {
|
|
611
|
+
const u = r(e);
|
|
612
|
+
if (u) {
|
|
613
|
+
const c = u.onDidChangeVisibility(n);
|
|
614
|
+
i(() => c.dispose());
|
|
615
615
|
}
|
|
616
|
-
}),
|
|
616
|
+
}), b(n), g(() => !!t.value);
|
|
617
617
|
}
|
|
618
|
-
const Ze =
|
|
618
|
+
const Ze = m(() => {
|
|
619
619
|
const e = d(l.visibleNotebookEditors);
|
|
620
|
-
return
|
|
620
|
+
return s(l.onDidChangeVisibleNotebookEditors((t) => {
|
|
621
621
|
e.value = t;
|
|
622
622
|
})), e;
|
|
623
|
-
}), _e =
|
|
623
|
+
}), _e = m(() => {
|
|
624
624
|
const e = d(l.visibleTextEditors);
|
|
625
|
-
return
|
|
625
|
+
return s(l.onDidChangeVisibleTextEditors((t) => {
|
|
626
626
|
e.value = t;
|
|
627
627
|
})), e;
|
|
628
628
|
});
|
|
629
629
|
function et(e, t, n = !0) {
|
|
630
|
-
const a = G(t) ? t : typeof t == "function" ? g(t) :
|
|
631
|
-
return
|
|
632
|
-
|
|
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);
|
|
633
633
|
}), a;
|
|
634
634
|
}
|
|
635
|
-
|
|
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(
|
|
636
669
|
(e, t, n) => {
|
|
637
670
|
const a = d(), i = d();
|
|
638
|
-
|
|
671
|
+
s(l.registerWebviewViewProvider(
|
|
639
672
|
e,
|
|
640
673
|
{
|
|
641
|
-
resolveWebviewView(f,
|
|
642
|
-
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);
|
|
643
676
|
}
|
|
644
677
|
},
|
|
645
678
|
{
|
|
@@ -648,94 +681,94 @@ const tt = $(
|
|
|
648
681
|
}
|
|
649
682
|
}
|
|
650
683
|
));
|
|
651
|
-
const
|
|
652
|
-
function
|
|
653
|
-
|
|
684
|
+
const u = S(0);
|
|
685
|
+
function c() {
|
|
686
|
+
u.value++;
|
|
654
687
|
}
|
|
655
|
-
if (
|
|
656
|
-
a.value && (a.value.webview.html = `${
|
|
688
|
+
if (b(() => {
|
|
689
|
+
a.value && (a.value.webview.html = `${r(t)}<!--${u.value}-->`);
|
|
657
690
|
}), n != null && n.webviewOptions) {
|
|
658
691
|
const f = n.webviewOptions;
|
|
659
|
-
|
|
660
|
-
a.value && (a.value.webview.options =
|
|
692
|
+
b(() => {
|
|
693
|
+
a.value && (a.value.webview.options = r(f));
|
|
661
694
|
});
|
|
662
695
|
}
|
|
663
|
-
n != null && n.title &&
|
|
664
|
-
function
|
|
665
|
-
var
|
|
666
|
-
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);
|
|
667
700
|
}
|
|
668
|
-
return { view: a, context: i, postMessage:
|
|
701
|
+
return { view: a, context: i, postMessage: o, forceRefresh: c };
|
|
669
702
|
},
|
|
670
703
|
(e) => e
|
|
671
|
-
),
|
|
704
|
+
), at = m(() => {
|
|
672
705
|
const e = d(l.state);
|
|
673
|
-
return
|
|
706
|
+
return s(l.onDidChangeWindowState((t) => {
|
|
674
707
|
e.value = t;
|
|
675
708
|
})), {
|
|
676
709
|
focused: g(() => e.value.focused),
|
|
677
710
|
active: g(() => e.value.active)
|
|
678
711
|
};
|
|
679
|
-
}),
|
|
680
|
-
const e = d(
|
|
681
|
-
return
|
|
682
|
-
e.value =
|
|
712
|
+
}), it = m(() => {
|
|
713
|
+
const e = d(T.workspaceFolders);
|
|
714
|
+
return s(T.onDidChangeWorkspaceFolders(() => {
|
|
715
|
+
e.value = T.workspaceFolders;
|
|
683
716
|
})), g(() => e.value);
|
|
684
717
|
});
|
|
685
718
|
export {
|
|
686
719
|
j as activateCbs,
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
720
|
+
N as createKeyedComposable,
|
|
721
|
+
m as createSingletonComposable,
|
|
722
|
+
H as deactivateCbs,
|
|
723
|
+
me as defineConfigObject,
|
|
691
724
|
ee as defineConfigs,
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
725
|
+
he as defineExtension,
|
|
726
|
+
be as defineLogger,
|
|
727
|
+
we as executeCommand,
|
|
728
|
+
R as extensionContext,
|
|
696
729
|
I as extensionScope,
|
|
697
|
-
|
|
730
|
+
$e as getDefaultLoggerPrefix,
|
|
698
731
|
B as onActivate,
|
|
699
732
|
ge as onDeactivate,
|
|
700
733
|
_ as tryOnScopeDispose,
|
|
701
|
-
|
|
734
|
+
Ce as useAbsolutePath,
|
|
702
735
|
ne as useActiveColorTheme,
|
|
703
736
|
De as useActiveDebugSession,
|
|
704
737
|
Te as useActiveEditorDecorations,
|
|
705
|
-
|
|
706
|
-
|
|
738
|
+
Se as useActiveNotebookEditor,
|
|
739
|
+
xe as useActiveTerminal,
|
|
707
740
|
ae as useActiveTextEditor,
|
|
708
741
|
Ee as useAllExtensions,
|
|
709
|
-
|
|
710
|
-
|
|
742
|
+
ce as useCommand,
|
|
743
|
+
pe as useCommands,
|
|
711
744
|
ke as useCommentController,
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
745
|
+
Re as useControlledTerminal,
|
|
746
|
+
ye as useDefaultShell,
|
|
747
|
+
s as useDisposable,
|
|
715
748
|
ie as useDocumentText,
|
|
716
749
|
re as useEditorDecorations,
|
|
717
|
-
|
|
718
|
-
|
|
750
|
+
E as useEvent,
|
|
751
|
+
y as useEventEmitter,
|
|
719
752
|
Ae as useExtensionSecret,
|
|
720
753
|
Ve as useFetchTasks,
|
|
721
754
|
Ie as useFileUri,
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
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,
|
|
735
768
|
ze as useStatusBarItem,
|
|
736
769
|
Ke as useTaskExecutions,
|
|
737
770
|
Qe as useTerminal,
|
|
738
|
-
|
|
771
|
+
z as useTerminalState,
|
|
739
772
|
le as useTextEditorCommand,
|
|
740
773
|
Ue as useTextEditorCommands,
|
|
741
774
|
qe as useTextEditorSelection,
|
|
@@ -743,13 +776,14 @@ export {
|
|
|
743
776
|
Ye as useTextEditorViewColumn,
|
|
744
777
|
Ge as useTextEditorVisibleRanges,
|
|
745
778
|
Je as useTreeView,
|
|
746
|
-
|
|
747
|
-
|
|
779
|
+
K as useViewBadge,
|
|
780
|
+
O as useViewTitle,
|
|
748
781
|
Xe as useViewVisibility,
|
|
749
782
|
Ze as useVisibleNotebookEditors,
|
|
750
783
|
_e as useVisibleTextEditors,
|
|
751
784
|
et as useVscodeContext,
|
|
752
|
-
tt as
|
|
753
|
-
nt as
|
|
754
|
-
at as
|
|
785
|
+
tt as useWebviewPanel,
|
|
786
|
+
nt as useWebviewView,
|
|
787
|
+
at as useWindowState,
|
|
788
|
+
it as useWorkspaceFolders
|
|
755
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",
|