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