@openfin/core 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.
@@ -1997,6 +1997,8 @@ declare type BeginUserBoundsChangingEvent = UserBoundsChangeEvent & {
1997
1997
  type: 'begin-user-bounds-changing';
1998
1998
  };
1999
1999
 
2000
+ declare type BFCacheRestoreListener = () => void | Promise<void>;
2001
+
2000
2002
  /**
2001
2003
  * A rule prescribing content creation that should be blocked.
2002
2004
  *
@@ -5384,6 +5386,16 @@ declare interface Environment {
5384
5386
  resolveLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, layoutIdentity: OpenFin_2.LayoutIdentity): Promise<any>;
5385
5387
  initPlatform(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, ...args: Parameters<OpenFin_2.Fin['Platform']['init']>): ReturnType<OpenFin_2.Fin['Platform']['init']>;
5386
5388
  observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): () => void;
5389
+ /**
5390
+ * Registers a listener invoked when the current page has been restored from the
5391
+ * browser's back/forward cache. Stateful APIs (e.g. channels) use this to re-establish
5392
+ * connections that were torn down while the page was cached.
5393
+ *
5394
+ * No-op in environments that cannot be bfcached.
5395
+ *
5396
+ * @returns a function that unregisters the listener.
5397
+ */
5398
+ onBFCacheRestore(listener: BFCacheRestoreListener): () => void;
5387
5399
  writeToken(path: string, token: string): Promise<string>;
5388
5400
  retrievePort(config: NewConnectConfig): Promise<number>;
5389
5401
  getNextMessageId(): any;
@@ -5838,7 +5850,7 @@ declare type ExtensionWindowCreatedEvent = BaseEvent_5 & {
5838
5850
  * these api calls are not implemented in the javscript api, only in the external adapter
5839
5851
  * If they don't exist in the external adapter they should be removed.
5840
5852
  */
5841
- declare type ExternalAdapterOnlyCalls = 'subscriber-added' | 'subscriber-removed' | 'clipboard-clear' | 'create-proxy-socket' | 'authenticate-proxy-socket' | 'convert-options' | 'generate-guid' | 'get-config' | 'get-remote-config' | 'get-nearest-display-root' | 'get-preload-scripts' | 'raise-event' | 'set-window-preload-state' | 'dock-window' | 'get-current-window-options' | 'redirect-window-to-url' | 'request-new-content' | 'raise-many-events' | 'show-menu' | 'resolve-proxy' | 'undock-window' | 'window-embedded' | 'window-get-cached-bounds' | 'resource-fetch-authenticate' | 'set-cookie';
5853
+ declare type ExternalAdapterOnlyCalls = 'subscriber-added' | 'subscriber-removed' | 'clipboard-clear' | 'convert-options' | 'generate-guid' | 'get-config' | 'get-remote-config' | 'get-nearest-display-root' | 'get-preload-scripts' | 'raise-event' | 'set-window-preload-state' | 'dock-window' | 'get-current-window-options' | 'redirect-window-to-url' | 'request-new-content' | 'raise-many-events' | 'show-menu' | 'resolve-proxy' | 'undock-window' | 'window-embedded' | 'window-get-cached-bounds' | 'resource-fetch-authenticate' | 'set-cookie';
5842
5854
 
5843
5855
  declare type ExternalAdapterOnlyCallsMap = {
5844
5856
  [k in ExternalAdapterOnlyCalls]: {
@@ -7102,16 +7114,21 @@ declare class InterApplicationBus extends Base {
7102
7114
  * Subscribes to messages from the specified application on the specified topic.
7103
7115
  * @param source This object is described in the Identity in the typedef
7104
7116
  * @param topic The topic on which the message is sent
7105
- * @param listener A function that is called when a message has
7106
- * been received. It is passed the message, uuid and name of the sending application.
7117
+ * @param listener A function that is called when a message has been received. It is passed
7118
+ * two arguments: the message, and the identity (`{ uuid, name }`) of the sender.
7107
7119
  * The message can be either a primitive data type (string, number, or boolean) or
7108
7120
  * composite data type (object, array) that is composed of other primitive or composite
7109
7121
  * data types
7110
7122
  *
7123
+ * @remarks This differs from the legacy `fin.desktop.InterApplicationBus.subscribe` API,
7124
+ * which passes `(message, uuid, name)` as separate arguments.
7125
+ *
7111
7126
  * @example
7112
7127
  * ```js
7113
7128
  * // subscribe to a specified application
7114
- * 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));
7129
+ * fin.InterApplicationBus.subscribe(fin.me, 'topic', (message, sender) => {
7130
+ * console.log(`Received from ${sender.uuid}/${sender.name}:`, message);
7131
+ * }).then(() => console.log('Subscribed to the specified application')).catch(err => console.log(err));
7115
7132
  *
7116
7133
  * // subscribe to wildcard
7117
7134
  * fin.InterApplicationBus.subscribe({ uuid: '*' }, 'topic', sub_msg => console.log(sub_msg)).then(() => console.log('Subscribed to *')).catch(err => console.log(err));
@@ -20150,6 +20167,9 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
20150
20167
  /**
20151
20168
  * Removes focus from the window.
20152
20169
  *
20170
+ * @remarks On macOS, a modal window (created with `modalParentIdentity`) is hidden instead, because
20171
+ * moving a modal sheet behind its parent would leave the parent unable to show other dialogs.
20172
+ *
20153
20173
  * @example
20154
20174
  * ```js
20155
20175
  * async function blurWindow() {
@@ -1997,6 +1997,8 @@ declare type BeginUserBoundsChangingEvent = UserBoundsChangeEvent & {
1997
1997
  type: 'begin-user-bounds-changing';
1998
1998
  };
1999
1999
 
2000
+ declare type BFCacheRestoreListener = () => void | Promise<void>;
2001
+
2000
2002
  /**
2001
2003
  * A rule prescribing content creation that should be blocked.
2002
2004
  *
@@ -5384,6 +5386,16 @@ declare interface Environment {
5384
5386
  resolveLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, layoutIdentity: OpenFin_2.LayoutIdentity): Promise<any>;
5385
5387
  initPlatform(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, ...args: Parameters<OpenFin_2.Fin['Platform']['init']>): ReturnType<OpenFin_2.Fin['Platform']['init']>;
5386
5388
  observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): () => void;
5389
+ /**
5390
+ * Registers a listener invoked when the current page has been restored from the
5391
+ * browser's back/forward cache. Stateful APIs (e.g. channels) use this to re-establish
5392
+ * connections that were torn down while the page was cached.
5393
+ *
5394
+ * No-op in environments that cannot be bfcached.
5395
+ *
5396
+ * @returns a function that unregisters the listener.
5397
+ */
5398
+ onBFCacheRestore(listener: BFCacheRestoreListener): () => void;
5387
5399
  writeToken(path: string, token: string): Promise<string>;
5388
5400
  retrievePort(config: NewConnectConfig): Promise<number>;
5389
5401
  getNextMessageId(): any;
@@ -5838,7 +5850,7 @@ declare type ExtensionWindowCreatedEvent = BaseEvent_5 & {
5838
5850
  * these api calls are not implemented in the javscript api, only in the external adapter
5839
5851
  * If they don't exist in the external adapter they should be removed.
5840
5852
  */
5841
- declare type ExternalAdapterOnlyCalls = 'subscriber-added' | 'subscriber-removed' | 'clipboard-clear' | 'create-proxy-socket' | 'authenticate-proxy-socket' | 'convert-options' | 'generate-guid' | 'get-config' | 'get-remote-config' | 'get-nearest-display-root' | 'get-preload-scripts' | 'raise-event' | 'set-window-preload-state' | 'dock-window' | 'get-current-window-options' | 'redirect-window-to-url' | 'request-new-content' | 'raise-many-events' | 'show-menu' | 'resolve-proxy' | 'undock-window' | 'window-embedded' | 'window-get-cached-bounds' | 'resource-fetch-authenticate' | 'set-cookie';
5853
+ declare type ExternalAdapterOnlyCalls = 'subscriber-added' | 'subscriber-removed' | 'clipboard-clear' | 'convert-options' | 'generate-guid' | 'get-config' | 'get-remote-config' | 'get-nearest-display-root' | 'get-preload-scripts' | 'raise-event' | 'set-window-preload-state' | 'dock-window' | 'get-current-window-options' | 'redirect-window-to-url' | 'request-new-content' | 'raise-many-events' | 'show-menu' | 'resolve-proxy' | 'undock-window' | 'window-embedded' | 'window-get-cached-bounds' | 'resource-fetch-authenticate' | 'set-cookie';
5842
5854
 
5843
5855
  declare type ExternalAdapterOnlyCallsMap = {
5844
5856
  [k in ExternalAdapterOnlyCalls]: {
@@ -7102,16 +7114,21 @@ declare class InterApplicationBus extends Base {
7102
7114
  * Subscribes to messages from the specified application on the specified topic.
7103
7115
  * @param source This object is described in the Identity in the typedef
7104
7116
  * @param topic The topic on which the message is sent
7105
- * @param listener A function that is called when a message has
7106
- * been received. It is passed the message, uuid and name of the sending application.
7117
+ * @param listener A function that is called when a message has been received. It is passed
7118
+ * two arguments: the message, and the identity (`{ uuid, name }`) of the sender.
7107
7119
  * The message can be either a primitive data type (string, number, or boolean) or
7108
7120
  * composite data type (object, array) that is composed of other primitive or composite
7109
7121
  * data types
7110
7122
  *
7123
+ * @remarks This differs from the legacy `fin.desktop.InterApplicationBus.subscribe` API,
7124
+ * which passes `(message, uuid, name)` as separate arguments.
7125
+ *
7111
7126
  * @example
7112
7127
  * ```js
7113
7128
  * // subscribe to a specified application
7114
- * 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));
7129
+ * fin.InterApplicationBus.subscribe(fin.me, 'topic', (message, sender) => {
7130
+ * console.log(`Received from ${sender.uuid}/${sender.name}:`, message);
7131
+ * }).then(() => console.log('Subscribed to the specified application')).catch(err => console.log(err));
7115
7132
  *
7116
7133
  * // subscribe to wildcard
7117
7134
  * fin.InterApplicationBus.subscribe({ uuid: '*' }, 'topic', sub_msg => console.log(sub_msg)).then(() => console.log('Subscribed to *')).catch(err => console.log(err));
@@ -20150,6 +20167,9 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
20150
20167
  /**
20151
20168
  * Removes focus from the window.
20152
20169
  *
20170
+ * @remarks On macOS, a modal window (created with `modalParentIdentity`) is hidden instead, because
20171
+ * moving a modal sheet behind its parent would leave the parent unable to show other dialogs.
20172
+ *
20153
20173
  * @example
20154
20174
  * ```js
20155
20175
  * async function blurWindow() {
@@ -1997,6 +1997,8 @@ declare type BeginUserBoundsChangingEvent = UserBoundsChangeEvent & {
1997
1997
  type: 'begin-user-bounds-changing';
1998
1998
  };
1999
1999
 
2000
+ declare type BFCacheRestoreListener = () => void | Promise<void>;
2001
+
2000
2002
  /**
2001
2003
  * A rule prescribing content creation that should be blocked.
2002
2004
  *
@@ -5384,6 +5386,16 @@ declare interface Environment {
5384
5386
  resolveLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, layoutIdentity: OpenFin_2.LayoutIdentity): Promise<any>;
5385
5387
  initPlatform(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, ...args: Parameters<OpenFin_2.Fin['Platform']['init']>): ReturnType<OpenFin_2.Fin['Platform']['init']>;
5386
5388
  observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): () => void;
5389
+ /**
5390
+ * Registers a listener invoked when the current page has been restored from the
5391
+ * browser's back/forward cache. Stateful APIs (e.g. channels) use this to re-establish
5392
+ * connections that were torn down while the page was cached.
5393
+ *
5394
+ * No-op in environments that cannot be bfcached.
5395
+ *
5396
+ * @returns a function that unregisters the listener.
5397
+ */
5398
+ onBFCacheRestore(listener: BFCacheRestoreListener): () => void;
5387
5399
  writeToken(path: string, token: string): Promise<string>;
5388
5400
  retrievePort(config: NewConnectConfig): Promise<number>;
5389
5401
  getNextMessageId(): any;
@@ -5838,7 +5850,7 @@ declare type ExtensionWindowCreatedEvent = BaseEvent_5 & {
5838
5850
  * these api calls are not implemented in the javscript api, only in the external adapter
5839
5851
  * If they don't exist in the external adapter they should be removed.
5840
5852
  */
5841
- declare type ExternalAdapterOnlyCalls = 'subscriber-added' | 'subscriber-removed' | 'clipboard-clear' | 'create-proxy-socket' | 'authenticate-proxy-socket' | 'convert-options' | 'generate-guid' | 'get-config' | 'get-remote-config' | 'get-nearest-display-root' | 'get-preload-scripts' | 'raise-event' | 'set-window-preload-state' | 'dock-window' | 'get-current-window-options' | 'redirect-window-to-url' | 'request-new-content' | 'raise-many-events' | 'show-menu' | 'resolve-proxy' | 'undock-window' | 'window-embedded' | 'window-get-cached-bounds' | 'resource-fetch-authenticate' | 'set-cookie';
5853
+ declare type ExternalAdapterOnlyCalls = 'subscriber-added' | 'subscriber-removed' | 'clipboard-clear' | 'convert-options' | 'generate-guid' | 'get-config' | 'get-remote-config' | 'get-nearest-display-root' | 'get-preload-scripts' | 'raise-event' | 'set-window-preload-state' | 'dock-window' | 'get-current-window-options' | 'redirect-window-to-url' | 'request-new-content' | 'raise-many-events' | 'show-menu' | 'resolve-proxy' | 'undock-window' | 'window-embedded' | 'window-get-cached-bounds' | 'resource-fetch-authenticate' | 'set-cookie';
5842
5854
 
5843
5855
  declare type ExternalAdapterOnlyCallsMap = {
5844
5856
  [k in ExternalAdapterOnlyCalls]: {
@@ -7102,16 +7114,21 @@ declare class InterApplicationBus extends Base {
7102
7114
  * Subscribes to messages from the specified application on the specified topic.
7103
7115
  * @param source This object is described in the Identity in the typedef
7104
7116
  * @param topic The topic on which the message is sent
7105
- * @param listener A function that is called when a message has
7106
- * been received. It is passed the message, uuid and name of the sending application.
7117
+ * @param listener A function that is called when a message has been received. It is passed
7118
+ * two arguments: the message, and the identity (`{ uuid, name }`) of the sender.
7107
7119
  * The message can be either a primitive data type (string, number, or boolean) or
7108
7120
  * composite data type (object, array) that is composed of other primitive or composite
7109
7121
  * data types
7110
7122
  *
7123
+ * @remarks This differs from the legacy `fin.desktop.InterApplicationBus.subscribe` API,
7124
+ * which passes `(message, uuid, name)` as separate arguments.
7125
+ *
7111
7126
  * @example
7112
7127
  * ```js
7113
7128
  * // subscribe to a specified application
7114
- * 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));
7129
+ * fin.InterApplicationBus.subscribe(fin.me, 'topic', (message, sender) => {
7130
+ * console.log(`Received from ${sender.uuid}/${sender.name}:`, message);
7131
+ * }).then(() => console.log('Subscribed to the specified application')).catch(err => console.log(err));
7115
7132
  *
7116
7133
  * // subscribe to wildcard
7117
7134
  * fin.InterApplicationBus.subscribe({ uuid: '*' }, 'topic', sub_msg => console.log(sub_msg)).then(() => console.log('Subscribed to *')).catch(err => console.log(err));
@@ -20150,6 +20167,9 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
20150
20167
  /**
20151
20168
  * Removes focus from the window.
20152
20169
  *
20170
+ * @remarks On macOS, a modal window (created with `modalParentIdentity`) is hidden instead, because
20171
+ * moving a modal sheet behind its parent would leave the parent unable to show other dialogs.
20172
+ *
20153
20173
  * @example
20154
20174
  * ```js
20155
20175
  * async function blurWindow() {
package/out/stub.d.ts CHANGED
@@ -2030,6 +2030,8 @@ declare type BeginUserBoundsChangingEvent = UserBoundsChangeEvent & {
2030
2030
  type: 'begin-user-bounds-changing';
2031
2031
  };
2032
2032
 
2033
+ declare type BFCacheRestoreListener = () => void | Promise<void>;
2034
+
2033
2035
  /**
2034
2036
  * A rule prescribing content creation that should be blocked.
2035
2037
  *
@@ -5496,6 +5498,16 @@ declare interface Environment {
5496
5498
  resolveLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, layoutIdentity: OpenFin_2.LayoutIdentity): Promise<any>;
5497
5499
  initPlatform(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, ...args: Parameters<OpenFin_2.Fin['Platform']['init']>): ReturnType<OpenFin_2.Fin['Platform']['init']>;
5498
5500
  observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): () => void;
5501
+ /**
5502
+ * Registers a listener invoked when the current page has been restored from the
5503
+ * browser's back/forward cache. Stateful APIs (e.g. channels) use this to re-establish
5504
+ * connections that were torn down while the page was cached.
5505
+ *
5506
+ * No-op in environments that cannot be bfcached.
5507
+ *
5508
+ * @returns a function that unregisters the listener.
5509
+ */
5510
+ onBFCacheRestore(listener: BFCacheRestoreListener): () => void;
5499
5511
  writeToken(path: string, token: string): Promise<string>;
5500
5512
  retrievePort(config: NewConnectConfig): Promise<number>;
5501
5513
  getNextMessageId(): any;
@@ -5968,7 +5980,7 @@ declare type ExtensionWindowCreatedEvent = BaseEvent_5 & {
5968
5980
  * these api calls are not implemented in the javscript api, only in the external adapter
5969
5981
  * If they don't exist in the external adapter they should be removed.
5970
5982
  */
5971
- declare type ExternalAdapterOnlyCalls = 'subscriber-added' | 'subscriber-removed' | 'clipboard-clear' | 'create-proxy-socket' | 'authenticate-proxy-socket' | 'convert-options' | 'generate-guid' | 'get-config' | 'get-remote-config' | 'get-nearest-display-root' | 'get-preload-scripts' | 'raise-event' | 'set-window-preload-state' | 'dock-window' | 'get-current-window-options' | 'redirect-window-to-url' | 'request-new-content' | 'raise-many-events' | 'show-menu' | 'resolve-proxy' | 'undock-window' | 'window-embedded' | 'window-get-cached-bounds' | 'resource-fetch-authenticate' | 'set-cookie';
5983
+ declare type ExternalAdapterOnlyCalls = 'subscriber-added' | 'subscriber-removed' | 'clipboard-clear' | 'convert-options' | 'generate-guid' | 'get-config' | 'get-remote-config' | 'get-nearest-display-root' | 'get-preload-scripts' | 'raise-event' | 'set-window-preload-state' | 'dock-window' | 'get-current-window-options' | 'redirect-window-to-url' | 'request-new-content' | 'raise-many-events' | 'show-menu' | 'resolve-proxy' | 'undock-window' | 'window-embedded' | 'window-get-cached-bounds' | 'resource-fetch-authenticate' | 'set-cookie';
5972
5984
 
5973
5985
  declare type ExternalAdapterOnlyCallsMap = {
5974
5986
  [k in ExternalAdapterOnlyCalls]: {
@@ -7253,16 +7265,21 @@ declare class InterApplicationBus extends Base {
7253
7265
  * Subscribes to messages from the specified application on the specified topic.
7254
7266
  * @param source This object is described in the Identity in the typedef
7255
7267
  * @param topic The topic on which the message is sent
7256
- * @param listener A function that is called when a message has
7257
- * been received. It is passed the message, uuid and name of the sending application.
7268
+ * @param listener A function that is called when a message has been received. It is passed
7269
+ * two arguments: the message, and the identity (`{ uuid, name }`) of the sender.
7258
7270
  * The message can be either a primitive data type (string, number, or boolean) or
7259
7271
  * composite data type (object, array) that is composed of other primitive or composite
7260
7272
  * data types
7261
7273
  *
7274
+ * @remarks This differs from the legacy `fin.desktop.InterApplicationBus.subscribe` API,
7275
+ * which passes `(message, uuid, name)` as separate arguments.
7276
+ *
7262
7277
  * @example
7263
7278
  * ```js
7264
7279
  * // subscribe to a specified application
7265
- * 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));
7280
+ * fin.InterApplicationBus.subscribe(fin.me, 'topic', (message, sender) => {
7281
+ * console.log(`Received from ${sender.uuid}/${sender.name}:`, message);
7282
+ * }).then(() => console.log('Subscribed to the specified application')).catch(err => console.log(err));
7266
7283
  *
7267
7284
  * // subscribe to wildcard
7268
7285
  * fin.InterApplicationBus.subscribe({ uuid: '*' }, 'topic', sub_msg => console.log(sub_msg)).then(() => console.log('Subscribed to *')).catch(err => console.log(err));
@@ -20689,6 +20706,9 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
20689
20706
  /**
20690
20707
  * Removes focus from the window.
20691
20708
  *
20709
+ * @remarks On macOS, a modal window (created with `modalParentIdentity`) is hidden instead, because
20710
+ * moving a modal sheet behind its parent would leave the parent unable to show other dialogs.
20711
+ *
20692
20712
  * @example
20693
20713
  * ```js
20694
20714
  * async function blurWindow() {
package/out/stub.js CHANGED
@@ -3814,6 +3814,9 @@ class _Window extends WebContents {
3814
3814
  /**
3815
3815
  * Removes focus from the window.
3816
3816
  *
3817
+ * @remarks On macOS, a modal window (created with `modalParentIdentity`) is hidden instead, because
3818
+ * moving a modal sheet behind its parent would leave the parent unable to show other dialogs.
3819
+ *
3817
3820
  * @example
3818
3821
  * ```js
3819
3822
  * async function blurWindow() {
@@ -9625,16 +9628,21 @@ class InterApplicationBus extends Base {
9625
9628
  * Subscribes to messages from the specified application on the specified topic.
9626
9629
  * @param source This object is described in the Identity in the typedef
9627
9630
  * @param topic The topic on which the message is sent
9628
- * @param listener A function that is called when a message has
9629
- * been received. It is passed the message, uuid and name of the sending application.
9631
+ * @param listener A function that is called when a message has been received. It is passed
9632
+ * two arguments: the message, and the identity (`{ uuid, name }`) of the sender.
9630
9633
  * The message can be either a primitive data type (string, number, or boolean) or
9631
9634
  * composite data type (object, array) that is composed of other primitive or composite
9632
9635
  * data types
9633
9636
  *
9637
+ * @remarks This differs from the legacy `fin.desktop.InterApplicationBus.subscribe` API,
9638
+ * which passes `(message, uuid, name)` as separate arguments.
9639
+ *
9634
9640
  * @example
9635
9641
  * ```js
9636
9642
  * // subscribe to a specified application
9637
- * 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));
9643
+ * fin.InterApplicationBus.subscribe(fin.me, 'topic', (message, sender) => {
9644
+ * console.log(`Received from ${sender.uuid}/${sender.name}:`, message);
9645
+ * }).then(() => console.log('Subscribed to the specified application')).catch(err => console.log(err));
9638
9646
  *
9639
9647
  * // subscribe to wildcard
9640
9648
  * fin.InterApplicationBus.subscribe({ uuid: '*' }, 'topic', sub_msg => console.log(sub_msg)).then(() => console.log('Subscribed to *')).catch(err => console.log(err));
@@ -17134,6 +17142,15 @@ class Transport extends events.EventEmitter {
17134
17142
  const { uuid, name } = config;
17135
17143
  const entityType = this.environment.getCurrentEntityType();
17136
17144
  this.me = getBaseMe(entityType, uuid, name);
17145
+ // Registered here rather than per-caller so that a restoration is logged exactly once,
17146
+ // however many parts of the adapter go on to subscribe.
17147
+ this.environment.onBFCacheRestore(async () => {
17148
+ await this.sendAction('write-to-log', {
17149
+ level: 'verbose',
17150
+ message: `Page restored from the back/forward cache for ${uuid}/${name}`,
17151
+ target: {}
17152
+ });
17153
+ });
17137
17154
  }
17138
17155
  getFin() {
17139
17156
  if (!__classPrivateFieldGet(this, _Transport_fin, "f")) {
@@ -17376,6 +17393,11 @@ class StubEnvironment {
17376
17393
  observeBounds() {
17377
17394
  throw new Error(environmentUnsupportedMessage);
17378
17395
  }
17396
+ onBFCacheRestore(listener) {
17397
+ // Deliberately not throwing: callers register unconditionally, including from the
17398
+ // Transport constructor, which the stub environment has to survive.
17399
+ return () => undefined;
17400
+ }
17379
17401
  writeToken(path, token) {
17380
17402
  throw new Error(environmentUnsupportedMessage);
17381
17403
  }
package/out/stub.mjs CHANGED
@@ -3811,6 +3811,9 @@ class _Window extends WebContents {
3811
3811
  /**
3812
3812
  * Removes focus from the window.
3813
3813
  *
3814
+ * @remarks On macOS, a modal window (created with `modalParentIdentity`) is hidden instead, because
3815
+ * moving a modal sheet behind its parent would leave the parent unable to show other dialogs.
3816
+ *
3814
3817
  * @example
3815
3818
  * ```js
3816
3819
  * async function blurWindow() {
@@ -9622,16 +9625,21 @@ class InterApplicationBus extends Base {
9622
9625
  * Subscribes to messages from the specified application on the specified topic.
9623
9626
  * @param source This object is described in the Identity in the typedef
9624
9627
  * @param topic The topic on which the message is sent
9625
- * @param listener A function that is called when a message has
9626
- * been received. It is passed the message, uuid and name of the sending application.
9628
+ * @param listener A function that is called when a message has been received. It is passed
9629
+ * two arguments: the message, and the identity (`{ uuid, name }`) of the sender.
9627
9630
  * The message can be either a primitive data type (string, number, or boolean) or
9628
9631
  * composite data type (object, array) that is composed of other primitive or composite
9629
9632
  * data types
9630
9633
  *
9634
+ * @remarks This differs from the legacy `fin.desktop.InterApplicationBus.subscribe` API,
9635
+ * which passes `(message, uuid, name)` as separate arguments.
9636
+ *
9631
9637
  * @example
9632
9638
  * ```js
9633
9639
  * // subscribe to a specified application
9634
- * 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));
9640
+ * fin.InterApplicationBus.subscribe(fin.me, 'topic', (message, sender) => {
9641
+ * console.log(`Received from ${sender.uuid}/${sender.name}:`, message);
9642
+ * }).then(() => console.log('Subscribed to the specified application')).catch(err => console.log(err));
9635
9643
  *
9636
9644
  * // subscribe to wildcard
9637
9645
  * fin.InterApplicationBus.subscribe({ uuid: '*' }, 'topic', sub_msg => console.log(sub_msg)).then(() => console.log('Subscribed to *')).catch(err => console.log(err));
@@ -17092,6 +17100,15 @@ class Transport extends EventEmitter {
17092
17100
  const { uuid, name } = config;
17093
17101
  const entityType = this.environment.getCurrentEntityType();
17094
17102
  this.me = getBaseMe(entityType, uuid, name);
17103
+ // Registered here rather than per-caller so that a restoration is logged exactly once,
17104
+ // however many parts of the adapter go on to subscribe.
17105
+ this.environment.onBFCacheRestore(async () => {
17106
+ await this.sendAction('write-to-log', {
17107
+ level: 'verbose',
17108
+ message: `Page restored from the back/forward cache for ${uuid}/${name}`,
17109
+ target: {}
17110
+ });
17111
+ });
17095
17112
  }
17096
17113
  getFin() {
17097
17114
  if (!__classPrivateFieldGet(this, _Transport_fin, "f")) {
@@ -17334,6 +17351,11 @@ class StubEnvironment {
17334
17351
  observeBounds() {
17335
17352
  throw new Error(environmentUnsupportedMessage);
17336
17353
  }
17354
+ onBFCacheRestore(listener) {
17355
+ // Deliberately not throwing: callers register unconditionally, including from the
17356
+ // Transport constructor, which the stub environment has to survive.
17357
+ return () => undefined;
17358
+ }
17337
17359
  writeToken(path, token) {
17338
17360
  throw new Error(environmentUnsupportedMessage);
17339
17361
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/core",
3
- "version": "46.100.85",
3
+ "version": "46.100.88",
4
4
  "description": "The core renderer entry point of OpenFin",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "main": "out/stub.js",
@@ -36,7 +36,7 @@
36
36
  ],
37
37
  "author": "OpenFin",
38
38
  "dependencies": {
39
- "@types/node": "^20.14.2",
39
+ "@types/node": "^24.19.2",
40
40
  "events": "^3.0.0",
41
41
  "es-toolkit": "^1.39.3",
42
42
  "ws": "^7.5.11",