@interopio/browser 4.0.3 → 4.1.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
@@ -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
@@ -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
  /**
@@ -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.1.0
2
+ feat: io.Connect Browser 4.1
1
3
  4.0.3
2
4
  chore: d.ts minor formatting changes
3
5
  4.0.0