acode-plugin-types 1.11.7-patch.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/README.md +8 -0
- package/index.d.ts +91 -0
- package/package.json +26 -0
- package/src/ace/index.d.ts +1 -0
- package/src/ace/modelist.d.ts +22 -0
- package/src/acode.d.ts +437 -0
- package/src/components/collapsibleList.d.ts +11 -0
- package/src/components/contextMenu.d.ts +66 -0
- package/src/components/index.d.ts +10 -0
- package/src/components/inputhints.d.ts +45 -0
- package/src/components/page.d.ts +22 -0
- package/src/components/palette.d.ts +21 -0
- package/src/components/sideButton.d.ts +35 -0
- package/src/components/terminal/index.d.ts +1 -0
- package/src/components/terminal/terminalManager.d.ts +113 -0
- package/src/components/toast.d.ts +20 -0
- package/src/components/tutorial.d.ts +13 -0
- package/src/components/webComponents/index.d.ts +1 -0
- package/src/components/webComponents/wcPage.d.ts +85 -0
- package/src/dialogs/alert.d.ts +15 -0
- package/src/dialogs/box.d.ts +45 -0
- package/src/dialogs/color.d.ts +15 -0
- package/src/dialogs/confirm.d.ts +16 -0
- package/src/dialogs/index.d.ts +8 -0
- package/src/dialogs/loader.d.ts +44 -0
- package/src/dialogs/multiPrompt.d.ts +16 -0
- package/src/dialogs/prompt.d.ts +47 -0
- package/src/dialogs/select.d.ts +66 -0
- package/src/fileSystem.d.ts +113 -0
- package/src/handlers/index.d.ts +3 -0
- package/src/handlers/intent.d.ts +47 -0
- package/src/handlers/keyboard.d.ts +30 -0
- package/src/handlers/windowResize.d.ts +13 -0
- package/src/index.d.ts +12 -0
- package/src/lib/actionStack.d.ts +60 -0
- package/src/lib/editorFile.d.ts +344 -0
- package/src/lib/editorManager.d.ts +127 -0
- package/src/lib/fileList.d.ts +70 -0
- package/src/lib/fonts.d.ts +29 -0
- package/src/lib/index.d.ts +9 -0
- package/src/lib/openFolder.d.ts +102 -0
- package/src/lib/projects.d.ts +28 -0
- package/src/lib/selectionMenu.d.ts +19 -0
- package/src/lib/settings.d.ts +155 -0
- package/src/pages/fileBrowser/fileBrowser.d.ts +65 -0
- package/src/pages/fileBrowser/index.d.ts +1 -0
- package/src/pages/index.d.ts +1 -0
- package/src/plugins/customtabs/CustomTabs.d.ts +57 -0
- package/src/plugins/customtabs/index.d.ts +1 -0
- package/src/plugins/index.d.ts +4 -0
- package/src/plugins/system/System.d.ts +550 -0
- package/src/plugins/system/index.d.ts +1 -0
- package/src/plugins/terminal/Executor.d.ts +155 -0
- package/src/plugins/terminal/Terminal.d.ts +123 -0
- package/src/plugins/terminal/index.d.ts +2 -0
- package/src/plugins/websocket/WebSocket.d.ts +224 -0
- package/src/plugins/websocket/index.d.ts +1 -0
- package/src/sideBarApps.d.ts +39 -0
- package/src/test.ts +517 -0
- package/src/theme/builder.d.ts +188 -0
- package/src/theme/index.d.ts +2 -0
- package/src/theme/list.d.ts +29 -0
- package/src/utils/KeyboardEvent.d.ts +19 -0
- package/src/utils/Url.d.ts +65 -0
- package/src/utils/color.d.ts +51 -0
- package/src/utils/encodings.d.ts +24 -0
- package/src/utils/helpers.d.ts +102 -0
- package/src/utils/index.d.ts +5 -0
- package/types/ace/VERSION +1 -0
- package/types/ace/ace-modes.d.ts +1724 -0
- package/types/ace/index.d.ts +1176 -0
- package/types/ace/types/ace-ext.d.ts +720 -0
- package/types/ace/types/ace-lib.d.ts +302 -0
- package/types/ace/types/ace-modules.d.ts +5293 -0
- package/types/ace/types/ace-snippets.d.ts +406 -0
- package/types/ace/types/ace-theme.d.ts +437 -0
- package/types/html-tag-js.d.ts +680 -0
- package/types/require.d.ts +412 -0
- package/types/xterm.d.ts +1908 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
declare namespace Acode {
|
|
2
|
+
/**
|
|
3
|
+
* Acode provides a flexible and intuitive module for managing themes, enabling developers to seamlessly add,
|
|
4
|
+
* retrieve, update, and list themes within their project.
|
|
5
|
+
*/
|
|
6
|
+
interface Themes {
|
|
7
|
+
/**
|
|
8
|
+
* Adds a new theme to the theme collection.
|
|
9
|
+
* @param theme An instance of ThemeBuilder defining the theme's properties.
|
|
10
|
+
*/
|
|
11
|
+
add(theme: ThemeBuilder): void;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Retrieves a specific theme by its name.
|
|
15
|
+
*/
|
|
16
|
+
get(name: string): ThemeBuilder | undefined;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Updates an existing theme in the theme collection.
|
|
20
|
+
*/
|
|
21
|
+
update(theme: ThemeBuilder): void;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* List all the themes in the theme list.
|
|
25
|
+
* @returns The names of all the themes in the theme list.
|
|
26
|
+
*/
|
|
27
|
+
list(): string[];
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare namespace Acode {
|
|
2
|
+
/**
|
|
3
|
+
* The createKeyboardEvent API allows you to programmatically create and dispatch keyboard events in Acode.
|
|
4
|
+
* This is useful for simulating keyboard interactions and testing keyboard-driven features.
|
|
5
|
+
*/
|
|
6
|
+
interface CreateKeyboardEvent {
|
|
7
|
+
/**
|
|
8
|
+
* Creates a new keyboard event with the specified type and options.
|
|
9
|
+
* @param type The type of keyboard event to create.
|
|
10
|
+
* @param options Configuration options for the keyboard event.
|
|
11
|
+
*/
|
|
12
|
+
(
|
|
13
|
+
type: "keydown" | "keyup",
|
|
14
|
+
options: {
|
|
15
|
+
[K in keyof KeyboardEvent]?: KeyboardEvent[K];
|
|
16
|
+
},
|
|
17
|
+
): void;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
declare namespace Acode {
|
|
2
|
+
/** The Url module provides various utility functions for working with URLs.
|
|
3
|
+
* This module is essential for parsing, manipulating, and formatting URLs within plugins.
|
|
4
|
+
*/
|
|
5
|
+
interface Url {
|
|
6
|
+
/**
|
|
7
|
+
* Returns the basename of the last segment of the URL path, or null if the input is invalid.
|
|
8
|
+
*/
|
|
9
|
+
basename(url: string): string | null;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Compares multiple URL strings and returns true if they are all the same, false otherwise.
|
|
13
|
+
*/
|
|
14
|
+
areSame(...urls: string[]): boolean;
|
|
15
|
+
|
|
16
|
+
/** Returns the file extension of the last segment of the URL path, or null if the input is invalid. */
|
|
17
|
+
extname(url: string): string | null;
|
|
18
|
+
|
|
19
|
+
/** Joins multiple path strings into a single URL string. */
|
|
20
|
+
join(...pathnames: string[]): string;
|
|
21
|
+
|
|
22
|
+
/** Returns a URL-safe string by encoding each component of the URL. */
|
|
23
|
+
safe(url: string): string;
|
|
24
|
+
|
|
25
|
+
/** Returns the path of the URL, or null if the input is invalid. */
|
|
26
|
+
pathname(url: string): string;
|
|
27
|
+
|
|
28
|
+
/** Returns the directory name from the URL, or null if the input is invalid. */
|
|
29
|
+
dirname(url: string): string;
|
|
30
|
+
|
|
31
|
+
/** Parses the given URL and returns an object containing the URL and query string. */
|
|
32
|
+
parse(url: string): { url: string; query: string };
|
|
33
|
+
|
|
34
|
+
/** Formats a URL object into a string. */
|
|
35
|
+
formate(urlObj: {
|
|
36
|
+
protocol: "ftp:" | "sftp:" | "http:" | "https:";
|
|
37
|
+
hostname: string | number;
|
|
38
|
+
path: string;
|
|
39
|
+
username?: string;
|
|
40
|
+
password?: string;
|
|
41
|
+
port?: string | number;
|
|
42
|
+
query?: object;
|
|
43
|
+
}): string;
|
|
44
|
+
|
|
45
|
+
/** Returns the protocol of a URL. */
|
|
46
|
+
getProtocol(url: string): "ftp:" | "sftp:" | "http:" | "https:";
|
|
47
|
+
|
|
48
|
+
/** Returns a URL string with the password (if present) replaced with asterisks. */
|
|
49
|
+
hidePassword(url: string): string;
|
|
50
|
+
|
|
51
|
+
/** Decodes the URL and returns an object containing username, password, hostname, pathname, port, and query. */
|
|
52
|
+
decodeUrl(url: string): {
|
|
53
|
+
protocol: "ftp:" | "sftp:" | "http:" | "https:";
|
|
54
|
+
hostname: string | number;
|
|
55
|
+
path: string;
|
|
56
|
+
username: string;
|
|
57
|
+
password: string;
|
|
58
|
+
port: string | number;
|
|
59
|
+
query: object;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
/** Removes the trailing slash from a URL. */
|
|
63
|
+
trimSlash(url: string): string;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
declare namespace Acode {
|
|
2
|
+
/**
|
|
3
|
+
* The Color API provides functionality for color manipulation and conversion.
|
|
4
|
+
* It allows you to create, modify, and analyze colors in different formats.
|
|
5
|
+
*/
|
|
6
|
+
interface ColorConstructor {
|
|
7
|
+
/**
|
|
8
|
+
* Creates a new Color instance from a color string.
|
|
9
|
+
* @param color A valid CSS color string (hex, rgb, hsl, color name etc.)
|
|
10
|
+
*/
|
|
11
|
+
(color: string): Color;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The Color API provides functionality for color manipulation and conversion.
|
|
16
|
+
* It allows you to create, modify, and analyze colors in different formats.
|
|
17
|
+
*/
|
|
18
|
+
interface Color {
|
|
19
|
+
/** Returns true if the color is considered dark (luminance < 0.5). */
|
|
20
|
+
isDark: boolean;
|
|
21
|
+
|
|
22
|
+
/** Returns true if the color is considered light (luminance >= 0.5). */
|
|
23
|
+
isLight: boolean;
|
|
24
|
+
|
|
25
|
+
/** Returns the HSL lightness value of the color (between 0 and 1). */
|
|
26
|
+
lightness: boolean;
|
|
27
|
+
|
|
28
|
+
/** Returns the perceived brightness of the color (between 0 and 1). */
|
|
29
|
+
luminance: boolean;
|
|
30
|
+
|
|
31
|
+
/** Returns the hexadecimal representation of the color. */
|
|
32
|
+
hex: string;
|
|
33
|
+
|
|
34
|
+
/** Returns the HSL representation of the color. */
|
|
35
|
+
hsl: { h: number; s: number; l: number };
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Darkens the color by the specified ratio
|
|
39
|
+
* @param ratio Number between 0 and 1 indicating how much to darken
|
|
40
|
+
* @returns The modified Color instance
|
|
41
|
+
*/
|
|
42
|
+
darken(ratio: number): Color;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Lightens the color by the specified ratio
|
|
46
|
+
* @param ratio Number between 0 and 1 indicating how much to darken
|
|
47
|
+
* @returns The modified Color instance
|
|
48
|
+
*/
|
|
49
|
+
lighten(ratio: number): Color;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
declare namespace Acode {
|
|
2
|
+
interface Encodings {
|
|
3
|
+
/** An array of all the supported encodings. */
|
|
4
|
+
readonly encodings: {
|
|
5
|
+
name: string;
|
|
6
|
+
labels: string[];
|
|
7
|
+
aliases: string[];
|
|
8
|
+
}[];
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Encodes a string with the specified character set.
|
|
12
|
+
* @param text The text to encode.
|
|
13
|
+
* @param charset The character set name (e.g., UTF-8, GBK).
|
|
14
|
+
*/
|
|
15
|
+
encode(text: string, charset: string): Promise<ArrayBuffer>;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
* @param buffer The ArrayBuffer to decode.
|
|
20
|
+
* @param charset The character set name (e.g., UTF-8, GBK).
|
|
21
|
+
*/
|
|
22
|
+
decode(buffer: ArrayBuffer, charset: string): Promise<string>;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
declare namespace Acode {
|
|
2
|
+
interface Helpers {
|
|
3
|
+
/**
|
|
4
|
+
* This helper method takes in a single parameter, a string named "filename", and returns a string representing an icon class for the file specified by the filename.
|
|
5
|
+
* The icon class returned corresponds to the file type, which is determined by the file extension of the provided filename.
|
|
6
|
+
* In simple, It will return icon according to filename.
|
|
7
|
+
* @param filename The name of the file for which the icon class is to be returned.
|
|
8
|
+
* @returns A string representing an icon class for the file specified by the filename. The icon class returned corresponds to the file type, which is determined by the file extension of the provided filename.
|
|
9
|
+
*/
|
|
10
|
+
getIconForFile(filename: string): string;
|
|
11
|
+
|
|
12
|
+
sortDir(
|
|
13
|
+
list: any[],
|
|
14
|
+
fileBrowser: any,
|
|
15
|
+
mode: "both" | "file" | "folder",
|
|
16
|
+
): any[];
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Gets error message from error object
|
|
20
|
+
*/
|
|
21
|
+
errorMessage(err: Error, ...args: string[]): Promise<string>;
|
|
22
|
+
|
|
23
|
+
error(err: Error, ...args: string[]): Promise<void>;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Returns unique ID
|
|
27
|
+
*/
|
|
28
|
+
uuid(): string;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Parses JSON string, if fails returns null
|
|
32
|
+
*/
|
|
33
|
+
parseJSON(string: string): unknown;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Checks whether given type is directory or not
|
|
37
|
+
*/
|
|
38
|
+
isDir(type: "dir" | "directory" | "folder"): boolean;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Checks whether given type is file or not
|
|
42
|
+
*/
|
|
43
|
+
isFile(type: "file" | "link"): boolean;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Replace matching part of url to alias name by which storage is added.
|
|
47
|
+
*/
|
|
48
|
+
getVirtualPath(url: string): string;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Updates uri of all active which matches the oldUrl as location
|
|
52
|
+
* of the file
|
|
53
|
+
*/
|
|
54
|
+
updateUriOfAllActiveFiles(oldUrl: string, newUrl: string): void;
|
|
55
|
+
|
|
56
|
+
toInternalUri(uri: string): Promise<string>;
|
|
57
|
+
|
|
58
|
+
// biome-ignore lint/complexity/noBannedTypes: <explanation>
|
|
59
|
+
promisify(func: Function, ...args: unknown[]): Promise<unknown>;
|
|
60
|
+
|
|
61
|
+
checkAPIStatus(): Promise<boolean>;
|
|
62
|
+
|
|
63
|
+
fixFilename(name: string): string;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Creates a debounced function that delays invoking the input function until after 'wait' milliseconds have elapsed
|
|
67
|
+
* since the last time the debounced function was invoked. Useful for implementing behavior that should only happen
|
|
68
|
+
* after the input is complete.
|
|
69
|
+
*
|
|
70
|
+
* @param func The function to debounce.
|
|
71
|
+
* @param wait The number of milliseconds to delay.
|
|
72
|
+
* @returns The new debounced function.
|
|
73
|
+
* @example
|
|
74
|
+
* window.addEventListener('resize', debounce(myFunction, 200));
|
|
75
|
+
*/
|
|
76
|
+
|
|
77
|
+
// biome-ignore lint/complexity/noBannedTypes: <explanation>
|
|
78
|
+
debounce(func: Function, wait: number): Function;
|
|
79
|
+
|
|
80
|
+
defineDeprecatedProperty<T, V>(
|
|
81
|
+
obj: T,
|
|
82
|
+
name: PropertyKey,
|
|
83
|
+
getter: () => V,
|
|
84
|
+
setter: (value: V) => void,
|
|
85
|
+
): void;
|
|
86
|
+
|
|
87
|
+
parseHTML(html: string): Element | Element[];
|
|
88
|
+
|
|
89
|
+
createFileStructure(
|
|
90
|
+
uri: string,
|
|
91
|
+
pathString: string,
|
|
92
|
+
isFile?: boolean,
|
|
93
|
+
): Promise<{
|
|
94
|
+
uri: string;
|
|
95
|
+
type: string;
|
|
96
|
+
}>;
|
|
97
|
+
|
|
98
|
+
formatDownloadCount(downloads: number): unknown;
|
|
99
|
+
|
|
100
|
+
isBinary(file: string): boolean;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
v1.39.0
|