@openfin/core 47.100.59 → 47.100.61

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.
@@ -5007,6 +5007,31 @@ declare type DisplayMetadata = {
5007
5007
  readonly glyph?: string;
5008
5008
  };
5009
5009
 
5010
+ declare type DockIconClickedEvent = OpenFin_2.SystemEvents.DockIconClickedEvent;
5011
+
5012
+ /**
5013
+ * Generated on macOS when the user clicks this runtime's dock icon, or opens the app again from Finder, while the
5014
+ * runtime is running. Only raised to listeners in this runtime, not to other connected runtimes.
5015
+ * @remarks macOS only. On Windows and Linux, launching an application that is already running raises
5016
+ * `run-requested` on that application instead.
5017
+ *
5018
+ * By default, the platform provider handles this event in
5019
+ * {@link OpenFin.PlatformProvider.handleDockIconClicked PlatformProvider.handleDockIconClicked}, which reopens the
5020
+ * platform when it has no windows. The default reopen requires `platform.allowLaunchIntoPlatform: true`.
5021
+ * @interface
5022
+ */
5023
+ declare type DockIconClickedEvent_2 = BaseEvent_9 & {
5024
+ type: 'dock-icon-clicked';
5025
+ /**
5026
+ * Whether macOS found any visible windows in this runtime. Hidden windows do not count.
5027
+ */
5028
+ hasVisibleWindows: boolean;
5029
+ /**
5030
+ * UUID of the application the runtime was started with, if any.
5031
+ */
5032
+ uuid?: string;
5033
+ };
5034
+
5010
5035
  /**
5011
5036
  * @interface
5012
5037
  *
@@ -5520,7 +5545,7 @@ declare type Event_10 = ApplicationEvents.Event | ApiReadyEvent | SnapshotApplie
5520
5545
  * under the {@link OpenFin.SystemEvents} namespace (payloads inherited from propagated events are defined in the namespace
5521
5546
  * from which they propagate).
5522
5547
  */
5523
- declare type Event_11 = ExcludeRequested<WindowEvents.PropagatedEvent<'system'>> | ExcludeRequested<ViewEvents.PropagatedEvent<'system'>> | ExcludeRequested<ApplicationEvents.PropagatedEvent<'system'>> | ApplicationCreatedEvent | DesktopIconClickedEvent | IdleStateChangedEvent | MonitorInfoChangedEvent | SessionChangedEvent | AppVersionEventWithId | SystemShutdownEvent | ExtensionsEnabledEvent | ExtensionsDisabledEvent | ExtensionsExcludedEvent | ExtensionsInstalledEvent | ExtensionInstalledEvent | ExtensionsInstallFailedEvent | ExtensionInstallFailedEvent | ExtensionsInitializationFailedEvent | ExtensionLoadedEvent | ExtensionReadyEvent | ThemePaletteChangedEvent | NativeThemeUpdatedEvent;
5548
+ declare type Event_11 = ExcludeRequested<WindowEvents.PropagatedEvent<'system'>> | ExcludeRequested<ViewEvents.PropagatedEvent<'system'>> | ExcludeRequested<ApplicationEvents.PropagatedEvent<'system'>> | ApplicationCreatedEvent | DesktopIconClickedEvent | DockIconClickedEvent_2 | IdleStateChangedEvent | MonitorInfoChangedEvent | SessionChangedEvent | AppVersionEventWithId | SystemShutdownEvent | ExtensionsEnabledEvent | ExtensionsDisabledEvent | ExtensionsExcludedEvent | ExtensionsInstalledEvent | ExtensionInstalledEvent | ExtensionsInstallFailedEvent | ExtensionInstallFailedEvent | ExtensionsInitializationFailedEvent | ExtensionLoadedEvent | ExtensionReadyEvent | ThemePaletteChangedEvent | NativeThemeUpdatedEvent;
5524
5549
 
5525
5550
  /**
5526
5551
  * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by the HTMLElement Layout container.
@@ -6397,9 +6422,8 @@ declare type FoundInPageEvent = NamedEvent & {
6397
6422
  * To be able to directly address this context for eventing and messaging purposes, it needs a
6398
6423
  * unique uuid name pairing. For OpenFin applications and windows this is provided via a configuration
6399
6424
  * object in the form of a manifest URL or options object, but there is no configuration object for iframes.
6400
- * Just as a call to window.open outside of our Window API returns a new window with a random GUID assigned
6401
- * for the name, each iframe that has the API injected will be assigned a GUID as its name, the UUID will be
6402
- * the same as the parent window's.
6425
+ * Each iframe that has the API injected is named by its frame token, which is unique within the runtime, and
6426
+ * its UUID is the same as the parent window's.
6403
6427
  *
6404
6428
  * The fin.Frame namespace represents a way to interact with `iframes` and facilitates the discovery of current context
6405
6429
  * (iframe or main window) as well as the ability to listen for {@link OpenFin.FrameEvents frame-specific events}.
@@ -7150,11 +7174,6 @@ declare class InterApplicationBus extends Base {
7150
7174
  subscriberRemoved: string;
7151
7175
  };
7152
7176
  private refCounter;
7153
- /**
7154
- * One entry per subscription the runtime knows about, keyed by the same subscription key the
7155
- * emitter and the ref counter use. Listeners sharing a key share a single entry.
7156
- */
7157
- private activeSubscriptions;
7158
7177
  protected emitter: EventEmitter;
7159
7178
  on: any;
7160
7179
  removeAllListeners: any;
@@ -12971,6 +12990,47 @@ declare interface PlatformProvider {
12971
12990
  * @returns {Promise<void>}
12972
12991
  */
12973
12992
  handleRunRequested({ manifest, userAppConfigArgs }: RunRequestedEvent): Promise<void>;
12993
+ /**
12994
+ * Handles the user clicking the macOS dock icon, or opening the app again from Finder, while the platform is running.
12995
+ * Only called for the platform the runtime was started with, and only after its startup content (its snapshot or
12996
+ * `appManifestUrl`) has finished launching or failed to.
12997
+ * Clicks while a previous call is still running are ignored.
12998
+ * Never called on Windows or Linux, where launching the platform again raises `run-requested` instead.
12999
+ *
13000
+ * By default, if no windows are visible and the platform has no other windows, including hidden or minimized ones,
13001
+ * calls {@link PlatformProvider#handleRunRequested PlatformProvider.handleRunRequested} with the platform's manifest
13002
+ * and startup `userAppConfigArgs`, the same as relaunching it. Otherwise it does nothing.
13003
+ *
13004
+ * @remarks
13005
+ * The default `handleRunRequested` reopens the manifest's snapshot through
13006
+ * {@link PlatformProvider#launchIntoPlatform PlatformProvider.launchIntoPlatform}, so the platform manifest must set
13007
+ * `platform.allowLaunchIntoPlatform` to `true`. Otherwise nothing reopens and a security notice is logged.
13008
+ * Platforms that override `handleRunRequested` or `handleDockIconClicked` are not affected.
13009
+ *
13010
+ * macOS counts any shown window as visible, including the platform provider window. If the provider window is shown,
13011
+ * the default does nothing.
13012
+ * @param payload The {@link OpenFin.SystemEvents.DockIconClickedEvent dock-icon-clicked} system event.
13013
+ *
13014
+ * @example
13015
+ *
13016
+ * ```js
13017
+ * const overrideCallback = (PlatformProvider) => {
13018
+ * class Override extends PlatformProvider {
13019
+ * async handleDockIconClicked(payload) {
13020
+ * if (payload.hasVisibleWindows) {
13021
+ * // Bring a window forward instead of doing nothing
13022
+ * return;
13023
+ * }
13024
+ * return super.handleDockIconClicked(payload);
13025
+ * }
13026
+ * }
13027
+ * return new Override();
13028
+ * }
13029
+ *
13030
+ * fin.Platform.init({ overrideCallback });
13031
+ * ```
13032
+ */
13033
+ handleDockIconClicked(payload: DockIconClickedEvent): Promise<void>;
12974
13034
  /**
12975
13035
  * @experimental
12976
13036
  *
@@ -17433,6 +17493,7 @@ declare namespace SystemEvents {
17433
17493
  AppVersionEventType,
17434
17494
  ApplicationCreatedEvent,
17435
17495
  DesktopIconClickedEvent,
17496
+ DockIconClickedEvent_2 as DockIconClickedEvent,
17436
17497
  ExtensionsEnabledEvent,
17437
17498
  ExtensionsDisabledEvent,
17438
17499
  ExtensionsExcludedEvent,
@@ -5007,6 +5007,31 @@ declare type DisplayMetadata = {
5007
5007
  readonly glyph?: string;
5008
5008
  };
5009
5009
 
5010
+ declare type DockIconClickedEvent = OpenFin_2.SystemEvents.DockIconClickedEvent;
5011
+
5012
+ /**
5013
+ * Generated on macOS when the user clicks this runtime's dock icon, or opens the app again from Finder, while the
5014
+ * runtime is running. Only raised to listeners in this runtime, not to other connected runtimes.
5015
+ * @remarks macOS only. On Windows and Linux, launching an application that is already running raises
5016
+ * `run-requested` on that application instead.
5017
+ *
5018
+ * By default, the platform provider handles this event in
5019
+ * {@link OpenFin.PlatformProvider.handleDockIconClicked PlatformProvider.handleDockIconClicked}, which reopens the
5020
+ * platform when it has no windows. The default reopen requires `platform.allowLaunchIntoPlatform: true`.
5021
+ * @interface
5022
+ */
5023
+ declare type DockIconClickedEvent_2 = BaseEvent_9 & {
5024
+ type: 'dock-icon-clicked';
5025
+ /**
5026
+ * Whether macOS found any visible windows in this runtime. Hidden windows do not count.
5027
+ */
5028
+ hasVisibleWindows: boolean;
5029
+ /**
5030
+ * UUID of the application the runtime was started with, if any.
5031
+ */
5032
+ uuid?: string;
5033
+ };
5034
+
5010
5035
  /**
5011
5036
  * @interface
5012
5037
  *
@@ -5520,7 +5545,7 @@ declare type Event_10 = ApplicationEvents.Event | ApiReadyEvent | SnapshotApplie
5520
5545
  * under the {@link OpenFin.SystemEvents} namespace (payloads inherited from propagated events are defined in the namespace
5521
5546
  * from which they propagate).
5522
5547
  */
5523
- declare type Event_11 = ExcludeRequested<WindowEvents.PropagatedEvent<'system'>> | ExcludeRequested<ViewEvents.PropagatedEvent<'system'>> | ExcludeRequested<ApplicationEvents.PropagatedEvent<'system'>> | ApplicationCreatedEvent | DesktopIconClickedEvent | IdleStateChangedEvent | MonitorInfoChangedEvent | SessionChangedEvent | AppVersionEventWithId | SystemShutdownEvent | ExtensionsEnabledEvent | ExtensionsDisabledEvent | ExtensionsExcludedEvent | ExtensionsInstalledEvent | ExtensionInstalledEvent | ExtensionsInstallFailedEvent | ExtensionInstallFailedEvent | ExtensionsInitializationFailedEvent | ExtensionLoadedEvent | ExtensionReadyEvent | ThemePaletteChangedEvent | NativeThemeUpdatedEvent;
5548
+ declare type Event_11 = ExcludeRequested<WindowEvents.PropagatedEvent<'system'>> | ExcludeRequested<ViewEvents.PropagatedEvent<'system'>> | ExcludeRequested<ApplicationEvents.PropagatedEvent<'system'>> | ApplicationCreatedEvent | DesktopIconClickedEvent | DockIconClickedEvent_2 | IdleStateChangedEvent | MonitorInfoChangedEvent | SessionChangedEvent | AppVersionEventWithId | SystemShutdownEvent | ExtensionsEnabledEvent | ExtensionsDisabledEvent | ExtensionsExcludedEvent | ExtensionsInstalledEvent | ExtensionInstalledEvent | ExtensionsInstallFailedEvent | ExtensionInstallFailedEvent | ExtensionsInitializationFailedEvent | ExtensionLoadedEvent | ExtensionReadyEvent | ThemePaletteChangedEvent | NativeThemeUpdatedEvent;
5524
5549
 
5525
5550
  /**
5526
5551
  * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by the HTMLElement Layout container.
@@ -6397,9 +6422,8 @@ declare type FoundInPageEvent = NamedEvent & {
6397
6422
  * To be able to directly address this context for eventing and messaging purposes, it needs a
6398
6423
  * unique uuid name pairing. For OpenFin applications and windows this is provided via a configuration
6399
6424
  * object in the form of a manifest URL or options object, but there is no configuration object for iframes.
6400
- * Just as a call to window.open outside of our Window API returns a new window with a random GUID assigned
6401
- * for the name, each iframe that has the API injected will be assigned a GUID as its name, the UUID will be
6402
- * the same as the parent window's.
6425
+ * Each iframe that has the API injected is named by its frame token, which is unique within the runtime, and
6426
+ * its UUID is the same as the parent window's.
6403
6427
  *
6404
6428
  * The fin.Frame namespace represents a way to interact with `iframes` and facilitates the discovery of current context
6405
6429
  * (iframe or main window) as well as the ability to listen for {@link OpenFin.FrameEvents frame-specific events}.
@@ -7150,11 +7174,6 @@ declare class InterApplicationBus extends Base {
7150
7174
  subscriberRemoved: string;
7151
7175
  };
7152
7176
  private refCounter;
7153
- /**
7154
- * One entry per subscription the runtime knows about, keyed by the same subscription key the
7155
- * emitter and the ref counter use. Listeners sharing a key share a single entry.
7156
- */
7157
- private activeSubscriptions;
7158
7177
  protected emitter: EventEmitter;
7159
7178
  on: any;
7160
7179
  removeAllListeners: any;
@@ -12971,6 +12990,47 @@ declare interface PlatformProvider {
12971
12990
  * @returns {Promise<void>}
12972
12991
  */
12973
12992
  handleRunRequested({ manifest, userAppConfigArgs }: RunRequestedEvent): Promise<void>;
12993
+ /**
12994
+ * Handles the user clicking the macOS dock icon, or opening the app again from Finder, while the platform is running.
12995
+ * Only called for the platform the runtime was started with, and only after its startup content (its snapshot or
12996
+ * `appManifestUrl`) has finished launching or failed to.
12997
+ * Clicks while a previous call is still running are ignored.
12998
+ * Never called on Windows or Linux, where launching the platform again raises `run-requested` instead.
12999
+ *
13000
+ * By default, if no windows are visible and the platform has no other windows, including hidden or minimized ones,
13001
+ * calls {@link PlatformProvider#handleRunRequested PlatformProvider.handleRunRequested} with the platform's manifest
13002
+ * and startup `userAppConfigArgs`, the same as relaunching it. Otherwise it does nothing.
13003
+ *
13004
+ * @remarks
13005
+ * The default `handleRunRequested` reopens the manifest's snapshot through
13006
+ * {@link PlatformProvider#launchIntoPlatform PlatformProvider.launchIntoPlatform}, so the platform manifest must set
13007
+ * `platform.allowLaunchIntoPlatform` to `true`. Otherwise nothing reopens and a security notice is logged.
13008
+ * Platforms that override `handleRunRequested` or `handleDockIconClicked` are not affected.
13009
+ *
13010
+ * macOS counts any shown window as visible, including the platform provider window. If the provider window is shown,
13011
+ * the default does nothing.
13012
+ * @param payload The {@link OpenFin.SystemEvents.DockIconClickedEvent dock-icon-clicked} system event.
13013
+ *
13014
+ * @example
13015
+ *
13016
+ * ```js
13017
+ * const overrideCallback = (PlatformProvider) => {
13018
+ * class Override extends PlatformProvider {
13019
+ * async handleDockIconClicked(payload) {
13020
+ * if (payload.hasVisibleWindows) {
13021
+ * // Bring a window forward instead of doing nothing
13022
+ * return;
13023
+ * }
13024
+ * return super.handleDockIconClicked(payload);
13025
+ * }
13026
+ * }
13027
+ * return new Override();
13028
+ * }
13029
+ *
13030
+ * fin.Platform.init({ overrideCallback });
13031
+ * ```
13032
+ */
13033
+ handleDockIconClicked(payload: DockIconClickedEvent): Promise<void>;
12974
13034
  /**
12975
13035
  * @experimental
12976
13036
  *
@@ -17433,6 +17493,7 @@ declare namespace SystemEvents {
17433
17493
  AppVersionEventType,
17434
17494
  ApplicationCreatedEvent,
17435
17495
  DesktopIconClickedEvent,
17496
+ DockIconClickedEvent_2 as DockIconClickedEvent,
17436
17497
  ExtensionsEnabledEvent,
17437
17498
  ExtensionsDisabledEvent,
17438
17499
  ExtensionsExcludedEvent,
@@ -5007,6 +5007,31 @@ declare type DisplayMetadata = {
5007
5007
  readonly glyph?: string;
5008
5008
  };
5009
5009
 
5010
+ declare type DockIconClickedEvent = OpenFin_2.SystemEvents.DockIconClickedEvent;
5011
+
5012
+ /**
5013
+ * Generated on macOS when the user clicks this runtime's dock icon, or opens the app again from Finder, while the
5014
+ * runtime is running. Only raised to listeners in this runtime, not to other connected runtimes.
5015
+ * @remarks macOS only. On Windows and Linux, launching an application that is already running raises
5016
+ * `run-requested` on that application instead.
5017
+ *
5018
+ * By default, the platform provider handles this event in
5019
+ * {@link OpenFin.PlatformProvider.handleDockIconClicked PlatformProvider.handleDockIconClicked}, which reopens the
5020
+ * platform when it has no windows. The default reopen requires `platform.allowLaunchIntoPlatform: true`.
5021
+ * @interface
5022
+ */
5023
+ declare type DockIconClickedEvent_2 = BaseEvent_9 & {
5024
+ type: 'dock-icon-clicked';
5025
+ /**
5026
+ * Whether macOS found any visible windows in this runtime. Hidden windows do not count.
5027
+ */
5028
+ hasVisibleWindows: boolean;
5029
+ /**
5030
+ * UUID of the application the runtime was started with, if any.
5031
+ */
5032
+ uuid?: string;
5033
+ };
5034
+
5010
5035
  /**
5011
5036
  * @interface
5012
5037
  *
@@ -5520,7 +5545,7 @@ declare type Event_10 = ApplicationEvents.Event | ApiReadyEvent | SnapshotApplie
5520
5545
  * under the {@link OpenFin.SystemEvents} namespace (payloads inherited from propagated events are defined in the namespace
5521
5546
  * from which they propagate).
5522
5547
  */
5523
- declare type Event_11 = ExcludeRequested<WindowEvents.PropagatedEvent<'system'>> | ExcludeRequested<ViewEvents.PropagatedEvent<'system'>> | ExcludeRequested<ApplicationEvents.PropagatedEvent<'system'>> | ApplicationCreatedEvent | DesktopIconClickedEvent | IdleStateChangedEvent | MonitorInfoChangedEvent | SessionChangedEvent | AppVersionEventWithId | SystemShutdownEvent | ExtensionsEnabledEvent | ExtensionsDisabledEvent | ExtensionsExcludedEvent | ExtensionsInstalledEvent | ExtensionInstalledEvent | ExtensionsInstallFailedEvent | ExtensionInstallFailedEvent | ExtensionsInitializationFailedEvent | ExtensionLoadedEvent | ExtensionReadyEvent | ThemePaletteChangedEvent | NativeThemeUpdatedEvent;
5548
+ declare type Event_11 = ExcludeRequested<WindowEvents.PropagatedEvent<'system'>> | ExcludeRequested<ViewEvents.PropagatedEvent<'system'>> | ExcludeRequested<ApplicationEvents.PropagatedEvent<'system'>> | ApplicationCreatedEvent | DesktopIconClickedEvent | DockIconClickedEvent_2 | IdleStateChangedEvent | MonitorInfoChangedEvent | SessionChangedEvent | AppVersionEventWithId | SystemShutdownEvent | ExtensionsEnabledEvent | ExtensionsDisabledEvent | ExtensionsExcludedEvent | ExtensionsInstalledEvent | ExtensionInstalledEvent | ExtensionsInstallFailedEvent | ExtensionInstallFailedEvent | ExtensionsInitializationFailedEvent | ExtensionLoadedEvent | ExtensionReadyEvent | ThemePaletteChangedEvent | NativeThemeUpdatedEvent;
5524
5549
 
5525
5550
  /**
5526
5551
  * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by the HTMLElement Layout container.
@@ -6397,9 +6422,8 @@ declare type FoundInPageEvent = NamedEvent & {
6397
6422
  * To be able to directly address this context for eventing and messaging purposes, it needs a
6398
6423
  * unique uuid name pairing. For OpenFin applications and windows this is provided via a configuration
6399
6424
  * object in the form of a manifest URL or options object, but there is no configuration object for iframes.
6400
- * Just as a call to window.open outside of our Window API returns a new window with a random GUID assigned
6401
- * for the name, each iframe that has the API injected will be assigned a GUID as its name, the UUID will be
6402
- * the same as the parent window's.
6425
+ * Each iframe that has the API injected is named by its frame token, which is unique within the runtime, and
6426
+ * its UUID is the same as the parent window's.
6403
6427
  *
6404
6428
  * The fin.Frame namespace represents a way to interact with `iframes` and facilitates the discovery of current context
6405
6429
  * (iframe or main window) as well as the ability to listen for {@link OpenFin.FrameEvents frame-specific events}.
@@ -7150,11 +7174,6 @@ declare class InterApplicationBus extends Base {
7150
7174
  subscriberRemoved: string;
7151
7175
  };
7152
7176
  private refCounter;
7153
- /**
7154
- * One entry per subscription the runtime knows about, keyed by the same subscription key the
7155
- * emitter and the ref counter use. Listeners sharing a key share a single entry.
7156
- */
7157
- private activeSubscriptions;
7158
7177
  protected emitter: EventEmitter;
7159
7178
  on: any;
7160
7179
  removeAllListeners: any;
@@ -12971,6 +12990,47 @@ declare interface PlatformProvider {
12971
12990
  * @returns {Promise<void>}
12972
12991
  */
12973
12992
  handleRunRequested({ manifest, userAppConfigArgs }: RunRequestedEvent): Promise<void>;
12993
+ /**
12994
+ * Handles the user clicking the macOS dock icon, or opening the app again from Finder, while the platform is running.
12995
+ * Only called for the platform the runtime was started with, and only after its startup content (its snapshot or
12996
+ * `appManifestUrl`) has finished launching or failed to.
12997
+ * Clicks while a previous call is still running are ignored.
12998
+ * Never called on Windows or Linux, where launching the platform again raises `run-requested` instead.
12999
+ *
13000
+ * By default, if no windows are visible and the platform has no other windows, including hidden or minimized ones,
13001
+ * calls {@link PlatformProvider#handleRunRequested PlatformProvider.handleRunRequested} with the platform's manifest
13002
+ * and startup `userAppConfigArgs`, the same as relaunching it. Otherwise it does nothing.
13003
+ *
13004
+ * @remarks
13005
+ * The default `handleRunRequested` reopens the manifest's snapshot through
13006
+ * {@link PlatformProvider#launchIntoPlatform PlatformProvider.launchIntoPlatform}, so the platform manifest must set
13007
+ * `platform.allowLaunchIntoPlatform` to `true`. Otherwise nothing reopens and a security notice is logged.
13008
+ * Platforms that override `handleRunRequested` or `handleDockIconClicked` are not affected.
13009
+ *
13010
+ * macOS counts any shown window as visible, including the platform provider window. If the provider window is shown,
13011
+ * the default does nothing.
13012
+ * @param payload The {@link OpenFin.SystemEvents.DockIconClickedEvent dock-icon-clicked} system event.
13013
+ *
13014
+ * @example
13015
+ *
13016
+ * ```js
13017
+ * const overrideCallback = (PlatformProvider) => {
13018
+ * class Override extends PlatformProvider {
13019
+ * async handleDockIconClicked(payload) {
13020
+ * if (payload.hasVisibleWindows) {
13021
+ * // Bring a window forward instead of doing nothing
13022
+ * return;
13023
+ * }
13024
+ * return super.handleDockIconClicked(payload);
13025
+ * }
13026
+ * }
13027
+ * return new Override();
13028
+ * }
13029
+ *
13030
+ * fin.Platform.init({ overrideCallback });
13031
+ * ```
13032
+ */
13033
+ handleDockIconClicked(payload: DockIconClickedEvent): Promise<void>;
12974
13034
  /**
12975
13035
  * @experimental
12976
13036
  *
@@ -17433,6 +17493,7 @@ declare namespace SystemEvents {
17433
17493
  AppVersionEventType,
17434
17494
  ApplicationCreatedEvent,
17435
17495
  DesktopIconClickedEvent,
17496
+ DockIconClickedEvent_2 as DockIconClickedEvent,
17436
17497
  ExtensionsEnabledEvent,
17437
17498
  ExtensionsDisabledEvent,
17438
17499
  ExtensionsExcludedEvent,
package/out/stub.d.ts CHANGED
@@ -5123,6 +5123,31 @@ declare type DisplayMetadata = {
5123
5123
  readonly glyph?: string;
5124
5124
  };
5125
5125
 
5126
+ declare type DockIconClickedEvent = OpenFin_2.SystemEvents.DockIconClickedEvent;
5127
+
5128
+ /**
5129
+ * Generated on macOS when the user clicks this runtime's dock icon, or opens the app again from Finder, while the
5130
+ * runtime is running. Only raised to listeners in this runtime, not to other connected runtimes.
5131
+ * @remarks macOS only. On Windows and Linux, launching an application that is already running raises
5132
+ * `run-requested` on that application instead.
5133
+ *
5134
+ * By default, the platform provider handles this event in
5135
+ * {@link OpenFin.PlatformProvider.handleDockIconClicked PlatformProvider.handleDockIconClicked}, which reopens the
5136
+ * platform when it has no windows. The default reopen requires `platform.allowLaunchIntoPlatform: true`.
5137
+ * @interface
5138
+ */
5139
+ declare type DockIconClickedEvent_2 = BaseEvent_9 & {
5140
+ type: 'dock-icon-clicked';
5141
+ /**
5142
+ * Whether macOS found any visible windows in this runtime. Hidden windows do not count.
5143
+ */
5144
+ hasVisibleWindows: boolean;
5145
+ /**
5146
+ * UUID of the application the runtime was started with, if any.
5147
+ */
5148
+ uuid?: string;
5149
+ };
5150
+
5126
5151
  /**
5127
5152
  * @interface
5128
5153
  *
@@ -5647,7 +5672,7 @@ declare type Event_10 = ApplicationEvents.Event | ApiReadyEvent | SnapshotApplie
5647
5672
  * under the {@link OpenFin.SystemEvents} namespace (payloads inherited from propagated events are defined in the namespace
5648
5673
  * from which they propagate).
5649
5674
  */
5650
- declare type Event_11 = ExcludeRequested<WindowEvents.PropagatedEvent<'system'>> | ExcludeRequested<ViewEvents.PropagatedEvent<'system'>> | ExcludeRequested<ApplicationEvents.PropagatedEvent<'system'>> | ApplicationCreatedEvent | DesktopIconClickedEvent | IdleStateChangedEvent | MonitorInfoChangedEvent | SessionChangedEvent | AppVersionEventWithId | SystemShutdownEvent | ExtensionsEnabledEvent | ExtensionsDisabledEvent | ExtensionsExcludedEvent | ExtensionsInstalledEvent | ExtensionInstalledEvent | ExtensionsInstallFailedEvent | ExtensionInstallFailedEvent | ExtensionsInitializationFailedEvent | ExtensionLoadedEvent | ExtensionReadyEvent | ThemePaletteChangedEvent | NativeThemeUpdatedEvent;
5675
+ declare type Event_11 = ExcludeRequested<WindowEvents.PropagatedEvent<'system'>> | ExcludeRequested<ViewEvents.PropagatedEvent<'system'>> | ExcludeRequested<ApplicationEvents.PropagatedEvent<'system'>> | ApplicationCreatedEvent | DesktopIconClickedEvent | DockIconClickedEvent_2 | IdleStateChangedEvent | MonitorInfoChangedEvent | SessionChangedEvent | AppVersionEventWithId | SystemShutdownEvent | ExtensionsEnabledEvent | ExtensionsDisabledEvent | ExtensionsExcludedEvent | ExtensionsInstalledEvent | ExtensionInstalledEvent | ExtensionsInstallFailedEvent | ExtensionInstallFailedEvent | ExtensionsInitializationFailedEvent | ExtensionLoadedEvent | ExtensionReadyEvent | ThemePaletteChangedEvent | NativeThemeUpdatedEvent;
5651
5676
 
5652
5677
  /**
5653
5678
  * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by the HTMLElement Layout container.
@@ -6551,9 +6576,8 @@ declare type FoundInPageEvent = NamedEvent & {
6551
6576
  * To be able to directly address this context for eventing and messaging purposes, it needs a
6552
6577
  * unique uuid name pairing. For OpenFin applications and windows this is provided via a configuration
6553
6578
  * object in the form of a manifest URL or options object, but there is no configuration object for iframes.
6554
- * Just as a call to window.open outside of our Window API returns a new window with a random GUID assigned
6555
- * for the name, each iframe that has the API injected will be assigned a GUID as its name, the UUID will be
6556
- * the same as the parent window's.
6579
+ * Each iframe that has the API injected is named by its frame token, which is unique within the runtime, and
6580
+ * its UUID is the same as the parent window's.
6557
6581
  *
6558
6582
  * The fin.Frame namespace represents a way to interact with `iframes` and facilitates the discovery of current context
6559
6583
  * (iframe or main window) as well as the ability to listen for {@link OpenFin.FrameEvents frame-specific events}.
@@ -7313,11 +7337,6 @@ declare class InterApplicationBus extends Base {
7313
7337
  subscriberRemoved: string;
7314
7338
  };
7315
7339
  private refCounter;
7316
- /**
7317
- * One entry per subscription the runtime knows about, keyed by the same subscription key the
7318
- * emitter and the ref counter use. Listeners sharing a key share a single entry.
7319
- */
7320
- private activeSubscriptions;
7321
7340
  protected emitter: EventEmitter;
7322
7341
  on: any;
7323
7342
  removeAllListeners: any;
@@ -13463,6 +13482,47 @@ declare interface PlatformProvider {
13463
13482
  * @returns {Promise<void>}
13464
13483
  */
13465
13484
  handleRunRequested({ manifest, userAppConfigArgs }: RunRequestedEvent): Promise<void>;
13485
+ /**
13486
+ * Handles the user clicking the macOS dock icon, or opening the app again from Finder, while the platform is running.
13487
+ * Only called for the platform the runtime was started with, and only after its startup content (its snapshot or
13488
+ * `appManifestUrl`) has finished launching or failed to.
13489
+ * Clicks while a previous call is still running are ignored.
13490
+ * Never called on Windows or Linux, where launching the platform again raises `run-requested` instead.
13491
+ *
13492
+ * By default, if no windows are visible and the platform has no other windows, including hidden or minimized ones,
13493
+ * calls {@link PlatformProvider#handleRunRequested PlatformProvider.handleRunRequested} with the platform's manifest
13494
+ * and startup `userAppConfigArgs`, the same as relaunching it. Otherwise it does nothing.
13495
+ *
13496
+ * @remarks
13497
+ * The default `handleRunRequested` reopens the manifest's snapshot through
13498
+ * {@link PlatformProvider#launchIntoPlatform PlatformProvider.launchIntoPlatform}, so the platform manifest must set
13499
+ * `platform.allowLaunchIntoPlatform` to `true`. Otherwise nothing reopens and a security notice is logged.
13500
+ * Platforms that override `handleRunRequested` or `handleDockIconClicked` are not affected.
13501
+ *
13502
+ * macOS counts any shown window as visible, including the platform provider window. If the provider window is shown,
13503
+ * the default does nothing.
13504
+ * @param payload The {@link OpenFin.SystemEvents.DockIconClickedEvent dock-icon-clicked} system event.
13505
+ *
13506
+ * @example
13507
+ *
13508
+ * ```js
13509
+ * const overrideCallback = (PlatformProvider) => {
13510
+ * class Override extends PlatformProvider {
13511
+ * async handleDockIconClicked(payload) {
13512
+ * if (payload.hasVisibleWindows) {
13513
+ * // Bring a window forward instead of doing nothing
13514
+ * return;
13515
+ * }
13516
+ * return super.handleDockIconClicked(payload);
13517
+ * }
13518
+ * }
13519
+ * return new Override();
13520
+ * }
13521
+ *
13522
+ * fin.Platform.init({ overrideCallback });
13523
+ * ```
13524
+ */
13525
+ handleDockIconClicked(payload: DockIconClickedEvent): Promise<void>;
13466
13526
  /**
13467
13527
  * @experimental
13468
13528
  *
@@ -17939,6 +17999,7 @@ declare namespace SystemEvents {
17939
17999
  AppVersionEventWithId,
17940
18000
  ApplicationCreatedEvent,
17941
18001
  DesktopIconClickedEvent,
18002
+ DockIconClickedEvent_2 as DockIconClickedEvent,
17942
18003
  SystemShutdownEvent,
17943
18004
  ExtensionsEnabledEvent,
17944
18005
  ExtensionsDisabledEvent,
package/out/stub.js CHANGED
@@ -9712,27 +9712,11 @@ class InterApplicationBus extends Base {
9712
9712
  subscriberRemoved: 'subscriber-removed'
9713
9713
  };
9714
9714
  this.refCounter = new RefCounter();
9715
- /**
9716
- * One entry per subscription the runtime knows about, keyed by the same subscription key the
9717
- * emitter and the ref counter use. Listeners sharing a key share a single entry.
9718
- */
9719
- this.activeSubscriptions = new Map();
9720
9715
  this.Channel = new Channel(wire);
9721
9716
  this.emitter = new events.EventEmitter();
9722
9717
  wire.registerMessageHandler(this.onmessage.bind(this));
9723
9718
  this.on = this.emitter.on.bind(this.emitter);
9724
9719
  this.removeAllListeners = this.emitter.removeAllListeners.bind(this.emitter);
9725
- wire.environment.onBFCacheRestore(() => {
9726
- Array.from(this.activeSubscriptions.values()).forEach(async (subscription) => {
9727
- try {
9728
- await this.wire.sendAction('subscribe', subscription);
9729
- }
9730
- catch (error) {
9731
- // eslint-disable-next-line no-console
9732
- console.error('Failed to restore InterApplicationBus subscription after bfcache restore', error);
9733
- }
9734
- });
9735
- });
9736
9720
  }
9737
9721
  /**
9738
9722
  * Publishes a message to all applications running on OpenFin Runtime that
@@ -9805,18 +9789,14 @@ class InterApplicationBus extends Base {
9805
9789
  * ```
9806
9790
  */
9807
9791
  subscribe(source, topic, listener) {
9808
- const sourceWindowName = source.name || '*';
9809
- const subKey = this.createSubscriptionKey(source.uuid, sourceWindowName, topic);
9810
- const subscription = {
9811
- sourceUuid: source.uuid,
9812
- sourceWindowName,
9813
- topic,
9814
- destinationWindowName: this.me.name
9815
- };
9792
+ const subKey = this.createSubscriptionKey(source.uuid, source.name || '*', topic);
9816
9793
  const sendSubscription = async () => {
9817
- // Journaled before the await so a concurrent unsubscribe can find it.
9818
- this.activeSubscriptions.set(subKey, subscription);
9819
- await this.wire.sendAction('subscribe', subscription);
9794
+ await this.wire.sendAction('subscribe', {
9795
+ sourceUuid: source.uuid,
9796
+ sourceWindowName: source.name || '*',
9797
+ topic,
9798
+ destinationWindowName: this.me.name
9799
+ });
9820
9800
  };
9821
9801
  const alreadySubscribed = () => {
9822
9802
  return Promise.resolve();
@@ -9852,9 +9832,6 @@ class InterApplicationBus extends Base {
9852
9832
  const sourceWindowName = source.name || '*';
9853
9833
  const subKey = this.createSubscriptionKey(source.uuid, sourceWindowName, topic);
9854
9834
  const sendUnsubscription = async () => {
9855
- // Dropped before the await so that a restoration landing while this unsubscribe is
9856
- // still in flight does not replay the subscription being torn down.
9857
- this.activeSubscriptions.delete(subKey);
9858
9835
  await this.wire.sendAction('unsubscribe', {
9859
9836
  sourceUuid: source.uuid,
9860
9837
  sourceWindowName,
@@ -9863,9 +9840,6 @@ class InterApplicationBus extends Base {
9863
9840
  });
9864
9841
  };
9865
9842
  const dontSendUnsubscription = () => {
9866
- // TODO(CORE-2749): never settles - the executor evaluates `r` instead of calling it,
9867
- // so awaiting a non-final unsubscribe hangs the caller. Should be `Promise.resolve()`,
9868
- // but that changes long-standing behavior, so it is tracked separately from CORE-2740.
9869
9843
  return new Promise((r) => r).then(() => undefined);
9870
9844
  };
9871
9845
  this.emitter.removeListener(subKey, listener);
@@ -10196,9 +10170,8 @@ class ExternalApplicationModule extends Base {
10196
10170
  * To be able to directly address this context for eventing and messaging purposes, it needs a
10197
10171
  * unique uuid name pairing. For OpenFin applications and windows this is provided via a configuration
10198
10172
  * object in the form of a manifest URL or options object, but there is no configuration object for iframes.
10199
- * Just as a call to window.open outside of our Window API returns a new window with a random GUID assigned
10200
- * for the name, each iframe that has the API injected will be assigned a GUID as its name, the UUID will be
10201
- * the same as the parent window's.
10173
+ * Each iframe that has the API injected is named by its frame token, which is unique within the runtime, and
10174
+ * its UUID is the same as the parent window's.
10202
10175
  *
10203
10176
  * The fin.Frame namespace represents a way to interact with `iframes` and facilitates the discovery of current context
10204
10177
  * (iframe or main window) as well as the ability to listen for {@link OpenFin.FrameEvents frame-specific events}.
package/out/stub.mjs CHANGED
@@ -9709,27 +9709,11 @@ class InterApplicationBus extends Base {
9709
9709
  subscriberRemoved: 'subscriber-removed'
9710
9710
  };
9711
9711
  this.refCounter = new RefCounter();
9712
- /**
9713
- * One entry per subscription the runtime knows about, keyed by the same subscription key the
9714
- * emitter and the ref counter use. Listeners sharing a key share a single entry.
9715
- */
9716
- this.activeSubscriptions = new Map();
9717
9712
  this.Channel = new Channel(wire);
9718
9713
  this.emitter = new EventEmitter();
9719
9714
  wire.registerMessageHandler(this.onmessage.bind(this));
9720
9715
  this.on = this.emitter.on.bind(this.emitter);
9721
9716
  this.removeAllListeners = this.emitter.removeAllListeners.bind(this.emitter);
9722
- wire.environment.onBFCacheRestore(() => {
9723
- Array.from(this.activeSubscriptions.values()).forEach(async (subscription) => {
9724
- try {
9725
- await this.wire.sendAction('subscribe', subscription);
9726
- }
9727
- catch (error) {
9728
- // eslint-disable-next-line no-console
9729
- console.error('Failed to restore InterApplicationBus subscription after bfcache restore', error);
9730
- }
9731
- });
9732
- });
9733
9717
  }
9734
9718
  /**
9735
9719
  * Publishes a message to all applications running on OpenFin Runtime that
@@ -9802,18 +9786,14 @@ class InterApplicationBus extends Base {
9802
9786
  * ```
9803
9787
  */
9804
9788
  subscribe(source, topic, listener) {
9805
- const sourceWindowName = source.name || '*';
9806
- const subKey = this.createSubscriptionKey(source.uuid, sourceWindowName, topic);
9807
- const subscription = {
9808
- sourceUuid: source.uuid,
9809
- sourceWindowName,
9810
- topic,
9811
- destinationWindowName: this.me.name
9812
- };
9789
+ const subKey = this.createSubscriptionKey(source.uuid, source.name || '*', topic);
9813
9790
  const sendSubscription = async () => {
9814
- // Journaled before the await so a concurrent unsubscribe can find it.
9815
- this.activeSubscriptions.set(subKey, subscription);
9816
- await this.wire.sendAction('subscribe', subscription);
9791
+ await this.wire.sendAction('subscribe', {
9792
+ sourceUuid: source.uuid,
9793
+ sourceWindowName: source.name || '*',
9794
+ topic,
9795
+ destinationWindowName: this.me.name
9796
+ });
9817
9797
  };
9818
9798
  const alreadySubscribed = () => {
9819
9799
  return Promise.resolve();
@@ -9849,9 +9829,6 @@ class InterApplicationBus extends Base {
9849
9829
  const sourceWindowName = source.name || '*';
9850
9830
  const subKey = this.createSubscriptionKey(source.uuid, sourceWindowName, topic);
9851
9831
  const sendUnsubscription = async () => {
9852
- // Dropped before the await so that a restoration landing while this unsubscribe is
9853
- // still in flight does not replay the subscription being torn down.
9854
- this.activeSubscriptions.delete(subKey);
9855
9832
  await this.wire.sendAction('unsubscribe', {
9856
9833
  sourceUuid: source.uuid,
9857
9834
  sourceWindowName,
@@ -9860,9 +9837,6 @@ class InterApplicationBus extends Base {
9860
9837
  });
9861
9838
  };
9862
9839
  const dontSendUnsubscription = () => {
9863
- // TODO(CORE-2749): never settles - the executor evaluates `r` instead of calling it,
9864
- // so awaiting a non-final unsubscribe hangs the caller. Should be `Promise.resolve()`,
9865
- // but that changes long-standing behavior, so it is tracked separately from CORE-2740.
9866
9840
  return new Promise((r) => r).then(() => undefined);
9867
9841
  };
9868
9842
  this.emitter.removeListener(subKey, listener);
@@ -10193,9 +10167,8 @@ class ExternalApplicationModule extends Base {
10193
10167
  * To be able to directly address this context for eventing and messaging purposes, it needs a
10194
10168
  * unique uuid name pairing. For OpenFin applications and windows this is provided via a configuration
10195
10169
  * object in the form of a manifest URL or options object, but there is no configuration object for iframes.
10196
- * Just as a call to window.open outside of our Window API returns a new window with a random GUID assigned
10197
- * for the name, each iframe that has the API injected will be assigned a GUID as its name, the UUID will be
10198
- * the same as the parent window's.
10170
+ * Each iframe that has the API injected is named by its frame token, which is unique within the runtime, and
10171
+ * its UUID is the same as the parent window's.
10199
10172
  *
10200
10173
  * The fin.Frame namespace represents a way to interact with `iframes` and facilitates the discovery of current context
10201
10174
  * (iframe or main window) as well as the ability to listen for {@link OpenFin.FrameEvents frame-specific events}.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/core",
3
- "version": "47.100.59",
3
+ "version": "47.100.61",
4
4
  "description": "The core renderer entry point of OpenFin",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "main": "out/stub.js",