@openfin/node-adapter 43.100.103 → 43.100.105

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.
Files changed (2) hide show
  1. package/out/node-adapter.js +137 -5
  2. package/package.json +2 -2
@@ -4891,6 +4891,38 @@ function requireInstance () {
4891
4891
  return undefined;
4892
4892
  }
4893
4893
  }
4894
+ /**
4895
+ * Displays the download bubble UI. If an anchor is provided, the bubble
4896
+ * will be positioned according to the specified rectangle and anchor point.
4897
+ *
4898
+ * @param {OpenFin.Anchor} options
4899
+ * Anchor configuration used to position the download bubble. This includes
4900
+ * the bounding rectangle and the anchor location within that rectangle.
4901
+ *
4902
+ * @returns {Promise<void>}
4903
+ * A promise that resolves once the request to show the download bubble
4904
+ * has been processed.
4905
+ */
4906
+ async showDownloadBubble(options) {
4907
+ return this.wire.sendAction('show-download-bubble', { ...this.identity, options }).then(() => undefined);
4908
+ }
4909
+ /**
4910
+ * Updates the anchor used for positioning the download bubble. This allows
4911
+ * moving the bubble reactively—for example, in response to window resizes,
4912
+ * layout changes, or DOM element repositioning.
4913
+ *
4914
+ * @param {OpenFin.Anchor} options
4915
+ * New anchor configuration describing the updated position and anchor
4916
+ * location for the download bubble.
4917
+ *
4918
+ * @returns {Promise<void>}
4919
+ * A promise that resolves once the anchor update has been applied.
4920
+ */
4921
+ async updateDownloadBubbleAnchor(options) {
4922
+ return this.wire
4923
+ .sendAction('update-download-bubble-anchor', { ...this.identity, options })
4924
+ .then(() => undefined);
4925
+ }
4894
4926
  }
4895
4927
  Instance$7._Window = _Window;
4896
4928
  return Instance$7;
@@ -5976,14 +6008,15 @@ class System extends base_1$m.EmitterBase {
5976
6008
  * Writes the passed message into both the log file and the console.
5977
6009
  * @param level The log level for the entry. Can be either "info", "warning" or "error"
5978
6010
  * @param message The log message text
6011
+ * @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.
5979
6012
  *
5980
6013
  * @example
5981
6014
  * ```js
5982
- * fin.System.log("info", "An example log message").then(() => console.log('Log info message')).catch(err => console.log(err));
6015
+ * fin.System.log("info", "An example log message", { type: 'debug.log' }).then(() => console.log('Log info message')).catch(err => console.log(err));
5983
6016
  * ```
5984
6017
  */
5985
- log(level, message) {
5986
- return this.wire.sendAction('write-to-log', { level, message }).then(() => undefined);
6018
+ log(level, message, { type = 'debug.log' } = {}) {
6019
+ return this.wire.sendAction('write-to-log', { level, message, target: { type } }).then(() => undefined);
5987
6020
  }
5988
6021
  /**
5989
6022
  * Opens the passed URL in the default web browser.
@@ -6999,6 +7032,88 @@ class System extends base_1$m.EmitterBase {
6999
7032
  async serveAsset(options) {
7000
7033
  return (await this.wire.sendAction('serve-asset', { options })).payload.data;
7001
7034
  }
7035
+ /**
7036
+ * Get's the native theme preferences for the current runtime.
7037
+ * Prefer css media-queries wherever possible, but this can be useful to see if the system setting has been overridden.
7038
+ * See @link OpenFin.NativeTheme for more information.
7039
+ * @example Theme selector menu
7040
+ * ```ts
7041
+ async function handleThemeMenu(e: React.MouseEvent<HTMLDivElement>) {
7042
+ const currentTheme = await fin.System.getThemePreferences();
7043
+ const result = await (fin.me as OpenFin.Window).showPopupMenu({
7044
+ x: e.clientX,
7045
+ y: e.clientY,
7046
+ template: [
7047
+ {
7048
+ label: 'Light',
7049
+ type: 'checkbox',
7050
+ checked: currentTheme.themeSource === 'light',
7051
+ data: { themeSource: 'light' } as const
7052
+ },
7053
+ {
7054
+ label: 'Dark',
7055
+ type: 'checkbox',
7056
+ checked: currentTheme.themeSource === 'dark',
7057
+ data: { themeSource: 'dark' } as const
7058
+ },
7059
+ {
7060
+ label: 'System',
7061
+ type: 'checkbox',
7062
+ checked: currentTheme.themeSource === 'system',
7063
+ data: { themeSource: 'system' } as const
7064
+ }
7065
+ ]
7066
+ });
7067
+ if (result.result === 'clicked') {
7068
+ await fin.System.setThemePreferences(result.data);
7069
+ }
7070
+ }
7071
+ ```
7072
+ */
7073
+ async getThemePreferences() {
7074
+ return (await this.wire.sendAction('get-theme-preferences')).payload.data;
7075
+ }
7076
+ /**
7077
+ * Sets the native theme preferences for the current runtime.
7078
+ * Can be used to force runtime-wide light or dark mode.
7079
+ * @important Due to this impacting all applications on a runtime, this method is only usable if a security realm has been set.
7080
+ * @example Theme selector menu
7081
+ * ```ts
7082
+ async function handleThemeMenu(e: React.MouseEvent<HTMLDivElement>) {
7083
+ const currentTheme = await fin.System.getThemePreferences();
7084
+ const result = await (fin.me as OpenFin.Window).showPopupMenu({
7085
+ x: e.clientX,
7086
+ y: e.clientY,
7087
+ template: [
7088
+ {
7089
+ label: 'Light',
7090
+ type: 'checkbox',
7091
+ checked: currentTheme.themeSource === 'light',
7092
+ data: { themeSource: 'light' } as const
7093
+ },
7094
+ {
7095
+ label: 'Dark',
7096
+ type: 'checkbox',
7097
+ checked: currentTheme.themeSource === 'dark',
7098
+ data: { themeSource: 'dark' } as const
7099
+ },
7100
+ {
7101
+ label: 'System',
7102
+ type: 'checkbox',
7103
+ checked: currentTheme.themeSource === 'system',
7104
+ data: { themeSource: 'system' } as const
7105
+ }
7106
+ ]
7107
+ });
7108
+ if (result.result === 'clicked') {
7109
+ await fin.System.setThemePreferences(result.data);
7110
+ }
7111
+ }
7112
+ ```
7113
+ */
7114
+ async setThemePreferences(preferences) {
7115
+ return (await this.wire.sendAction('set-theme-preferences', { preferences })).payload.data;
7116
+ }
7002
7117
  /**
7003
7118
  * Launches the Log Uploader. Full documentation can be found [here](https://resources.here.io/docs/core/develop/debug/log-uploader/).
7004
7119
  * @experimental
@@ -7006,6 +7121,21 @@ class System extends base_1$m.EmitterBase {
7006
7121
  async launchLogUploader(options) {
7007
7122
  return (await this.wire.sendAction('launch-log-uploader', { options })).payload.data;
7008
7123
  }
7124
+ /**
7125
+ * Overrides original Chromium theme color providers matching key (currently except high contrast ones). Only colors passed in the map will be overridden.
7126
+ * @param overrides - Array of ColorProviderOverrides objects
7127
+ */
7128
+ async setThemePalette(themePalette) {
7129
+ return (await this.wire.sendAction('set-theme-palette', { themePalette })).payload.data;
7130
+ }
7131
+ /**
7132
+ * Retrieves currently used color overrides
7133
+ * @returns Array of ColorProviderOverrides objects
7134
+ */
7135
+ async getThemePalette() {
7136
+ const { payload } = await this.wire.sendAction('get-theme-palette');
7137
+ return payload.data;
7138
+ }
7009
7139
  }
7010
7140
  system.System = System;
7011
7141
 
@@ -11400,7 +11530,7 @@ class LayoutNode {
11400
11530
  * Known Issue: If the number of views to add overflows the tab-container, the added views will be set as active
11401
11531
  * during each render, and then placed at the front of the tab-stack, while the underlying order of tabs will remain unchanged.
11402
11532
  * This means the views you pass to createAdjacentStack() may not render in the order given by the array.
11403
- * Until fixed, this problem can be avoided only if your window is wide enough to fit creating all the views in the tabstack.
11533
+ * Note: This issue does not occur when using `tabOverflowBehavior: 'scroll'` in the layout configuration.
11404
11534
  *
11405
11535
  * @param views The views that will populate the new TabStack.
11406
11536
  * @param options Additional options that control new TabStack creation.
@@ -11536,6 +11666,7 @@ class TabStack extends LayoutNode {
11536
11666
  * and rendered at the front of the tab-stack, while the underlying order of tabs will remain unchanged.
11537
11667
  * If that happens and then getViews() is called, it will return the identities in a different order than
11538
11668
  * than the currently rendered tab order.
11669
+ * Note: This issue does not occur when using `tabOverflowBehavior: 'scroll'` in the layout configuration.
11539
11670
  *
11540
11671
  *
11541
11672
  * @throws If the {@link TabStack} has been destroyed.
@@ -11560,6 +11691,7 @@ class TabStack extends LayoutNode {
11560
11691
  *
11561
11692
  * @remarks Known Issue: If adding a view overflows the tab-container, the added view will be set as active
11562
11693
  * and rendered at the front of the tab-stack, while the underlying order of tabs will remain unchanged.
11694
+ * Note: This issue does not occur when using `tabOverflowBehavior: 'scroll'` in the layout configuration.
11563
11695
  *
11564
11696
  * @param view The identity of an existing view to add, or options to create a view.
11565
11697
  * @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)
@@ -18024,7 +18156,7 @@ class NodeEnvironment extends BaseEnvironment_1 {
18024
18156
  };
18025
18157
  }
18026
18158
  getAdapterVersionSync() {
18027
- return "43.100.103";
18159
+ return "43.100.105";
18028
18160
  }
18029
18161
  observeBounds(element, onChange) {
18030
18162
  throw new Error('Method not implemented.');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/node-adapter",
3
- "version": "43.100.103",
3
+ "version": "43.100.105",
4
4
  "description": "See README.md",
5
5
  "main": "out/node-adapter.js",
6
6
  "types": "out/node-adapter.d.ts",
@@ -24,7 +24,7 @@
24
24
  "author": "OpenFin",
25
25
  "dependencies": {
26
26
  "@types/node": "^20.14.2",
27
- "@openfin/core": "43.100.103",
27
+ "@openfin/core": "43.100.105",
28
28
  "lodash": "^4.17.21",
29
29
  "ws": "^7.3.0"
30
30
  }