reactive-vscode 0.2.5 → 0.2.6-beta.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/dist/index.d.ts +39 -24
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -177,6 +177,21 @@ export declare function defineLogger(name: string, options?: UseLoggerOptions):
|
|
|
177
177
|
(column?: ViewColumn, preserveFocus?: boolean): void;
|
|
178
178
|
};
|
|
179
179
|
hide: () => void;
|
|
180
|
+
} | null, {
|
|
181
|
+
outputChannel: OutputChannel;
|
|
182
|
+
createLoggerFunc: (type: string) => (...message: any[]) => void;
|
|
183
|
+
info: (...message: any[]) => void;
|
|
184
|
+
warn: (...message: any[]) => void;
|
|
185
|
+
error: (...message: any[]) => void;
|
|
186
|
+
append: (value: string) => void;
|
|
187
|
+
appendLine: (value: string) => void;
|
|
188
|
+
replace: (value: string) => void;
|
|
189
|
+
clear: () => void;
|
|
190
|
+
show: {
|
|
191
|
+
(preserveFocus?: boolean): void;
|
|
192
|
+
(column?: ViewColumn, preserveFocus?: boolean): void;
|
|
193
|
+
};
|
|
194
|
+
hide: () => void;
|
|
180
195
|
} | null>;
|
|
181
196
|
outputChannel: ComputedRef<OutputChannel | undefined>;
|
|
182
197
|
info: (...args: any[]) => void | null;
|
|
@@ -197,7 +212,7 @@ export declare function defineLogger(name: string, options?: UseLoggerOptions):
|
|
|
197
212
|
*/
|
|
198
213
|
export declare function executeCommand<K extends Extract<keyof Commands, string>>(command: K, ...args: Parameters<Commands[K]>): Thenable<unknown>;
|
|
199
214
|
|
|
200
|
-
export declare const extensionContext: ShallowRef<ExtensionContext | null>;
|
|
215
|
+
export declare const extensionContext: ShallowRef<ExtensionContext | null, ExtensionContext | null>;
|
|
201
216
|
|
|
202
217
|
/* Excluded from this release type: extensionScope */
|
|
203
218
|
|
|
@@ -334,7 +349,7 @@ export declare function useAbsolutePath(relativePath: MaybeRefOrGetter<string>,
|
|
|
334
349
|
/**
|
|
335
350
|
* @reactive `window.activeColorTheme`
|
|
336
351
|
*/
|
|
337
|
-
export declare const useActiveColorTheme: () => ShallowRef<ColorTheme>;
|
|
352
|
+
export declare const useActiveColorTheme: () => ShallowRef<ColorTheme, ColorTheme>;
|
|
338
353
|
|
|
339
354
|
/**
|
|
340
355
|
* @reactive `debug.activeDebugSession`
|
|
@@ -352,19 +367,19 @@ export declare function useActiveEditorDecorations(decorationTypeOrOptions: Text
|
|
|
352
367
|
* @reactive `window.activeNotebookEditor`
|
|
353
368
|
* @category editor
|
|
354
369
|
*/
|
|
355
|
-
export declare const useActiveNotebookEditor: () => ShallowRef<NotebookEditor | undefined>;
|
|
370
|
+
export declare const useActiveNotebookEditor: () => ShallowRef<NotebookEditor | undefined, NotebookEditor | undefined>;
|
|
356
371
|
|
|
357
372
|
/**
|
|
358
373
|
* @reactive `window.activeTerminal`
|
|
359
374
|
* @category terminal
|
|
360
375
|
*/
|
|
361
|
-
export declare const useActiveTerminal: () => ShallowRef<Terminal | undefined>;
|
|
376
|
+
export declare const useActiveTerminal: () => ShallowRef<Terminal | undefined, Terminal | undefined>;
|
|
362
377
|
|
|
363
378
|
/**
|
|
364
379
|
* @reactive `window.activeTextEditor`
|
|
365
380
|
* @category editor
|
|
366
381
|
*/
|
|
367
|
-
export declare const useActiveTextEditor: () => ShallowRef<TextEditor | undefined>;
|
|
382
|
+
export declare const useActiveTextEditor: () => ShallowRef<TextEditor | undefined, TextEditor | undefined>;
|
|
368
383
|
|
|
369
384
|
/**
|
|
370
385
|
* @reactive `extensions.all`
|
|
@@ -427,7 +442,7 @@ export declare function useDisposable<T extends Disposable_2>(disposable: T): T;
|
|
|
427
442
|
* @reactive `TextDocument.getText`
|
|
428
443
|
* @category document
|
|
429
444
|
*/
|
|
430
|
-
export declare function useDocumentText(doc: MaybeRefOrGetter<TextDocument | undefined>): ShallowRef<string | undefined>;
|
|
445
|
+
export declare function useDocumentText(doc: MaybeRefOrGetter<TextDocument | undefined>): ShallowRef<string | undefined, string | undefined>;
|
|
431
446
|
|
|
432
447
|
/**
|
|
433
448
|
* Reactively set decorations on the given editor. See `vscode::TextEditor.setDecorations`.
|
|
@@ -476,7 +491,7 @@ declare interface UseEventEmitterReturn<T> {
|
|
|
476
491
|
* @reactive `ExtensionContext.secrets`
|
|
477
492
|
* @category extension
|
|
478
493
|
*/
|
|
479
|
-
export declare function useExtensionSecret(key: string): Promise<Ref<string | undefined> & {
|
|
494
|
+
export declare function useExtensionSecret(key: string): Promise<Ref<string | undefined, string | undefined> & {
|
|
480
495
|
set: (newValue: string) => Promise<void>;
|
|
481
496
|
remove: () => Promise<void>;
|
|
482
497
|
}>;
|
|
@@ -564,13 +579,13 @@ export declare const useLogLevel: () => ComputedRef<LogLevel>;
|
|
|
564
579
|
* @reactive `NotebookEditor.selection`
|
|
565
580
|
* @category editor
|
|
566
581
|
*/
|
|
567
|
-
export declare function useNotebookEditorSelection(notebookEditor: MaybeNullableRefOrGetter<NotebookEditor>): WritableComputedRef<NotebookRange>;
|
|
582
|
+
export declare function useNotebookEditorSelection(notebookEditor: MaybeNullableRefOrGetter<NotebookEditor>): WritableComputedRef<NotebookRange, NotebookRange>;
|
|
568
583
|
|
|
569
584
|
/**
|
|
570
585
|
* @reactive `NotebookEditor.selections`
|
|
571
586
|
* @category editor
|
|
572
587
|
*/
|
|
573
|
-
export declare function useNotebookEditorSelections(notebookEditor: MaybeNullableRefOrGetter<NotebookEditor>): WritableComputedRef<readonly NotebookRange[]>;
|
|
588
|
+
export declare function useNotebookEditorSelections(notebookEditor: MaybeNullableRefOrGetter<NotebookEditor>): WritableComputedRef<readonly NotebookRange[], readonly NotebookRange[]>;
|
|
574
589
|
|
|
575
590
|
/**
|
|
576
591
|
* @reactive `NotebookEditor.visibleRanges`
|
|
@@ -582,7 +597,7 @@ export declare function useNotebookEditorVisibleRanges(notebookEditor: MaybeNull
|
|
|
582
597
|
* @reactive `window.terminals`
|
|
583
598
|
* @category terminal
|
|
584
599
|
*/
|
|
585
|
-
export declare const useOpenedTerminals: () => ShallowRef<readonly Terminal[]>;
|
|
600
|
+
export declare const useOpenedTerminals: () => ShallowRef<readonly Terminal[], readonly Terminal[]>;
|
|
586
601
|
|
|
587
602
|
/**
|
|
588
603
|
* @reactive `window.createOutputChannel`
|
|
@@ -602,9 +617,9 @@ export declare function useQuickPick<T extends QuickPickItem>(options?: QuickPic
|
|
|
602
617
|
onDidHide: (listener: (e: void) => any, thisArgs?: any, disposables?: Disposable_2[]) => void;
|
|
603
618
|
onDidTriggerButton: (listener: (e: QuickInputButton) => any, thisArgs?: any, disposables?: Disposable_2[]) => void;
|
|
604
619
|
onDidChangeValue: (listener: (e: string) => any, thisArgs?: any, disposables?: Disposable_2[]) => void;
|
|
605
|
-
value: ShallowRef<string>;
|
|
606
|
-
activeItems: ShallowRef<readonly T[]>;
|
|
607
|
-
selectedItems: ShallowRef<readonly T[]>;
|
|
620
|
+
value: ShallowRef<string, string>;
|
|
621
|
+
activeItems: ShallowRef<readonly T[], readonly T[]>;
|
|
622
|
+
selectedItems: ShallowRef<readonly T[], readonly T[]>;
|
|
608
623
|
placeholder: string | undefined;
|
|
609
624
|
buttons: readonly QuickInputButton[];
|
|
610
625
|
onDidTriggerItemButton: Event_2<QuickPickItemButtonEvent<T>>;
|
|
@@ -686,13 +701,13 @@ export declare function useTextEditorCommands(commands: Record<string, TextEdito
|
|
|
686
701
|
* @reactive `TextEditor.selection`
|
|
687
702
|
* @category editor
|
|
688
703
|
*/
|
|
689
|
-
export declare function useTextEditorSelection(textEditor: MaybeNullableRefOrGetter<TextEditor>, acceptKind?: MaybeRefOrGetter<(TextEditorSelectionChangeKind | undefined)[]>): WritableComputedRef<Selection>;
|
|
704
|
+
export declare function useTextEditorSelection(textEditor: MaybeNullableRefOrGetter<TextEditor>, acceptKind?: MaybeRefOrGetter<(TextEditorSelectionChangeKind | undefined)[]>): WritableComputedRef<Selection, Selection>;
|
|
690
705
|
|
|
691
706
|
/**
|
|
692
707
|
* @reactive `TextEditor.selections`
|
|
693
708
|
* @category editor
|
|
694
709
|
*/
|
|
695
|
-
export declare function useTextEditorSelections(textEditor: MaybeNullableRefOrGetter<TextEditor>, acceptKind?: MaybeRefOrGetter<(TextEditorSelectionChangeKind | undefined)[]>): WritableComputedRef<readonly Selection[]>;
|
|
710
|
+
export declare function useTextEditorSelections(textEditor: MaybeNullableRefOrGetter<TextEditor>, acceptKind?: MaybeRefOrGetter<(TextEditorSelectionChangeKind | undefined)[]>): WritableComputedRef<readonly Selection[], readonly Selection[]>;
|
|
696
711
|
|
|
697
712
|
/**
|
|
698
713
|
* @reactive `TextEditor.viewColumn`
|
|
@@ -747,18 +762,18 @@ export declare function useViewVisibility(view: MaybeNullableRefOrGetter<ViewWit
|
|
|
747
762
|
* @reactive `window.visibleNotebookEditors`
|
|
748
763
|
* @category editor
|
|
749
764
|
*/
|
|
750
|
-
export declare const useVisibleNotebookEditors: () => ShallowRef<readonly NotebookEditor[]>;
|
|
765
|
+
export declare const useVisibleNotebookEditors: () => ShallowRef<readonly NotebookEditor[], readonly NotebookEditor[]>;
|
|
751
766
|
|
|
752
767
|
/**
|
|
753
768
|
* @reactive `window.visibleTextEditors`
|
|
754
769
|
* @category editor
|
|
755
770
|
*/
|
|
756
|
-
export declare const useVisibleTextEditors: () => ShallowRef<readonly TextEditor[]>;
|
|
757
|
-
|
|
758
|
-
export declare function useVscodeContext<T>(name: string, value: ComputedRef<T> | (() => T), shouldUpdate?: MaybeRefOrGetter<boolean>): ComputedRef<T>;
|
|
771
|
+
export declare const useVisibleTextEditors: () => ShallowRef<readonly TextEditor[], readonly TextEditor[]>;
|
|
759
772
|
|
|
760
773
|
export declare function useVscodeContext<T>(name: string, value: WritableComputedRef<T>, shouldUpdate?: MaybeRefOrGetter<boolean>): WritableComputedRef<T>;
|
|
761
774
|
|
|
775
|
+
export declare function useVscodeContext<T>(name: string, value: ComputedRef<T> | (() => T), shouldUpdate?: MaybeRefOrGetter<boolean>): ComputedRef<T>;
|
|
776
|
+
|
|
762
777
|
export declare function useVscodeContext<T>(name: string, value: MaybeRef<T>, shouldUpdate?: MaybeRefOrGetter<boolean>): Ref<T>;
|
|
763
778
|
|
|
764
779
|
/**
|
|
@@ -768,9 +783,9 @@ export declare function useVscodeContext<T>(name: string, value: MaybeRef<T>, sh
|
|
|
768
783
|
*/
|
|
769
784
|
export declare function useWebviewPanel(viewType: string, title: MaybeRefOrGetter<string>, html: MaybeRefOrGetter<string>, showOptions: Parameters<typeof window.createWebviewPanel>[2], options?: WebviewPanelRegisterOptions): {
|
|
770
785
|
panel: WebviewPanel;
|
|
771
|
-
context: ShallowRef<unknown>;
|
|
772
|
-
active: Ref<boolean>;
|
|
773
|
-
visible: Ref<boolean>;
|
|
786
|
+
context: ShallowRef<unknown, unknown>;
|
|
787
|
+
active: Ref<boolean, boolean>;
|
|
788
|
+
visible: Ref<boolean, boolean>;
|
|
774
789
|
postMessage: (message: any) => Thenable<boolean>;
|
|
775
790
|
forceRefresh: () => void;
|
|
776
791
|
};
|
|
@@ -781,8 +796,8 @@ export declare function useWebviewPanel(viewType: string, title: MaybeRefOrGette
|
|
|
781
796
|
* @category view
|
|
782
797
|
*/
|
|
783
798
|
export declare const useWebviewView: (viewId: string, html: MaybeRefOrGetter<string>, options?: WebviewViewRegisterOptions | undefined) => {
|
|
784
|
-
view: ShallowRef<WebviewView | undefined>;
|
|
785
|
-
context: ShallowRef<WebviewViewResolveContext<unknown> | undefined>;
|
|
799
|
+
view: ShallowRef<WebviewView | undefined, WebviewView | undefined>;
|
|
800
|
+
context: ShallowRef<WebviewViewResolveContext<unknown> | undefined, WebviewViewResolveContext<unknown> | undefined>;
|
|
786
801
|
postMessage: (message: any) => Thenable<boolean> | undefined;
|
|
787
802
|
forceRefresh: () => void;
|
|
788
803
|
};
|
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.6-beta.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.6-beta.1"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/node": "^20.16.10",
|