@widget-js/core 0.10.6 → 0.10.13

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.d.ts CHANGED
@@ -514,6 +514,7 @@ interface IAppApi {
514
514
  getConfig(key: string, defaultValue: string | number | boolean): Promise<string | number | boolean>;
515
515
  getVersion(): Promise<string>;
516
516
  getPreloadPath(): Promise<string>;
517
+ getAppPath(): Promise<string>;
517
518
  openAddWidgetWindow(): Promise<void>;
518
519
  openSettingWindow(): Promise<void>;
519
520
  getIconFile(): Promise<string>;
@@ -1382,7 +1383,8 @@ declare enum Channel {
1382
1383
  DEVICE = "channel::cn.widgetjs.core.device",
1383
1384
  MOUSE = "channel::cn.widgetjs.core.mouse",
1384
1385
  KEYBOARD = "channel::cn.widgetjs.core.keyboard",
1385
- STORE = "channel::cn.widgetjs.core.store"
1386
+ STORE = "channel::cn.widgetjs.core.store",
1387
+ PROCESS = "channel::cn.widgetjs.core.process"
1386
1388
  }
1387
1389
 
1388
1390
  interface IClipboardApi {
@@ -1461,4 +1463,20 @@ interface IFileApi {
1461
1463
  type FileApiMethods = keyof IFileApi;
1462
1464
  declare const FileApi: IFileApi;
1463
1465
 
1464
- 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, 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 };
1466
+ /**
1467
+ * An object with V8 heap statistics. Note that all statistics are reported in Kilobytes.
1468
+ * @link https://www.electronjs.org/docs/latest/api/process#processgetheapstatistics
1469
+ */
1470
+ interface HeapStatistics {
1471
+ totalHeapSize: number;
1472
+ totalHeapSizeExecutable: number;
1473
+ totalPhysicalSize: number;
1474
+ totalAvailableSize: number;
1475
+ usedHeapSize: number;
1476
+ heapSizeLimit: number;
1477
+ mallocedMemory: number;
1478
+ peakMallocedMemory: number;
1479
+ doesZapGarbage: boolean;
1480
+ }
1481
+
1482
+ 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, 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
@@ -1158,6 +1158,7 @@ var Channel = /* @__PURE__ */ ((Channel2) => {
1158
1158
  Channel2["MOUSE"] = "channel::cn.widgetjs.core.mouse";
1159
1159
  Channel2["KEYBOARD"] = "channel::cn.widgetjs.core.keyboard";
1160
1160
  Channel2["STORE"] = "channel::cn.widgetjs.core.store";
1161
+ Channel2["PROCESS"] = "channel::cn.widgetjs.core.process";
1161
1162
  return Channel2;
1162
1163
  })(Channel || {});
1163
1164
 
@@ -1810,6 +1811,9 @@ var AppApiConstants = /* @__PURE__ */ ((AppApiConstants2) => {
1810
1811
  return AppApiConstants2;
1811
1812
  })(AppApiConstants || {});
1812
1813
  var AppApiImpl = class extends BaseApi {
1814
+ getAppPath() {
1815
+ return this.invokeMethod("getAppPath");
1816
+ }
1813
1817
  async getIconFile() {
1814
1818
  return this.invokeMethod("getIconFile");
1815
1819
  }