@wailsio/runtime@3.0.0-alpha.20

This fixes dragging by working around Vite's aggressive tree shaking
This commit is contained in:
Lea Anthony 2024-01-30 21:01:32 +11:00
commit cbaf859103
No known key found for this signature in database
GPG key ID: 33DAF7BB90A58405
9 changed files with 8 additions and 21 deletions

File diff suppressed because one or more lines are too long

View file

@ -1,4 +1,5 @@
events.test.js
node_modules
types/drag.d.ts
types/contextmenu.d.ts
types/contextmenu.d.ts
types/log.d.ts

View file

@ -1,6 +1,6 @@
{
"name": "@wailsio/runtime",
"version": "3.0.0-alpha.17",
"version": "3.0.0-alpha.20",
"description": "Wails Runtime",
"main": "src/index.js",
"types": "types/index.d.ts",

View file

@ -21,6 +21,7 @@ window.addEventListener('mousedown', onMouseDown);
window.addEventListener('mousemove', onMouseMove);
window.addEventListener('mouseup', onMouseUp);
let shouldDrag = false;
let resizeEdge = null;
let resizable = false;

View file

@ -15,6 +15,7 @@ window._wails = window._wails || {};
import * as Application from "./application";
import * as Browser from "./browser";
import * as Clipboard from "./clipboard";
import * as ContextMenu from "./contextmenu";
import * as Flags from "./flags";
import * as Screens from "./screens";
import * as System from "./system";
@ -23,6 +24,7 @@ import * as WML from './wml';
import * as Events from "./events";
import * as Dialogs from "./dialogs";
import * as Call from "./calls";
import * as Drag from "./drag";
import {invoke} from "./system";

View file

@ -3,7 +3,6 @@ import {Emit, WailsEvent} from "./events";
import {Question} from "./dialogs";
import {Get} from "./window";
import {OpenURL} from "./browser";
import {debugLog} from "./log";
/**
* Sends an event with the given name and optional data.
@ -145,9 +144,6 @@ function addWMLOpenBrowserListener() {
* @return {void}
*/
export function Reload() {
if(DEBUG) {
debugLog("Reloading WML");
}
addWMLEventListeners();
addWMLWindowListeners();
addWMLOpenBrowserListener();

View file

@ -1 +0,0 @@
export {};

View file

@ -81,15 +81,6 @@ export const Types: {
ApplicationDidChangeIcon: string;
ApplicationDidChangeOcclusionState: string;
ApplicationDidChangeScreenParameters: string;
/**
* Register a callback function to be called multiple times for a specific event.
*
* @param {string} eventName - The name of the event to register the callback for.
* @param {function} callback - The callback function to be called when the event is triggered.
* @param {number} maxCallbacks - The maximum number of times the callback can be called for the event. Once the maximum number is reached, the callback will no longer be called.
*
@return {function} - A function that, when called, will unregister the callback from the event.
*/
ApplicationDidChangeStatusBarFrame: string;
ApplicationDidChangeStatusBarOrientation: string;
ApplicationDidFinishLaunching: string;

View file

@ -1,3 +1,4 @@
export function invoke(msg: any): any;
/**
* @function
* Retrieves the system dark mode status.
@ -59,7 +60,6 @@ export function IsARM(): boolean;
*/
export function IsARM64(): boolean;
export function IsDebug(): boolean;
export let invoke: any;
export type EnvironmentInfo = {
/**
* - The operating system in use.