@widget-js/core 0.10.14 → 0.10.21
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/index.cjs +2 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +6 -19
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CPUUsage, IOCounters, BlinkMemoryInfo, HeapStatistics
|
|
1
|
+
import { CPUUsage, IOCounters, BlinkMemoryInfo, HeapStatistics, ProcessMemoryInfo, SystemMemoryInfo } from 'electron';
|
|
2
2
|
import { FileTypeResult } from 'file-type';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -116,6 +116,7 @@ interface IPageOptions extends IWindowSize {
|
|
|
116
116
|
resizable?: boolean;
|
|
117
117
|
backgroundThrottling?: boolean;
|
|
118
118
|
security?: boolean;
|
|
119
|
+
webviewTag?: boolean;
|
|
119
120
|
path: string;
|
|
120
121
|
/**
|
|
121
122
|
* 是否只能添加一次
|
|
@@ -133,6 +134,7 @@ interface IPage {
|
|
|
133
134
|
*/
|
|
134
135
|
readonly title: LanguageTextMap;
|
|
135
136
|
readonly permissions: WidgetPermission[];
|
|
137
|
+
readonly webviewTag: boolean;
|
|
136
138
|
/**
|
|
137
139
|
* 窗口介绍
|
|
138
140
|
*/
|
|
@@ -184,6 +186,7 @@ declare class Page implements IPage {
|
|
|
184
186
|
packageName?: string | null;
|
|
185
187
|
readonly height: number;
|
|
186
188
|
readonly maxWidth: number;
|
|
189
|
+
readonly webviewTag: boolean;
|
|
187
190
|
readonly maxHeight: number;
|
|
188
191
|
readonly minWidth: number;
|
|
189
192
|
readonly minHeight: number;
|
|
@@ -1429,7 +1432,7 @@ interface IProcessApi {
|
|
|
1429
1432
|
getCPUUsage(): Promise<CPUUsage>;
|
|
1430
1433
|
getIOCounters(): Promise<IOCounters>;
|
|
1431
1434
|
getBlinkMemoryInfo(): Promise<BlinkMemoryInfo>;
|
|
1432
|
-
getHeapStatistics(): Promise<HeapStatistics
|
|
1435
|
+
getHeapStatistics(): Promise<HeapStatistics>;
|
|
1433
1436
|
/**
|
|
1434
1437
|
* // On macOS -> '10.13.6'
|
|
1435
1438
|
* // On Windows -> '10.0.17763'
|
|
@@ -1481,20 +1484,4 @@ interface IFileApi {
|
|
|
1481
1484
|
type FileApiMethods = keyof IFileApi;
|
|
1482
1485
|
declare const FileApi: IFileApi;
|
|
1483
1486
|
|
|
1484
|
-
|
|
1485
|
-
* An object with V8 heap statistics. Note that all statistics are reported in Kilobytes.
|
|
1486
|
-
* @link https://www.electronjs.org/docs/latest/api/process#processgetheapstatistics
|
|
1487
|
-
*/
|
|
1488
|
-
interface HeapStatistics {
|
|
1489
|
-
totalHeapSize: number;
|
|
1490
|
-
totalHeapSizeExecutable: number;
|
|
1491
|
-
totalPhysicalSize: number;
|
|
1492
|
-
totalAvailableSize: number;
|
|
1493
|
-
usedHeapSize: number;
|
|
1494
|
-
heapSizeLimit: number;
|
|
1495
|
-
mallocedMemory: number;
|
|
1496
|
-
peakMallocedMemory: number;
|
|
1497
|
-
doesZapGarbage: boolean;
|
|
1498
|
-
}
|
|
1499
|
-
|
|
1500
|
-
export { AlignPosition, ApiConstants, AppApi, AppApiConstants, AppApiEvent, AppApiMethods, AppMouseEvent, AppNotification, BaseApi, BroadcastApi, BroadcastApiMethods, BroadcastEvent, BroadcastEventType, BrowserWindowApi, BrowserWindowApiEvent, BrowserWindowApiMethods, Channel, ClipboardApi, ClipboardApiEvent, ClipboardApiMethods, DeployMode, DeployedPage, DeployedWidget, DeployedWidgetApi, DeployedWidgetApiMethods, DevOptions, DeviceApi, DeviceApiMethods, DialogApi, DialogApiMethods, ElectronApi, ElectronUtils, FileApi, FileApiMethods, Gravity, GridRect, GridSystem, HeapStatistics, HostedMode, IGridRect, IPage, IPageOptions, IWidgetDataApi, IWidgetOptions, IWindowSize, LanguageCode, LanguageTextMap, LocalPackageUrlInfo, LocationQuery, LocationQueryRaw, LocationQueryValue, LocationQueryValueRaw, LogApi, LogApiMethods, MetaInfo, NativeKeyboardEvent, NormalizeOptions, NotificationApi, NotificationApiEvent, NotificationApiMethods, NotificationOption, NotificationSize, NotificationType, OpenUrlOptions, Page, Point, Position, ProcessApi, ProcessApiMethods, ReadDirOptions, Rectangle, RemotePackageUrlInfo, SaveWidgetOption, SetPositionOptions, ShortcutApi, ShortcutApiEvent, ShortcutApiMethods, StoreApi, StoreApiMethods, ThemeMode, WebSocketEvent, WebSocketEventType, Widget, WidgetApi, WidgetApiEvent, WidgetApiMethods, WidgetData, WidgetDataApi, WidgetDataApiMethods, WidgetKeyword, WidgetPackage, WidgetPackageOptions, WidgetParams, WidgetPermission, WidgetRoute, WidgetUrlUtils, getTextByLanguageCode, normalizeUrl, parseQuery, stringifyQuery };
|
|
1487
|
+
export { AlignPosition, ApiConstants, AppApi, AppApiConstants, AppApiEvent, AppApiMethods, AppMouseEvent, AppNotification, BaseApi, BroadcastApi, BroadcastApiMethods, BroadcastEvent, BroadcastEventType, BrowserWindowApi, BrowserWindowApiEvent, BrowserWindowApiMethods, Channel, ClipboardApi, ClipboardApiEvent, ClipboardApiMethods, DeployMode, DeployedPage, DeployedWidget, DeployedWidgetApi, DeployedWidgetApiMethods, DevOptions, DeviceApi, DeviceApiMethods, DialogApi, DialogApiMethods, ElectronApi, ElectronUtils, FileApi, FileApiMethods, Gravity, GridRect, GridSystem, HostedMode, IGridRect, IPage, IPageOptions, IWidgetDataApi, IWidgetOptions, IWindowSize, LanguageCode, LanguageTextMap, LocalPackageUrlInfo, LocationQuery, LocationQueryRaw, LocationQueryValue, LocationQueryValueRaw, LogApi, LogApiMethods, MetaInfo, NativeKeyboardEvent, NormalizeOptions, NotificationApi, NotificationApiEvent, NotificationApiMethods, NotificationOption, NotificationSize, NotificationType, OpenUrlOptions, Page, Point, Position, ProcessApi, ProcessApiMethods, ReadDirOptions, Rectangle, RemotePackageUrlInfo, SaveWidgetOption, SetPositionOptions, ShortcutApi, ShortcutApiEvent, ShortcutApiMethods, StoreApi, StoreApiMethods, ThemeMode, WebSocketEvent, WebSocketEventType, Widget, WidgetApi, WidgetApiEvent, WidgetApiMethods, WidgetData, WidgetDataApi, WidgetDataApiMethods, WidgetKeyword, WidgetPackage, WidgetPackageOptions, WidgetParams, WidgetPermission, WidgetRoute, WidgetUrlUtils, getTextByLanguageCode, normalizeUrl, parseQuery, stringifyQuery };
|
package/dist/index.js
CHANGED
|
@@ -74,6 +74,7 @@ var Page = class {
|
|
|
74
74
|
packageName;
|
|
75
75
|
height;
|
|
76
76
|
maxWidth;
|
|
77
|
+
webviewTag;
|
|
77
78
|
maxHeight;
|
|
78
79
|
minWidth;
|
|
79
80
|
minHeight;
|
|
@@ -108,6 +109,7 @@ var Page = class {
|
|
|
108
109
|
this.path = options.path;
|
|
109
110
|
this.meta = options.meta ?? {};
|
|
110
111
|
this.security = options.security ?? false;
|
|
112
|
+
this.webviewTag = options.webviewTag ?? false;
|
|
111
113
|
this.permissions = options.permissions ?? [];
|
|
112
114
|
}
|
|
113
115
|
/**
|