reactive-vscode 0.2.0-beta.2 → 0.2.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +22 -25
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import { ColorTheme } from 'vscode';
|
|
4
4
|
import { CommentController } from 'vscode';
|
|
5
5
|
import { ComputedRef } from '@reactive-vscode/reactivity';
|
|
6
|
-
import { ComputedRef as ComputedRef_2 } from '@vue/reactivity';
|
|
7
6
|
import { ConfigurationScope } from 'vscode';
|
|
8
7
|
import { ConfigurationTarget } from 'vscode';
|
|
9
8
|
import { DebugSession } from 'vscode';
|
|
@@ -11,7 +10,7 @@ import { DecorationOptions } from 'vscode';
|
|
|
11
10
|
import { DecorationRenderOptions } from 'vscode';
|
|
12
11
|
import { Disposable as Disposable_2 } from 'vscode';
|
|
13
12
|
import { DocumentSelector } from 'vscode';
|
|
14
|
-
import { EffectScope } from '@
|
|
13
|
+
import { EffectScope } from '@reactive-vscode/reactivity';
|
|
15
14
|
import { Event as Event_2 } from 'vscode';
|
|
16
15
|
import { EventEmitter } from 'vscode';
|
|
17
16
|
import { Extension } from 'vscode';
|
|
@@ -28,9 +27,8 @@ import { OutputChannel } from 'vscode';
|
|
|
28
27
|
import { Range } from 'vscode';
|
|
29
28
|
import { Ref } from '@reactive-vscode/reactivity';
|
|
30
29
|
import { Selection } from 'vscode';
|
|
31
|
-
import { ShallowReactive } from '@
|
|
32
|
-
import { ShallowRef } from '@
|
|
33
|
-
import { ShallowRef as ShallowRef_2 } from '@reactive-vscode/reactivity';
|
|
30
|
+
import { ShallowReactive } from '@reactive-vscode/reactivity';
|
|
31
|
+
import { ShallowRef } from '@reactive-vscode/reactivity';
|
|
34
32
|
import { StatusBarAlignment } from 'vscode';
|
|
35
33
|
import { StatusBarItem } from 'vscode';
|
|
36
34
|
import { Task } from 'vscode';
|
|
@@ -55,8 +53,7 @@ import { WatchSource } from '@reactive-vscode/reactivity';
|
|
|
55
53
|
import { WebviewOptions } from 'vscode';
|
|
56
54
|
import { WebviewView } from 'vscode';
|
|
57
55
|
import { WorkspaceFolder } from 'vscode';
|
|
58
|
-
import { WritableComputedRef } from '@
|
|
59
|
-
import { WritableComputedRef as WritableComputedRef_2 } from '@reactive-vscode/reactivity';
|
|
56
|
+
import { WritableComputedRef } from '@reactive-vscode/reactivity';
|
|
60
57
|
|
|
61
58
|
/* Excluded from this release type: activateCbs */
|
|
62
59
|
|
|
@@ -64,7 +61,7 @@ export declare interface Commands extends Record<string, (...args: any[]) => any
|
|
|
64
61
|
'vscode.open': (uri: Uri) => void;
|
|
65
62
|
}
|
|
66
63
|
|
|
67
|
-
export declare interface ConfigRef<T> extends
|
|
64
|
+
export declare interface ConfigRef<T> extends ShallowRef<T> {
|
|
68
65
|
update: (value: T, configurationTarget?: ConfigurationTarget | boolean | null, overrideInLanguage?: boolean) => Promise<void>;
|
|
69
66
|
}
|
|
70
67
|
|
|
@@ -135,7 +132,7 @@ export declare function defineLogger(name: string, options?: UseLoggerOptions):
|
|
|
135
132
|
};
|
|
136
133
|
hide: () => void;
|
|
137
134
|
} | null>;
|
|
138
|
-
outputChannel:
|
|
135
|
+
outputChannel: ComputedRef<OutputChannel | undefined>;
|
|
139
136
|
info: (...args: any[]) => void | null;
|
|
140
137
|
warn: (...args: any[]) => void | null;
|
|
141
138
|
error: (...args: any[]) => void | null;
|
|
@@ -218,7 +215,7 @@ export declare const useActiveColorTheme: () => ShallowRef<ColorTheme>;
|
|
|
218
215
|
/**
|
|
219
216
|
* @reactive `debug.activeDebugSession`
|
|
220
217
|
*/
|
|
221
|
-
export declare const useActiveDebugSession: () =>
|
|
218
|
+
export declare const useActiveDebugSession: () => ComputedRef<DebugSession | undefined>;
|
|
222
219
|
|
|
223
220
|
/**
|
|
224
221
|
* Reactively set decorations on the active editor. See `vscode::window.activeTextEditor`.
|
|
@@ -248,7 +245,7 @@ export declare const useActiveTextEditor: () => ShallowRef<TextEditor | undefine
|
|
|
248
245
|
/**
|
|
249
246
|
* @reactive `extensions.all`
|
|
250
247
|
*/
|
|
251
|
-
export declare const useAllExtensions: () =>
|
|
248
|
+
export declare const useAllExtensions: () => ComputedRef<readonly Extension<any>[]>;
|
|
252
249
|
|
|
253
250
|
/**
|
|
254
251
|
* Register a command. See `vscode::commands.registerCommand`.
|
|
@@ -292,7 +289,7 @@ declare interface UseControlledTerminalReturn {
|
|
|
292
289
|
/**
|
|
293
290
|
* @reactive `env.shell`
|
|
294
291
|
*/
|
|
295
|
-
export declare const useDefaultShell: () =>
|
|
292
|
+
export declare const useDefaultShell: () => ComputedRef<string>;
|
|
296
293
|
|
|
297
294
|
/**
|
|
298
295
|
* Dispose the disposable when the current scope is disposed. See `vscode::Disposable`.
|
|
@@ -337,7 +334,7 @@ declare interface UseEventEmitterReturn<T> {
|
|
|
337
334
|
/**
|
|
338
335
|
* @reactive `tasks.fetchTasks`
|
|
339
336
|
*/
|
|
340
|
-
export declare function useFetchTasks(filter?: MaybeRefOrGetter<TaskFilter | undefined>):
|
|
337
|
+
export declare function useFetchTasks(filter?: MaybeRefOrGetter<TaskFilter | undefined>): ComputedRef<Thenable<Task[]>>;
|
|
341
338
|
|
|
342
339
|
/**
|
|
343
340
|
* @reactive `Uri.file`
|
|
@@ -383,12 +380,12 @@ export declare function useFsWatcher(globPattern: GlobPattern, ignoreCreateEvent
|
|
|
383
380
|
*
|
|
384
381
|
* @category window
|
|
385
382
|
*/
|
|
386
|
-
export declare const useIsDarkTheme: () =>
|
|
383
|
+
export declare const useIsDarkTheme: () => ComputedRef<boolean>;
|
|
387
384
|
|
|
388
385
|
/**
|
|
389
386
|
* @reactive `env.isTelemetryEnabled`
|
|
390
387
|
*/
|
|
391
|
-
export declare const useIsTelemetryEnabled: () =>
|
|
388
|
+
export declare const useIsTelemetryEnabled: () => ComputedRef<boolean>;
|
|
392
389
|
|
|
393
390
|
/**
|
|
394
391
|
* @reactive `l10n.t`
|
|
@@ -427,7 +424,7 @@ export declare interface UseLoggerOptions {
|
|
|
427
424
|
/**
|
|
428
425
|
* @reactive `env.logLevel`
|
|
429
426
|
*/
|
|
430
|
-
export declare const useLogLevel: () =>
|
|
427
|
+
export declare const useLogLevel: () => ComputedRef<LogLevel>;
|
|
431
428
|
|
|
432
429
|
/**
|
|
433
430
|
* @reactive `NotebookEditor.selection`
|
|
@@ -445,7 +442,7 @@ export declare function useNotebookEditorSelections(notebookEditor: MaybeNullabl
|
|
|
445
442
|
* @reactive `NotebookEditor.visibleRanges`
|
|
446
443
|
* @category editor
|
|
447
444
|
*/
|
|
448
|
-
export declare function useNotebookEditorVisibleRanges(notebookEditor: MaybeNullableRefOrGetter<NotebookEditor>):
|
|
445
|
+
export declare function useNotebookEditorVisibleRanges(notebookEditor: MaybeNullableRefOrGetter<NotebookEditor>): ComputedRef<readonly NotebookRange[]>;
|
|
449
446
|
|
|
450
447
|
/**
|
|
451
448
|
* @reactive `window.terminals`
|
|
@@ -480,7 +477,7 @@ export declare interface UseStatusBarItemOptions {
|
|
|
480
477
|
/**
|
|
481
478
|
* @reactive `tasks.taskExecutions`
|
|
482
479
|
*/
|
|
483
|
-
export declare const useTaskExecutions: () =>
|
|
480
|
+
export declare const useTaskExecutions: () => ComputedRef<readonly TaskExecution[]>;
|
|
484
481
|
|
|
485
482
|
/**
|
|
486
483
|
* @category terminal
|
|
@@ -501,7 +498,7 @@ declare interface UseTerminalReturn extends Omit<Terminal, 'state' | 'dispose'>
|
|
|
501
498
|
* @reactive `Terminal.state`
|
|
502
499
|
* @category terminal
|
|
503
500
|
*/
|
|
504
|
-
export declare function useTerminalState(terminal: MaybeNullableRefOrGetter<Terminal>):
|
|
501
|
+
export declare function useTerminalState(terminal: MaybeNullableRefOrGetter<Terminal>): ComputedRef<TerminalState | undefined>;
|
|
505
502
|
|
|
506
503
|
/**
|
|
507
504
|
* Register a text editor command. See `vscode::commands.registerTextEditorCommand`.
|
|
@@ -533,13 +530,13 @@ export declare function useTextEditorSelections(textEditor: MaybeNullableRefOrGe
|
|
|
533
530
|
* @reactive `TextEditor.viewColumn`
|
|
534
531
|
* @category editor
|
|
535
532
|
*/
|
|
536
|
-
export declare function useTextEditorViewColumn(textEditor: MaybeNullableRefOrGetter<TextEditor>):
|
|
533
|
+
export declare function useTextEditorViewColumn(textEditor: MaybeNullableRefOrGetter<TextEditor>): ComputedRef<ViewColumn | undefined>;
|
|
537
534
|
|
|
538
535
|
/**
|
|
539
536
|
* @reactive `TextEditor.visibleRanges`
|
|
540
537
|
* @category editor
|
|
541
538
|
*/
|
|
542
|
-
export declare function useTextEditorVisibleRanges(textEditor: MaybeNullableRefOrGetter<TextEditor>):
|
|
539
|
+
export declare function useTextEditorVisibleRanges(textEditor: MaybeNullableRefOrGetter<TextEditor>): ComputedRef<readonly Range[]>;
|
|
543
540
|
|
|
544
541
|
/**
|
|
545
542
|
* Register a tree view. See `vscode::window.createTreeView`.
|
|
@@ -614,7 +611,7 @@ export declare const useVisibleTextEditors: () => ShallowRef<readonly TextEditor
|
|
|
614
611
|
|
|
615
612
|
export declare function useVscodeContext<T>(name: string, value: ComputedRef<T> | (() => T), shouldUpdate?: MaybeRefOrGetter<boolean>): ComputedRef<T>;
|
|
616
613
|
|
|
617
|
-
export declare function useVscodeContext<T>(name: string, value:
|
|
614
|
+
export declare function useVscodeContext<T>(name: string, value: WritableComputedRef<T>, shouldUpdate?: MaybeRefOrGetter<boolean>): WritableComputedRef<T>;
|
|
618
615
|
|
|
619
616
|
export declare function useVscodeContext<T>(name: string, value: MaybeRef<T>, shouldUpdate?: MaybeRefOrGetter<boolean>): Ref<T>;
|
|
620
617
|
|
|
@@ -634,14 +631,14 @@ export declare const useWebviewView: (viewId: string, html: MaybeRefOrGetter<str
|
|
|
634
631
|
* @reactive `window.state`
|
|
635
632
|
*/
|
|
636
633
|
export declare const useWindowState: () => {
|
|
637
|
-
focused:
|
|
638
|
-
active:
|
|
634
|
+
focused: ComputedRef<boolean>;
|
|
635
|
+
active: ComputedRef<boolean>;
|
|
639
636
|
};
|
|
640
637
|
|
|
641
638
|
/**
|
|
642
639
|
* @reactive `workspace.workspaceFolders`
|
|
643
640
|
*/
|
|
644
|
-
export declare const useWorkspaceFolders: () =>
|
|
641
|
+
export declare const useWorkspaceFolders: () => ComputedRef<readonly WorkspaceFolder[] | undefined>;
|
|
645
642
|
|
|
646
643
|
declare type ViewWithBadge = Pick<TreeView<unknown> | WebviewView, 'badge'>;
|
|
647
644
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reactive-vscode",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.0-beta.
|
|
4
|
+
"version": "0.2.0-beta.3",
|
|
5
5
|
"description": "Develop VSCode extension with Vue Reactivity API",
|
|
6
6
|
"author": "_Kerman <kermanx@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@types/vscode": "^1.89.0"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@reactive-vscode/reactivity": "0.2.0-beta.
|
|
40
|
+
"@reactive-vscode/reactivity": "0.2.0-beta.3"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/node": "^20.14.2",
|