reactive-vscode 0.0.1-beta.5 → 0.1.0
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/README.md +33 -33
- package/dist/index.d.ts +723 -3
- package/dist/index.js +791 -724
- package/package.json +2 -2
- package/tsconfig.json +9 -9
- package/dist/composables/index.d.ts +0 -50
- package/dist/composables/useAbsolutePath.d.ts +0 -8
- package/dist/composables/useActiveColorTheme.d.ts +0 -5
- package/dist/composables/useActiveDebugSession.d.ts +0 -5
- package/dist/composables/useActiveEditorDecorations.d.ts +0 -9
- package/dist/composables/useActiveNotebookEditor.d.ts +0 -6
- package/dist/composables/useActiveTerminal.d.ts +0 -6
- package/dist/composables/useActiveTextEditor.d.ts +0 -6
- package/dist/composables/useAllExtensions.d.ts +0 -5
- package/dist/composables/useCommand.d.ts +0 -8
- package/dist/composables/useCommands.d.ts +0 -8
- package/dist/composables/useCommentController.d.ts +0 -5
- package/dist/composables/useDefaultShell.d.ts +0 -4
- package/dist/composables/useDisposable.d.ts +0 -8
- package/dist/composables/useDocumentText.d.ts +0 -8
- package/dist/composables/useEditorDecorations.d.ts +0 -10
- package/dist/composables/useEvent.d.ts +0 -7
- package/dist/composables/useEventEmitter.d.ts +0 -10
- package/dist/composables/useFetchTasks.d.ts +0 -7
- package/dist/composables/useFileUri.d.ts +0 -24
- package/dist/composables/useFoldingRangeProvider.d.ts +0 -7
- package/dist/composables/useIsDarkTheme.d.ts +0 -6
- package/dist/composables/useIsTelemetryEnabled.d.ts +0 -4
- package/dist/composables/useL10nText.d.ts +0 -7
- package/dist/composables/useLogLevel.d.ts +0 -5
- package/dist/composables/useLogger.d.ts +0 -24
- package/dist/composables/useNotebookEditorSelection.d.ts +0 -8
- package/dist/composables/useNotebookEditorSelections.d.ts +0 -8
- package/dist/composables/useNotebookEditorVisibleRanges.d.ts +0 -8
- package/dist/composables/useOpenedTerminals.d.ts +0 -6
- package/dist/composables/useOutputChannel.d.ts +0 -6
- package/dist/composables/useStatusBarItem.d.ts +0 -19
- package/dist/composables/useTaskExecutions.d.ts +0 -5
- package/dist/composables/useTerminalState.d.ts +0 -7
- package/dist/composables/useTextEditorCommand.d.ts +0 -9
- package/dist/composables/useTextEditorCommands.d.ts +0 -8
- package/dist/composables/useTextEditorSelection.d.ts +0 -9
- package/dist/composables/useTextEditorSelections.d.ts +0 -9
- package/dist/composables/useTextEditorViewColumn.d.ts +0 -8
- package/dist/composables/useTextEditorVisibleRanges.d.ts +0 -8
- package/dist/composables/useTreeView.d.ts +0 -13
- package/dist/composables/useUri.d.ts +0 -24
- package/dist/composables/useViewBadge.d.ts +0 -12
- package/dist/composables/useViewTitle.d.ts +0 -12
- package/dist/composables/useViewVisibility.d.ts +0 -12
- package/dist/composables/useVisibleNotebookEditors.d.ts +0 -6
- package/dist/composables/useVisibleTextEditors.d.ts +0 -6
- package/dist/composables/useVscodeContext.d.ts +0 -5
- package/dist/composables/useWebviewView.d.ts +0 -19
- package/dist/composables/useWindowState.d.ts +0 -7
- package/dist/composables/useWorkspaceFolders.d.ts +0 -5
- package/dist/utils/createKeyedComposable.d.ts +0 -6
- package/dist/utils/createSingletonComposable.d.ts +0 -6
- package/dist/utils/defineConfigs.d.ts +0 -24
- package/dist/utils/defineExtension.d.ts +0 -16
- package/dist/utils/executeCommand.d.ts +0 -11
- package/dist/utils/index.d.ts +0 -9
- package/dist/utils/onActivate.d.ts +0 -14
- package/dist/utils/onDeactivate.d.ts +0 -12
- package/dist/utils/tryOnScopeDispose.d.ts +0 -6
- package/dist/utils/types.d.ts +0 -4
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reactive-vscode",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.1.0",
|
|
5
5
|
"description": "Develop VSCode extension with Vue Reactivity API",
|
|
6
6
|
"author": "_Kerman <kermanx@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"typescript": "^5.4.5",
|
|
45
45
|
"vite": "^5.2.12",
|
|
46
46
|
"vite-plugin-dts": "^3.9.1",
|
|
47
|
-
"@reactive-vscode/reactivity": "0.
|
|
47
|
+
"@reactive-vscode/reactivity": "0.1.0"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"typecheck": "tsc --noEmit",
|
package/tsconfig.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../../tsconfig.base.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"types": [
|
|
5
|
-
"vscode",
|
|
6
|
-
"node"
|
|
7
|
-
]
|
|
8
|
-
}
|
|
9
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../tsconfig.base.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"types": [
|
|
5
|
+
"vscode",
|
|
6
|
+
"node"
|
|
7
|
+
]
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
export * from './useAbsolutePath';
|
|
2
|
-
export * from './useActiveColorTheme';
|
|
3
|
-
export * from './useActiveDebugSession';
|
|
4
|
-
export * from './useActiveEditorDecorations';
|
|
5
|
-
export * from './useActiveNotebookEditor';
|
|
6
|
-
export * from './useActiveTerminal';
|
|
7
|
-
export * from './useActiveTextEditor';
|
|
8
|
-
export * from './useAllExtensions';
|
|
9
|
-
export * from './useCommand';
|
|
10
|
-
export * from './useCommands';
|
|
11
|
-
export * from './useCommentController';
|
|
12
|
-
export * from './useDefaultShell';
|
|
13
|
-
export * from './useDisposable';
|
|
14
|
-
export * from './useDocumentText';
|
|
15
|
-
export * from './useEditorDecorations';
|
|
16
|
-
export * from './useEvent';
|
|
17
|
-
export * from './useEventEmitter';
|
|
18
|
-
export * from './useFetchTasks';
|
|
19
|
-
export * from './useFileUri';
|
|
20
|
-
export * from './useFoldingRangeProvider';
|
|
21
|
-
export * from './useIsDarkTheme';
|
|
22
|
-
export * from './useIsTelemetryEnabled';
|
|
23
|
-
export * from './useL10nText';
|
|
24
|
-
export * from './useLogLevel';
|
|
25
|
-
export * from './useLogger';
|
|
26
|
-
export * from './useNotebookEditorSelection';
|
|
27
|
-
export * from './useNotebookEditorSelections';
|
|
28
|
-
export * from './useNotebookEditorVisibleRanges';
|
|
29
|
-
export * from './useOpenedTerminals';
|
|
30
|
-
export * from './useOutputChannel';
|
|
31
|
-
export * from './useStatusBarItem';
|
|
32
|
-
export * from './useTaskExecutions';
|
|
33
|
-
export * from './useTerminalState';
|
|
34
|
-
export * from './useTextEditorCommand';
|
|
35
|
-
export * from './useTextEditorCommands';
|
|
36
|
-
export * from './useTextEditorSelection';
|
|
37
|
-
export * from './useTextEditorSelections';
|
|
38
|
-
export * from './useTextEditorViewColumn';
|
|
39
|
-
export * from './useTextEditorVisibleRanges';
|
|
40
|
-
export * from './useTreeView';
|
|
41
|
-
export * from './useUri';
|
|
42
|
-
export * from './useViewBadge';
|
|
43
|
-
export * from './useViewTitle';
|
|
44
|
-
export * from './useViewVisibility';
|
|
45
|
-
export * from './useVisibleNotebookEditors';
|
|
46
|
-
export * from './useVisibleTextEditors';
|
|
47
|
-
export * from './useVscodeContext';
|
|
48
|
-
export * from './useWebviewView';
|
|
49
|
-
export * from './useWindowState';
|
|
50
|
-
export * from './useWorkspaceFolders';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ComputedRef, MaybeRefOrGetter } from '@reactive-vscode/reactivity';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @category utilities
|
|
5
|
-
* @reactive `ExtensionContext.asAbsolutePath`
|
|
6
|
-
*/
|
|
7
|
-
export declare function useAbsolutePath(relativePath: MaybeRefOrGetter<string>, slient: true): ComputedRef<string | undefined>;
|
|
8
|
-
export declare function useAbsolutePath(relativePath: MaybeRefOrGetter<string>, slient?: false): ComputedRef<string>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { MaybeRefOrGetter } from '@reactive-vscode/reactivity';
|
|
2
|
-
import { DecorationOptions, DecorationRenderOptions, Range, TextEditorDecorationType } from 'vscode';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Reactively set decorations on the active editor. See `vscode::window.activeTextEditor`.
|
|
6
|
-
*
|
|
7
|
-
* @category editor
|
|
8
|
-
*/
|
|
9
|
-
export declare function useActiveEditorDecorations(decorationTypeOrOptions: TextEditorDecorationType | DecorationRenderOptions, rangesOrOptions: MaybeRefOrGetter<readonly Range[] | readonly DecorationOptions[]>): void;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { MaybeRefOrGetter } from '@reactive-vscode/reactivity';
|
|
2
|
-
import { TextDocument } from 'vscode';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* @reactive `TextDocument.getText`
|
|
6
|
-
* @category document
|
|
7
|
-
*/
|
|
8
|
-
export declare function useDocumentText(doc: MaybeRefOrGetter<TextDocument | undefined>): import('@vue/reactivity').ShallowRef<string | undefined>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { MaybeRefOrGetter } from '@reactive-vscode/reactivity';
|
|
2
|
-
import { DecorationOptions, DecorationRenderOptions, Range, TextEditor, TextEditorDecorationType } from 'vscode';
|
|
3
|
-
import { Nullable } from '../utils/types';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Reactively set decorations on the given editor. See `vscode::TextEditor.setDecorations`.
|
|
7
|
-
*
|
|
8
|
-
* @category editor
|
|
9
|
-
*/
|
|
10
|
-
export declare function useEditorDecorations(editor: MaybeRefOrGetter<Nullable<TextEditor>>, decorationTypeOrOptions: TextEditorDecorationType | DecorationRenderOptions, rangesOrOptions: MaybeRefOrGetter<readonly Range[] | readonly DecorationOptions[]>): void;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="vscode" />
|
|
2
|
-
/**
|
|
3
|
-
* @category utilities
|
|
4
|
-
* @reactive `EventEmitter`
|
|
5
|
-
*/
|
|
6
|
-
export declare function useEventEmitter<T>(listeners?: ((e: T) => any)[]): {
|
|
7
|
-
event: import('vscode').Event<T>;
|
|
8
|
-
fire: (data: T) => void;
|
|
9
|
-
addListener: import('vscode').Event<T>;
|
|
10
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { MaybeRefOrGetter } from '@reactive-vscode/reactivity';
|
|
2
|
-
import { TaskFilter } from 'vscode';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* @reactive `tasks.fetchTasks`
|
|
6
|
-
*/
|
|
7
|
-
export declare function useFetchTasks(filter?: MaybeRefOrGetter<TaskFilter | undefined>): import('@vue/reactivity').ComputedRef<Thenable<import('vscode').Task[]>>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { MaybeRefOrGetter } from '@reactive-vscode/reactivity';
|
|
2
|
-
import { Uri } from 'vscode';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* @reactive `Uri.file`
|
|
6
|
-
* @category utilities
|
|
7
|
-
*/
|
|
8
|
-
export declare function useFileUri(path: MaybeRefOrGetter<string>): import('@vue/reactivity').ShallowReactive<{
|
|
9
|
-
readonly scheme: string;
|
|
10
|
-
readonly authority: string;
|
|
11
|
-
readonly path: string;
|
|
12
|
-
readonly query: string;
|
|
13
|
-
readonly fragment: string;
|
|
14
|
-
readonly fsPath: string;
|
|
15
|
-
with(change: {
|
|
16
|
-
scheme?: string | undefined;
|
|
17
|
-
authority?: string | undefined;
|
|
18
|
-
path?: string | undefined;
|
|
19
|
-
query?: string | undefined;
|
|
20
|
-
fragment?: string | undefined;
|
|
21
|
-
}): Uri;
|
|
22
|
-
toString(): string;
|
|
23
|
-
toJSON(): any;
|
|
24
|
-
}>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { MaybeRefOrGetter } from '@reactive-vscode/reactivity';
|
|
2
|
-
import { DocumentSelector, FoldingRangeProvider } from 'vscode';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* @reactive `languages.registerFoldingRangeProvider`
|
|
6
|
-
*/
|
|
7
|
-
export declare function useFoldingRangeProvider(selector: DocumentSelector, provideFoldingRanges: MaybeRefOrGetter<FoldingRangeProvider['provideFoldingRanges']>): void;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ComputedRef, MaybeRefOrGetter } from '@reactive-vscode/reactivity';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @reactive `l10n.t`
|
|
5
|
-
*/
|
|
6
|
-
export declare function useL10nText(message: MaybeRefOrGetter<string>, ...args: Array<MaybeRefOrGetter<string | number | boolean>>): ComputedRef<string>;
|
|
7
|
-
export declare function useL10nText(message: MaybeRefOrGetter<string>, args: Record<string, any>): ComputedRef<string>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/// <reference types="vscode" />
|
|
2
|
-
declare function defaultGetPrefix(type: string): string;
|
|
3
|
-
/**
|
|
4
|
-
* Creates a logger that writes to the output channel.
|
|
5
|
-
*
|
|
6
|
-
* @category view
|
|
7
|
-
*/
|
|
8
|
-
export declare function useLogger(name: string, getPrefix?: typeof defaultGetPrefix): {
|
|
9
|
-
outputChannel: import('vscode').OutputChannel;
|
|
10
|
-
createLoggerFunc: (type: string) => (...message: any[]) => void;
|
|
11
|
-
info: (...message: any[]) => void;
|
|
12
|
-
warn: (...message: any[]) => void;
|
|
13
|
-
error: (...message: any[]) => void;
|
|
14
|
-
append: (value: string) => void;
|
|
15
|
-
appendLine: (value: string) => void;
|
|
16
|
-
replace: (value: string) => void;
|
|
17
|
-
clear: () => void;
|
|
18
|
-
show: {
|
|
19
|
-
(preserveFocus?: boolean | undefined): void;
|
|
20
|
-
(column?: import('vscode').ViewColumn | undefined, preserveFocus?: boolean | undefined): void;
|
|
21
|
-
};
|
|
22
|
-
hide: () => void;
|
|
23
|
-
};
|
|
24
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { NotebookEditor } from 'vscode';
|
|
2
|
-
import { MaybeNullableRefOrGetter } from '../utils';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* @reactive `NotebookEditor.selection`
|
|
6
|
-
* @category editor
|
|
7
|
-
*/
|
|
8
|
-
export declare function useNotebookEditorSelection(notebookEditor: MaybeNullableRefOrGetter<NotebookEditor>): import('@vue/reactivity').WritableComputedRef<import('vscode').NotebookRange>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { NotebookEditor } from 'vscode';
|
|
2
|
-
import { MaybeNullableRefOrGetter } from '../utils';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* @reactive `NotebookEditor.selections`
|
|
6
|
-
* @category editor
|
|
7
|
-
*/
|
|
8
|
-
export declare function useNotebookEditorSelections(notebookEditor: MaybeNullableRefOrGetter<NotebookEditor>): import('@vue/reactivity').WritableComputedRef<readonly import('vscode').NotebookRange[]>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { NotebookEditor } from 'vscode';
|
|
2
|
-
import { MaybeNullableRefOrGetter } from '../utils';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* @reactive `NotebookEditor.visibleRanges`
|
|
6
|
-
* @category editor
|
|
7
|
-
*/
|
|
8
|
-
export declare function useNotebookEditorVisibleRanges(notebookEditor: MaybeNullableRefOrGetter<NotebookEditor>): import('@vue/reactivity').ComputedRef<readonly import('vscode').NotebookRange[]>;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { MaybeRefOrGetter } from '@reactive-vscode/reactivity';
|
|
2
|
-
import { StatusBarAlignment, StatusBarItem } from 'vscode';
|
|
3
|
-
|
|
4
|
-
export interface UseStatusBarItemOptions {
|
|
5
|
-
id?: string;
|
|
6
|
-
alignment?: StatusBarAlignment;
|
|
7
|
-
priority?: number;
|
|
8
|
-
name?: MaybeRefOrGetter<StatusBarItem['name']>;
|
|
9
|
-
text?: MaybeRefOrGetter<StatusBarItem['text']>;
|
|
10
|
-
tooltip?: MaybeRefOrGetter<StatusBarItem['tooltip']>;
|
|
11
|
-
color?: MaybeRefOrGetter<StatusBarItem['color']>;
|
|
12
|
-
backgroundColor?: MaybeRefOrGetter<StatusBarItem['backgroundColor']>;
|
|
13
|
-
command?: MaybeRefOrGetter<StatusBarItem['command']>;
|
|
14
|
-
accessibilityInformation?: MaybeRefOrGetter<StatusBarItem['accessibilityInformation']>;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* @reactive `window.createStatusBarItem`
|
|
18
|
-
*/
|
|
19
|
-
export declare function useStatusBarItem(options: UseStatusBarItemOptions): StatusBarItem;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { TextEditor, TextEditorEdit } from 'vscode';
|
|
2
|
-
|
|
3
|
-
export type TextEditorCommandCallback = (textEditor: TextEditor, edit: TextEditorEdit, ...args: any[]) => void;
|
|
4
|
-
/**
|
|
5
|
-
* Register a text editor command. See `vscode::commands.registerTextEditorCommand`.
|
|
6
|
-
*
|
|
7
|
-
* @category commands
|
|
8
|
-
*/
|
|
9
|
-
export declare function useTextEditorCommand(command: string, callback: TextEditorCommandCallback): void;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { TextEditorCommandCallback } from './useTextEditorCommand';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Register multiple text editor commands. See `vscode::commands.registerTextEditorCommand`.
|
|
5
|
-
*
|
|
6
|
-
* @category commands
|
|
7
|
-
*/
|
|
8
|
-
export declare function useTextEditorCommands(commands: Record<string, TextEditorCommandCallback>): void;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { MaybeRefOrGetter } from '@reactive-vscode/reactivity';
|
|
2
|
-
import { TextEditor, TextEditorSelectionChangeKind } from 'vscode';
|
|
3
|
-
import { MaybeNullableRefOrGetter } from '../utils';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @reactive `TextEditor.selection`
|
|
7
|
-
* @category editor
|
|
8
|
-
*/
|
|
9
|
-
export declare function useTextEditorSelection(textEditor: MaybeNullableRefOrGetter<TextEditor>, acceptKind?: MaybeRefOrGetter<(TextEditorSelectionChangeKind | undefined)[]>): import('@vue/reactivity').WritableComputedRef<import('vscode').Selection>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { MaybeRefOrGetter } from '@reactive-vscode/reactivity';
|
|
2
|
-
import { TextEditor, TextEditorSelectionChangeKind } from 'vscode';
|
|
3
|
-
import { MaybeNullableRefOrGetter } from '../utils';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @reactive `TextEditor.selections`
|
|
7
|
-
* @category editor
|
|
8
|
-
*/
|
|
9
|
-
export declare function useTextEditorSelections(textEditor: MaybeNullableRefOrGetter<TextEditor>, acceptKind?: MaybeRefOrGetter<(TextEditorSelectionChangeKind | undefined)[]>): import('@vue/reactivity').WritableComputedRef<readonly import('vscode').Selection[]>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { TextEditor } from 'vscode';
|
|
2
|
-
import { MaybeNullableRefOrGetter } from '../utils';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* @reactive `TextEditor.viewColumn`
|
|
6
|
-
* @category editor
|
|
7
|
-
*/
|
|
8
|
-
export declare function useTextEditorViewColumn(textEditor: MaybeNullableRefOrGetter<TextEditor>): import('@vue/reactivity').ComputedRef<import('vscode').ViewColumn | undefined>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { TextEditor } from 'vscode';
|
|
2
|
-
import { MaybeNullableRefOrGetter } from '../utils';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* @reactive `TextEditor.visibleRanges`
|
|
6
|
-
* @category editor
|
|
7
|
-
*/
|
|
8
|
-
export declare function useTextEditorVisibleRanges(textEditor: MaybeNullableRefOrGetter<TextEditor>): import('@vue/reactivity').ComputedRef<readonly import('vscode').Range[]>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { MaybeRefOrGetter } from '@reactive-vscode/reactivity';
|
|
2
|
-
import { TreeDataProvider, TreeView, TreeViewOptions } from 'vscode';
|
|
3
|
-
|
|
4
|
-
export interface TreeViewNode {
|
|
5
|
-
readonly children?: this[];
|
|
6
|
-
}
|
|
7
|
-
export type UseTreeViewOptions<T> = (Omit<TreeViewOptions<T>, 'treeDataProvider'> & Pick<TreeDataProvider<T>, 'getTreeItem' | 'resolveTreeItem'>) | TreeDataProvider<T>['getTreeItem'];
|
|
8
|
-
/**
|
|
9
|
-
* Register a tree view. See `vscode::window.createTreeView`.
|
|
10
|
-
*
|
|
11
|
-
* @category view
|
|
12
|
-
*/
|
|
13
|
-
export declare const useTreeView: <T extends TreeViewNode>(viewId: string, treeData: MaybeRefOrGetter<T[]>, options: UseTreeViewOptions<T>) => TreeView<T>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { MaybeRefOrGetter } from '@reactive-vscode/reactivity';
|
|
2
|
-
import { Uri } from 'vscode';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* @reactive `Uri`
|
|
6
|
-
* @category utilities
|
|
7
|
-
*/
|
|
8
|
-
export declare function useUri(uri: MaybeRefOrGetter<Uri>): import('@vue/reactivity').ShallowReactive<{
|
|
9
|
-
readonly scheme: string;
|
|
10
|
-
readonly authority: string;
|
|
11
|
-
readonly path: string;
|
|
12
|
-
readonly query: string;
|
|
13
|
-
readonly fragment: string;
|
|
14
|
-
readonly fsPath: string;
|
|
15
|
-
with(change: {
|
|
16
|
-
scheme?: string | undefined;
|
|
17
|
-
authority?: string | undefined;
|
|
18
|
-
path?: string | undefined;
|
|
19
|
-
query?: string | undefined;
|
|
20
|
-
fragment?: string | undefined;
|
|
21
|
-
}): Uri;
|
|
22
|
-
toString(): string;
|
|
23
|
-
toJSON(): any;
|
|
24
|
-
}>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { MaybeRefOrGetter } from '@reactive-vscode/reactivity';
|
|
2
|
-
import { TreeView, ViewBadge, WebviewView } from 'vscode';
|
|
3
|
-
import { Nullable } from '../utils/types';
|
|
4
|
-
|
|
5
|
-
type ViewWithBadge = Pick<TreeView<unknown> | WebviewView, 'badge'>;
|
|
6
|
-
/**
|
|
7
|
-
* Reactively set the badge of a view (`vscode::TreeView` or `vscode::WebviewView`).
|
|
8
|
-
*
|
|
9
|
-
* @category view
|
|
10
|
-
*/
|
|
11
|
-
export declare function useViewBadge(view: MaybeRefOrGetter<Nullable<ViewWithBadge>>, title: MaybeRefOrGetter<ViewBadge | undefined>): void;
|
|
12
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { MaybeRefOrGetter } from '@reactive-vscode/reactivity';
|
|
2
|
-
import { TreeView, WebviewView } from 'vscode';
|
|
3
|
-
import { Nullable } from '../utils/types';
|
|
4
|
-
|
|
5
|
-
type ViewWithTitle = Pick<TreeView<unknown> | WebviewView, 'title'>;
|
|
6
|
-
/**
|
|
7
|
-
* Reactively set the title of a view (`vscode::TreeView` or `vscode::WebviewView`).
|
|
8
|
-
*
|
|
9
|
-
* @category view
|
|
10
|
-
*/
|
|
11
|
-
export declare function useViewTitle(view: MaybeRefOrGetter<Nullable<ViewWithTitle>>, title: MaybeRefOrGetter<string | undefined>): void;
|
|
12
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ComputedRef, MaybeRefOrGetter } from '@reactive-vscode/reactivity';
|
|
2
|
-
import { TreeView, WebviewView } from 'vscode';
|
|
3
|
-
import { Nullable } from '../utils/types';
|
|
4
|
-
|
|
5
|
-
type ViewWithVisibility = Pick<TreeView<unknown> | WebviewView, 'visible' | 'onDidChangeVisibility'>;
|
|
6
|
-
/**
|
|
7
|
-
* Reactively get the visibility of a view (`vscode::TreeView` or `vscode::WebviewView`).
|
|
8
|
-
*
|
|
9
|
-
* @category view
|
|
10
|
-
*/
|
|
11
|
-
export declare function useViewVisibility(view: MaybeRefOrGetter<Nullable<ViewWithVisibility>>): ComputedRef<boolean>;
|
|
12
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ComputedRef, MaybeRefOrGetter, Ref, WritableComputedRef } from '@reactive-vscode/reactivity';
|
|
2
|
-
|
|
3
|
-
export declare function useVscodeContext<T>(name: string, value: ComputedRef<T> | (() => T), shouldUpdate?: MaybeRefOrGetter<boolean>): ComputedRef<T>;
|
|
4
|
-
export declare function useVscodeContext<T>(name: string, value: WritableComputedRef<T>, shouldUpdate?: MaybeRefOrGetter<boolean>): WritableComputedRef<T>;
|
|
5
|
-
export declare function useVscodeContext<T>(name: string, value: Ref<T>, shouldUpdate?: MaybeRefOrGetter<boolean>): Ref<T>;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { MaybeRefOrGetter } from '@reactive-vscode/reactivity';
|
|
2
|
-
import { WebviewOptions, WebviewView } from 'vscode';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Register a webview view. See `vscode::window.registerWebviewViewProvider`.
|
|
6
|
-
*
|
|
7
|
-
* @category view
|
|
8
|
-
*/
|
|
9
|
-
export declare const useWebviewView: (viewId: string, html: MaybeRefOrGetter<string>, webviewOptions?: MaybeRefOrGetter<WebviewOptions> | undefined, registerOptions?: ({
|
|
10
|
-
readonly webviewOptions?: {
|
|
11
|
-
readonly retainContextWhenHidden?: boolean | undefined;
|
|
12
|
-
} | undefined;
|
|
13
|
-
} & {
|
|
14
|
-
onDidReceiveMessage?: ((message: any) => void) | undefined;
|
|
15
|
-
}) | undefined) => {
|
|
16
|
-
view: import('@vue/reactivity').ShallowRef<WebviewView | undefined>;
|
|
17
|
-
context: import('@vue/reactivity').ShallowRef<unknown>;
|
|
18
|
-
postMessage: (message: any) => Thenable<boolean> | undefined;
|
|
19
|
-
};
|