@wailsio/runtime 3.0.0-alpha.65 → 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.
Files changed (142) hide show
  1. package/{src → dist}/application.js +2 -16
  2. package/dist/browser.js +20 -0
  3. package/dist/callable.js +144 -0
  4. package/dist/calls.js +194 -0
  5. package/dist/cancellable.js +792 -0
  6. package/dist/clipboard.js +30 -0
  7. package/dist/contextmenu.js +80 -0
  8. package/{src → dist}/create.js +2 -33
  9. package/dist/dialogs.js +134 -0
  10. package/dist/drag.js +222 -0
  11. package/dist/event_types.js +229 -0
  12. package/dist/events.js +101 -0
  13. package/dist/flags.js +23 -0
  14. package/dist/index.js +38 -0
  15. package/dist/listener.js +44 -0
  16. package/{src → dist}/nanoid.js +7 -11
  17. package/dist/runtime.js +63 -0
  18. package/dist/screens.js +38 -0
  19. package/dist/system.js +116 -0
  20. package/{src → dist}/utils.js +29 -20
  21. package/dist/window.js +438 -0
  22. package/{src → dist}/wml.js +51 -122
  23. package/package.json +43 -19
  24. package/types/application.d.ts +3 -10
  25. package/types/browser.d.ts +4 -4
  26. package/types/callable.d.ts +3 -0
  27. package/types/calls.d.ts +43 -49
  28. package/types/cancellable.d.ts +434 -0
  29. package/types/clipboard.d.ts +6 -5
  30. package/types/contextmenu.d.ts +1 -0
  31. package/types/create.d.ts +6 -27
  32. package/types/dialogs.d.ts +99 -143
  33. package/types/drag.d.ts +1 -0
  34. package/types/event_types.d.ts +218 -219
  35. package/types/events.d.ts +45 -250
  36. package/types/flags.d.ts +3 -3
  37. package/types/index.d.ts +16 -14
  38. package/types/listener.d.ts +9 -0
  39. package/types/nanoid.d.ts +1 -1
  40. package/types/runtime.d.ts +18 -26
  41. package/types/screens.d.ts +42 -76
  42. package/types/system.d.ts +50 -79
  43. package/types/utils.d.ts +15 -8
  44. package/types/window.d.ts +110 -225
  45. package/types/wml.d.ts +2 -6
  46. package/docs/.nojekyll +0 -1
  47. package/docs/assets/highlight.css +0 -22
  48. package/docs/assets/icons.js +0 -15
  49. package/docs/assets/icons.svg +0 -1
  50. package/docs/assets/main.js +0 -59
  51. package/docs/assets/navigation.js +0 -1
  52. package/docs/assets/search.js +0 -1
  53. package/docs/assets/style.css +0 -1415
  54. package/docs/classes/Call.RuntimeError.html +0 -11
  55. package/docs/classes/Events.WailsEvent.html +0 -4
  56. package/docs/functions/Application.Hide.html +0 -2
  57. package/docs/functions/Application.Quit.html +0 -2
  58. package/docs/functions/Application.Show.html +0 -2
  59. package/docs/functions/Browser.OpenURL.html +0 -3
  60. package/docs/functions/Call.ByID.html +0 -8
  61. package/docs/functions/Call.ByName.html +0 -6
  62. package/docs/functions/Call.Call.html +0 -11
  63. package/docs/functions/Clipboard.SetText.html +0 -6
  64. package/docs/functions/Clipboard.Text.html +0 -3
  65. package/docs/functions/Create.Any.html +0 -2
  66. package/docs/functions/Create.Array.html +0 -4
  67. package/docs/functions/Create.ByteSlice.html +0 -3
  68. package/docs/functions/Create.Map.html +0 -4
  69. package/docs/functions/Create.Nullable.html +0 -3
  70. package/docs/functions/Create.Struct.html +0 -3
  71. package/docs/functions/Dialogs.Error.html +0 -5
  72. package/docs/functions/Dialogs.Info.html +0 -5
  73. package/docs/functions/Dialogs.OpenFile.html +0 -3
  74. package/docs/functions/Dialogs.Question.html +0 -5
  75. package/docs/functions/Dialogs.SaveFile.html +0 -3
  76. package/docs/functions/Dialogs.Warning.html +0 -5
  77. package/docs/functions/Events.Emit.html +0 -6
  78. package/docs/functions/Events.Off.html +0 -4
  79. package/docs/functions/Events.OffAll.html +0 -3
  80. package/docs/functions/Events.On.html +0 -7
  81. package/docs/functions/Events.OnMultiple.html +0 -8
  82. package/docs/functions/Events.Once.html +0 -7
  83. package/docs/functions/Events.setup.html +0 -1
  84. package/docs/functions/Flags.GetFlag.html +0 -6
  85. package/docs/functions/Screens.GetAll.html +0 -3
  86. package/docs/functions/Screens.GetCurrent.html +0 -3
  87. package/docs/functions/Screens.GetPrimary.html +0 -3
  88. package/docs/functions/System.Capabilities.html +0 -4
  89. package/docs/functions/System.Environment.html +0 -5
  90. package/docs/functions/System.IsAMD64.html +0 -3
  91. package/docs/functions/System.IsARM.html +0 -3
  92. package/docs/functions/System.IsARM64.html +0 -5
  93. package/docs/functions/System.IsDarkMode.html +0 -5
  94. package/docs/functions/System.IsDebug.html +0 -1
  95. package/docs/functions/System.IsLinux.html +0 -3
  96. package/docs/functions/System.IsMac.html +0 -3
  97. package/docs/functions/System.IsWindows.html +0 -3
  98. package/docs/functions/System.invoke.html +0 -1
  99. package/docs/functions/WML.Enable.html +0 -2
  100. package/docs/functions/WML.Reload.html +0 -2
  101. package/docs/functions/init.html +0 -1
  102. package/docs/index.html +0 -5
  103. package/docs/interfaces/Call.CallOptions.html +0 -7
  104. package/docs/interfaces/Dialogs.Button.html +0 -7
  105. package/docs/interfaces/Dialogs.FileFilter.html +0 -5
  106. package/docs/interfaces/Dialogs.MessageDialogOptions.html +0 -9
  107. package/docs/interfaces/Dialogs.OpenFileDialogOptions.html +0 -33
  108. package/docs/interfaces/Dialogs.SaveFileDialogOptions.html +0 -35
  109. package/docs/interfaces/Screens.Rect.html +0 -9
  110. package/docs/interfaces/Screens.Screen.html +0 -25
  111. package/docs/interfaces/Screens.Size.html +0 -5
  112. package/docs/interfaces/System.EnvironmentInfo.html +0 -11
  113. package/docs/interfaces/System.OSInfo.html +0 -9
  114. package/docs/modules/Application.html +0 -4
  115. package/docs/modules/Browser.html +0 -2
  116. package/docs/modules/Call.html +0 -6
  117. package/docs/modules/Clipboard.html +0 -3
  118. package/docs/modules/Create.html +0 -7
  119. package/docs/modules/Dialogs.html +0 -12
  120. package/docs/modules/Events.html +0 -10
  121. package/docs/modules/Flags.html +0 -2
  122. package/docs/modules/Screens.html +0 -7
  123. package/docs/modules/System.html +0 -14
  124. package/docs/modules/WML.html +0 -3
  125. package/docs/modules.html +0 -14
  126. package/docs/variables/Events.Types.html +0 -1
  127. package/docs/variables/Window.html +0 -2
  128. package/src/browser.js +0 -24
  129. package/src/calls.js +0 -221
  130. package/src/clipboard.js +0 -35
  131. package/src/contextmenu.js +0 -97
  132. package/src/dialogs.js +0 -200
  133. package/src/drag.js +0 -119
  134. package/src/event_types.js +0 -219
  135. package/src/events.js +0 -140
  136. package/src/flags.js +0 -25
  137. package/src/index.js +0 -60
  138. package/src/runtime.js +0 -92
  139. package/src/screens.js +0 -71
  140. package/src/system.js +0 -143
  141. package/src/window.js +0 -638
  142. package/tsconfig.json +0 -20
@@ -1,184 +1,140 @@
1
- export function Info(options: MessageDialogOptions): Promise<string>;
2
- export function Warning(options: MessageDialogOptions): Promise<string>;
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 type SaveFileDialogOptions = {
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 type MessageDialogOptions = {
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 type Button = {
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 type FileFilter = {
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>;
@@ -0,0 +1 @@
1
+ export {};