reactive-vscode 1.0.1 → 1.0.2
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.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +21 -22
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { computed as e, effectScope as t, getCurrentScope as n, isRef as r, onScopeDispose as i, readonly as a, ref as o, shallowReactive as s, shallowRef as c, toRaw as l, toValue as u, unref as d, watch as f, watchEffect as p } from "@reactive-vscode/reactivity";
|
|
2
2
|
import { ColorThemeKind as m, EventEmitter as ee, Uri as te, chat as ne, commands as h, debug as g, env as _, extensions as v, l10n as y, lm as b, tasks as x, window as S, workspace as C } from "vscode";
|
|
3
3
|
export * from "@reactive-vscode/reactivity";
|
|
4
|
-
//#region src/utils/onActivate.ts
|
|
5
|
-
var w = [];
|
|
6
|
-
function T(e) {
|
|
7
|
-
D.value ? e(D.value) : w.push(e);
|
|
8
|
-
}
|
|
9
|
-
//#endregion
|
|
10
4
|
//#region src/utils/onDeactivate.ts
|
|
11
|
-
var
|
|
5
|
+
var w = [];
|
|
12
6
|
function re(e) {
|
|
13
|
-
|
|
7
|
+
w.push(e);
|
|
14
8
|
}
|
|
15
9
|
//#endregion
|
|
16
10
|
//#region src/utils/defineExtension.ts
|
|
17
|
-
var
|
|
11
|
+
var T = c(null), E = t();
|
|
18
12
|
function ie(e) {
|
|
19
13
|
return {
|
|
20
|
-
activate: (t) => (
|
|
14
|
+
activate: (t) => (T.value = t, E.run(() => (D.forEach((e) => e(t)), e(t)))),
|
|
21
15
|
deactivate: async () => {
|
|
22
|
-
await Promise.allSettled(
|
|
16
|
+
await Promise.allSettled(w.map((e) => e())), E.stop();
|
|
23
17
|
}
|
|
24
18
|
};
|
|
25
19
|
}
|
|
26
20
|
//#endregion
|
|
21
|
+
//#region src/utils/onActivate.ts
|
|
22
|
+
var D = [];
|
|
23
|
+
function O(e) {
|
|
24
|
+
T.value ? e(T.value) : D.push(e);
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
27
|
//#region src/utils/defineConfig.ts
|
|
28
28
|
function k(e, t) {
|
|
29
29
|
let n = !e, r = c(null);
|
|
@@ -31,8 +31,7 @@ function k(e, t) {
|
|
|
31
31
|
return r.value = C.getConfiguration(e ?? void 0, t);
|
|
32
32
|
}
|
|
33
33
|
function a() {
|
|
34
|
-
|
|
35
|
-
return r.value ? r.value : i();
|
|
34
|
+
return r.value || i();
|
|
36
35
|
}
|
|
37
36
|
function o(t) {
|
|
38
37
|
let n = () => {
|
|
@@ -76,7 +75,7 @@ function k(e, t) {
|
|
|
76
75
|
}
|
|
77
76
|
});
|
|
78
77
|
}
|
|
79
|
-
return
|
|
78
|
+
return O(() => {
|
|
80
79
|
M(C.onDidChangeConfiguration((r) => {
|
|
81
80
|
(n || r.affectsConfiguration(e, t ?? void 0)) && i();
|
|
82
81
|
}));
|
|
@@ -99,7 +98,7 @@ var A = [
|
|
|
99
98
|
];
|
|
100
99
|
function ae(t) {
|
|
101
100
|
let n = c(null), r = c(_.logLevel), i = [];
|
|
102
|
-
|
|
101
|
+
O(() => {
|
|
103
102
|
let e = n.value = M(S.createOutputChannel(t, { log: !0 }));
|
|
104
103
|
r.value = e.logLevel, M(e.onDidChangeLogLevel((e) => {
|
|
105
104
|
r.value = e;
|
|
@@ -123,7 +122,7 @@ function j(e) {
|
|
|
123
122
|
if (!n) {
|
|
124
123
|
if (t) throw Error("Cannot call a singleton composable recursively.");
|
|
125
124
|
try {
|
|
126
|
-
t = !0, r =
|
|
125
|
+
t = !0, r = E.run(e);
|
|
127
126
|
} finally {
|
|
128
127
|
t = !1, n = !0;
|
|
129
128
|
}
|
|
@@ -134,12 +133,12 @@ function j(e) {
|
|
|
134
133
|
//#endregion
|
|
135
134
|
//#region src/composables/useAbsoluteUri.ts
|
|
136
135
|
function oe(t) {
|
|
137
|
-
return e(() => te.joinPath(
|
|
136
|
+
return e(() => te.joinPath(T.value.extensionUri, u(t)));
|
|
138
137
|
}
|
|
139
138
|
//#endregion
|
|
140
139
|
//#region src/composables/useDisposable.ts
|
|
141
140
|
function M(e) {
|
|
142
|
-
return (n() ??
|
|
141
|
+
return (n() ?? E).cleanups.push(e.dispose.bind(e)), e;
|
|
143
142
|
}
|
|
144
143
|
//#endregion
|
|
145
144
|
//#region src/composables/useActiveColorTheme.ts
|
|
@@ -279,7 +278,7 @@ function U(e, t = []) {
|
|
|
279
278
|
//#endregion
|
|
280
279
|
//#region src/composables/useExtensionSecret.ts
|
|
281
280
|
function fe(t) {
|
|
282
|
-
let n =
|
|
281
|
+
let n = T.value.secrets, r = c(null);
|
|
283
282
|
n.get(t).then((e) => {
|
|
284
283
|
r.value = e;
|
|
285
284
|
}), M(n.onDidChange(async (e) => {
|
|
@@ -343,7 +342,7 @@ function W(t, n, r) {
|
|
|
343
342
|
//#endregion
|
|
344
343
|
//#region src/composables/useGlobalState.ts
|
|
345
344
|
function me(e, t) {
|
|
346
|
-
return W(
|
|
345
|
+
return W(T.value.globalState, e, t);
|
|
347
346
|
}
|
|
348
347
|
//#endregion
|
|
349
348
|
//#region src/composables/useQuickInputOptions.ts
|
|
@@ -785,9 +784,9 @@ var $ = j(() => {
|
|
|
785
784
|
//#endregion
|
|
786
785
|
//#region src/composables/useWorkspaceState.ts
|
|
787
786
|
function Be(e, t) {
|
|
788
|
-
return W(
|
|
787
|
+
return W(T.value.workspaceState, e, t);
|
|
789
788
|
}
|
|
790
789
|
//#endregion
|
|
791
|
-
export {
|
|
790
|
+
export { D as activateCbs, w as deactivateCbs, k as defineConfig, ie as defineExtension, ae as defineLogger, j as defineService, T as extensionContext, E as extensionScope, O as onActivate, re as onDeactivate, oe as useAbsoluteUri, N as useActiveColorTheme, se as useActiveDebugSession, ce as useActiveNotebookEditor, le as useActiveTerminal, ue as useActiveTextEditor, de as useAllExtensions, I as useChatParticipant, L as useCommand, R as useCommands, M as useDisposable, z as useDocumentText, B as useEditorDecorations, V as useEnvShell, H as useEvent, U as useEventEmitter, fe as useExtensionSecret, pe as useFileSystemWatcher, me as useGlobalState, he as useInputBox, ge as useIsDarkTheme, _e as useIsTelemetryEnabled, ve as useL10nText, ye as useLmTools, be as useLogLevel, W as useMementoItem, xe as useNotebookEditorSelection, K as useNotebookEditorSelections, Se as useNotebookEditorVisibleRanges, Ce as useOpenedTerminals, we as useQuickPick, F as useReactiveOptions, Te as useStatusBarItem, Ee as useTaskExecutions, De as useTerminal, q as useTerminalShellIntegration, J as useTerminalState, Y as useTextEditorCommand, Oe as useTextEditorCommands, ke as useTextEditorSelection, X as useTextEditorSelections, Ae as useTextEditorViewColumn, je as useTextEditorVisibleRanges, Q as useTreeView, Z as useViewVisibility, Me as useVisibleNotebookEditors, Ne as useVisibleTextEditors, Pe as useVscodeContext, Fe as useWebviewPanel, Ie as useWebviewView, Le as useWindowActive, Re as useWindowFocused, $ as useWindowState, ze as useWorkspaceFolders, Be as useWorkspaceState };
|
|
792
791
|
|
|
793
792
|
//# sourceMappingURL=index.js.map
|