@openfin/fdc3-api 40.101.1 → 40.102.2

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.
@@ -4598,6 +4598,15 @@ declare class EmitterBase<EmitterEvent extends BaseEvent, EmitterEventType exten
4598
4598
  eventNames: () => (string | symbol)[];
4599
4599
  /* Excluded from this release type: emit */
4600
4600
  private hasEmitter;
4601
+ /**
4602
+ * Cleans up after removal of a listener, e.g. deleting any lingering deregistration handlers for a
4603
+ * `once` subscription.
4604
+ *
4605
+ * @remarks Implementing this as a `removeListener` handler ensures that direct removal of a listener
4606
+ * on the base emitter will not leak additional core handlers. We could do this in the forwarding method,
4607
+ * which would involve less "magic," but would be more-vulnerable to accidental re-introduction of a leak.
4608
+ */
4609
+ private cleanUpRemovedListener;
4601
4610
  private getOrCreateEmitter;
4602
4611
  listeners: (type: string | symbol) => Function[];
4603
4612
  listenerCount: (type: string | symbol) => number;
@@ -6020,6 +6029,30 @@ declare type FrameProcessDetails = ProcessDetails & {
6020
6029
  entityType: string;
6021
6030
  };
6022
6031
 
6032
+ /**
6033
+ * @interface
6034
+ * Options for the {@link Window._Window.getBounds} method.
6035
+ */
6036
+ declare interface GetBoundsOptions {
6037
+ /**
6038
+ * Specifies the state of the window for which to retrieve the bounds.
6039
+ *
6040
+ * - `'normal'`: Returns the bounds of the window in its 'normal' state (not maximized or minimized).
6041
+ * - `'current'`: Returns the bounds of the window in its current state. For a minimized window, this returns the bounds from its previous state before being minimized.
6042
+ *
6043
+ * If a window is in `normal` state, `current` and `normal` will return the same bounds.
6044
+ *
6045
+ * If a window is `maximized`, `current` will return the dimensions of the screen while `normal` will return the bounds the window will be restored to.
6046
+ *
6047
+ * If a window is `minimized`, both `current` and `normal` will return the bounds of the window prior to it being minimized.
6048
+ *
6049
+ * **Edge case:** On MacOS, if a window is maximized, then minimized, calling `getBounds` with `boundsType: 'current'` will return the bounds of the window when it was maximized while `normal` will return the normal bounds.
6050
+ *
6051
+ * @default 'normal'
6052
+ */
6053
+ boundsType?: 'normal' | 'current';
6054
+ }
6055
+
6023
6056
  /**
6024
6057
  * @interface
6025
6058
  */
@@ -7927,7 +7960,7 @@ declare type LaunchIntoPlatformPayload = {
7927
7960
  *
7928
7961
  * @remarks The built-in event emitter is not an OpenFin event emitter so it doesn't share propagation semantics.
7929
7962
  *
7930
- * #### {@link https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener addEventListener(type, listener [, options]);}
7963
+ * #### [addEventListener(type, listener [, options]);](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)
7931
7964
  * Adds a listener to the end of the listeners array for the specified event.
7932
7965
  * @example
7933
7966
  * ```js
@@ -7944,7 +7977,7 @@ declare type LaunchIntoPlatformPayload = {
7944
7977
  * });
7945
7978
  * ```
7946
7979
  *
7947
- * #### {@link https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener removeEventListener(type, listener [, options]);}
7980
+ * #### [removeEventListener(type, listener [, options]);](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener)
7948
7981
  * Adds a listener to the end of the listeners array for the specified event.
7949
7982
  * @example
7950
7983
  * ```js
@@ -8208,7 +8241,7 @@ declare class Layout extends Base {
8208
8241
  */
8209
8242
  applyPreset: (options: PresetLayoutOptions) => Promise<void>;
8210
8243
  /**
8211
- * Adds a view to the platform layout. Behaves like @link{Platform#createView} with the current layout as the target.
8244
+ * Adds a view to the platform layout. Behaves like {@link Platform#createView Platform.createView} with the current layout as the target.
8212
8245
  *
8213
8246
  * @param viewOptions - The options for creating the view.
8214
8247
  * @param options - Optional parameters for adding the view.
@@ -8224,7 +8257,7 @@ declare class Layout extends Base {
8224
8257
  }>;
8225
8258
  /**
8226
8259
  * Closes a view by its identity. Throws an error if the view does not belong to the current layout.
8227
- * Behaves like @link{Platform#closeView} but only closes the view if it belongs the current layout.
8260
+ * Behaves like {@link Platform#closeView Platform.closeView} but only closes the view if it belongs the current layout.
8228
8261
  *
8229
8262
  * @param viewIdentity - The identity of the view to close.
8230
8263
  * @returns A promise that resolves when the view is closed.
@@ -9638,6 +9671,7 @@ declare namespace OpenFin {
9638
9671
  EntityType_4 as EntityType,
9639
9672
  Bounds,
9640
9673
  WindowBounds,
9674
+ GetBoundsOptions,
9641
9675
  Rectangle,
9642
9676
  ApplicationCreationOptions,
9643
9677
  TimeZones,
@@ -12321,7 +12355,9 @@ declare interface ProtocolMap extends ProtocolMapBase {
12321
12355
  options: OpenFin.TransitionOptions;
12322
12356
  }>;
12323
12357
  'get-all-frames': IdentityCall<{}, OpenFin.FrameInfo[]>;
12324
- 'get-window-bounds': IdentityCall<{}, OpenFin.WindowBounds>;
12358
+ 'get-window-bounds': IdentityCall<{
12359
+ options?: OpenFin.GetBoundsOptions;
12360
+ }, OpenFin.WindowBounds>;
12325
12361
  'center-window': IdentityCall;
12326
12362
  'blur-window': IdentityCall;
12327
12363
  'bring-window-to-front': IdentityCall;
@@ -13699,6 +13735,7 @@ declare type Snapshot = {
13699
13735
  declare type SnapshotAppliedEvent = BaseEvents.BaseEvent & {
13700
13736
  topic: 'application';
13701
13737
  type: 'platform-snapshot-applied';
13738
+ snapshot: Snapshot;
13702
13739
  };
13703
13740
 
13704
13741
  /**
@@ -17911,7 +17948,7 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
17911
17948
  * getBounds().then(bounds => console.log(bounds)).catch(err => console.log(err));
17912
17949
  * ```
17913
17950
  */
17914
- getBounds(): Promise<OpenFin.WindowBounds>;
17951
+ getBounds(options?: OpenFin.GetBoundsOptions): Promise<OpenFin.WindowBounds>;
17915
17952
  /**
17916
17953
  * Centers the window on its current screen.
17917
17954
  *
@@ -4598,6 +4598,15 @@ declare class EmitterBase<EmitterEvent extends BaseEvent, EmitterEventType exten
4598
4598
  eventNames: () => (string | symbol)[];
4599
4599
  /* Excluded from this release type: emit */
4600
4600
  private hasEmitter;
4601
+ /**
4602
+ * Cleans up after removal of a listener, e.g. deleting any lingering deregistration handlers for a
4603
+ * `once` subscription.
4604
+ *
4605
+ * @remarks Implementing this as a `removeListener` handler ensures that direct removal of a listener
4606
+ * on the base emitter will not leak additional core handlers. We could do this in the forwarding method,
4607
+ * which would involve less "magic," but would be more-vulnerable to accidental re-introduction of a leak.
4608
+ */
4609
+ private cleanUpRemovedListener;
4601
4610
  private getOrCreateEmitter;
4602
4611
  listeners: (type: string | symbol) => Function[];
4603
4612
  listenerCount: (type: string | symbol) => number;
@@ -6020,6 +6029,30 @@ declare type FrameProcessDetails = ProcessDetails & {
6020
6029
  entityType: string;
6021
6030
  };
6022
6031
 
6032
+ /**
6033
+ * @interface
6034
+ * Options for the {@link Window._Window.getBounds} method.
6035
+ */
6036
+ declare interface GetBoundsOptions {
6037
+ /**
6038
+ * Specifies the state of the window for which to retrieve the bounds.
6039
+ *
6040
+ * - `'normal'`: Returns the bounds of the window in its 'normal' state (not maximized or minimized).
6041
+ * - `'current'`: Returns the bounds of the window in its current state. For a minimized window, this returns the bounds from its previous state before being minimized.
6042
+ *
6043
+ * If a window is in `normal` state, `current` and `normal` will return the same bounds.
6044
+ *
6045
+ * If a window is `maximized`, `current` will return the dimensions of the screen while `normal` will return the bounds the window will be restored to.
6046
+ *
6047
+ * If a window is `minimized`, both `current` and `normal` will return the bounds of the window prior to it being minimized.
6048
+ *
6049
+ * **Edge case:** On MacOS, if a window is maximized, then minimized, calling `getBounds` with `boundsType: 'current'` will return the bounds of the window when it was maximized while `normal` will return the normal bounds.
6050
+ *
6051
+ * @default 'normal'
6052
+ */
6053
+ boundsType?: 'normal' | 'current';
6054
+ }
6055
+
6023
6056
  /**
6024
6057
  * @interface
6025
6058
  */
@@ -7927,7 +7960,7 @@ declare type LaunchIntoPlatformPayload = {
7927
7960
  *
7928
7961
  * @remarks The built-in event emitter is not an OpenFin event emitter so it doesn't share propagation semantics.
7929
7962
  *
7930
- * #### {@link https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener addEventListener(type, listener [, options]);}
7963
+ * #### [addEventListener(type, listener [, options]);](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)
7931
7964
  * Adds a listener to the end of the listeners array for the specified event.
7932
7965
  * @example
7933
7966
  * ```js
@@ -7944,7 +7977,7 @@ declare type LaunchIntoPlatformPayload = {
7944
7977
  * });
7945
7978
  * ```
7946
7979
  *
7947
- * #### {@link https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener removeEventListener(type, listener [, options]);}
7980
+ * #### [removeEventListener(type, listener [, options]);](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener)
7948
7981
  * Adds a listener to the end of the listeners array for the specified event.
7949
7982
  * @example
7950
7983
  * ```js
@@ -8208,7 +8241,7 @@ declare class Layout extends Base {
8208
8241
  */
8209
8242
  applyPreset: (options: PresetLayoutOptions) => Promise<void>;
8210
8243
  /**
8211
- * Adds a view to the platform layout. Behaves like @link{Platform#createView} with the current layout as the target.
8244
+ * Adds a view to the platform layout. Behaves like {@link Platform#createView Platform.createView} with the current layout as the target.
8212
8245
  *
8213
8246
  * @param viewOptions - The options for creating the view.
8214
8247
  * @param options - Optional parameters for adding the view.
@@ -8224,7 +8257,7 @@ declare class Layout extends Base {
8224
8257
  }>;
8225
8258
  /**
8226
8259
  * Closes a view by its identity. Throws an error if the view does not belong to the current layout.
8227
- * Behaves like @link{Platform#closeView} but only closes the view if it belongs the current layout.
8260
+ * Behaves like {@link Platform#closeView Platform.closeView} but only closes the view if it belongs the current layout.
8228
8261
  *
8229
8262
  * @param viewIdentity - The identity of the view to close.
8230
8263
  * @returns A promise that resolves when the view is closed.
@@ -9638,6 +9671,7 @@ declare namespace OpenFin {
9638
9671
  EntityType_4 as EntityType,
9639
9672
  Bounds,
9640
9673
  WindowBounds,
9674
+ GetBoundsOptions,
9641
9675
  Rectangle,
9642
9676
  ApplicationCreationOptions,
9643
9677
  TimeZones,
@@ -12321,7 +12355,9 @@ declare interface ProtocolMap extends ProtocolMapBase {
12321
12355
  options: OpenFin.TransitionOptions;
12322
12356
  }>;
12323
12357
  'get-all-frames': IdentityCall<{}, OpenFin.FrameInfo[]>;
12324
- 'get-window-bounds': IdentityCall<{}, OpenFin.WindowBounds>;
12358
+ 'get-window-bounds': IdentityCall<{
12359
+ options?: OpenFin.GetBoundsOptions;
12360
+ }, OpenFin.WindowBounds>;
12325
12361
  'center-window': IdentityCall;
12326
12362
  'blur-window': IdentityCall;
12327
12363
  'bring-window-to-front': IdentityCall;
@@ -13699,6 +13735,7 @@ declare type Snapshot = {
13699
13735
  declare type SnapshotAppliedEvent = BaseEvents.BaseEvent & {
13700
13736
  topic: 'application';
13701
13737
  type: 'platform-snapshot-applied';
13738
+ snapshot: Snapshot;
13702
13739
  };
13703
13740
 
13704
13741
  /**
@@ -17911,7 +17948,7 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
17911
17948
  * getBounds().then(bounds => console.log(bounds)).catch(err => console.log(err));
17912
17949
  * ```
17913
17950
  */
17914
- getBounds(): Promise<OpenFin.WindowBounds>;
17951
+ getBounds(options?: OpenFin.GetBoundsOptions): Promise<OpenFin.WindowBounds>;
17915
17952
  /**
17916
17953
  * Centers the window on its current screen.
17917
17954
  *
@@ -4598,6 +4598,15 @@ declare class EmitterBase<EmitterEvent extends BaseEvent, EmitterEventType exten
4598
4598
  eventNames: () => (string | symbol)[];
4599
4599
  /* Excluded from this release type: emit */
4600
4600
  private hasEmitter;
4601
+ /**
4602
+ * Cleans up after removal of a listener, e.g. deleting any lingering deregistration handlers for a
4603
+ * `once` subscription.
4604
+ *
4605
+ * @remarks Implementing this as a `removeListener` handler ensures that direct removal of a listener
4606
+ * on the base emitter will not leak additional core handlers. We could do this in the forwarding method,
4607
+ * which would involve less "magic," but would be more-vulnerable to accidental re-introduction of a leak.
4608
+ */
4609
+ private cleanUpRemovedListener;
4601
4610
  private getOrCreateEmitter;
4602
4611
  listeners: (type: string | symbol) => Function[];
4603
4612
  listenerCount: (type: string | symbol) => number;
@@ -6020,6 +6029,30 @@ declare type FrameProcessDetails = ProcessDetails & {
6020
6029
  entityType: string;
6021
6030
  };
6022
6031
 
6032
+ /**
6033
+ * @interface
6034
+ * Options for the {@link Window._Window.getBounds} method.
6035
+ */
6036
+ declare interface GetBoundsOptions {
6037
+ /**
6038
+ * Specifies the state of the window for which to retrieve the bounds.
6039
+ *
6040
+ * - `'normal'`: Returns the bounds of the window in its 'normal' state (not maximized or minimized).
6041
+ * - `'current'`: Returns the bounds of the window in its current state. For a minimized window, this returns the bounds from its previous state before being minimized.
6042
+ *
6043
+ * If a window is in `normal` state, `current` and `normal` will return the same bounds.
6044
+ *
6045
+ * If a window is `maximized`, `current` will return the dimensions of the screen while `normal` will return the bounds the window will be restored to.
6046
+ *
6047
+ * If a window is `minimized`, both `current` and `normal` will return the bounds of the window prior to it being minimized.
6048
+ *
6049
+ * **Edge case:** On MacOS, if a window is maximized, then minimized, calling `getBounds` with `boundsType: 'current'` will return the bounds of the window when it was maximized while `normal` will return the normal bounds.
6050
+ *
6051
+ * @default 'normal'
6052
+ */
6053
+ boundsType?: 'normal' | 'current';
6054
+ }
6055
+
6023
6056
  /**
6024
6057
  * @interface
6025
6058
  */
@@ -7927,7 +7960,7 @@ declare type LaunchIntoPlatformPayload = {
7927
7960
  *
7928
7961
  * @remarks The built-in event emitter is not an OpenFin event emitter so it doesn't share propagation semantics.
7929
7962
  *
7930
- * #### {@link https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener addEventListener(type, listener [, options]);}
7963
+ * #### [addEventListener(type, listener [, options]);](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)
7931
7964
  * Adds a listener to the end of the listeners array for the specified event.
7932
7965
  * @example
7933
7966
  * ```js
@@ -7944,7 +7977,7 @@ declare type LaunchIntoPlatformPayload = {
7944
7977
  * });
7945
7978
  * ```
7946
7979
  *
7947
- * #### {@link https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener removeEventListener(type, listener [, options]);}
7980
+ * #### [removeEventListener(type, listener [, options]);](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener)
7948
7981
  * Adds a listener to the end of the listeners array for the specified event.
7949
7982
  * @example
7950
7983
  * ```js
@@ -8208,7 +8241,7 @@ declare class Layout extends Base {
8208
8241
  */
8209
8242
  applyPreset: (options: PresetLayoutOptions) => Promise<void>;
8210
8243
  /**
8211
- * Adds a view to the platform layout. Behaves like @link{Platform#createView} with the current layout as the target.
8244
+ * Adds a view to the platform layout. Behaves like {@link Platform#createView Platform.createView} with the current layout as the target.
8212
8245
  *
8213
8246
  * @param viewOptions - The options for creating the view.
8214
8247
  * @param options - Optional parameters for adding the view.
@@ -8224,7 +8257,7 @@ declare class Layout extends Base {
8224
8257
  }>;
8225
8258
  /**
8226
8259
  * Closes a view by its identity. Throws an error if the view does not belong to the current layout.
8227
- * Behaves like @link{Platform#closeView} but only closes the view if it belongs the current layout.
8260
+ * Behaves like {@link Platform#closeView Platform.closeView} but only closes the view if it belongs the current layout.
8228
8261
  *
8229
8262
  * @param viewIdentity - The identity of the view to close.
8230
8263
  * @returns A promise that resolves when the view is closed.
@@ -9638,6 +9671,7 @@ declare namespace OpenFin {
9638
9671
  EntityType_4 as EntityType,
9639
9672
  Bounds,
9640
9673
  WindowBounds,
9674
+ GetBoundsOptions,
9641
9675
  Rectangle,
9642
9676
  ApplicationCreationOptions,
9643
9677
  TimeZones,
@@ -12321,7 +12355,9 @@ declare interface ProtocolMap extends ProtocolMapBase {
12321
12355
  options: OpenFin.TransitionOptions;
12322
12356
  }>;
12323
12357
  'get-all-frames': IdentityCall<{}, OpenFin.FrameInfo[]>;
12324
- 'get-window-bounds': IdentityCall<{}, OpenFin.WindowBounds>;
12358
+ 'get-window-bounds': IdentityCall<{
12359
+ options?: OpenFin.GetBoundsOptions;
12360
+ }, OpenFin.WindowBounds>;
12325
12361
  'center-window': IdentityCall;
12326
12362
  'blur-window': IdentityCall;
12327
12363
  'bring-window-to-front': IdentityCall;
@@ -13699,6 +13735,7 @@ declare type Snapshot = {
13699
13735
  declare type SnapshotAppliedEvent = BaseEvents.BaseEvent & {
13700
13736
  topic: 'application';
13701
13737
  type: 'platform-snapshot-applied';
13738
+ snapshot: Snapshot;
13702
13739
  };
13703
13740
 
13704
13741
  /**
@@ -17911,7 +17948,7 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
17911
17948
  * getBounds().then(bounds => console.log(bounds)).catch(err => console.log(err));
17912
17949
  * ```
17913
17950
  */
17914
- getBounds(): Promise<OpenFin.WindowBounds>;
17951
+ getBounds(options?: OpenFin.GetBoundsOptions): Promise<OpenFin.WindowBounds>;
17915
17952
  /**
17916
17953
  * Centers the window on its current screen.
17917
17954
  *
package/out/fdc3-api.d.ts CHANGED
@@ -4662,6 +4662,15 @@ declare class EmitterBase<EmitterEvent extends BaseEvent, EmitterEventType exten
4662
4662
  type: EventType;
4663
4663
  }>, ...args: any[]) => boolean;
4664
4664
  private hasEmitter;
4665
+ /**
4666
+ * Cleans up after removal of a listener, e.g. deleting any lingering deregistration handlers for a
4667
+ * `once` subscription.
4668
+ *
4669
+ * @remarks Implementing this as a `removeListener` handler ensures that direct removal of a listener
4670
+ * on the base emitter will not leak additional core handlers. We could do this in the forwarding method,
4671
+ * which would involve less "magic," but would be more-vulnerable to accidental re-introduction of a leak.
4672
+ */
4673
+ private cleanUpRemovedListener;
4665
4674
  private getOrCreateEmitter;
4666
4675
  listeners: (type: string | symbol) => Function[];
4667
4676
  listenerCount: (type: string | symbol) => number;
@@ -6108,6 +6117,30 @@ declare type FrameProcessDetails = ProcessDetails & {
6108
6117
  entityType: string;
6109
6118
  };
6110
6119
 
6120
+ /**
6121
+ * @interface
6122
+ * Options for the {@link Window._Window.getBounds} method.
6123
+ */
6124
+ declare interface GetBoundsOptions {
6125
+ /**
6126
+ * Specifies the state of the window for which to retrieve the bounds.
6127
+ *
6128
+ * - `'normal'`: Returns the bounds of the window in its 'normal' state (not maximized or minimized).
6129
+ * - `'current'`: Returns the bounds of the window in its current state. For a minimized window, this returns the bounds from its previous state before being minimized.
6130
+ *
6131
+ * If a window is in `normal` state, `current` and `normal` will return the same bounds.
6132
+ *
6133
+ * If a window is `maximized`, `current` will return the dimensions of the screen while `normal` will return the bounds the window will be restored to.
6134
+ *
6135
+ * If a window is `minimized`, both `current` and `normal` will return the bounds of the window prior to it being minimized.
6136
+ *
6137
+ * **Edge case:** On MacOS, if a window is maximized, then minimized, calling `getBounds` with `boundsType: 'current'` will return the bounds of the window when it was maximized while `normal` will return the normal bounds.
6138
+ *
6139
+ * @default 'normal'
6140
+ */
6141
+ boundsType?: 'normal' | 'current';
6142
+ }
6143
+
6111
6144
  /**
6112
6145
  * @interface
6113
6146
  */
@@ -8044,7 +8077,7 @@ declare type LaunchIntoPlatformPayload = {
8044
8077
  *
8045
8078
  * @remarks The built-in event emitter is not an OpenFin event emitter so it doesn't share propagation semantics.
8046
8079
  *
8047
- * #### {@link https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener addEventListener(type, listener [, options]);}
8080
+ * #### [addEventListener(type, listener [, options]);](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)
8048
8081
  * Adds a listener to the end of the listeners array for the specified event.
8049
8082
  * @example
8050
8083
  * ```js
@@ -8061,7 +8094,7 @@ declare type LaunchIntoPlatformPayload = {
8061
8094
  * });
8062
8095
  * ```
8063
8096
  *
8064
- * #### {@link https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener removeEventListener(type, listener [, options]);}
8097
+ * #### [removeEventListener(type, listener [, options]);](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener)
8065
8098
  * Adds a listener to the end of the listeners array for the specified event.
8066
8099
  * @example
8067
8100
  * ```js
@@ -8334,7 +8367,7 @@ declare class Layout extends Base {
8334
8367
  */
8335
8368
  applyPreset: (options: PresetLayoutOptions) => Promise<void>;
8336
8369
  /**
8337
- * Adds a view to the platform layout. Behaves like @link{Platform#createView} with the current layout as the target.
8370
+ * Adds a view to the platform layout. Behaves like {@link Platform#createView Platform.createView} with the current layout as the target.
8338
8371
  *
8339
8372
  * @param viewOptions - The options for creating the view.
8340
8373
  * @param options - Optional parameters for adding the view.
@@ -8350,7 +8383,7 @@ declare class Layout extends Base {
8350
8383
  }>;
8351
8384
  /**
8352
8385
  * Closes a view by its identity. Throws an error if the view does not belong to the current layout.
8353
- * Behaves like @link{Platform#closeView} but only closes the view if it belongs the current layout.
8386
+ * Behaves like {@link Platform#closeView Platform.closeView} but only closes the view if it belongs the current layout.
8354
8387
  *
8355
8388
  * @param viewIdentity - The identity of the view to close.
8356
8389
  * @returns A promise that resolves when the view is closed.
@@ -9956,6 +9989,7 @@ declare namespace OpenFin {
9956
9989
  EntityType_4 as EntityType,
9957
9990
  Bounds,
9958
9991
  WindowBounds,
9992
+ GetBoundsOptions,
9959
9993
  Rectangle,
9960
9994
  ApplicationCreationOptions,
9961
9995
  TimeZones,
@@ -12722,7 +12756,9 @@ declare interface ProtocolMap extends ProtocolMapBase {
12722
12756
  options: OpenFin.TransitionOptions;
12723
12757
  }>;
12724
12758
  'get-all-frames': IdentityCall<{}, OpenFin.FrameInfo[]>;
12725
- 'get-window-bounds': IdentityCall<{}, OpenFin.WindowBounds>;
12759
+ 'get-window-bounds': IdentityCall<{
12760
+ options?: OpenFin.GetBoundsOptions;
12761
+ }, OpenFin.WindowBounds>;
12726
12762
  'center-window': IdentityCall;
12727
12763
  'blur-window': IdentityCall;
12728
12764
  'bring-window-to-front': IdentityCall;
@@ -14100,6 +14136,7 @@ declare type Snapshot = {
14100
14136
  declare type SnapshotAppliedEvent = BaseEvents.BaseEvent & {
14101
14137
  topic: 'application';
14102
14138
  type: 'platform-snapshot-applied';
14139
+ snapshot: Snapshot;
14103
14140
  };
14104
14141
 
14105
14142
  /**
@@ -18365,7 +18402,7 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
18365
18402
  * getBounds().then(bounds => console.log(bounds)).catch(err => console.log(err));
18366
18403
  * ```
18367
18404
  */
18368
- getBounds(): Promise<OpenFin.WindowBounds>;
18405
+ getBounds(options?: OpenFin.GetBoundsOptions): Promise<OpenFin.WindowBounds>;
18369
18406
  /**
18370
18407
  * Centers the window on its current screen.
18371
18408
  *
package/out/fdc3-api.js CHANGED
@@ -476,7 +476,7 @@ var __classPrivateFieldGet$1 = (commonjsGlobal && commonjsGlobal.__classPrivateF
476
476
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
477
477
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
478
478
  };
479
- var _EmitterBase_emitterAccessor;
479
+ var _EmitterBase_emitterAccessor, _EmitterBase_deregisterOnceListeners;
480
480
  Object.defineProperty(base, "__esModule", { value: true });
481
481
  base.Reply = base.EmitterBase = base.Base = void 0;
482
482
  const promises_1 = promises;
@@ -548,6 +548,7 @@ class EmitterBase extends Base {
548
548
  super(wire);
549
549
  this.topic = topic;
550
550
  _EmitterBase_emitterAccessor.set(this, void 0);
551
+ _EmitterBase_deregisterOnceListeners.set(this, void 0);
551
552
  this.eventNames = () => (this.hasEmitter() ? this.getOrCreateEmitter().eventNames() : []);
552
553
  /**
553
554
  * @internal
@@ -556,7 +557,28 @@ class EmitterBase extends Base {
556
557
  return this.hasEmitter() ? this.getOrCreateEmitter().emit(eventType, payload, ...args) : false;
557
558
  };
558
559
  this.hasEmitter = () => this.wire.eventAggregator.has(__classPrivateFieldGet$1(this, _EmitterBase_emitterAccessor, "f"));
559
- this.getOrCreateEmitter = () => this.wire.eventAggregator.getOrCreate(__classPrivateFieldGet$1(this, _EmitterBase_emitterAccessor, "f"));
560
+ /**
561
+ * Cleans up after removal of a listener, e.g. deleting any lingering deregistration handlers for a
562
+ * `once` subscription.
563
+ *
564
+ * @remarks Implementing this as a `removeListener` handler ensures that direct removal of a listener
565
+ * on the base emitter will not leak additional core handlers. We could do this in the forwarding method,
566
+ * which would involve less "magic," but would be more-vulnerable to accidental re-introduction of a leak.
567
+ */
568
+ this.cleanUpRemovedListener = (eventType, listener) => {
569
+ const deregister = __classPrivateFieldGet$1(this, _EmitterBase_deregisterOnceListeners, "f").get(listener);
570
+ if (deregister) {
571
+ const emitter = this.wire.eventAggregator.getOrCreate(__classPrivateFieldGet$1(this, _EmitterBase_emitterAccessor, "f"));
572
+ emitter.removeListener(eventType, deregister);
573
+ }
574
+ };
575
+ this.getOrCreateEmitter = () => {
576
+ const emitter = this.wire.eventAggregator.getOrCreate(__classPrivateFieldGet$1(this, _EmitterBase_emitterAccessor, "f"));
577
+ if (!emitter.listeners('removeListener').includes(this.cleanUpRemovedListener)) {
578
+ emitter.on('removeListener', this.cleanUpRemovedListener);
579
+ }
580
+ return emitter;
581
+ };
560
582
  this.listeners = (type) => this.hasEmitter() ? this.getOrCreateEmitter().listeners(type) : [];
561
583
  this.listenerCount = (type) => this.hasEmitter() ? this.getOrCreateEmitter().listenerCount(type) : 0;
562
584
  this.registerEventListener = async (eventType, options = {}, applySubscription, undoSubscription) => {
@@ -588,13 +610,13 @@ class EmitterBase extends Base {
588
610
  type: eventType
589
611
  };
590
612
  await this.wire.sendAction('unsubscribe-to-desktop-event', runtimeEvent).catch(() => null);
591
- const emitter = this.getOrCreateEmitter();
592
- return emitter;
613
+ return this.getOrCreateEmitter();
593
614
  }
594
615
  // This will only be reached if unsubscribe from event that does not exist but do not want to error here
595
616
  return Promise.resolve();
596
617
  };
597
618
  __classPrivateFieldSet$1(this, _EmitterBase_emitterAccessor, [topic, ...additionalAccessors], "f");
619
+ __classPrivateFieldSet$1(this, _EmitterBase_deregisterOnceListeners, new WeakMap(), "f");
598
620
  this.listeners = (event) => this.hasEmitter() ? this.getOrCreateEmitter().listeners(event) : [];
599
621
  }
600
622
  /**
@@ -623,6 +645,7 @@ class EmitterBase extends Base {
623
645
  */
624
646
  async once(eventType, listener, options) {
625
647
  const deregister = () => this.deregisterEventListener(eventType);
648
+ __classPrivateFieldGet$1(this, _EmitterBase_deregisterOnceListeners, "f").set(listener, deregister);
626
649
  await this.registerEventListener(eventType, options, (emitter) => {
627
650
  emitter.once(eventType, deregister);
628
651
  emitter.once(eventType, listener);
@@ -653,6 +676,7 @@ class EmitterBase extends Base {
653
676
  */
654
677
  async prependOnceListener(eventType, listener, options) {
655
678
  const deregister = () => this.deregisterEventListener(eventType);
679
+ __classPrivateFieldGet$1(this, _EmitterBase_deregisterOnceListeners, "f").set(listener, deregister);
656
680
  await this.registerEventListener(eventType, options, (emitter) => {
657
681
  emitter.prependOnceListener(eventType, listener);
658
682
  emitter.once(eventType, deregister);
@@ -711,13 +735,13 @@ class EmitterBase extends Base {
711
735
  return this;
712
736
  }
713
737
  deleteEmitterIfNothingRegistered(emitter) {
714
- if (emitter.eventNames().length === 0) {
738
+ if (emitter.eventNames().every((type) => type === 'removeListener')) {
715
739
  this.wire.eventAggregator.delete(__classPrivateFieldGet$1(this, _EmitterBase_emitterAccessor, "f"));
716
740
  }
717
741
  }
718
742
  }
719
743
  base.EmitterBase = EmitterBase;
720
- _EmitterBase_emitterAccessor = new WeakMap();
744
+ _EmitterBase_emitterAccessor = new WeakMap(), _EmitterBase_deregisterOnceListeners = new WeakMap();
721
745
  class Reply {
722
746
  }
723
747
  base.Reply = Reply;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/fdc3-api",
3
- "version": "40.101.1",
3
+ "version": "40.102.2",
4
4
  "description": "OpenFin fdc3 module utilities and types.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "private": false,