@net-vim/core 0.3.1 → 0.4.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/dist/index.js +1255 -1064
- package/dist/src/opfs-util.d.ts +7 -0
- package/dist/src/prelude/markdown-syntax.d.ts +8 -0
- package/dist/src/types.d.ts +2 -0
- package/dist/src/vim-engine.d.ts +2 -0
- package/package.json +1 -1
package/dist/src/opfs-util.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Simple utility to interact with the Origin Private File System (OPFS)
|
|
3
|
+
* or fallback to a memory-based file system.
|
|
3
4
|
*/
|
|
4
5
|
export declare const PRELUDE_BASE = ".config/net-vim/prelude";
|
|
5
6
|
export declare const opfsFS: {
|
|
@@ -8,6 +9,12 @@ export declare const opfsFS: {
|
|
|
8
9
|
listDirectory: typeof listDirectory;
|
|
9
10
|
isDirectory: typeof isDirectory;
|
|
10
11
|
};
|
|
12
|
+
export declare const autoFS: {
|
|
13
|
+
readFile: (path: string) => Promise<string | null>;
|
|
14
|
+
writeFile: (path: string, content: string) => Promise<void>;
|
|
15
|
+
listDirectory: (path: string) => Promise<string[]>;
|
|
16
|
+
isDirectory: (path: string) => Promise<boolean>;
|
|
17
|
+
};
|
|
11
18
|
export declare function getConfigFile(path: string): Promise<string | null>;
|
|
12
19
|
export declare function ensureConfigDir(path: string): Promise<FileSystemDirectoryHandle>;
|
|
13
20
|
export declare function writeConfigFile(path: string, content: string): Promise<void>;
|
package/dist/src/types.d.ts
CHANGED
|
@@ -61,6 +61,7 @@ export interface LineRendererOptions {
|
|
|
61
61
|
x: number;
|
|
62
62
|
y: number;
|
|
63
63
|
});
|
|
64
|
+
currentFilePath?: string | null | (() => string | null);
|
|
64
65
|
}) => any;
|
|
65
66
|
}
|
|
66
67
|
export interface VimState {
|
|
@@ -118,6 +119,7 @@ export interface VimAPI {
|
|
|
118
119
|
y: number;
|
|
119
120
|
} | null;
|
|
120
121
|
getMode: () => VimMode;
|
|
122
|
+
getCurrentFilePath: () => string | null;
|
|
121
123
|
on: (event: VimEvent, callback: (...args: any[]) => void) => void;
|
|
122
124
|
executeCommand: (cmd: string) => void;
|
|
123
125
|
loadPluginFromSource: (name: string, source: string) => Promise<boolean>;
|
package/dist/src/vim-engine.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ export declare class VimEngine {
|
|
|
40
40
|
private openDirectory;
|
|
41
41
|
private openFile;
|
|
42
42
|
getAPI(): VimAPI;
|
|
43
|
+
private insertText;
|
|
43
44
|
hideCompletions(): void;
|
|
44
45
|
setViewportHeight(height: number): void;
|
|
45
46
|
setViewportWidth(width: number): void;
|
|
@@ -52,6 +53,7 @@ export declare class VimEngine {
|
|
|
52
53
|
handleKey(key: string, _ctrl?: boolean): void;
|
|
53
54
|
private handleExplorerSelect;
|
|
54
55
|
private moveCursor;
|
|
56
|
+
private putFromClipboard;
|
|
55
57
|
private handleNormalMode;
|
|
56
58
|
private handleInsertMode;
|
|
57
59
|
private handleVisualMode;
|