Runtime updates

This commit is contained in:
Lea Anthony 2020-11-17 21:19:09 +11:00
commit 7c7b6ba082
No known key found for this signature in database
GPG key ID: 33DAF7BB90A58405
5 changed files with 52 additions and 9 deletions

View file

@ -1,4 +1,8 @@
{
"go.formatTool": "goimports",
"eslint.alwaysShowStatus": true
"eslint.alwaysShowStatus": true,
"files.associations": {
"__locale": "c",
"ios": "c"
}
}

View file

@ -1,6 +1,6 @@
{
"name": "@wails/runtime",
"version": "1.2.4",
"version": "1.2.11",
"description": "Wails V2 Javascript runtime library",
"main": "main.js",
"types": "runtime.d.ts",

View file

@ -7,13 +7,51 @@ interface Store {
update(callback: (currentvalue: any) => any): void;
}
interface Level {
interface MacTitleBar {
TitleBarAppearsTransparent: boolean; // NSWindow.titleBarAppearsTransparent
HideTitle: boolean; // NSWindow.hideTitle
HideTitleBar: boolean; // NSWindow.hideTitleBar
FullSizeContent: boolean; // Makes the webview portion of the window the full size of the window, even over the titlebar
UseToolbar: boolean; // Set true to add a blank toolbar to the window (makes the title bar larger)
HideToolbarSeparator: boolean; // Set true to remove the separator between the toolbar and the main content area
}
interface MacAppConfig {
TitleBar: MacTitleBar;
}
interface LinuxAppConfig {
}
interface WindowsAppConfig {
}
interface AppConfig {
Title: string; // Application Title
Width: number; // Window Width
Height: number; // Window Height
DisableResize: boolean; // True if resize is disabled
Fullscreen: boolean; // App started in fullscreen
MinWidth: number; // Window Minimum Width
MinHeight: number; // Window Minimum Height
MaxWidth: number; // Window Maximum Width
MaxHeight: number; // Window Maximum Height
StartHidden: boolean; // Start with window hidden
DevTools: boolean; // Enables the window devtools
RBGA: number; // The initial window colour. Convert to hex then it'll mean 0xRRGGBBAA
Mac?: MacAppConfig; // - Configuration when running on Mac
Linux?: LinuxAppConfig; // - Configuration when running on Linux
Windows?: WindowsAppConfig; // - Configuration when running on Windows
Appearance: string; // The default application appearance. Use the values listed here: https://developer.apple.com/documentation/appkit/nsappearance?language=objc
WebviewIsTransparent: number; // Makes the background of the webview content transparent. Use this with the Alpha part of the window colour to make parts of your application transparent.
WindowBackgroundIsTranslucent: number; // Makes the transparent parts of the application window translucent. Example: https://en.wikipedia.org/wiki/MacOS_Big_Sur#/media/File:MacOS_Big_Sur_-_Safari_Extensions_category_in_App_Store.jpg
LogLevel: number; // The initial log level (lower is more verbose)
}
interface Level {
TRACE: 1,
DEBUG: 2,
INFO: 3,
WARNING: 4,
ERROR: 5,
};
}
declare const wailsapp__runtime: {
Browser: {
@ -39,7 +77,8 @@ declare const wailsapp__runtime: {
OnThemeChange(callback: (darkModeEnabled: boolean) => void): void;
LogLevel(): Store;
Platform(): string;
AppType(): string
AppType(): string;
AppConfig(): AppConfig;
};
Store: {
New(name: string, defaultValue?: any): Store;

View file

@ -135,9 +135,9 @@
}
},
"@wails/runtime": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/@wails/runtime/-/runtime-1.2.2.tgz",
"integrity": "sha512-sZlW83ZXldcb4Kbkcl1MZ/iPdSbMQtlCM60b3VcCehwYqR/aM/cKZPLm/HbOwvyRhkv4/Uo6QPlwlB13UUFhSA==",
"version": "1.2.11",
"resolved": "https://registry.npmjs.org/@wails/runtime/-/runtime-1.2.11.tgz",
"integrity": "sha512-IhCsu8bvCb8Vjv3T0Ob+yLFYlpzFwox073LD55khsVJc7/1jB3aMcqt4y7Jnnomn6SUcitImLHpw8bytKsHjLA==",
"dev": true
},
"alphanum-sort": {

View file

@ -11,7 +11,7 @@
"@rollup/plugin-commonjs": "^11.0.0",
"@rollup/plugin-node-resolve": "^7.0.0",
"@rollup/plugin-url": "^5.0.1",
"@wails/runtime": "^1.2.2",
"@wails/runtime": "^1.2.11",
"focus-visible": "^5.2.0",
"halfmoon": "^1.1.1",
"postcss": "^8.1.7",