@interopio/browser 4.0.2 → 4.1.0-beta.0

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/browser.d.ts CHANGED
@@ -128,8 +128,8 @@ export namespace IOConnectBrowser {
128
128
  systemLogger?: SystemLogger;
129
129
 
130
130
  /**
131
- * Connect with GW in memory.
132
- * Used for testing in node environment, where the GW isn't started by @glue42/worker-web and an inproc GW is used instead.
131
+ * Connect with the Gateway in memory.
132
+ * Used for testing in a Node.js environment where the Gateway isn't started by `@interopio/browser-worker and an in-process Gateway is used instead.
133
133
  * @ignore
134
134
  */
135
135
  inproc?: IOConnectCore.InprocGWSettings;
@@ -159,7 +159,7 @@ export namespace IOConnectBrowser {
159
159
  memoizeAPI?: boolean;
160
160
 
161
161
  /**
162
- * List of references to the factory functions of additional io.Connect libraries to be initialized internally (e.g., `@interopio/workspaces-api`, `@interopio/search-api`).
162
+ * List of references to the factory functions of additional io.Connect libraries to be initialized internally (e.g., `@interopio/workspaces-api`, `@interopio/search-api`).
163
163
  * The APIs provided by these libraries can then be accessed via the initialized io.Connect API object (e.g., `io.workspaces`, `io.search`).
164
164
  */
165
165
  libraries?: Array<(io: IOConnectBrowser.API, config?: IOConnectBrowser.Config | IOConnectDesktop.Config) => Promise<void>>;
@@ -202,12 +202,7 @@ export namespace IOConnectBrowser {
202
202
  /**
203
203
  * Initial position for the widget within the window.
204
204
  */
205
- export type WidgetPosition = "top" | "bottom" | "left" | "right";
206
-
207
- /**
208
- * Mode for displaying the widget.
209
- */
210
- export type WidgetMode = "compact" | "default";
205
+ export type WidgetPosition = "top-left" | "top-center" | "top-right" | "center-left" | "center-right" | "bottom-left" | "bottom-center" | "bottom-right";
211
206
 
212
207
  /**
213
208
  * Settings for the Widget Channel Selector UI.
@@ -259,16 +254,10 @@ export namespace IOConnectBrowser {
259
254
 
260
255
  /**
261
256
  * Initial position for the widget within the window.
262
- * @default "bottom"
257
+ * @default "bottom-center"
263
258
  */
264
259
  position?: WidgetPosition;
265
260
 
266
- /**
267
- * Mode for displaying the widget.
268
- * @default "default"
269
- */
270
- mode?: WidgetMode;
271
-
272
261
  /**
273
262
  * If `true`, the widget will be visible in the app even if the app is currently in a Workspace.
274
263
  * @default false
@@ -276,7 +265,7 @@ export namespace IOConnectBrowser {
276
265
  displayInWorkspace?: boolean;
277
266
 
278
267
  /**
279
- * If `true`, the `&commat;interopio/browser` library will wait for the `IOBrowserWidget()` factory function to resolve before completing its initialization.
268
+ * If `true`, the `@interopio/browser` library will wait for the `IOBrowserWidget()` factory function to resolve before completing its initialization.
280
269
  * @default true
281
270
  */
282
271
  awaitFactory?: boolean;
@@ -286,6 +275,12 @@ export namespace IOConnectBrowser {
286
275
  * @default 5000
287
276
  */
288
277
  timeout?: number;
278
+
279
+ /**
280
+ * If `true`, the widget will save its position in the app's prefs storage and restore it upon app's initialization.
281
+ * @default true
282
+ */
283
+ restoreLastKnownPosition?: boolean;
289
284
  }
290
285
 
291
286
  /**
@@ -299,7 +294,7 @@ export namespace IOConnectBrowser {
299
294
  enable: boolean;
300
295
 
301
296
  /**
302
- * If `true`, the `&commat;interopio/browser` library will wait for the `IOBrowserIntentResolverUI()` factory function
297
+ * If `true`, the `@interopio/browser` library will wait for the `IOBrowserIntentResolverUI()` factory function
303
298
  * to resolve before completing its initialization.
304
299
  * @default true
305
300
  */
@@ -362,8 +357,8 @@ export namespace IOConnectBrowser {
362
357
  }
363
358
 
364
359
  /**
365
- * The [`&commat;interopio/modals-ui`](https://www.npmjs.com/package/&commat;interopio/modals-ui) library provides components and APIs used
366
- * in **io.Connect Browser** for displaying dialogs and alerts. When initializing the [`&commat;interopio/browser`](https://www.npmjs.com/package/&commat;interopio/browser) library,
360
+ * The [`@interopio/modals-ui`](https://www.npmjs.com/package/@interopio/modals-ui) library provides components and APIs used
361
+ * in **io.Connect Browser** for displaying dialogs and alerts. When initializing the [`@interopio/browser`](https://www.npmjs.com/package/@interopio/browser) library,
367
362
  * you can provide configuration for the Modals UI library (e.g., disable alerts and/or dialogs, and more).
368
363
  */
369
364
  export interface ModalsUIConfig {
@@ -391,7 +386,7 @@ export namespace IOConnectBrowser {
391
386
  };
392
387
 
393
388
  /**
394
- * If `true`, the `&commat;interopio/browser` library will wait for the `IOBrowserModalsUI()` factory function to resolve before completing its initialization.
389
+ * If `true`, the `@interopio/browser` library will wait for the `IOBrowserModalsUI()` factory function to resolve before completing its initialization.
395
390
  * @default true
396
391
  */
397
392
  awaitFactory?: boolean;
@@ -610,12 +605,26 @@ export namespace IOConnectBrowser {
610
605
  }
611
606
 
612
607
  export interface WebWindow {
608
+ /**
609
+ * ID of the window.
610
+ */
613
611
  id: string;
614
612
 
613
+ /**
614
+ * Name of the window.
615
+ */
615
616
  name: string;
616
617
 
618
+ /**
619
+ * Flag indicating whether the window is currently on focus.
620
+ */
617
621
  isFocused: boolean;
618
622
 
623
+ /**
624
+ * Retrieves the current zoom factor.
625
+ */
626
+ zoomFactor: number;
627
+
619
628
  /**
620
629
  * Gets the current URL of the window.
621
630
  */
@@ -686,6 +695,11 @@ export namespace IOConnectBrowser {
686
695
  */
687
696
  setContext(context: any): Promise<WebWindow>;
688
697
 
698
+ /**
699
+ * Refreshes the current window.
700
+ */
701
+ refresh(): Promise<WebWindow>;
702
+
689
703
  /**
690
704
  * Notifies when a change to the window's context has been made.
691
705
  * @param callback The function which will be invoked when a change to the window's context happens. The function will be called with the new context and window as arguments.
@@ -708,7 +722,30 @@ export namespace IOConnectBrowser {
708
722
  * @param callback Callback for handling the event. Receives the names of the current Channels as an argument.
709
723
  */
710
724
  onChannelsChanged(callback: (names: string[]) => void): UnsubscribeFunction;
725
+
726
+ /**
727
+ * Zooms in the window.
728
+ */
729
+ zoomIn(): Promise<WebWindow>;
730
+
731
+ /**
732
+ * Zooms out the window.
733
+ */
734
+ zoomOut(): Promise<WebWindow>;
735
+
736
+ /**
737
+ * Changes the zoom level.
738
+ * @param factor Zoom factor.
739
+ */
740
+ setZoomFactor(factor: number): Promise<WebWindow>;
741
+
742
+ /**
743
+ * Notifies when the zoom factor is changed.
744
+ * @param callback Callback function for handling the event.
745
+ */
746
+ onZoomFactorChanged(callback: (window: WebWindow) => void): UnsubscribeFunction;
711
747
  }
748
+
712
749
  export interface Settings {
713
750
 
714
751
  /**
@@ -1036,7 +1073,8 @@ export namespace IOConnectBrowser {
1036
1073
  },
1037
1074
  instanceId: string,
1038
1075
  isSticky?: boolean,
1039
- isCollapsed?: boolean
1076
+ isCollapsed?: boolean,
1077
+ channelId?: string;
1040
1078
  }
1041
1079
 
1042
1080
  /**
package/changelog.md CHANGED
@@ -1,3 +1,5 @@
1
+ 4.0.3
2
+ chore: d.ts minor formatting changes
1
3
  4.0.0
2
4
  feat: io.Connect Browser 4.0
3
5
  3.5.9