@openfin/remote-adapter 44.100.48 → 44.100.50

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.
@@ -6277,6 +6277,38 @@ function requireInstance$1 () {
6277
6277
  return undefined;
6278
6278
  }
6279
6279
  }
6280
+ /**
6281
+ * Displays the download bubble UI. If an anchor is provided, the bubble
6282
+ * will be positioned according to the specified rectangle and anchor point.
6283
+ *
6284
+ * @param {OpenFin.Anchor} options
6285
+ * Anchor configuration used to position the download bubble. This includes
6286
+ * the bounding rectangle and the anchor location within that rectangle.
6287
+ *
6288
+ * @returns {Promise<void>}
6289
+ * A promise that resolves once the request to show the download bubble
6290
+ * has been processed.
6291
+ */
6292
+ async showDownloadBubble(options) {
6293
+ return this.wire.sendAction('show-download-bubble', { ...this.identity, options }).then(() => undefined);
6294
+ }
6295
+ /**
6296
+ * Updates the anchor used for positioning the download bubble. This allows
6297
+ * moving the bubble reactively—for example, in response to window resizes,
6298
+ * layout changes, or DOM element repositioning.
6299
+ *
6300
+ * @param {OpenFin.Anchor} options
6301
+ * New anchor configuration describing the updated position and anchor
6302
+ * location for the download bubble.
6303
+ *
6304
+ * @returns {Promise<void>}
6305
+ * A promise that resolves once the anchor update has been applied.
6306
+ */
6307
+ async updateDownloadBubbleAnchor(options) {
6308
+ return this.wire
6309
+ .sendAction('update-download-bubble-anchor', { ...this.identity, options })
6310
+ .then(() => undefined);
6311
+ }
6280
6312
  }
6281
6313
  Instance$6._Window = _Window;
6282
6314
  return Instance$6;
@@ -8734,14 +8766,15 @@ class System extends base_1$h.EmitterBase {
8734
8766
  * Writes the passed message into both the log file and the console.
8735
8767
  * @param level The log level for the entry. Can be either "info", "warning" or "error"
8736
8768
  * @param message The log message text
8769
+ * @param target.type Optional. The the log stream this message will be sent to, defaults to 'debug.log'. Specify 'app.log' to log to the app log of the sending View / Window. Note, when using `app.log`, it will always log to app.log irrespective of the `enableAppLogging` setting for the sender. This is particularly useful if you wish to log certain things from a View / Window but ignore generic console logs.
8737
8770
  *
8738
8771
  * @example
8739
8772
  * ```js
8740
- * fin.System.log("info", "An example log message").then(() => console.log('Log info message')).catch(err => console.log(err));
8773
+ * fin.System.log("info", "An example log message", { type: 'debug.log' }).then(() => console.log('Log info message')).catch(err => console.log(err));
8741
8774
  * ```
8742
8775
  */
8743
- log(level, message) {
8744
- return this.wire.sendAction('write-to-log', { level, message }).then(() => undefined);
8776
+ log(level, message, { type = 'debug.log' } = {}) {
8777
+ return this.wire.sendAction('write-to-log', { level, message, target: { type } }).then(() => undefined);
8745
8778
  }
8746
8779
  /**
8747
8780
  * Opens the passed URL in the default web browser.
@@ -9757,6 +9790,88 @@ class System extends base_1$h.EmitterBase {
9757
9790
  async serveAsset(options) {
9758
9791
  return (await this.wire.sendAction('serve-asset', { options })).payload.data;
9759
9792
  }
9793
+ /**
9794
+ * Get's the native theme preferences for the current runtime.
9795
+ * Prefer css media-queries wherever possible, but this can be useful to see if the system setting has been overridden.
9796
+ * See @link OpenFin.NativeTheme for more information.
9797
+ * @example Theme selector menu
9798
+ * ```ts
9799
+ async function handleThemeMenu(e: React.MouseEvent<HTMLDivElement>) {
9800
+ const currentTheme = await fin.System.getThemePreferences();
9801
+ const result = await (fin.me as OpenFin.Window).showPopupMenu({
9802
+ x: e.clientX,
9803
+ y: e.clientY,
9804
+ template: [
9805
+ {
9806
+ label: 'Light',
9807
+ type: 'checkbox',
9808
+ checked: currentTheme.themeSource === 'light',
9809
+ data: { themeSource: 'light' } as const
9810
+ },
9811
+ {
9812
+ label: 'Dark',
9813
+ type: 'checkbox',
9814
+ checked: currentTheme.themeSource === 'dark',
9815
+ data: { themeSource: 'dark' } as const
9816
+ },
9817
+ {
9818
+ label: 'System',
9819
+ type: 'checkbox',
9820
+ checked: currentTheme.themeSource === 'system',
9821
+ data: { themeSource: 'system' } as const
9822
+ }
9823
+ ]
9824
+ });
9825
+ if (result.result === 'clicked') {
9826
+ await fin.System.setThemePreferences(result.data);
9827
+ }
9828
+ }
9829
+ ```
9830
+ */
9831
+ async getThemePreferences() {
9832
+ return (await this.wire.sendAction('get-theme-preferences')).payload.data;
9833
+ }
9834
+ /**
9835
+ * Sets the native theme preferences for the current runtime.
9836
+ * Can be used to force runtime-wide light or dark mode.
9837
+ * @important Due to this impacting all applications on a runtime, this method is only usable if a security realm has been set.
9838
+ * @example Theme selector menu
9839
+ * ```ts
9840
+ async function handleThemeMenu(e: React.MouseEvent<HTMLDivElement>) {
9841
+ const currentTheme = await fin.System.getThemePreferences();
9842
+ const result = await (fin.me as OpenFin.Window).showPopupMenu({
9843
+ x: e.clientX,
9844
+ y: e.clientY,
9845
+ template: [
9846
+ {
9847
+ label: 'Light',
9848
+ type: 'checkbox',
9849
+ checked: currentTheme.themeSource === 'light',
9850
+ data: { themeSource: 'light' } as const
9851
+ },
9852
+ {
9853
+ label: 'Dark',
9854
+ type: 'checkbox',
9855
+ checked: currentTheme.themeSource === 'dark',
9856
+ data: { themeSource: 'dark' } as const
9857
+ },
9858
+ {
9859
+ label: 'System',
9860
+ type: 'checkbox',
9861
+ checked: currentTheme.themeSource === 'system',
9862
+ data: { themeSource: 'system' } as const
9863
+ }
9864
+ ]
9865
+ });
9866
+ if (result.result === 'clicked') {
9867
+ await fin.System.setThemePreferences(result.data);
9868
+ }
9869
+ }
9870
+ ```
9871
+ */
9872
+ async setThemePreferences(preferences) {
9873
+ return (await this.wire.sendAction('set-theme-preferences', { preferences })).payload.data;
9874
+ }
9760
9875
  /**
9761
9876
  * Launches the Log Uploader. Full documentation can be found [here](https://resources.here.io/docs/core/develop/debug/log-uploader/).
9762
9877
  * @experimental
@@ -9764,6 +9879,21 @@ class System extends base_1$h.EmitterBase {
9764
9879
  async launchLogUploader(options) {
9765
9880
  return (await this.wire.sendAction('launch-log-uploader', { options })).payload.data;
9766
9881
  }
9882
+ /**
9883
+ * Overrides original Chromium theme color providers matching key (currently except high contrast ones). Only colors passed in the map will be overridden.
9884
+ * @param overrides - Array of ColorProviderOverrides objects
9885
+ */
9886
+ async setThemePalette(themePalette) {
9887
+ return (await this.wire.sendAction('set-theme-palette', { themePalette })).payload.data;
9888
+ }
9889
+ /**
9890
+ * Retrieves currently used color overrides
9891
+ * @returns Array of ColorProviderOverrides objects
9892
+ */
9893
+ async getThemePalette() {
9894
+ const { payload } = await this.wire.sendAction('get-theme-palette');
9895
+ return payload.data;
9896
+ }
9767
9897
  }
9768
9898
  system.System = System;
9769
9899
 
@@ -13814,7 +13944,7 @@ class LayoutNode {
13814
13944
  * Known Issue: If the number of views to add overflows the tab-container, the added views will be set as active
13815
13945
  * during each render, and then placed at the front of the tab-stack, while the underlying order of tabs will remain unchanged.
13816
13946
  * This means the views you pass to createAdjacentStack() may not render in the order given by the array.
13817
- * Until fixed, this problem can be avoided only if your window is wide enough to fit creating all the views in the tabstack.
13947
+ * Note: This issue does not occur when using `tabOverflowBehavior: 'scroll'` in the layout configuration.
13818
13948
  *
13819
13949
  * @param views The views that will populate the new TabStack.
13820
13950
  * @param options Additional options that control new TabStack creation.
@@ -13950,6 +14080,7 @@ class TabStack extends LayoutNode {
13950
14080
  * and rendered at the front of the tab-stack, while the underlying order of tabs will remain unchanged.
13951
14081
  * If that happens and then getViews() is called, it will return the identities in a different order than
13952
14082
  * than the currently rendered tab order.
14083
+ * Note: This issue does not occur when using `tabOverflowBehavior: 'scroll'` in the layout configuration.
13953
14084
  *
13954
14085
  *
13955
14086
  * @throws If the {@link TabStack} has been destroyed.
@@ -13974,6 +14105,7 @@ class TabStack extends LayoutNode {
13974
14105
  *
13975
14106
  * @remarks Known Issue: If adding a view overflows the tab-container, the added view will be set as active
13976
14107
  * and rendered at the front of the tab-stack, while the underlying order of tabs will remain unchanged.
14108
+ * Note: This issue does not occur when using `tabOverflowBehavior: 'scroll'` in the layout configuration.
13977
14109
  *
13978
14110
  * @param view The identity of an existing view to add, or options to create a view.
13979
14111
  * @param options Optional view options: index number used to insert the view into the stack at that index. Defaults to 0 (front of the stack)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/remote-adapter",
3
- "version": "44.100.48",
3
+ "version": "44.100.50",
4
4
  "description": "Establish intermachine runtime connections using webRTC.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "private": false,
@@ -20,6 +20,6 @@
20
20
  "author": "OpenFin",
21
21
  "dependencies": {
22
22
  "lodash": "^4.17.21",
23
- "@openfin/core": "44.100.48"
23
+ "@openfin/core": "44.100.50"
24
24
  }
25
25
  }