@wailsio/runtime 3.0.0-alpha.95 → 3.0.0-alpha.96
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/create.js +7 -0
- package/dist/event_types.js +1 -0
- package/dist/window.js +2 -2
- package/package.json +2 -1
- package/types/create.d.ts +5 -0
- package/types/event_types.d.ts +1 -0
- package/types/window.d.ts +2 -2
package/dist/create.js
CHANGED
|
@@ -92,6 +92,13 @@ export function Struct(createField) {
|
|
|
92
92
|
return source;
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
|
+
/**
|
|
96
|
+
* DateFromTime is a creation function that converts RFC3339 strings
|
|
97
|
+
* (from Go's time.Time JSON marshaling) to JavaScript Date objects.
|
|
98
|
+
*/
|
|
99
|
+
export function DateFromTime(source) {
|
|
100
|
+
return new Date(source);
|
|
101
|
+
}
|
|
95
102
|
/**
|
|
96
103
|
* Maps known event names to creation functions for their data types.
|
|
97
104
|
* Will be monkey-patched by the binding generator.
|
package/dist/event_types.js
CHANGED
|
@@ -193,6 +193,7 @@ export const Types = Object.freeze({
|
|
|
193
193
|
WindowZoomIn: "mac:WindowZoomIn",
|
|
194
194
|
WindowZoomOut: "mac:WindowZoomOut",
|
|
195
195
|
WindowZoomReset: "mac:WindowZoomReset",
|
|
196
|
+
WebViewWebContentProcessDidTerminate: "mac:WebViewWebContentProcessDidTerminate",
|
|
196
197
|
}),
|
|
197
198
|
Linux: Object.freeze({
|
|
198
199
|
ApplicationStartup: "linux:ApplicationStartup",
|
package/dist/window.js
CHANGED
|
@@ -540,8 +540,8 @@ class Window {
|
|
|
540
540
|
* Gathers information about the drop target element and sends it back to the Go backend.
|
|
541
541
|
*
|
|
542
542
|
* @param filenames - An array of file paths (strings) that were dropped.
|
|
543
|
-
* @param x - The x-coordinate of the drop event (CSS pixels
|
|
544
|
-
* @param y - The y-coordinate of the drop event (CSS pixels
|
|
543
|
+
* @param x - The x-coordinate of the drop event, in logical (CSS) pixels relative to the webview.
|
|
544
|
+
* @param y - The y-coordinate of the drop event, in logical (CSS) pixels relative to the webview.
|
|
545
545
|
*/
|
|
546
546
|
HandlePlatformFileDrop(filenames, x, y) {
|
|
547
547
|
var _a, _b;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wailsio/runtime",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.0.0-alpha.
|
|
4
|
+
"version": "3.0.0-alpha.96",
|
|
5
5
|
"description": "Wails Runtime",
|
|
6
6
|
"types": "types/index.d.ts",
|
|
7
7
|
"exports": {
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
"prepack": "npm run build"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
+
"esbuild": "0.28.1",
|
|
51
52
|
"happy-dom": "^20.9.0",
|
|
52
53
|
"promises-aplus-tests": "2.1.2",
|
|
53
54
|
"rimraf": "^6.0.1",
|
package/types/create.d.ts
CHANGED
|
@@ -29,6 +29,11 @@ export declare function Nullable<T = any>(element: (source: any) => T): (source:
|
|
|
29
29
|
* and returns an in-place creation function for a struct.
|
|
30
30
|
*/
|
|
31
31
|
export declare function Struct(createField: Record<string, (source: any) => any>): <U extends Record<string, any> = any>(source: any) => U;
|
|
32
|
+
/**
|
|
33
|
+
* DateFromTime is a creation function that converts RFC3339 strings
|
|
34
|
+
* (from Go's time.Time JSON marshaling) to JavaScript Date objects.
|
|
35
|
+
*/
|
|
36
|
+
export declare function DateFromTime(source: any): Date;
|
|
32
37
|
/**
|
|
33
38
|
* Maps known event names to creation functions for their data types.
|
|
34
39
|
* Will be monkey-patched by the binding generator.
|
package/types/event_types.d.ts
CHANGED
|
@@ -182,6 +182,7 @@ export declare const Types: Readonly<{
|
|
|
182
182
|
WindowZoomIn: "mac:WindowZoomIn";
|
|
183
183
|
WindowZoomOut: "mac:WindowZoomOut";
|
|
184
184
|
WindowZoomReset: "mac:WindowZoomReset";
|
|
185
|
+
WebViewWebContentProcessDidTerminate: "mac:WebViewWebContentProcessDidTerminate";
|
|
185
186
|
}>;
|
|
186
187
|
Linux: Readonly<{
|
|
187
188
|
ApplicationStartup: "linux:ApplicationStartup";
|
package/types/window.d.ts
CHANGED
|
@@ -308,8 +308,8 @@ declare class Window {
|
|
|
308
308
|
* Gathers information about the drop target element and sends it back to the Go backend.
|
|
309
309
|
*
|
|
310
310
|
* @param filenames - An array of file paths (strings) that were dropped.
|
|
311
|
-
* @param x - The x-coordinate of the drop event (CSS pixels
|
|
312
|
-
* @param y - The y-coordinate of the drop event (CSS pixels
|
|
311
|
+
* @param x - The x-coordinate of the drop event, in logical (CSS) pixels relative to the webview.
|
|
312
|
+
* @param y - The y-coordinate of the drop event, in logical (CSS) pixels relative to the webview.
|
|
313
313
|
*/
|
|
314
314
|
HandlePlatformFileDrop(filenames: string[], x: number, y: number): void;
|
|
315
315
|
/**
|