New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

reactive-vscode

Package Overview
Dependencies
Maintainers
0
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reactive-vscode - npm Package Compare versions

Comparing version 0.2.0-beta.9 to 0.2.0

46

dist/index.d.ts

@@ -326,5 +326,5 @@ /// <reference types="vscode" />

*/
export declare function useAbsolutePath(relativePath: MaybeRefOrGetter<string>, slient: true): ComputedRef<string | undefined>;
export declare function useAbsolutePath(relativePath: MaybeRefOrGetter<string>, silent: true): ComputedRef<string | undefined>;
export declare function useAbsolutePath(relativePath: MaybeRefOrGetter<string>, slient?: false): ComputedRef<string>;
export declare function useAbsolutePath(relativePath: MaybeRefOrGetter<string>, silent?: false): ComputedRef<string>;

@@ -476,19 +476,3 @@ /**

*/
export declare function useFileUri(path: MaybeRefOrGetter<string>): ShallowReactive< {
readonly scheme: string;
readonly authority: string;
readonly path: string;
readonly query: string;
readonly fragment: string;
readonly fsPath: string;
with(change: {
scheme?: string | undefined;
authority?: string | undefined;
path?: string | undefined;
query?: string | undefined;
fragment?: string | undefined;
}): Uri;
toString(): string;
toJSON(): any;
}>;
export declare function useFileUri(path: MaybeRefOrGetter<string>): ComputedRef<Uri>;

@@ -510,3 +494,3 @@ /**

*/
export declare function useFsWatcher(globPattern: MaybeRefOrGetter<GlobPattern | GlobPattern[]>, ignoreCreateEvents?: MaybeNullableRefOrGetter<boolean>, ignoreChangeEvents?: MaybeNullableRefOrGetter<boolean>, ignoreDeleteEvents?: MaybeNullableRefOrGetter<boolean>): UseFSWatcher;
export declare function useFsWatcher(globPattern: MaybeRefOrGetter<GlobPattern | readonly GlobPattern[] | ReadonlySet<GlobPattern>>, ignoreCreateEvents?: MaybeNullableRefOrGetter<boolean>, ignoreChangeEvents?: MaybeNullableRefOrGetter<boolean>, ignoreDeleteEvents?: MaybeNullableRefOrGetter<boolean>): UseFSWatcher;

@@ -727,24 +711,2 @@ /**

/**
* @reactive `Uri`
* @category utilities
*/
export declare function useUri(uri: MaybeRefOrGetter<Uri>): ShallowReactive< {
readonly scheme: string;
readonly authority: string;
readonly path: string;
readonly query: string;
readonly fragment: string;
readonly fsPath: string;
with(change: {
scheme?: string | undefined;
authority?: string | undefined;
path?: string | undefined;
query?: string | undefined;
fragment?: string | undefined;
}): Uri;
toString(): string;
toJSON(): any;
}>;
/**
* Reactively set the badge of a view (`vscode::TreeView` or `vscode::WebviewView`).

@@ -751,0 +713,0 @@ *

649

dist/index.js

@@ -1,71 +0,71 @@

import { getCurrentScope as O, onScopeDispose as V, shallowRef as d, effectScope as K, computed as v, reactive as Q, toValue as r, watchEffect as b, watch as D, ref as x, shallowReactive as F, toRaw as z, isRef as Y } from "@reactive-vscode/reactivity";
import { getCurrentScope as N, onScopeDispose as P, shallowRef as d, effectScope as Q, computed as v, reactive as U, toValue as o, watchEffect as C, watch as b, ref as R, shallowReactive as q, toRaw as Y, isRef as G } from "@reactive-vscode/reactivity";
export * from "@reactive-vscode/reactivity";
import { workspace as w, commands as y, window as c, debug as I, extensions as R, comments as G, env as S, EventEmitter as L, tasks as p, Uri as X, languages as Z, ColorThemeKind as P, l10n as N } from "vscode";
import { workspace as D, commands as y, window as c, debug as W, extensions as V, comments as J, env as x, EventEmitter as O, tasks as E, Uri as X, languages as Z, ColorThemeKind as F, l10n as L } from "vscode";
function _(e) {
return O() ? (V(e), !0) : !1;
return N() ? (P(e), !0) : !1;
}
function W(e, t) {
function $(e, t) {
const n = /* @__PURE__ */ new Map();
return (...a) => {
const i = t(...a);
let o = n.get(i);
return o ? o.refCount++ : (o = {
let r = n.get(i);
return r ? r.refCount++ : (r = {
data: e(...a),
refCount: 1
}, n.set(i, o)), _(() => {
--o.refCount === 0 && n.delete(i);
}), o.data;
}, n.set(i, r)), _(() => {
--r.refCount === 0 && n.delete(i);
}), r.data;
};
}
function m(e) {
function h(e) {
let t;
return () => t ?? (t = e());
}
const $ = [];
const M = [];
function ve(e) {
M.push(e);
}
const k = d(null), I = Q();
function ge(e) {
$.push(e);
}
const E = d(null), A = K();
function he(e) {
return {
activate: (t) => (E.value = t, A.run(() => (M.map((n) => n(t)), e()))),
activate: (t) => (k.value = t, I.run(() => (j.map((n) => n(t)), e()))),
deactivate: () => {
$.map((t) => t()), A.stop();
M.map((t) => t()), I.stop();
}
};
}
const M = [];
function j(e) {
E.value ? e(E.value) : M.push(e);
const j = [];
function B(e) {
k.value ? e(k.value) : j.push(e);
}
function ee(e, t, n) {
const a = !e, i = w.getConfiguration(a ? void 0 : e, n);
function o(l, f) {
const h = d(f), C = v({
get: () => h.value,
set: (g) => {
h.value = g, i.update(l, g);
const a = !e, i = D.getConfiguration(a ? void 0 : e, n);
function r(l, g) {
const m = d(g), w = v({
get: () => m.value,
set: (f) => {
m.value = f, i.update(l, f);
}
});
return C.update = async (g, U, J) => {
await i.update(l, g, U, J), C.value = g;
}, C.set = (g) => {
h.value = g;
}, C;
return w.update = async (f, T, S) => {
await i.update(l, f, T, S), w.value = f;
}, w.set = (f) => {
m.value = f;
}, w;
}
const s = Object.fromEntries(
Object.keys(t).map((l) => [l, o(l, i.get(l))])
Object.keys(t).map((l) => [l, r(l, i.get(l))])
);
return j(() => {
u(w.onDidChangeConfiguration(
return B(() => {
u(D.onDidChangeConfiguration(
a ? (l) => {
const f = w.getConfiguration();
for (const h in t)
l.affectsConfiguration(h) && s[h].set(f.get(h));
const g = D.getConfiguration();
for (const m in t)
l.affectsConfiguration(m) && s[m].set(g.get(m));
} : (l) => {
if (!l.affectsConfiguration(e))
return;
const f = w.getConfiguration(e);
for (const h in t)
l.affectsConfiguration(`${e}.${h}`) && s[h].set(f.get(h));
const g = D.getConfiguration(e);
for (const m in t)
l.affectsConfiguration(`${e}.${m}`) && s[m].set(g.get(m));
}

@@ -77,23 +77,23 @@ ));

const a = ee(e, t, n);
return Q({
return U({
...a,
$update(i, o, s, l) {
return a[i].update(o, s, l);
$update(i, r, s, l) {
return a[i].update(r, s, l);
},
$set(i, o) {
return a[i].set(o);
$set(i, r) {
return a[i].set(r);
}
});
}
function Ce(e, t) {
const n = d(null), a = [], i = (o) => (...s) => n.value ? n.value[o](...s) : (a.push([o, s]), null);
return j(() => {
n.value = ue(e, t);
for (const [o, s] of a)
n.value[o](...s);
function he(e, t) {
const n = d(null), a = [], i = (r) => (...s) => n.value ? n.value[r](...s) : (a.push([r, s]), null);
return B(() => {
n.value = se(e, t);
for (const [r, s] of a)
n.value[r](...s);
}), {
logger: n,
outputChannel: v(() => {
var o;
return (o = n.value) == null ? void 0 : o.outputChannel;
var r;
return (r = n.value) == null ? void 0 : r.outputChannel;
}),

@@ -111,7 +111,7 @@ info: i("info"),

}
function be(e, ...t) {
function Ce(e, ...t) {
return y.executeCommand(e, ...t);
}
function te(e, t = !1) {
const n = E.value;
const n = k.value;
if (!n && !t)

@@ -121,9 +121,9 @@ throw new Error("Cannot get absolute path because the extension is not activated yet");

}
function we(e, t = !1) {
return v(() => te(r(e), t));
function be(e, t = !1) {
return v(() => te(o(e), t));
}
function u(e) {
return (O() ?? A).cleanups.push(e.dispose.bind(e)), e;
return (N() ?? I).cleanups.push(e.dispose.bind(e)), e;
}
const ne = m(() => {
const ne = h(() => {
const e = d(c.activeColorTheme);

@@ -133,8 +133,8 @@ return u(c.onDidChangeActiveColorTheme((t) => {

})), e;
}), De = m(() => {
const e = d(I.activeDebugSession);
return u(I.onDidChangeActiveDebugSession((t) => {
}), we = h(() => {
const e = d(W.activeDebugSession);
return u(W.onDidChangeActiveDebugSession((t) => {
e.value = t;
})), v(() => e.value);
}), ae = m(() => {
}), ae = h(() => {
const e = d(c.activeTextEditor);

@@ -147,12 +147,12 @@ return u(c.onDidChangeActiveTextEditor((t) => {

const a = "key" in t ? t : c.createTextEditorDecorationType(t);
b(() => {
C(() => {
var i;
(i = r(e)) == null || i.setDecorations(a, r(n));
(i = o(e)) == null || i.setDecorations(a, o(n));
});
}
function Te(e, t) {
function De(e, t) {
const n = ae();
ie(n, e, t);
}
const Se = m(() => {
const Te = h(() => {
const e = d(c.activeNotebookEditor);

@@ -162,3 +162,3 @@ return u(c.onDidChangeActiveNotebookEditor((t) => {

})), e;
}), pe = m(() => {
}), Se = h(() => {
const e = d(c.activeTerminal);

@@ -168,6 +168,6 @@ return u(c.onDidChangeActiveTerminal((t) => {

})), e;
}), Ee = m(() => {
const e = d(R.all);
return u(R.onDidChange(() => {
e.value = R.all;
}), pe = h(() => {
const e = d(V.all);
return u(V.onDidChange(() => {
e.value = V.all;
})), v(() => e.value);

@@ -182,17 +182,17 @@ });

}
function ke(e, t) {
return u(G.createCommentController(e, t));
function Ee(e, t) {
return u(J.createCommentController(e, t));
}
function B(e) {
function H(e) {
var n;
const t = d((n = r(e)) == null ? void 0 : n.state);
return D(e, () => {
const t = d((n = o(e)) == null ? void 0 : n.state);
return b(e, () => {
var a;
t.value = (a = r(e)) == null ? void 0 : a.state;
t.value = (a = o(e)) == null ? void 0 : a.state;
}), u(c.onDidChangeTerminalState((a) => {
a === r(e) && (t.value = a.state);
a === o(e) && (t.value = a.state);
})), v(() => t.value);
}
function ye(...e) {
const t = x(null);
function ke(...e) {
const t = R(null);
function n() {

@@ -207,3 +207,3 @@ return !!t.value && t.value.exitStatus == null;

}
function o() {
function r() {
a().show();

@@ -214,14 +214,14 @@ }

}
return V(s), {
return P(s), {
terminal: t,
getIsActive: n,
show: o,
show: r,
sendText: i,
close: s,
state: B(t)
state: H(t)
};
}
const Re = m(() => {
const e = d(S.shell);
return u(S.onDidChangeShell((t) => {
const Re = h(() => {
const e = d(x.shell);
return u(x.onDidChangeShell((t) => {
e.value = t;

@@ -232,20 +232,20 @@ })), v(() => e.value);

var n;
const t = d((n = r(e)) == null ? void 0 : n.getText());
return b(() => {
const t = d((n = o(e)) == null ? void 0 : n.getText());
return C(() => {
var a;
t.value = (a = r(e)) == null ? void 0 : a.getText();
}), u(w.onDidChangeTextDocument((a) => {
a.document === r(e) && (t.value = a.document.getText());
t.value = (a = o(e)) == null ? void 0 : a.getText();
}), u(D.onDidChangeTextDocument((a) => {
a.document === o(e) && (t.value = a.document.getText());
})), t;
}
function T(e, t) {
const n = (a, i, o) => {
u(e(a, i, o));
function p(e, t) {
const n = (a, i, r) => {
u(e(a, i, r));
};
return t == null || t.forEach((a) => n(a)), n;
}
function k(e, t = []) {
const n = Array.isArray(e) ? e : t ?? [], a = u(Array.isArray(e) || e == null ? new L() : e), i = T(a.event, n);
for (const o of n)
i(o);
function A(e, t = []) {
const n = Array.isArray(e) ? e : t ?? [], a = u(Array.isArray(e) || e == null ? new O() : e), i = p(a.event, n);
for (const r of n)
i(r);
return {

@@ -257,4 +257,4 @@ event: a.event,

}
async function Ve(e) {
const t = E.value.secrets, n = x(await t.get(e));
async function ye(e) {
const t = k.value.secrets, n = R(await t.get(e));
return n.set = async (a) => {

@@ -266,47 +266,16 @@ n.value = a, await t.store(e, a);

a.key === e && (n.value = await t.get(e));
})), D(n, (a) => {
})), b(n, (a) => {
a === void 0 ? t.delete(e) : t.store(e, a);
}), n;
}
function Ve(e) {
return v(() => E.fetchTasks(o(e)));
}
function Ie(e) {
return v(() => p.fetchTasks(r(e)));
return v(() => X.file(o(e)));
}
function oe(e) {
return F({
get scheme() {
return r(e).scheme;
},
get authority() {
return r(e).authority;
},
get path() {
return r(e).path;
},
get query() {
return r(e).query;
},
get fragment() {
return r(e).fragment;
},
get fsPath() {
return r(e).fsPath;
},
with(t) {
return r(e).with(t);
},
toString() {
return r(e).toString();
},
toJSON() {
return r(e).toJSON();
}
});
}
function Pe(e) {
return oe(() => X.file(r(e)));
}
function Ne(e, t) {
const n = new L(), a = d();
b(() => {
a.value && n.fire(), a.value = r(t);
function Pe(e, t) {
const n = new O(), a = d();
C(() => {
a.value && n.fire(), a.value = o(t);
}), u(Z.registerFoldingRangeProvider(

@@ -316,5 +285,5 @@ e,

onDidChangeFoldingRanges: n.event,
provideFoldingRanges(i, o, s) {
provideFoldingRanges(i, r, s) {
var l;
return (l = a.value) == null ? void 0 : l.call(a, i, o, s);
return (l = a.value) == null ? void 0 : l.call(a, i, r, s);
}

@@ -324,25 +293,32 @@ }

}
function Oe(e, t, n, a) {
const i = F(/* @__PURE__ */ new Map()), o = k(), s = k(), l = k();
return b(() => {
const f = r(e), h = Array.isArray(f) ? f : [f];
for (const [C, g] of i)
h.includes(C) || (g.dispose(), i.delete(C));
for (const C of h)
if (!i.has(C)) {
const g = w.createFileSystemWatcher(
C,
r(t) || !1,
r(n) || !1,
r(a) || !1
function We(e, t, n, a) {
const i = q(/* @__PURE__ */ new Map()), r = A(), s = A(), l = A(), g = v(() => {
const f = o(e);
return Array.isArray(f) ? f : f instanceof Set ? Array.from(f) : [f];
});
function m() {
const f = g.value;
for (const [T, S] of i)
f.includes(T) || (S.dispose(), i.delete(T));
for (const T of f)
if (!i.has(T)) {
const S = D.createFileSystemWatcher(
T,
o(t) || !1,
o(n) || !1,
o(a) || !1
);
g.onDidCreate(o.fire), g.onDidChange(s.fire), g.onDidDelete(l.fire);
S.onDidCreate(r.fire), S.onDidChange(s.fire), S.onDidDelete(l.fire);
}
}), V(() => {
}
function w() {
for (const f of i.values())
f.dispose();
i.clear();
}), {
}
return b(g, m), b([t, n, a], () => {
w(), m();
}), P(w), {
watchers: i,
onDidCreate: o.event,
onDidCreate: r.event,
onDidChange: s.event,

@@ -352,25 +328,25 @@ onDidDelete: l.event

}
const Fe = m(() => {
const Fe = h(() => {
const e = ne();
return v(() => e.value.kind === P.Dark || e.value.kind === P.HighContrast);
}), Le = m(() => {
const e = d(S.isTelemetryEnabled);
return u(S.onDidChangeTelemetryEnabled((t) => {
return v(() => e.value.kind === F.Dark || e.value.kind === F.HighContrast);
}), Le = h(() => {
const e = d(x.isTelemetryEnabled);
return u(x.onDidChangeTelemetryEnabled((t) => {
e.value = t;
})), v(() => e.value);
});
function We(e, ...t) {
return v(() => typeof t[0] == "object" ? N.t(r(e), z(t[0])) : N.t(r(e), ...t.map(r)));
function Ne(e, ...t) {
return v(() => typeof t[0] == "object" ? L.t(o(e), Y(t[0])) : L.t(o(e), ...t.map(o)));
}
function se(e, t) {
function oe(e, t) {
return u(c.createOutputChannel(e, t));
}
function $e(e) {
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"), o = String(t.getHours()).padStart(2, "0"), s = String(t.getMinutes()).padStart(2, "0"), l = String(t.getSeconds()).padStart(2, "0"), f = String(t.getMilliseconds()).padStart(3, "0");
return `${n}-${a}-${i} ${o}:${s}:${l}.${f} [${e}] `;
function Oe(e) {
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"), l = String(t.getSeconds()).padStart(2, "0"), g = String(t.getMilliseconds()).padStart(3, "0");
return `${n}-${a}-${i} ${r}:${s}:${l}.${g} [${e}] `;
}
function ue(e, t = {}) {
const n = t.outputChannel ?? se(e), a = (i) => (...o) => {
function se(e, t = {}) {
const n = t.outputChannel ?? oe(e), a = (i) => (...r) => {
var s;
n.appendLine((((s = t.getPrefix) == null ? void 0 : s.call(t, i)) ?? "") + o.join(" "));
n.appendLine((((s = t.getPrefix) == null ? void 0 : s.call(t, i)) ?? "") + r.join(" "));
};

@@ -391,16 +367,16 @@ return {

}
const Me = m(() => {
const e = d(S.logLevel);
return u(S.onDidChangeLogLevel((t) => {
const $e = h(() => {
const e = d(x.logLevel);
return u(x.onDidChangeLogLevel((t) => {
e.value = t;
})), v(() => e.value);
});
function ce(e) {
function ue(e) {
var n;
const t = d(((n = r(e)) == null ? void 0 : n.selections) ?? []);
return D(e, () => {
const t = d(((n = o(e)) == null ? void 0 : n.selections) ?? []);
return b(e, () => {
var a;
t.value = ((a = r(e)) == null ? void 0 : a.selections) ?? [];
t.value = ((a = o(e)) == null ? void 0 : a.selections) ?? [];
}), u(c.onDidChangeNotebookEditorSelection((a) => {
a.notebookEditor === r(e) && (t.value = a.selections);
a.notebookEditor === o(e) && (t.value = a.selections);
})), v({

@@ -412,3 +388,3 @@ get() {

t.value = a;
const i = r(e);
const i = o(e);
i && (i.selections = a);

@@ -418,4 +394,4 @@ }

}
function je(e) {
const t = ce(e);
function Me(e) {
const t = ue(e);
return v({

@@ -430,13 +406,13 @@ get() {

}
function Be(e) {
function je(e) {
var n;
const t = d(((n = r(e)) == null ? void 0 : n.visibleRanges) ?? []);
return D(e, () => {
const t = d(((n = o(e)) == null ? void 0 : n.visibleRanges) ?? []);
return b(e, () => {
var a;
t.value = ((a = r(e)) == null ? void 0 : a.visibleRanges) ?? [];
t.value = ((a = o(e)) == null ? void 0 : a.visibleRanges) ?? [];
}), u(c.onDidChangeNotebookEditorVisibleRanges((a) => {
a.notebookEditor === r(e) && (t.value = a.visibleRanges);
a.notebookEditor === o(e) && (t.value = a.visibleRanges);
})), v(() => t.value);
}
const He = m(() => {
const Be = h(() => {
const e = d(c.terminals);

@@ -448,4 +424,4 @@ function t() {

});
function qe(e = {}) {
const t = u(c.createQuickPick()), n = T(t.onDidChangeActive), a = T(t.onDidChangeSelection), i = T(t.onDidAccept), o = T(t.onDidHide), s = T(t.onDidTriggerButton), l = T(t.onDidChangeValue);
function He(e = {}) {
const t = u(c.createQuickPick()), n = p(t.onDidChangeActive), a = p(t.onDidChangeSelection), i = p(t.onDidAccept), r = p(t.onDidHide), s = p(t.onDidTriggerButton), l = p(t.onDidChangeValue);
[

@@ -465,11 +441,11 @@ "items",

"keepScrollPosition"
].forEach((g) => {
e[g] && b(() => t[g] = r(e[g]));
].forEach((f) => {
e[f] && C(() => t[f] = o(e[f]));
}), e.value && (t.value = e.value);
const f = d(t.value);
l((g) => f.value = g), e.activeItems && (t.activeItems = e.activeItems);
const h = d(t.activeItems);
n((g) => h.value = g), e.selectedItems && (t.selectedItems = e.selectedItems);
const C = d(t.selectedItems);
return a((g) => C.value = g), {
const g = d(t.value);
l((f) => g.value = f), e.activeItems && (t.activeItems = e.activeItems);
const m = d(t.activeItems);
n((f) => m.value = f), e.selectedItems && (t.selectedItems = e.selectedItems);
const w = d(t.selectedItems);
return a((f) => w.value = f), {
...t,

@@ -479,15 +455,15 @@ onDidChangeActive: n,

onDidAccept: i,
onDidHide: o,
onDidHide: r,
onDidTriggerButton: s,
onDidChangeValue: l,
value: f,
activeItems: h,
selectedItems: C
value: g,
activeItems: m,
selectedItems: w
};
}
function Ue(e) {
function ze(e) {
const t = u(e.id ? c.createStatusBarItem(e.id, e.alignment, e.priority) : c.createStatusBarItem(e.alignment, e.priority));
function n(a) {
const i = e[a];
i != null && b(() => t[a] = r(i));
i != null && C(() => t[a] = o(i));
}

@@ -504,10 +480,10 @@ return [

}
const Je = m(() => {
const e = d(p.taskExecutions);
const Ke = h(() => {
const e = d(E.taskExecutions);
function t() {
e.value = p.taskExecutions;
e.value = E.taskExecutions;
}
return u(p.onDidStartTask(t)), u(p.onDidEndTask(t)), v(() => e.value);
return u(E.onDidStartTask(t)), u(E.onDidEndTask(t)), v(() => e.value);
});
function Ke(...e) {
function Qe(...e) {
const t = u(c.createTerminal(...e));

@@ -531,21 +507,21 @@ return {

hide: t.hide.bind(t),
state: B(t)
state: H(t)
};
}
function le(e, t) {
function ce(e, t) {
u(y.registerTextEditorCommand(e, t));
}
function Qe(e) {
function Ue(e) {
for (const [t, n] of Object.entries(e))
le(t, n);
ce(t, n);
}
function de(e, t) {
function le(e, t) {
var a;
const n = d(((a = r(e)) == null ? void 0 : a.selections) ?? []);
return D(e, () => {
const n = d(((a = o(e)) == null ? void 0 : a.selections) ?? []);
return b(e, () => {
var i;
n.value = ((i = r(e)) == null ? void 0 : i.selections) ?? [];
n.value = ((i = o(e)) == null ? void 0 : i.selections) ?? [];
}), u(c.onDidChangeTextEditorSelection((i) => {
const o = r(e), s = r(t);
i.textEditor === o && (!s || s.includes(i.kind)) && (n.value = i.selections);
const r = o(e), s = o(t);
i.textEditor === r && (!s || s.includes(i.kind)) && (n.value = i.selections);
})), v({

@@ -557,9 +533,9 @@ get() {

n.value = i;
const o = r(e);
o && (o.selections = i);
const r = o(e);
r && (r.selections = i);
}
});
}
function ze(e, t) {
const n = de(e, t);
function qe(e, t) {
const n = le(e, t);
return v({

@@ -576,8 +552,8 @@ get() {

var n;
const t = d((n = r(e)) == null ? void 0 : n.viewColumn);
return D(e, () => {
const t = d((n = o(e)) == null ? void 0 : n.viewColumn);
return b(e, () => {
var a;
t.value = (a = r(e)) == null ? void 0 : a.viewColumn;
t.value = (a = o(e)) == null ? void 0 : a.viewColumn;
}), u(c.onDidChangeTextEditorViewColumn((a) => {
a.textEditor === r(e) && (t.value = a.viewColumn);
a.textEditor === o(e) && (t.value = a.viewColumn);
})), v(() => t.value);

@@ -587,27 +563,27 @@ }

var n;
const t = d(((n = r(e)) == null ? void 0 : n.visibleRanges) ?? []);
return D(e, () => {
const t = d(((n = o(e)) == null ? void 0 : n.visibleRanges) ?? []);
return b(e, () => {
var a;
t.value = ((a = r(e)) == null ? void 0 : a.visibleRanges) ?? [];
t.value = ((a = o(e)) == null ? void 0 : a.visibleRanges) ?? [];
}), u(c.onDidChangeTextEditorVisibleRanges((a) => {
a.textEditor === r(e) && (t.value = a.visibleRanges);
a.textEditor === o(e) && (t.value = a.visibleRanges);
})), v(() => t.value);
}
function H(e, t) {
b(() => {
const n = r(e);
n && (n.badge = r(t));
function z(e, t) {
C(() => {
const n = o(e);
n && (n.badge = o(t));
});
}
function q(e, t) {
b(() => {
const n = r(e);
n && (n.title = r(t));
function K(e, t) {
C(() => {
const n = o(e);
n && (n.title = o(t));
});
}
const Xe = W(
const Je = $(
(e, t, n) => {
const a = k();
D(t, () => a.fire()), n != null && n.watchSource && D(n.watchSource, () => a.fire());
const i = /* @__PURE__ */ new WeakMap(), o = u(c.createTreeView(e, {
const a = A();
b(t, () => a.fire()), n != null && n.watchSource && b(n.watchSource, () => a.fire());
const i = /* @__PURE__ */ new WeakMap(), r = u(c.createTreeView(e, {
...n,

@@ -622,3 +598,3 @@ treeDataProvider: {

var l;
return s ? ((l = s.children) == null || l.forEach((f) => i.set(f, s)), s.children) : r(t);
return s ? ((l = s.children) == null || l.forEach((g) => i.set(g, s)), s.children) : o(t);
},

@@ -630,22 +606,22 @@ getParent(s) {

}));
return n != null && n.title && q(o, n.title), n != null && n.badge && H(o, n.badge), o;
return n != null && n.title && K(r, n.title), n != null && n.badge && z(r, n.badge), r;
},
(e) => e
);
function Ze(e) {
function Xe(e) {
var a;
const t = x((a = r(e)) == null ? void 0 : a.visible);
const t = R((a = o(e)) == null ? void 0 : a.visible);
function n() {
var i;
t.value = (i = r(e)) == null ? void 0 : i.visible;
t.value = (i = o(e)) == null ? void 0 : i.visible;
}
return b((i) => {
const o = r(e);
if (o) {
const s = o.onDidChangeVisibility(n);
return C((i) => {
const r = o(e);
if (r) {
const s = r.onDidChangeVisibility(n);
i(() => s.dispose());
}
}), b(n), v(() => !!t.value);
}), C(n), v(() => !!t.value);
}
const _e = m(() => {
const Ze = h(() => {
const e = d(c.visibleNotebookEditors);

@@ -655,3 +631,3 @@ return u(c.onDidChangeVisibleNotebookEditors((t) => {

})), e;
}), et = m(() => {
}), _e = h(() => {
const e = d(c.visibleTextEditors);

@@ -662,9 +638,9 @@ return u(c.onDidChangeVisibleTextEditors((t) => {

});
function tt(e, t, n = !0) {
const a = Y(t) ? t : typeof t == "function" ? v(t) : x(t);
return b(() => {
r(n) && y.executeCommand("setContext", e, a.value);
function et(e, t, n = !0) {
const a = G(t) ? t : typeof t == "function" ? v(t) : R(t);
return C(() => {
o(n) && y.executeCommand("setContext", e, a.value);
}), a;
}
const nt = W(
const tt = $(
(e, t, n) => {

@@ -675,4 +651,4 @@ const a = d(), i = d();

{
resolveWebviewView(f, h) {
a.value = f, i.value = h, n != null && n.onDidReceiveMessage && f.webview.onDidReceiveMessage(n.onDidReceiveMessage);
resolveWebviewView(g, m) {
a.value = g, i.value = m, n != null && n.onDidReceiveMessage && g.webview.onDidReceiveMessage(n.onDidReceiveMessage);
}

@@ -686,18 +662,18 @@ },

));
const o = x(0);
const r = R(0);
function s() {
o.value++;
r.value++;
}
if (b(() => {
a.value && (a.value.webview.html = `${r(t)}<!--${o.value}-->`);
if (C(() => {
a.value && (a.value.webview.html = `${o(t)}<!--${r.value}-->`);
}), n != null && n.webviewOptions) {
const f = n.webviewOptions;
b(() => {
a.value && (a.value.webview.options = r(f));
const g = n.webviewOptions;
C(() => {
a.value && (a.value.webview.options = o(g));
});
}
n != null && n.title && q(a, n.title), n != null && n.badge && H(a, n.badge);
function l(f) {
var h;
return (h = a.value) == null ? void 0 : h.webview.postMessage(f);
n != null && n.title && K(a, n.title), n != null && n.badge && z(a, n.badge);
function l(g) {
var m;
return (m = a.value) == null ? void 0 : m.webview.postMessage(g);
}

@@ -707,3 +683,3 @@ return { view: a, context: i, postMessage: l, forceRefresh: s };

(e) => e
), at = m(() => {
), nt = h(() => {
const e = d(c.state);

@@ -716,36 +692,36 @@ return u(c.onDidChangeWindowState((t) => {

};
}), it = m(() => {
const e = d(w.workspaceFolders);
return u(w.onDidChangeWorkspaceFolders(() => {
e.value = w.workspaceFolders;
}), at = h(() => {
const e = d(D.workspaceFolders);
return u(D.onDidChangeWorkspaceFolders(() => {
e.value = D.workspaceFolders;
})), v(() => e.value);
});
export {
M as activateCbs,
W as createKeyedComposable,
m as createSingletonComposable,
$ as deactivateCbs,
j as activateCbs,
$ as createKeyedComposable,
h as createSingletonComposable,
M as deactivateCbs,
me as defineConfigObject,
ee as defineConfigs,
he as defineExtension,
Ce as defineLogger,
be as executeCommand,
E as extensionContext,
A as extensionScope,
$e as getDefaultLoggerPrefix,
j as onActivate,
ge as onDeactivate,
ge as defineExtension,
he as defineLogger,
Ce as executeCommand,
k as extensionContext,
I as extensionScope,
Oe as getDefaultLoggerPrefix,
B as onActivate,
ve as onDeactivate,
_ as tryOnScopeDispose,
we as useAbsolutePath,
be as useAbsolutePath,
ne as useActiveColorTheme,
De as useActiveDebugSession,
Te as useActiveEditorDecorations,
Se as useActiveNotebookEditor,
pe as useActiveTerminal,
we as useActiveDebugSession,
De as useActiveEditorDecorations,
Te as useActiveNotebookEditor,
Se as useActiveTerminal,
ae as useActiveTextEditor,
Ee as useAllExtensions,
pe as useAllExtensions,
re as useCommand,
xe as useCommands,
ke as useCommentController,
ye as useControlledTerminal,
Ee as useCommentController,
ke as useControlledTerminal,
Re as useDefaultShell,

@@ -755,41 +731,40 @@ u as useDisposable,

ie as useEditorDecorations,
T as useEvent,
k as useEventEmitter,
Ve as useExtensionSecret,
Ie as useFetchTasks,
Pe as useFileUri,
Ne as useFoldingRangeProvider,
Oe as useFsWatcher,
p as useEvent,
A as useEventEmitter,
ye as useExtensionSecret,
Ve as useFetchTasks,
Ie as useFileUri,
Pe as useFoldingRangeProvider,
We as useFsWatcher,
Fe as useIsDarkTheme,
Le as useIsTelemetryEnabled,
We as useL10nText,
Me as useLogLevel,
ue as useLogger,
je as useNotebookEditorSelection,
ce as useNotebookEditorSelections,
Be as useNotebookEditorVisibleRanges,
He as useOpenedTerminals,
se as useOutputChannel,
qe as useQuickPick,
Ue as useStatusBarItem,
Je as useTaskExecutions,
Ke as useTerminal,
B as useTerminalState,
le as useTextEditorCommand,
Qe as useTextEditorCommands,
ze as useTextEditorSelection,
de as useTextEditorSelections,
Ne as useL10nText,
$e as useLogLevel,
se as useLogger,
Me as useNotebookEditorSelection,
ue as useNotebookEditorSelections,
je as useNotebookEditorVisibleRanges,
Be as useOpenedTerminals,
oe as useOutputChannel,
He as useQuickPick,
ze as useStatusBarItem,
Ke as useTaskExecutions,
Qe as useTerminal,
H as useTerminalState,
ce as useTextEditorCommand,
Ue as useTextEditorCommands,
qe as useTextEditorSelection,
le as useTextEditorSelections,
Ye as useTextEditorViewColumn,
Ge as useTextEditorVisibleRanges,
Xe as useTreeView,
oe as useUri,
H as useViewBadge,
q as useViewTitle,
Ze as useViewVisibility,
_e as useVisibleNotebookEditors,
et as useVisibleTextEditors,
tt as useVscodeContext,
nt as useWebviewView,
at as useWindowState,
it as useWorkspaceFolders
Je as useTreeView,
z as useViewBadge,
K as useViewTitle,
Xe as useViewVisibility,
Ze as useVisibleNotebookEditors,
_e as useVisibleTextEditors,
et as useVscodeContext,
tt as useWebviewView,
nt as useWindowState,
at as useWorkspaceFolders
};
{
"name": "reactive-vscode",
"type": "module",
"version": "0.2.0-beta.9",
"version": "0.2.0",
"description": "Develop VSCode extension with Vue Reactivity API",

@@ -40,3 +40,3 @@ "author": "_Kerman <kermanx@qq.com>",

"dependencies": {
"@reactive-vscode/reactivity": "0.2.0-beta.9"
"@reactive-vscode/reactivity": "0.2.0"
},

@@ -43,0 +43,0 @@ "devDependencies": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc