@widget-js/core 0.10.21 → 0.10.27

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
@@ -1,4 +1,4 @@
1
- import { CPUUsage, IOCounters, BlinkMemoryInfo, HeapStatistics, ProcessMemoryInfo, SystemMemoryInfo } from 'electron';
1
+ import { Config, CPUUsage, IOCounters, BlinkMemoryInfo, HeapStatistics, ProcessMemoryInfo, SystemMemoryInfo } from 'electron';
2
2
  import { FileTypeResult } from 'file-type';
3
3
 
4
4
  /**
@@ -514,7 +514,7 @@ declare class WidgetApiImpl extends BaseApi<WidgetApiMethods> implements IWidget
514
514
  declare const WidgetApi: WidgetApiImpl;
515
515
 
516
516
  interface IAppApi {
517
- setConfig(key: string, value: string | number | boolean): Promise<void>;
517
+ setConfig(key: string, value: string | number | boolean): Promise<any>;
518
518
  getConfig(key: string, defaultValue: string | number | boolean): Promise<string | number | boolean>;
519
519
  getVersion(): Promise<string>;
520
520
  getPreloadPath(): Promise<string>;
@@ -1190,6 +1190,7 @@ interface IBrowserWindowApi {
1190
1190
  setMinimumSize(width: number, height: number): Promise<void>;
1191
1191
  setZoomLevel(level: number): Promise<void>;
1192
1192
  setZoomFactor(factor: number): Promise<void>;
1193
+ setProxy(config: Config): Promise<void>;
1193
1194
  isFocused(): Promise<boolean>;
1194
1195
  }
1195
1196
  type BrowserWindowApiMethods = keyof IBrowserWindowApi;
@@ -1275,6 +1276,7 @@ declare class BrowserWindowApiImpl extends BaseApi<BrowserWindowApiMethods> impl
1275
1276
  close(): Promise<void>;
1276
1277
  setZoomFactor(factor: number): Promise<void>;
1277
1278
  setup(options: SetupOptions): Promise<void>;
1279
+ setProxy(config: Config): Promise<void>;
1278
1280
  }
1279
1281
  declare const BrowserWindowApi: BrowserWindowApiImpl;
1280
1282
 
@@ -1376,7 +1378,7 @@ declare enum Channel {
1376
1378
  BROWSER_WINDOW = "channel::cn.widgetjs.core.browser_window",
1377
1379
  BROADCAST = "channel::cn.widgetjs.core.broadcast",
1378
1380
  WIDGET = "channel::cn.widgetjs.core.widget",
1379
- HOSTED_WIDGET = "channel::cn.widgetjs.core.hosted_widget",
1381
+ DEPLOYED_WIDGET = "channel::cn.widgetjs.core.deployed_widget",
1380
1382
  APP = "channel::cn.widgetjs.core.app",
1381
1383
  DIALOG = "channel::cn.widgetjs.core.dialog",
1382
1384
  CLIPBOARD = "channel::cn.widgetjs.core.clipboard",
package/dist/index.js CHANGED
@@ -1148,7 +1148,7 @@ var Channel = /* @__PURE__ */ ((Channel2) => {
1148
1148
  Channel2["BROWSER_WINDOW"] = "channel::cn.widgetjs.core.browser_window";
1149
1149
  Channel2["BROADCAST"] = "channel::cn.widgetjs.core.broadcast";
1150
1150
  Channel2["WIDGET"] = "channel::cn.widgetjs.core.widget";
1151
- Channel2["HOSTED_WIDGET"] = "channel::cn.widgetjs.core.hosted_widget";
1151
+ Channel2["DEPLOYED_WIDGET"] = "channel::cn.widgetjs.core.deployed_widget";
1152
1152
  Channel2["APP"] = "channel::cn.widgetjs.core.app";
1153
1153
  Channel2["DIALOG"] = "channel::cn.widgetjs.core.dialog";
1154
1154
  Channel2["CLIPBOARD"] = "channel::cn.widgetjs.core.clipboard";
@@ -1563,6 +1563,9 @@ var BrowserWindowApiImpl = class extends BaseApi {
1563
1563
  await this.center();
1564
1564
  }
1565
1565
  }
1566
+ async setProxy(config) {
1567
+ return await this.invokeMethod("setProxy", config);
1568
+ }
1566
1569
  };
1567
1570
  var BrowserWindowApi = new BrowserWindowApiImpl();
1568
1571
 
@@ -1680,7 +1683,7 @@ var NotificationApi = new NotificationApiImpl();
1680
1683
  // src/api/DeployedWidgetApi.ts
1681
1684
  var DeployedWidgetApiImpl = class extends BaseApi {
1682
1685
  getChannel() {
1683
- return "channel::cn.widgetjs.core.hosted_widget" /* HOSTED_WIDGET */;
1686
+ return "channel::cn.widgetjs.core.deployed_widget" /* DEPLOYED_WIDGET */;
1684
1687
  }
1685
1688
  /**
1686
1689
  * 移除组件