@openfin/remote-adapter 46.100.85 → 46.100.88

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.
@@ -2150,6 +2150,10 @@ class BrowserEnvironment extends BaseEnvironment {
2150
2150
  observeBounds(element, onChange) {
2151
2151
  throw new Error('Method not implemented.');
2152
2152
  }
2153
+ onBFCacheRestore(listener) {
2154
+ // Generic browser contexts do not participate in bfcache restoration handling.
2155
+ return () => undefined;
2156
+ }
2153
2157
  layoutAllowedInContext(_fin) {
2154
2158
  return false;
2155
2159
  }
@@ -5062,6 +5066,9 @@ class _Window extends WebContents {
5062
5066
  /**
5063
5067
  * Removes focus from the window.
5064
5068
  *
5069
+ * @remarks On macOS, a modal window (created with `modalParentIdentity`) is hidden instead, because
5070
+ * moving a modal sheet behind its parent would leave the parent unable to show other dialogs.
5071
+ *
5065
5072
  * @example
5066
5073
  * ```js
5067
5074
  * async function blurWindow() {
@@ -7287,6 +7294,15 @@ class Transport extends events.EventEmitter {
7287
7294
  const { uuid, name } = config;
7288
7295
  const entityType = this.environment.getCurrentEntityType();
7289
7296
  this.me = getBaseMe(entityType, uuid, name);
7297
+ // Registered here rather than per-caller so that a restoration is logged exactly once,
7298
+ // however many parts of the adapter go on to subscribe.
7299
+ this.environment.onBFCacheRestore(async () => {
7300
+ await this.sendAction('write-to-log', {
7301
+ level: 'verbose',
7302
+ message: `Page restored from the back/forward cache for ${uuid}/${name}`,
7303
+ target: {}
7304
+ });
7305
+ });
7290
7306
  }
7291
7307
  getFin() {
7292
7308
  if (!__classPrivateFieldGet$k(this, _Transport_fin, "f")) {
@@ -12059,16 +12075,21 @@ class InterApplicationBus extends Base {
12059
12075
  * Subscribes to messages from the specified application on the specified topic.
12060
12076
  * @param source This object is described in the Identity in the typedef
12061
12077
  * @param topic The topic on which the message is sent
12062
- * @param listener A function that is called when a message has
12063
- * been received. It is passed the message, uuid and name of the sending application.
12078
+ * @param listener A function that is called when a message has been received. It is passed
12079
+ * two arguments: the message, and the identity (`{ uuid, name }`) of the sender.
12064
12080
  * The message can be either a primitive data type (string, number, or boolean) or
12065
12081
  * composite data type (object, array) that is composed of other primitive or composite
12066
12082
  * data types
12067
12083
  *
12084
+ * @remarks This differs from the legacy `fin.desktop.InterApplicationBus.subscribe` API,
12085
+ * which passes `(message, uuid, name)` as separate arguments.
12086
+ *
12068
12087
  * @example
12069
12088
  * ```js
12070
12089
  * // subscribe to a specified application
12071
- * fin.InterApplicationBus.subscribe(fin.me, 'topic', sub_msg => console.log(sub_msg)).then(() => console.log('Subscribed to the specified application')).catch(err => console.log(err));
12090
+ * fin.InterApplicationBus.subscribe(fin.me, 'topic', (message, sender) => {
12091
+ * console.log(`Received from ${sender.uuid}/${sender.name}:`, message);
12092
+ * }).then(() => console.log('Subscribed to the specified application')).catch(err => console.log(err));
12072
12093
  *
12073
12094
  * // subscribe to wildcard
12074
12095
  * fin.InterApplicationBus.subscribe({ uuid: '*' }, 'topic', sub_msg => console.log(sub_msg)).then(() => console.log('Subscribed to *')).catch(err => console.log(err));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/remote-adapter",
3
- "version": "46.100.85",
3
+ "version": "46.100.88",
4
4
  "description": "Establish intermachine runtime connections using webRTC.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "private": false,
@@ -16,7 +16,7 @@
16
16
  "dependencies": {
17
17
  "es-toolkit": "^1.39.3",
18
18
  "tslib": "2.8.1",
19
- "@openfin/core": "46.100.85"
19
+ "@openfin/core": "46.100.88"
20
20
  },
21
21
  "scripts": {
22
22
  "prebuild": "rimraf ./out",