@wailsio/runtime 3.0.0-alpha.64 → 3.0.0-alpha.66
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/{src → dist}/application.js +2 -16
- package/dist/browser.js +20 -0
- package/dist/callable.js +144 -0
- package/dist/calls.js +194 -0
- package/dist/cancellable.js +792 -0
- package/dist/clipboard.js +30 -0
- package/dist/contextmenu.js +80 -0
- package/{src → dist}/create.js +2 -33
- package/dist/dialogs.js +134 -0
- package/dist/drag.js +222 -0
- package/dist/event_types.js +229 -0
- package/dist/events.js +101 -0
- package/dist/flags.js +23 -0
- package/dist/index.js +38 -0
- package/dist/listener.js +44 -0
- package/{src → dist}/nanoid.js +7 -11
- package/dist/runtime.js +63 -0
- package/dist/screens.js +38 -0
- package/dist/system.js +116 -0
- package/{src → dist}/utils.js +29 -20
- package/dist/window.js +438 -0
- package/{src → dist}/wml.js +51 -122
- package/package.json +43 -19
- package/types/application.d.ts +3 -10
- package/types/browser.d.ts +4 -4
- package/types/callable.d.ts +3 -0
- package/types/calls.d.ts +43 -49
- package/types/cancellable.d.ts +434 -0
- package/types/clipboard.d.ts +6 -5
- package/types/contextmenu.d.ts +1 -0
- package/types/create.d.ts +6 -27
- package/types/dialogs.d.ts +99 -143
- package/types/drag.d.ts +1 -0
- package/types/event_types.d.ts +218 -219
- package/types/events.d.ts +45 -250
- package/types/flags.d.ts +3 -3
- package/types/index.d.ts +16 -14
- package/types/listener.d.ts +9 -0
- package/types/nanoid.d.ts +1 -1
- package/types/runtime.d.ts +18 -26
- package/types/screens.d.ts +42 -76
- package/types/system.d.ts +50 -79
- package/types/utils.d.ts +15 -8
- package/types/window.d.ts +110 -225
- package/types/wml.d.ts +2 -6
- package/docs/.nojekyll +0 -1
- package/docs/assets/highlight.css +0 -22
- package/docs/assets/icons.js +0 -15
- package/docs/assets/icons.svg +0 -1
- package/docs/assets/main.js +0 -59
- package/docs/assets/navigation.js +0 -1
- package/docs/assets/search.js +0 -1
- package/docs/assets/style.css +0 -1415
- package/docs/classes/Call.RuntimeError.html +0 -11
- package/docs/classes/Events.WailsEvent.html +0 -4
- package/docs/functions/Application.Hide.html +0 -2
- package/docs/functions/Application.Quit.html +0 -2
- package/docs/functions/Application.Show.html +0 -2
- package/docs/functions/Browser.OpenURL.html +0 -3
- package/docs/functions/Call.ByID.html +0 -8
- package/docs/functions/Call.ByName.html +0 -6
- package/docs/functions/Call.Call.html +0 -11
- package/docs/functions/Clipboard.SetText.html +0 -6
- package/docs/functions/Clipboard.Text.html +0 -3
- package/docs/functions/Create.Any.html +0 -2
- package/docs/functions/Create.Array.html +0 -4
- package/docs/functions/Create.ByteSlice.html +0 -3
- package/docs/functions/Create.Map.html +0 -4
- package/docs/functions/Create.Nullable.html +0 -3
- package/docs/functions/Create.Struct.html +0 -3
- package/docs/functions/Dialogs.Error.html +0 -5
- package/docs/functions/Dialogs.Info.html +0 -5
- package/docs/functions/Dialogs.OpenFile.html +0 -3
- package/docs/functions/Dialogs.Question.html +0 -5
- package/docs/functions/Dialogs.SaveFile.html +0 -3
- package/docs/functions/Dialogs.Warning.html +0 -5
- package/docs/functions/Events.Emit.html +0 -6
- package/docs/functions/Events.Off.html +0 -4
- package/docs/functions/Events.OffAll.html +0 -3
- package/docs/functions/Events.On.html +0 -7
- package/docs/functions/Events.OnMultiple.html +0 -8
- package/docs/functions/Events.Once.html +0 -7
- package/docs/functions/Events.setup.html +0 -1
- package/docs/functions/Flags.GetFlag.html +0 -6
- package/docs/functions/Screens.GetAll.html +0 -3
- package/docs/functions/Screens.GetCurrent.html +0 -3
- package/docs/functions/Screens.GetPrimary.html +0 -3
- package/docs/functions/System.Capabilities.html +0 -4
- package/docs/functions/System.Environment.html +0 -5
- package/docs/functions/System.IsAMD64.html +0 -3
- package/docs/functions/System.IsARM.html +0 -3
- package/docs/functions/System.IsARM64.html +0 -5
- package/docs/functions/System.IsDarkMode.html +0 -5
- package/docs/functions/System.IsDebug.html +0 -1
- package/docs/functions/System.IsLinux.html +0 -3
- package/docs/functions/System.IsMac.html +0 -3
- package/docs/functions/System.IsWindows.html +0 -3
- package/docs/functions/System.invoke.html +0 -1
- package/docs/functions/WML.Enable.html +0 -2
- package/docs/functions/WML.Reload.html +0 -2
- package/docs/functions/init.html +0 -1
- package/docs/index.html +0 -5
- package/docs/interfaces/Call.CallOptions.html +0 -7
- package/docs/interfaces/Dialogs.Button.html +0 -7
- package/docs/interfaces/Dialogs.FileFilter.html +0 -5
- package/docs/interfaces/Dialogs.MessageDialogOptions.html +0 -9
- package/docs/interfaces/Dialogs.OpenFileDialogOptions.html +0 -33
- package/docs/interfaces/Dialogs.SaveFileDialogOptions.html +0 -35
- package/docs/interfaces/Screens.Rect.html +0 -9
- package/docs/interfaces/Screens.Screen.html +0 -25
- package/docs/interfaces/Screens.Size.html +0 -5
- package/docs/interfaces/System.EnvironmentInfo.html +0 -11
- package/docs/interfaces/System.OSInfo.html +0 -9
- package/docs/modules/Application.html +0 -4
- package/docs/modules/Browser.html +0 -2
- package/docs/modules/Call.html +0 -6
- package/docs/modules/Clipboard.html +0 -3
- package/docs/modules/Create.html +0 -7
- package/docs/modules/Dialogs.html +0 -12
- package/docs/modules/Events.html +0 -10
- package/docs/modules/Flags.html +0 -2
- package/docs/modules/Screens.html +0 -7
- package/docs/modules/System.html +0 -14
- package/docs/modules/WML.html +0 -3
- package/docs/modules.html +0 -14
- package/docs/variables/Events.Types.html +0 -1
- package/docs/variables/Window.html +0 -2
- package/src/browser.js +0 -24
- package/src/calls.js +0 -221
- package/src/clipboard.js +0 -35
- package/src/contextmenu.js +0 -97
- package/src/dialogs.js +0 -200
- package/src/drag.js +0 -119
- package/src/event_types.js +0 -219
- package/src/events.js +0 -140
- package/src/flags.js +0 -25
- package/src/index.js +0 -60
- package/src/runtime.js +0 -92
- package/src/screens.js +0 -71
- package/src/system.js +0 -143
- package/src/window.js +0 -638
- package/tsconfig.json +0 -20
package/types/dialogs.d.ts
CHANGED
|
@@ -1,184 +1,140 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
export function Error(options: MessageDialogOptions): Promise<string>;
|
|
4
|
-
export function Question(options: MessageDialogOptions): Promise<string>;
|
|
5
|
-
export function OpenFile(options: OpenFileDialogOptions): Promise<string[] | string>;
|
|
6
|
-
export function SaveFile(options: SaveFileDialogOptions): Promise<string>;
|
|
7
|
-
export type OpenFileDialogOptions = {
|
|
8
|
-
/**
|
|
9
|
-
* - Indicates if directories can be chosen.
|
|
10
|
-
*/
|
|
1
|
+
export interface OpenFileDialogOptions {
|
|
2
|
+
/** Indicates if directories can be chosen. */
|
|
11
3
|
CanChooseDirectories?: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* - Indicates if files can be chosen.
|
|
14
|
-
*/
|
|
4
|
+
/** Indicates if files can be chosen. */
|
|
15
5
|
CanChooseFiles?: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* - Indicates if directories can be created.
|
|
18
|
-
*/
|
|
6
|
+
/** Indicates if directories can be created. */
|
|
19
7
|
CanCreateDirectories?: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* - Indicates if hidden files should be shown.
|
|
22
|
-
*/
|
|
8
|
+
/** Indicates if hidden files should be shown. */
|
|
23
9
|
ShowHiddenFiles?: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* - Indicates if aliases should be resolved.
|
|
26
|
-
*/
|
|
10
|
+
/** Indicates if aliases should be resolved. */
|
|
27
11
|
ResolvesAliases?: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* - Indicates if multiple selection is allowed.
|
|
30
|
-
*/
|
|
12
|
+
/** Indicates if multiple selection is allowed. */
|
|
31
13
|
AllowsMultipleSelection?: boolean;
|
|
32
|
-
/**
|
|
33
|
-
* - Indicates if the extension should be hidden.
|
|
34
|
-
*/
|
|
14
|
+
/** Indicates if the extension should be hidden. */
|
|
35
15
|
HideExtension?: boolean;
|
|
36
|
-
/**
|
|
37
|
-
* - Indicates if hidden extensions can be selected.
|
|
38
|
-
*/
|
|
16
|
+
/** Indicates if hidden extensions can be selected. */
|
|
39
17
|
CanSelectHiddenExtension?: boolean;
|
|
40
|
-
/**
|
|
41
|
-
* - Indicates if file packages should be treated as directories.
|
|
42
|
-
*/
|
|
18
|
+
/** Indicates if file packages should be treated as directories. */
|
|
43
19
|
TreatsFilePackagesAsDirectories?: boolean;
|
|
44
|
-
/**
|
|
45
|
-
* - Indicates if other file types are allowed.
|
|
46
|
-
*/
|
|
20
|
+
/** Indicates if other file types are allowed. */
|
|
47
21
|
AllowsOtherFiletypes?: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* - Array of file filters.
|
|
50
|
-
*/
|
|
22
|
+
/** Array of file filters. */
|
|
51
23
|
Filters?: FileFilter[];
|
|
52
|
-
/**
|
|
53
|
-
* - Title of the dialog.
|
|
54
|
-
*/
|
|
24
|
+
/** Title of the dialog. */
|
|
55
25
|
Title?: string;
|
|
56
|
-
/**
|
|
57
|
-
* - Message to show in the dialog.
|
|
58
|
-
*/
|
|
26
|
+
/** Message to show in the dialog. */
|
|
59
27
|
Message?: string;
|
|
60
|
-
/**
|
|
61
|
-
* - Text to display on the button.
|
|
62
|
-
*/
|
|
28
|
+
/** Text to display on the button. */
|
|
63
29
|
ButtonText?: string;
|
|
64
|
-
/**
|
|
65
|
-
* - Directory to open in the dialog.
|
|
66
|
-
*/
|
|
30
|
+
/** Directory to open in the dialog. */
|
|
67
31
|
Directory?: string;
|
|
68
|
-
/**
|
|
69
|
-
* - Indicates if the dialog should appear detached from the main window.
|
|
70
|
-
*/
|
|
32
|
+
/** Indicates if the dialog should appear detached from the main window. */
|
|
71
33
|
Detached?: boolean;
|
|
72
|
-
}
|
|
73
|
-
export
|
|
74
|
-
/**
|
|
75
|
-
* - Default filename to use in the dialog.
|
|
76
|
-
*/
|
|
34
|
+
}
|
|
35
|
+
export interface SaveFileDialogOptions {
|
|
36
|
+
/** Default filename to use in the dialog. */
|
|
77
37
|
Filename?: string;
|
|
78
|
-
/**
|
|
79
|
-
* - Indicates if directories can be chosen.
|
|
80
|
-
*/
|
|
38
|
+
/** Indicates if directories can be chosen. */
|
|
81
39
|
CanChooseDirectories?: boolean;
|
|
82
|
-
/**
|
|
83
|
-
* - Indicates if files can be chosen.
|
|
84
|
-
*/
|
|
40
|
+
/** Indicates if files can be chosen. */
|
|
85
41
|
CanChooseFiles?: boolean;
|
|
86
|
-
/**
|
|
87
|
-
* - Indicates if directories can be created.
|
|
88
|
-
*/
|
|
42
|
+
/** Indicates if directories can be created. */
|
|
89
43
|
CanCreateDirectories?: boolean;
|
|
90
|
-
/**
|
|
91
|
-
* - Indicates if hidden files should be shown.
|
|
92
|
-
*/
|
|
44
|
+
/** Indicates if hidden files should be shown. */
|
|
93
45
|
ShowHiddenFiles?: boolean;
|
|
94
|
-
/**
|
|
95
|
-
* - Indicates if aliases should be resolved.
|
|
96
|
-
*/
|
|
46
|
+
/** Indicates if aliases should be resolved. */
|
|
97
47
|
ResolvesAliases?: boolean;
|
|
98
|
-
/**
|
|
99
|
-
* - Indicates if multiple selection is allowed.
|
|
100
|
-
*/
|
|
101
|
-
AllowsMultipleSelection?: boolean;
|
|
102
|
-
/**
|
|
103
|
-
* - Indicates if the extension should be hidden.
|
|
104
|
-
*/
|
|
48
|
+
/** Indicates if the extension should be hidden. */
|
|
105
49
|
HideExtension?: boolean;
|
|
106
|
-
/**
|
|
107
|
-
* - Indicates if hidden extensions can be selected.
|
|
108
|
-
*/
|
|
50
|
+
/** Indicates if hidden extensions can be selected. */
|
|
109
51
|
CanSelectHiddenExtension?: boolean;
|
|
110
|
-
/**
|
|
111
|
-
* - Indicates if file packages should be treated as directories.
|
|
112
|
-
*/
|
|
52
|
+
/** Indicates if file packages should be treated as directories. */
|
|
113
53
|
TreatsFilePackagesAsDirectories?: boolean;
|
|
114
|
-
/**
|
|
115
|
-
* - Indicates if other file types are allowed.
|
|
116
|
-
*/
|
|
54
|
+
/** Indicates if other file types are allowed. */
|
|
117
55
|
AllowsOtherFiletypes?: boolean;
|
|
118
|
-
/**
|
|
119
|
-
* - Array of file filters.
|
|
120
|
-
*/
|
|
56
|
+
/** Array of file filters. */
|
|
121
57
|
Filters?: FileFilter[];
|
|
122
|
-
/**
|
|
123
|
-
* - Title of the dialog.
|
|
124
|
-
*/
|
|
58
|
+
/** Title of the dialog. */
|
|
125
59
|
Title?: string;
|
|
126
|
-
/**
|
|
127
|
-
* - Message to show in the dialog.
|
|
128
|
-
*/
|
|
60
|
+
/** Message to show in the dialog. */
|
|
129
61
|
Message?: string;
|
|
130
|
-
/**
|
|
131
|
-
* - Text to display on the button.
|
|
132
|
-
*/
|
|
62
|
+
/** Text to display on the button. */
|
|
133
63
|
ButtonText?: string;
|
|
134
|
-
/**
|
|
135
|
-
* - Directory to open in the dialog.
|
|
136
|
-
*/
|
|
64
|
+
/** Directory to open in the dialog. */
|
|
137
65
|
Directory?: string;
|
|
138
|
-
/**
|
|
139
|
-
* - Indicates if the dialog should appear detached from the main window.
|
|
140
|
-
*/
|
|
66
|
+
/** Indicates if the dialog should appear detached from the main window. */
|
|
141
67
|
Detached?: boolean;
|
|
142
|
-
}
|
|
143
|
-
export
|
|
144
|
-
/**
|
|
145
|
-
* - The title of the dialog window.
|
|
146
|
-
*/
|
|
68
|
+
}
|
|
69
|
+
export interface MessageDialogOptions {
|
|
70
|
+
/** The title of the dialog window. */
|
|
147
71
|
Title?: string;
|
|
148
|
-
/**
|
|
149
|
-
* - The main message to show in the dialog.
|
|
150
|
-
*/
|
|
72
|
+
/** The main message to show in the dialog. */
|
|
151
73
|
Message?: string;
|
|
152
|
-
/**
|
|
153
|
-
* - Array of button options to show in the dialog.
|
|
154
|
-
*/
|
|
74
|
+
/** Array of button options to show in the dialog. */
|
|
155
75
|
Buttons?: Button[];
|
|
156
|
-
/**
|
|
157
|
-
* - True if the dialog should appear detached from the main window (if applicable).
|
|
158
|
-
*/
|
|
76
|
+
/** True if the dialog should appear detached from the main window (if applicable). */
|
|
159
77
|
Detached?: boolean;
|
|
160
|
-
}
|
|
161
|
-
export
|
|
162
|
-
/**
|
|
163
|
-
* - Text that appears within the button.
|
|
164
|
-
*/
|
|
78
|
+
}
|
|
79
|
+
export interface Button {
|
|
80
|
+
/** Text that appears within the button. */
|
|
165
81
|
Label?: string;
|
|
166
|
-
/**
|
|
167
|
-
* - True if the button should cancel an operation when clicked.
|
|
168
|
-
*/
|
|
82
|
+
/** True if the button should cancel an operation when clicked. */
|
|
169
83
|
IsCancel?: boolean;
|
|
170
|
-
/**
|
|
171
|
-
* - True if the button should be the default action when the user presses enter.
|
|
172
|
-
*/
|
|
84
|
+
/** True if the button should be the default action when the user presses enter. */
|
|
173
85
|
IsDefault?: boolean;
|
|
174
|
-
}
|
|
175
|
-
export
|
|
176
|
-
/**
|
|
177
|
-
* - Display name for the filter, it could be "Text Files", "Images" etc.
|
|
178
|
-
*/
|
|
86
|
+
}
|
|
87
|
+
export interface FileFilter {
|
|
88
|
+
/** Display name for the filter, it could be "Text Files", "Images" etc. */
|
|
179
89
|
DisplayName?: string;
|
|
180
|
-
/**
|
|
181
|
-
* - Pattern to match for the filter, e.g. "*.txt;*.md" for text markdown files.
|
|
182
|
-
*/
|
|
90
|
+
/** Pattern to match for the filter, e.g. "*.txt;*.md" for text markdown files. */
|
|
183
91
|
Pattern?: string;
|
|
184
|
-
}
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Presents an info dialog.
|
|
95
|
+
*
|
|
96
|
+
* @param options - Dialog options
|
|
97
|
+
* @returns A promise that resolves with the label of the chosen button.
|
|
98
|
+
*/
|
|
99
|
+
export declare function Info(options: MessageDialogOptions): Promise<string>;
|
|
100
|
+
/**
|
|
101
|
+
* Presents a warning dialog.
|
|
102
|
+
*
|
|
103
|
+
* @param options - Dialog options.
|
|
104
|
+
* @returns A promise that resolves with the label of the chosen button.
|
|
105
|
+
*/
|
|
106
|
+
export declare function Warning(options: MessageDialogOptions): Promise<string>;
|
|
107
|
+
/**
|
|
108
|
+
* Presents an error dialog.
|
|
109
|
+
*
|
|
110
|
+
* @param options - Dialog options.
|
|
111
|
+
* @returns A promise that resolves with the label of the chosen button.
|
|
112
|
+
*/
|
|
113
|
+
export declare function Error(options: MessageDialogOptions): Promise<string>;
|
|
114
|
+
/**
|
|
115
|
+
* Presents a question dialog.
|
|
116
|
+
*
|
|
117
|
+
* @param options - Dialog options.
|
|
118
|
+
* @returns A promise that resolves with the label of the chosen button.
|
|
119
|
+
*/
|
|
120
|
+
export declare function Question(options: MessageDialogOptions): Promise<string>;
|
|
121
|
+
/**
|
|
122
|
+
* Presents a file selection dialog to pick one or more files to open.
|
|
123
|
+
*
|
|
124
|
+
* @param options - Dialog options.
|
|
125
|
+
* @returns Selected file or list of files, or a blank string/empty list if no file has been selected.
|
|
126
|
+
*/
|
|
127
|
+
export declare function OpenFile(options: OpenFileDialogOptions & {
|
|
128
|
+
AllowsMultipleSelection: true;
|
|
129
|
+
}): Promise<string[]>;
|
|
130
|
+
export declare function OpenFile(options: OpenFileDialogOptions & {
|
|
131
|
+
AllowsMultipleSelection?: false | undefined;
|
|
132
|
+
}): Promise<string>;
|
|
133
|
+
export declare function OpenFile(options: OpenFileDialogOptions): Promise<string | string[]>;
|
|
134
|
+
/**
|
|
135
|
+
* Presents a file selection dialog to pick a file to save.
|
|
136
|
+
*
|
|
137
|
+
* @param options - Dialog options.
|
|
138
|
+
* @returns Selected file, or a blank string if no file has been selected.
|
|
139
|
+
*/
|
|
140
|
+
export declare function SaveFile(options: SaveFileDialogOptions): Promise<string>;
|
package/types/drag.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|