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.
Files changed (66) hide show
  1. package/README.md +33 -33
  2. package/dist/index.d.ts +723 -3
  3. package/dist/index.js +791 -724
  4. package/package.json +2 -2
  5. package/tsconfig.json +9 -9
  6. package/dist/composables/index.d.ts +0 -50
  7. package/dist/composables/useAbsolutePath.d.ts +0 -8
  8. package/dist/composables/useActiveColorTheme.d.ts +0 -5
  9. package/dist/composables/useActiveDebugSession.d.ts +0 -5
  10. package/dist/composables/useActiveEditorDecorations.d.ts +0 -9
  11. package/dist/composables/useActiveNotebookEditor.d.ts +0 -6
  12. package/dist/composables/useActiveTerminal.d.ts +0 -6
  13. package/dist/composables/useActiveTextEditor.d.ts +0 -6
  14. package/dist/composables/useAllExtensions.d.ts +0 -5
  15. package/dist/composables/useCommand.d.ts +0 -8
  16. package/dist/composables/useCommands.d.ts +0 -8
  17. package/dist/composables/useCommentController.d.ts +0 -5
  18. package/dist/composables/useDefaultShell.d.ts +0 -4
  19. package/dist/composables/useDisposable.d.ts +0 -8
  20. package/dist/composables/useDocumentText.d.ts +0 -8
  21. package/dist/composables/useEditorDecorations.d.ts +0 -10
  22. package/dist/composables/useEvent.d.ts +0 -7
  23. package/dist/composables/useEventEmitter.d.ts +0 -10
  24. package/dist/composables/useFetchTasks.d.ts +0 -7
  25. package/dist/composables/useFileUri.d.ts +0 -24
  26. package/dist/composables/useFoldingRangeProvider.d.ts +0 -7
  27. package/dist/composables/useIsDarkTheme.d.ts +0 -6
  28. package/dist/composables/useIsTelemetryEnabled.d.ts +0 -4
  29. package/dist/composables/useL10nText.d.ts +0 -7
  30. package/dist/composables/useLogLevel.d.ts +0 -5
  31. package/dist/composables/useLogger.d.ts +0 -24
  32. package/dist/composables/useNotebookEditorSelection.d.ts +0 -8
  33. package/dist/composables/useNotebookEditorSelections.d.ts +0 -8
  34. package/dist/composables/useNotebookEditorVisibleRanges.d.ts +0 -8
  35. package/dist/composables/useOpenedTerminals.d.ts +0 -6
  36. package/dist/composables/useOutputChannel.d.ts +0 -6
  37. package/dist/composables/useStatusBarItem.d.ts +0 -19
  38. package/dist/composables/useTaskExecutions.d.ts +0 -5
  39. package/dist/composables/useTerminalState.d.ts +0 -7
  40. package/dist/composables/useTextEditorCommand.d.ts +0 -9
  41. package/dist/composables/useTextEditorCommands.d.ts +0 -8
  42. package/dist/composables/useTextEditorSelection.d.ts +0 -9
  43. package/dist/composables/useTextEditorSelections.d.ts +0 -9
  44. package/dist/composables/useTextEditorViewColumn.d.ts +0 -8
  45. package/dist/composables/useTextEditorVisibleRanges.d.ts +0 -8
  46. package/dist/composables/useTreeView.d.ts +0 -13
  47. package/dist/composables/useUri.d.ts +0 -24
  48. package/dist/composables/useViewBadge.d.ts +0 -12
  49. package/dist/composables/useViewTitle.d.ts +0 -12
  50. package/dist/composables/useViewVisibility.d.ts +0 -12
  51. package/dist/composables/useVisibleNotebookEditors.d.ts +0 -6
  52. package/dist/composables/useVisibleTextEditors.d.ts +0 -6
  53. package/dist/composables/useVscodeContext.d.ts +0 -5
  54. package/dist/composables/useWebviewView.d.ts +0 -19
  55. package/dist/composables/useWindowState.d.ts +0 -7
  56. package/dist/composables/useWorkspaceFolders.d.ts +0 -5
  57. package/dist/utils/createKeyedComposable.d.ts +0 -6
  58. package/dist/utils/createSingletonComposable.d.ts +0 -6
  59. package/dist/utils/defineConfigs.d.ts +0 -24
  60. package/dist/utils/defineExtension.d.ts +0 -16
  61. package/dist/utils/executeCommand.d.ts +0 -11
  62. package/dist/utils/index.d.ts +0 -9
  63. package/dist/utils/onActivate.d.ts +0 -14
  64. package/dist/utils/onDeactivate.d.ts +0 -12
  65. package/dist/utils/tryOnScopeDispose.d.ts +0 -6
  66. 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.0.1-beta.5",
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.0.1-beta.5"
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,5 +0,0 @@
1
- /// <reference types="vscode" />
2
- /**
3
- * @reactive `window.activeColorTheme`
4
- */
5
- export declare const useActiveColorTheme: () => import('@vue/reactivity').ShallowRef<import('vscode').ColorTheme>;
@@ -1,5 +0,0 @@
1
- /// <reference types="vscode" />
2
- /**
3
- * @reactive `debug.activeDebugSession`
4
- */
5
- export declare const useActiveDebugSession: () => import('@vue/reactivity').ComputedRef<import('vscode').DebugSession | undefined>;
@@ -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,6 +0,0 @@
1
- /// <reference types="vscode" />
2
- /**
3
- * @reactive `window.activeNotebookEditor`
4
- * @category editor
5
- */
6
- export declare const useActiveNotebookEditor: () => import('@vue/reactivity').ShallowRef<import('vscode').NotebookEditor | undefined>;
@@ -1,6 +0,0 @@
1
- /// <reference types="vscode" />
2
- /**
3
- * @reactive `window.activeTerminal`
4
- * @category terminal
5
- */
6
- export declare const useActiveTerminal: () => import('@vue/reactivity').ShallowRef<import('vscode').Terminal | undefined>;
@@ -1,6 +0,0 @@
1
- /// <reference types="vscode" />
2
- /**
3
- * @reactive `window.activeTextEditor`
4
- * @category editor
5
- */
6
- export declare const useActiveTextEditor: () => import('@vue/reactivity').ShallowRef<import('vscode').TextEditor | undefined>;
@@ -1,5 +0,0 @@
1
- /// <reference types="vscode" />
2
- /**
3
- * @reactive `extensions.all`
4
- */
5
- export declare const useAllExtensions: () => import('@vue/reactivity').ComputedRef<readonly import('vscode').Extension<any>[]>;
@@ -1,8 +0,0 @@
1
- import { Commands } from '../utils';
2
-
3
- /**
4
- * Register a command. See `vscode::commands.registerCommand`.
5
- *
6
- * @category commands
7
- */
8
- export declare function useCommand<K extends Extract<keyof Commands, string>>(command: K, callback: Commands[K]): void;
@@ -1,8 +0,0 @@
1
- import { Commands } from '../utils';
2
-
3
- /**
4
- * Register multiple commands. See `vscode::commands.registerCommand`.
5
- *
6
- * @category commands
7
- */
8
- export declare function useCommands(commands: Partial<Commands>): void;
@@ -1,5 +0,0 @@
1
- /// <reference types="vscode" />
2
- /**
3
- * @reactive `comments.createCommentController`
4
- */
5
- export declare function useCommentController(id: string, label: string): import('vscode').CommentController;
@@ -1,4 +0,0 @@
1
- /**
2
- * @reactive `env.shell`
3
- */
4
- export declare const useDefaultShell: () => import('@vue/reactivity').ComputedRef<string>;
@@ -1,8 +0,0 @@
1
- import { Disposable } from 'vscode';
2
-
3
- /**
4
- * Dispose the disposable when the current scope is disposed. See `vscode::Disposable`.
5
- *
6
- * @category lifecycle
7
- */
8
- export declare function useDisposable<T extends Disposable>(disposable: T): T;
@@ -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,7 +0,0 @@
1
- import { Event } from 'vscode';
2
-
3
- /**
4
- * @category utilities
5
- * @reactive `Event`
6
- */
7
- export declare function useEvent<T>(event: Event<T>, listeners?: ((e: T) => any)[]): Event<T>;
@@ -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,6 +0,0 @@
1
- /**
2
- * Determines if the current color theme is dark. See `vscode::ColorTheme.kind`.
3
- *
4
- * @category window
5
- */
6
- export declare const useIsDarkTheme: () => import('@vue/reactivity').ComputedRef<boolean>;
@@ -1,4 +0,0 @@
1
- /**
2
- * @reactive `env.isTelemetryEnabled`
3
- */
4
- export declare const useIsTelemetryEnabled: () => import('@vue/reactivity').ComputedRef<boolean>;
@@ -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,5 +0,0 @@
1
- /// <reference types="vscode" />
2
- /**
3
- * @reactive `env.logLevel`
4
- */
5
- export declare const useLogLevel: () => import('@vue/reactivity').ComputedRef<import('vscode').LogLevel>;
@@ -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,6 +0,0 @@
1
- /// <reference types="vscode" />
2
- /**
3
- * @reactive `window.terminals`
4
- * @category terminal
5
- */
6
- export declare const useOpenedTerminals: () => import('@vue/reactivity').ShallowRef<readonly import('vscode').Terminal[]>;
@@ -1,6 +0,0 @@
1
- /// <reference types="vscode" />
2
- /**
3
- * @reactive `window.createOutputChannel`
4
- * @category view
5
- */
6
- export declare function useOutputChannel(name: string, languageId?: string): import('vscode').OutputChannel;
@@ -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,5 +0,0 @@
1
- /// <reference types="vscode" />
2
- /**
3
- * @reactive `tasks.taskExecutions`
4
- */
5
- export declare const useTaskExecutions: () => import('@vue/reactivity').ComputedRef<readonly import('vscode').TaskExecution[]>;
@@ -1,7 +0,0 @@
1
- import { Terminal } from 'vscode';
2
-
3
- /**
4
- * @reactive `Terminal.state`
5
- * @category terminal
6
- */
7
- export declare const useTerminalState: (terminal: Terminal) => import('@vue/reactivity').ComputedRef<import('vscode').TerminalState>;
@@ -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,6 +0,0 @@
1
- /// <reference types="vscode" />
2
- /**
3
- * @reactive `window.visibleNotebookEditors`
4
- * @category editor
5
- */
6
- export declare const useVisibleNotebookEditors: () => import('@vue/reactivity').ShallowRef<readonly import('vscode').NotebookEditor[]>;
@@ -1,6 +0,0 @@
1
- /// <reference types="vscode" />
2
- /**
3
- * @reactive `window.visibleTextEditors`
4
- * @category editor
5
- */
6
- export declare const useVisibleTextEditors: () => import('@vue/reactivity').ShallowRef<readonly import('vscode').TextEditor[]>;
@@ -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
- };
@@ -1,7 +0,0 @@
1
- /**
2
- * @reactive `window.state`
3
- */
4
- export declare const useWindowState: () => {
5
- focused: import('@vue/reactivity').ComputedRef<boolean>;
6
- active: import('@vue/reactivity').ComputedRef<boolean>;
7
- };
@@ -1,5 +0,0 @@
1
- /// <reference types="vscode" />
2
- /**
3
- * @reactive `workspace.workspaceFolders`
4
- */
5
- export declare const useWorkspaceFolders: () => import('@vue/reactivity').ComputedRef<readonly import('vscode').WorkspaceFolder[] | undefined>;