reactive-vscode
Advanced tools
Comparing version 0.2.7-beta.1 to 0.2.7
@@ -1,5 +0,5 @@ | ||
import { getCurrentScope as z, onScopeDispose as M, effectScope as K, shallowRef as g, computed as h, toValue as s, watchEffect as C, watch as D, ref as x, shallowReactive as _, toRaw as ee, isRef as te } from "@reactive-vscode/reactivity"; | ||
import { getCurrentScope as z, onScopeDispose as M, effectScope as K, shallowRef as g, computed as h, reactive as _, toValue as s, watchEffect as C, watch as D, ref as x, shallowReactive as ee, toRaw as te, isRef as ne } from "@reactive-vscode/reactivity"; | ||
export * from "@reactive-vscode/reactivity"; | ||
import { workspace as S, commands as I, window as f, debug as j, extensions as O, comments as ne, env as p, EventEmitter as Q, tasks as k, Uri as ie, languages as ae, ColorThemeKind as H, l10n as B } from "vscode"; | ||
function re(e) { | ||
import { workspace as S, commands as I, window as f, debug as j, extensions as O, comments as ie, env as p, EventEmitter as Q, tasks as k, Uri as ae, languages as re, ColorThemeKind as H, l10n as B } from "vscode"; | ||
function se(e) { | ||
return z() ? (M(e), !0) : !1; | ||
@@ -15,3 +15,3 @@ } | ||
refCount: 1 | ||
}, n.set(a, u)), re(() => { | ||
}, n.set(a, u)), se(() => { | ||
--u.refCount === 0 && n.delete(a); | ||
@@ -26,7 +26,7 @@ }), u.data; | ||
const q = []; | ||
function De(e) { | ||
function Te(e) { | ||
q.push(e); | ||
} | ||
const R = g(null), $ = K(); | ||
function Te(e) { | ||
function Se(e) { | ||
return { | ||
@@ -43,3 +43,3 @@ activate: (t) => (R.value = t, $.run(() => (Y.map((n) => n(t)), e(t)))), | ||
} | ||
function se(e, t, n) { | ||
function ue(e, t, n) { | ||
const i = !e, a = S.getConfiguration(i ? void 0 : e, n); | ||
@@ -78,4 +78,4 @@ function u(c, l) { | ||
} | ||
function Se(e, t, n) { | ||
const i = se(e, t, n), a = {}, u = { | ||
function xe(e, t, n) { | ||
const i = ue(e, t, n), a = {}, u = _({ | ||
$update(r, c, l, v) { | ||
@@ -87,3 +87,3 @@ return i[r].update(c, l, v); | ||
} | ||
}; | ||
}); | ||
for (const r in t) { | ||
@@ -130,6 +130,6 @@ const c = r.split("."); | ||
} | ||
function xe(e, t) { | ||
function Ee(e, t) { | ||
const n = g(null), i = [], a = (u) => (...r) => n.value ? n.value[u](...r) : (i.push([u, r]), null); | ||
return G(() => { | ||
n.value = ge(e, t); | ||
n.value = he(e, t); | ||
for (const [u, r] of i) | ||
@@ -154,6 +154,6 @@ n.value[u](...r); | ||
} | ||
function Ee(e, ...t) { | ||
function pe(e, ...t) { | ||
return I.executeCommand(e, ...t); | ||
} | ||
function ue(e, t = !1) { | ||
function ce(e, t = !1) { | ||
const n = R.value; | ||
@@ -164,4 +164,4 @@ if (!n && !t) | ||
} | ||
function pe(e, t = !1) { | ||
return h(() => ue(s(e), t)); | ||
function ke(e, t = !1) { | ||
return h(() => ce(s(e), t)); | ||
} | ||
@@ -171,3 +171,3 @@ function o(e) { | ||
} | ||
const ce = w(() => { | ||
const oe = w(() => { | ||
const e = g(f.activeColorTheme); | ||
@@ -177,3 +177,3 @@ return o(f.onDidChangeActiveColorTheme((t) => { | ||
})), e; | ||
}), ke = w(() => { | ||
}), Re = w(() => { | ||
const e = g(j.activeDebugSession); | ||
@@ -183,3 +183,3 @@ return o(j.onDidChangeActiveDebugSession((t) => { | ||
})), h(() => e.value); | ||
}), oe = w(() => { | ||
}), le = w(() => { | ||
const e = g(f.activeTextEditor); | ||
@@ -190,3 +190,3 @@ return o(f.onDidChangeActiveTextEditor((t) => { | ||
}); | ||
function le(e) { | ||
function de(e) { | ||
var n; | ||
@@ -201,3 +201,3 @@ const t = g((n = s(e)) == null ? void 0 : n.getText()); | ||
} | ||
function de(e, t, n, i = {}) { | ||
function fe(e, t, n, i = {}) { | ||
const { | ||
@@ -211,3 +211,3 @@ updateOn: a = ["effect", "documentChanged"] | ||
); | ||
}, c = a.includes("documentChanged") ? le(() => { | ||
}, c = a.includes("documentChanged") ? de(() => { | ||
var l; | ||
@@ -225,7 +225,7 @@ return (l = s(e)) == null ? void 0 : l.document; | ||
} | ||
function Re(e, t) { | ||
const n = oe(); | ||
de(n, e, t); | ||
function ye(e, t) { | ||
const n = le(); | ||
fe(n, e, t); | ||
} | ||
const ye = w(() => { | ||
const Ae = w(() => { | ||
const e = g(f.activeNotebookEditor); | ||
@@ -235,3 +235,3 @@ return o(f.onDidChangeActiveNotebookEditor((t) => { | ||
})), e; | ||
}), Ae = w(() => { | ||
}), Ve = w(() => { | ||
const e = g(f.activeTerminal); | ||
@@ -241,3 +241,3 @@ return o(f.onDidChangeActiveTerminal((t) => { | ||
})), e; | ||
}), Ve = w(() => { | ||
}), Ie = w(() => { | ||
const e = g(O.all); | ||
@@ -248,11 +248,11 @@ return o(O.onDidChange(() => { | ||
}); | ||
function fe(e, t) { | ||
function ve(e, t) { | ||
o(I.registerCommand(e, t)); | ||
} | ||
function Ie(e) { | ||
function Pe(e) { | ||
for (const [t, n] of Object.entries(e)) | ||
n && fe(t, n); | ||
n && ve(t, n); | ||
} | ||
function Pe(e, t) { | ||
return o(ne.createCommentController(e, t)); | ||
function We(e, t) { | ||
return o(ie.createCommentController(e, t)); | ||
} | ||
@@ -269,3 +269,3 @@ function J(e) { | ||
} | ||
function We(...e) { | ||
function Oe(...e) { | ||
const t = x(null); | ||
@@ -296,3 +296,3 @@ function n() { | ||
} | ||
const Oe = w(() => { | ||
const $e = w(() => { | ||
const e = g(p.shell); | ||
@@ -319,3 +319,3 @@ return o(p.onDidChangeShell((t) => { | ||
} | ||
async function $e(e) { | ||
async function Me(e) { | ||
const t = R.value.secrets, n = x(await t.get(e)); | ||
@@ -332,13 +332,13 @@ return n.set = async (i) => { | ||
} | ||
function Me(e) { | ||
function Fe(e) { | ||
return h(() => k.fetchTasks(s(e))); | ||
} | ||
function Fe(e) { | ||
return h(() => ie.file(s(e))); | ||
function Le(e) { | ||
return h(() => ae.file(s(e))); | ||
} | ||
function Le(e, t) { | ||
function Ne(e, t) { | ||
const n = new Q(), i = g(); | ||
C(() => { | ||
i.value && n.fire(), i.value = s(t); | ||
}), o(ae.registerFoldingRangeProvider( | ||
}), o(re.registerFoldingRangeProvider( | ||
e, | ||
@@ -354,4 +354,4 @@ { | ||
} | ||
function Ne(e, t, n, i) { | ||
const a = _(/* @__PURE__ */ new Map()), u = V(), r = V(), c = V(), l = h(() => { | ||
function je(e, t, n, i) { | ||
const a = ee(/* @__PURE__ */ new Map()), u = V(), r = V(), c = V(), l = h(() => { | ||
const d = s(e); | ||
@@ -396,6 +396,6 @@ return Array.isArray(d) ? d : d instanceof Set ? Array.from(d) : [d]; | ||
} | ||
const je = w(() => { | ||
const e = ce(); | ||
const He = w(() => { | ||
const e = oe(); | ||
return h(() => e.value.kind === H.Dark || e.value.kind === H.HighContrast); | ||
}), He = w(() => { | ||
}), Be = w(() => { | ||
const e = g(p.isTelemetryEnabled); | ||
@@ -406,14 +406,14 @@ return o(p.onDidChangeTelemetryEnabled((t) => { | ||
}); | ||
function Be(e, ...t) { | ||
return h(() => typeof t[0] == "object" ? B.t(s(e), ee(t[0])) : B.t(s(e), ...t.map(s))); | ||
function ze(e, ...t) { | ||
return h(() => typeof t[0] == "object" ? B.t(s(e), te(t[0])) : B.t(s(e), ...t.map(s))); | ||
} | ||
function ve(e, t) { | ||
function ge(e, t) { | ||
return o(f.createOutputChannel(e, t)); | ||
} | ||
function ze(e) { | ||
function Ke(e) { | ||
const t = /* @__PURE__ */ new Date(), n = String(t.getFullYear()).padStart(4, "0"), i = String(t.getMonth() + 1).padStart(2, "0"), a = String(t.getDate()).padStart(2, "0"), u = String(t.getHours()).padStart(2, "0"), r = String(t.getMinutes()).padStart(2, "0"), c = String(t.getSeconds()).padStart(2, "0"), l = String(t.getMilliseconds()).padStart(3, "0"); | ||
return `${n}-${i}-${a} ${u}:${r}:${c}.${l} [${e}] `; | ||
} | ||
function ge(e, t = {}) { | ||
const n = t.outputChannel ?? ve(e), i = (a) => (...u) => { | ||
function he(e, t = {}) { | ||
const n = t.outputChannel ?? ge(e), i = (a) => (...u) => { | ||
var r; | ||
@@ -436,3 +436,3 @@ n.appendLine((((r = t.getPrefix) == null ? void 0 : r.call(t, a)) ?? "") + u.join(" ")); | ||
} | ||
const Ke = w(() => { | ||
const Qe = w(() => { | ||
const e = g(p.logLevel); | ||
@@ -443,3 +443,3 @@ return o(p.onDidChangeLogLevel((t) => { | ||
}); | ||
function he(e) { | ||
function me(e) { | ||
var n; | ||
@@ -463,4 +463,4 @@ const t = g(((n = s(e)) == null ? void 0 : n.selections) ?? []); | ||
} | ||
function Qe(e) { | ||
const t = he(e); | ||
function Ue(e) { | ||
const t = me(e); | ||
return h({ | ||
@@ -475,3 +475,3 @@ get() { | ||
} | ||
function Ue(e) { | ||
function qe(e) { | ||
var n; | ||
@@ -486,3 +486,3 @@ const t = g(((n = s(e)) == null ? void 0 : n.visibleRanges) ?? []); | ||
} | ||
const qe = w(() => { | ||
const Ye = w(() => { | ||
const e = g(f.terminals); | ||
@@ -494,3 +494,3 @@ function t() { | ||
}); | ||
function Ye(e = {}) { | ||
function Ge(e = {}) { | ||
const t = o(f.createQuickPick()), n = E(t.onDidChangeActive), i = E(t.onDidChangeSelection), a = E(t.onDidAccept), u = E(t.onDidHide), r = E(t.onDidTriggerButton), c = E(t.onDidChangeValue); | ||
@@ -532,3 +532,3 @@ [ | ||
} | ||
function Ge(e) { | ||
function Je(e) { | ||
const t = o(e.id ? f.createStatusBarItem(e.id, e.alignment, e.priority) : f.createStatusBarItem(e.alignment, e.priority)); | ||
@@ -549,3 +549,3 @@ function n(i) { | ||
} | ||
const Je = w(() => { | ||
const Xe = w(() => { | ||
const e = g(k.taskExecutions); | ||
@@ -557,3 +557,3 @@ function t() { | ||
}); | ||
function Xe(...e) { | ||
function Ze(...e) { | ||
const t = o(f.createTerminal(...e)); | ||
@@ -583,10 +583,10 @@ return { | ||
} | ||
function me(e, t) { | ||
function be(e, t) { | ||
o(I.registerTextEditorCommand(e, t)); | ||
} | ||
function Ze(e) { | ||
function _e(e) { | ||
for (const [t, n] of Object.entries(e)) | ||
me(t, n); | ||
be(t, n); | ||
} | ||
function be(e, t) { | ||
function we(e, t) { | ||
var i; | ||
@@ -611,4 +611,4 @@ const n = g(((i = s(e)) == null ? void 0 : i.selections) ?? []); | ||
} | ||
function _e(e, t) { | ||
const n = be(e, t); | ||
function et(e, t) { | ||
const n = we(e, t); | ||
return h({ | ||
@@ -623,3 +623,3 @@ get() { | ||
} | ||
function et(e) { | ||
function tt(e) { | ||
var n; | ||
@@ -634,3 +634,3 @@ const t = g((n = s(e)) == null ? void 0 : n.viewColumn); | ||
} | ||
function tt(e) { | ||
function nt(e) { | ||
var n; | ||
@@ -657,3 +657,3 @@ const t = g(((n = s(e)) == null ? void 0 : n.visibleRanges) ?? []); | ||
} | ||
const nt = U( | ||
const it = U( | ||
(e, t, n) => { | ||
@@ -683,3 +683,3 @@ const i = V(); | ||
); | ||
function it(e) { | ||
function at(e) { | ||
var i; | ||
@@ -699,3 +699,3 @@ const t = x((i = s(e)) == null ? void 0 : i.visible); | ||
} | ||
const at = w(() => { | ||
const rt = w(() => { | ||
const e = g(f.visibleNotebookEditors); | ||
@@ -705,3 +705,3 @@ return o(f.onDidChangeVisibleNotebookEditors((t) => { | ||
})), e; | ||
}), rt = w(() => { | ||
}), st = w(() => { | ||
const e = g(f.visibleTextEditors); | ||
@@ -712,4 +712,4 @@ return o(f.onDidChangeVisibleTextEditors((t) => { | ||
}); | ||
function st(e, t, n = !0) { | ||
const i = te(t) ? t : typeof t == "function" ? h(t) : x(t); | ||
function ut(e, t, n = !0) { | ||
const i = ne(t) ? t : typeof t == "function" ? h(t) : x(t); | ||
return C(() => { | ||
@@ -719,3 +719,3 @@ s(n) && I.executeCommand("setContext", e, i.value); | ||
} | ||
function ut(e, t, n, i, a) { | ||
function ct(e, t, n, i, a) { | ||
const u = g(), r = o(f.createWebviewPanel( | ||
@@ -753,3 +753,3 @@ e, | ||
} | ||
const ct = U( | ||
const ot = U( | ||
(e, t, n) => { | ||
@@ -790,3 +790,3 @@ const i = g(), a = g(); | ||
(e) => e | ||
), ot = w(() => { | ||
), lt = w(() => { | ||
const e = g(f.state); | ||
@@ -799,3 +799,3 @@ return o(f.onDidChangeWindowState((t) => { | ||
}; | ||
}), lt = w(() => { | ||
}), dt = w(() => { | ||
const e = g(S.workspaceFolders); | ||
@@ -811,68 +811,68 @@ return o(S.onDidChangeWorkspaceFolders(() => { | ||
q as deactivateCbs, | ||
Se as defineConfigObject, | ||
se as defineConfigs, | ||
Te as defineExtension, | ||
xe as defineLogger, | ||
Ee as executeCommand, | ||
xe as defineConfigObject, | ||
ue as defineConfigs, | ||
Se as defineExtension, | ||
Ee as defineLogger, | ||
pe as executeCommand, | ||
R as extensionContext, | ||
$ as extensionScope, | ||
ze as getDefaultLoggerPrefix, | ||
Ke as getDefaultLoggerPrefix, | ||
G as onActivate, | ||
De as onDeactivate, | ||
re as tryOnScopeDispose, | ||
pe as useAbsolutePath, | ||
ce as useActiveColorTheme, | ||
ke as useActiveDebugSession, | ||
Re as useActiveEditorDecorations, | ||
ye as useActiveNotebookEditor, | ||
Ae as useActiveTerminal, | ||
oe as useActiveTextEditor, | ||
Ve as useAllExtensions, | ||
fe as useCommand, | ||
Ie as useCommands, | ||
Pe as useCommentController, | ||
We as useControlledTerminal, | ||
Oe as useDefaultShell, | ||
Te as onDeactivate, | ||
se as tryOnScopeDispose, | ||
ke as useAbsolutePath, | ||
oe as useActiveColorTheme, | ||
Re as useActiveDebugSession, | ||
ye as useActiveEditorDecorations, | ||
Ae as useActiveNotebookEditor, | ||
Ve as useActiveTerminal, | ||
le as useActiveTextEditor, | ||
Ie as useAllExtensions, | ||
ve as useCommand, | ||
Pe as useCommands, | ||
We as useCommentController, | ||
Oe as useControlledTerminal, | ||
$e as useDefaultShell, | ||
o as useDisposable, | ||
le as useDocumentText, | ||
de as useEditorDecorations, | ||
de as useDocumentText, | ||
fe as useEditorDecorations, | ||
E as useEvent, | ||
V as useEventEmitter, | ||
$e as useExtensionSecret, | ||
Me as useFetchTasks, | ||
Fe as useFileUri, | ||
Le as useFoldingRangeProvider, | ||
Ne as useFsWatcher, | ||
je as useIsDarkTheme, | ||
He as useIsTelemetryEnabled, | ||
Be as useL10nText, | ||
Ke as useLogLevel, | ||
ge as useLogger, | ||
Qe as useNotebookEditorSelection, | ||
he as useNotebookEditorSelections, | ||
Ue as useNotebookEditorVisibleRanges, | ||
qe as useOpenedTerminals, | ||
ve as useOutputChannel, | ||
Ye as useQuickPick, | ||
Ge as useStatusBarItem, | ||
Je as useTaskExecutions, | ||
Xe as useTerminal, | ||
Me as useExtensionSecret, | ||
Fe as useFetchTasks, | ||
Le as useFileUri, | ||
Ne as useFoldingRangeProvider, | ||
je as useFsWatcher, | ||
He as useIsDarkTheme, | ||
Be as useIsTelemetryEnabled, | ||
ze as useL10nText, | ||
Qe as useLogLevel, | ||
he as useLogger, | ||
Ue as useNotebookEditorSelection, | ||
me as useNotebookEditorSelections, | ||
qe as useNotebookEditorVisibleRanges, | ||
Ye as useOpenedTerminals, | ||
ge as useOutputChannel, | ||
Ge as useQuickPick, | ||
Je as useStatusBarItem, | ||
Xe as useTaskExecutions, | ||
Ze as useTerminal, | ||
J as useTerminalState, | ||
me as useTextEditorCommand, | ||
Ze as useTextEditorCommands, | ||
_e as useTextEditorSelection, | ||
be as useTextEditorSelections, | ||
et as useTextEditorViewColumn, | ||
tt as useTextEditorVisibleRanges, | ||
nt as useTreeView, | ||
be as useTextEditorCommand, | ||
_e as useTextEditorCommands, | ||
et as useTextEditorSelection, | ||
we as useTextEditorSelections, | ||
tt as useTextEditorViewColumn, | ||
nt as useTextEditorVisibleRanges, | ||
it as useTreeView, | ||
X as useViewBadge, | ||
F as useViewTitle, | ||
it as useViewVisibility, | ||
at as useVisibleNotebookEditors, | ||
rt as useVisibleTextEditors, | ||
st as useVscodeContext, | ||
ut as useWebviewPanel, | ||
ct as useWebviewView, | ||
ot as useWindowState, | ||
lt as useWorkspaceFolders | ||
at as useViewVisibility, | ||
rt as useVisibleNotebookEditors, | ||
st as useVisibleTextEditors, | ||
ut as useVscodeContext, | ||
ct as useWebviewPanel, | ||
ot as useWebviewView, | ||
lt as useWindowState, | ||
dt as useWorkspaceFolders | ||
}; |
{ | ||
"name": "reactive-vscode", | ||
"type": "module", | ||
"version": "0.2.7-beta.1", | ||
"version": "0.2.7", | ||
"description": "Develop VSCode extension with Vue Reactivity API", | ||
@@ -41,3 +41,3 @@ "author": "_Kerman <kermanx@qq.com>", | ||
"dependencies": { | ||
"@reactive-vscode/reactivity": "0.2.7-beta.1" | ||
"@reactive-vscode/reactivity": "0.2.7" | ||
}, | ||
@@ -44,0 +44,0 @@ "devDependencies": { |
@@ -20,2 +20,3 @@ # reactive-vscode | ||
- [Vue - Official <sub><sub>![downloads](https://img.shields.io/visual-studio-marketplace/d/Vue.volar.svg)</sub></sub>](https://github.com/vuejs/language-tools) | ||
- [Slidev for VSCode <sub><sub>![downloads](https://img.shields.io/visual-studio-marketplace/d/antfu.slidev.svg)</sub></sub>](https://github.com/slidevjs/slidev/tree/main/packages/vscode) | ||
@@ -26,3 +27,3 @@ - [Iconify IntelliSense <sub><sub>![downloads](https://img.shields.io/visual-studio-marketplace/d/antfu.iconify.svg)</sub></sub>](https://github.com/antfu/vscode-iconify) | ||
However, the project is still in beta and may have minor API changes. If you encounter any problems, please feel free to [open an issue](https://github.com/KermanX/reactive-vscode/issues/new). | ||
However, the project is still in its 0.x and may have minor API changes. If you encounter any problems, please feel free to [open an issue](https://github.com/KermanX/reactive-vscode/issues/new). | ||
@@ -29,0 +30,0 @@ ### Counter Example |
Sorry, the diff of this file is not supported yet
77889
110
+ Added@reactive-vscode/reactivity@0.2.7(transitive)
- Removed@reactive-vscode/reactivity@0.2.7-beta.1(transitive)