@openfin/fdc3-api 40.102.1 → 40.103.1

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.
@@ -3218,6 +3218,40 @@ declare class Clipboard_2 extends Base {
3218
3218
  getAvailableFormats(type?: OpenFin.ClipboardSelectionType): Promise<Array<string>>;
3219
3219
  }
3220
3220
 
3221
+ /**
3222
+ * Generated when a copy operation is blocked through {@link OpenFin.DomainSettings}.
3223
+ * @interface
3224
+ */
3225
+ declare type ClipboardCopyBlockedEvent = NamedEvent & {
3226
+ type: 'clipboard-copy-blocked';
3227
+ /**
3228
+ * URL of the Window or View that generated the event.
3229
+ */
3230
+ url: string;
3231
+ reason: CopyBlockedEventReason;
3232
+ };
3233
+
3234
+ /**
3235
+ * Generated when a paste operation is blocked through {@link OpenFin.DomainSettings}.
3236
+ * @interface
3237
+ */
3238
+ declare type ClipboardPasteBlockedEvent = NamedEvent & {
3239
+ type: 'clipboard-paste-blocked';
3240
+ /**
3241
+ * URL of the Window or View that generated the event.
3242
+ */
3243
+ url: string;
3244
+ reason: PasteBlockedEventReason;
3245
+ };
3246
+
3247
+ /**
3248
+ * Clipboard Permissions
3249
+ */
3250
+ declare type ClipboardPermissions = {
3251
+ copy?: CopyPermissions;
3252
+ paste?: PastePermissions;
3253
+ };
3254
+
3221
3255
  /**
3222
3256
  * The type of clipboard to write to, can be 'clipboard' or 'selection'.
3223
3257
  * Defaults to 'clipboard'. Use 'selection' for linux only.
@@ -3992,6 +4026,40 @@ declare type CookieOption = {
3992
4026
  name: string;
3993
4027
  };
3994
4028
 
4029
+ /**
4030
+ * Reasons for a copy operation being blocked
4031
+ *
4032
+ * 'disabled': Copy operation is disabled through domain-based permissions.
4033
+ */
4034
+ declare type CopyBlockedEventReason = 'disabled';
4035
+
4036
+ /**
4037
+ * Control copy operations for a matched URL.
4038
+ */
4039
+ declare type CopyPermissions = {
4040
+ /**
4041
+ * @defaultValue 'allowed'
4042
+ *
4043
+ * Controls the behavior for copy operations for a matched URL.
4044
+ *
4045
+ * allow: Enables all copy operations.
4046
+ * block: Disables all copy operations.
4047
+ * protect: Protects any copied content. Only URLs that have set paste.behavior: 'all-content' will be allowed to paste this content.
4048
+ */
4049
+ behavior: 'allow' | 'block' | 'protect';
4050
+ /**
4051
+ * Additional copy operation options
4052
+ */
4053
+ options?: {
4054
+ /**
4055
+ * @defaultValue ''
4056
+ *
4057
+ * When setting behavior = 'protected' , this string will be pasted to other applications that do not have a matching URL instead of the original content.
4058
+ */
4059
+ replacementText: string;
4060
+ };
4061
+ };
4062
+
3995
4063
  /**
3996
4064
  * Defines and applies rounded corners for a frameless window. **NOTE:** On macOS corner is not ellipse but circle rounded by the
3997
4065
  * average of _height_ and _width_.
@@ -4598,6 +4666,15 @@ declare class EmitterBase<EmitterEvent extends BaseEvent, EmitterEventType exten
4598
4666
  eventNames: () => (string | symbol)[];
4599
4667
  /* Excluded from this release type: emit */
4600
4668
  private hasEmitter;
4669
+ /**
4670
+ * Cleans up after removal of a listener, e.g. deleting any lingering deregistration handlers for a
4671
+ * `once` subscription.
4672
+ *
4673
+ * @remarks Implementing this as a `removeListener` handler ensures that direct removal of a listener
4674
+ * on the base emitter will not leak additional core handlers. We could do this in the forwarding method,
4675
+ * which would involve less "magic," but would be more-vulnerable to accidental re-introduction of a leak.
4676
+ */
4677
+ private cleanUpRemovedListener;
4601
4678
  private getOrCreateEmitter;
4602
4679
  listeners: (type: string | symbol) => Function[];
4603
4680
  listenerCount: (type: string | symbol) => number;
@@ -4838,7 +4915,7 @@ declare type Event_4 = (WebContentsEvents.Event<'view'> & {
4838
4915
  */
4839
4916
  declare type Event_5<Topic extends string> = {
4840
4917
  topic: Topic;
4841
- } & (BlurredEvent | CertificateSelectionShownEvent | CrashedEvent_2 | DidChangeThemeColorEvent | FocusedEvent | NavigationRejectedEvent | UrlChangedEvent | DidFailLoadEvent | DidFinishLoadEvent | DidStartLoadingEvent | PageFaviconUpdatedEvent | PageTitleUpdatedEvent | ResourceLoadFailedEvent | ResourceResponseReceivedEvent | ChildContentBlockedEvent | ChildContentOpenedInBrowserEvent | ChildViewCreatedEvent | ChildWindowCreatedEvent | FileDownloadStartedEvent | FileDownloadProgressEvent | FileDownloadCompletedEvent | FoundInPageEvent | CertificateErrorEvent | ContentBlockedEvent | WillRedirectEvent);
4918
+ } & (BlurredEvent | CertificateSelectionShownEvent | CrashedEvent_2 | DidChangeThemeColorEvent | FocusedEvent | NavigationRejectedEvent | UrlChangedEvent | DidFailLoadEvent | DidFinishLoadEvent | DidStartLoadingEvent | PageFaviconUpdatedEvent | PageTitleUpdatedEvent | ResourceLoadFailedEvent | ResourceResponseReceivedEvent | ChildContentBlockedEvent | ChildContentOpenedInBrowserEvent | ChildViewCreatedEvent | ChildWindowCreatedEvent | FileDownloadStartedEvent | FileDownloadProgressEvent | FileDownloadCompletedEvent | FoundInPageEvent | CertificateErrorEvent | ContentBlockedEvent | WillRedirectEvent | ClipboardCopyBlockedEvent | ClipboardPasteBlockedEvent);
4842
4919
 
4843
4920
  /**
4844
4921
  * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by a {@link Window}. Events are
@@ -5940,11 +6017,8 @@ declare type FrameEventType = EventType_5;
5940
6017
  /**
5941
6018
  * @interface
5942
6019
  */
5943
- declare type FrameInfo = {
5944
- name: string;
5945
- uuid: string;
6020
+ declare type FrameInfo = EntityInfo & {
5946
6021
  url: string;
5947
- entityType: EntityType_4;
5948
6022
  parent: Identity_4;
5949
6023
  };
5950
6024
 
@@ -9660,6 +9734,8 @@ declare namespace OpenFin {
9660
9734
  ClientConnectionPayload,
9661
9735
  EntityInfo,
9662
9736
  EntityType_4 as EntityType,
9737
+ ScreenCaptureState,
9738
+ ScreenCapturePermission,
9663
9739
  Bounds,
9664
9740
  WindowBounds,
9665
9741
  GetBoundsOptions,
@@ -9880,7 +9956,11 @@ declare namespace OpenFin {
9880
9956
  StructuredContentBehavior,
9881
9957
  StructuredContentPermissions,
9882
9958
  ContentPermission,
9959
+ ScreenCaptureBehavior,
9883
9960
  PerDomainSettings,
9961
+ CopyPermissions,
9962
+ PastePermissions,
9963
+ ClipboardPermissions,
9884
9964
  DomainSettingsRule,
9885
9965
  FileDownloadBehavior,
9886
9966
  FileDownloadBehaviorNames,
@@ -10059,6 +10139,29 @@ declare type PageTitleUpdatedEvent = NamedEvent & {
10059
10139
  title: string;
10060
10140
  };
10061
10141
 
10142
+ /**
10143
+ * Reasons for a paste operation being blocked
10144
+ *
10145
+ * 'invalid-data': Copy protection is enabled and the pasted data is invalid.
10146
+ * 'disabled': Copy protection is turned on and the current URL for this WebContent has been disabled through domain-based settings from accessing the copied data.
10147
+ */
10148
+ declare type PasteBlockedEventReason = 'invalid-data' | 'disabled';
10149
+
10150
+ /**
10151
+ * Control copy operations for a matched URL.
10152
+ */
10153
+ declare type PastePermissions = {
10154
+ /**
10155
+ * @defaultValue 'non-protected-content'
10156
+ *
10157
+ * Controls the behavior for paste operations for a matched URL.
10158
+ *
10159
+ * non-protected-content: All matching URLs will be able to paste content copied from non-protected URLs.
10160
+ * all-content: All matching URLs will be able to paste content copied from both protected (copy.behavior = 'protect') and on-protected (copy.behavior = 'allow') URLs.
10161
+ */
10162
+ behavior: 'non-protected-content' | 'all-content';
10163
+ };
10164
+
10062
10165
  declare type PathServeRequest = ServeRequest & {
10063
10166
  path: string;
10064
10167
  };
@@ -10202,6 +10305,16 @@ declare type PerDomainSettings = {
10202
10305
  * {@inheritdoc ChromiumPolicies}
10203
10306
  */
10204
10307
  chromiumPolicies?: ChromiumPolicies;
10308
+ contentProtection?: {
10309
+ /**
10310
+ * {@inheritdoc ScreenCaptureBehavior}
10311
+ */
10312
+ screenCapture: ScreenCaptureBehavior;
10313
+ /**
10314
+ * {@inheritdoc ClipboardPermissions}
10315
+ */
10316
+ clipboard?: ClipboardPermissions;
10317
+ };
10205
10318
  };
10206
10319
 
10207
10320
  /**
@@ -12852,6 +12965,10 @@ declare interface ProtocolMap extends ProtocolMapBase {
12852
12965
  };
12853
12966
  response: OpenFin.PopupResult;
12854
12967
  };
12968
+ 'get-screen-capture-permissions': {
12969
+ request: OpenFin.Identity;
12970
+ response: OpenFin.ScreenCapturePermission;
12971
+ };
12855
12972
  'render-overlay': {
12856
12973
  request: {
12857
12974
  bounds: OpenFin.Bounds;
@@ -13381,6 +13498,31 @@ declare type RvmLaunchOptions = {
13381
13498
  subscribe?: (launch: LaunchEmitter) => void;
13382
13499
  };
13383
13500
 
13501
+ /**
13502
+ * @interface
13503
+ * Controls whether this content should be allowed or blocked when capturing the screen.
13504
+ */
13505
+ declare type ScreenCaptureBehavior = 'allow' | 'block';
13506
+
13507
+ /**
13508
+ * Returned by getScreenCapturePermission. Includes sub-entity permission states and the resulting permission.
13509
+ * @interface
13510
+ */
13511
+ declare type ScreenCapturePermission = {
13512
+ permission: ScreenCaptureBehavior;
13513
+ permissions: ScreenCaptureState[];
13514
+ };
13515
+
13516
+ /**
13517
+ * screenCapture state for a given entity as defined in domain settings.
13518
+ * @interface
13519
+ */
13520
+ declare type ScreenCaptureState = {
13521
+ info: EntityInfo;
13522
+ behavior: ScreenCaptureBehavior;
13523
+ url: string;
13524
+ };
13525
+
13384
13526
  /**
13385
13527
  * @interface
13386
13528
  */
@@ -17732,6 +17874,19 @@ declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
17732
17874
  * {@link OpenFin.WebContentsEvents event namespace}.
17733
17875
  */
17734
17876
  showPopupWindow(options: OpenFin.PopupOptions): Promise<OpenFin.PopupResult>;
17877
+ /**
17878
+ *
17879
+ * Get the screen capture permission for this content.
17880
+ *
17881
+ * @example
17882
+ * ```js
17883
+ * const { permission } = await fin.me.getScreenCapturePermission();
17884
+ *
17885
+ * console.log(`This content is currently ${permission}ed in screen captures.`);
17886
+ *
17887
+ * ```
17888
+ */
17889
+ getScreenCapturePermission(): Promise<OpenFin.ScreenCapturePermission>;
17735
17890
  }
17736
17891
 
17737
17892
  /**
@@ -17770,6 +17925,8 @@ declare namespace WebContentsEvents {
17770
17925
  FileDownloadProgressEvent,
17771
17926
  FileDownloadCompletedEvent,
17772
17927
  ContentBlockedEvent,
17928
+ ClipboardCopyBlockedEvent,
17929
+ ClipboardPasteBlockedEvent,
17773
17930
  Event_5 as Event,
17774
17931
  WebContentsEvent,
17775
17932
  WillPropagateWebContentsEvent,
@@ -3218,6 +3218,40 @@ declare class Clipboard_2 extends Base {
3218
3218
  getAvailableFormats(type?: OpenFin.ClipboardSelectionType): Promise<Array<string>>;
3219
3219
  }
3220
3220
 
3221
+ /**
3222
+ * Generated when a copy operation is blocked through {@link OpenFin.DomainSettings}.
3223
+ * @interface
3224
+ */
3225
+ declare type ClipboardCopyBlockedEvent = NamedEvent & {
3226
+ type: 'clipboard-copy-blocked';
3227
+ /**
3228
+ * URL of the Window or View that generated the event.
3229
+ */
3230
+ url: string;
3231
+ reason: CopyBlockedEventReason;
3232
+ };
3233
+
3234
+ /**
3235
+ * Generated when a paste operation is blocked through {@link OpenFin.DomainSettings}.
3236
+ * @interface
3237
+ */
3238
+ declare type ClipboardPasteBlockedEvent = NamedEvent & {
3239
+ type: 'clipboard-paste-blocked';
3240
+ /**
3241
+ * URL of the Window or View that generated the event.
3242
+ */
3243
+ url: string;
3244
+ reason: PasteBlockedEventReason;
3245
+ };
3246
+
3247
+ /**
3248
+ * Clipboard Permissions
3249
+ */
3250
+ declare type ClipboardPermissions = {
3251
+ copy?: CopyPermissions;
3252
+ paste?: PastePermissions;
3253
+ };
3254
+
3221
3255
  /**
3222
3256
  * The type of clipboard to write to, can be 'clipboard' or 'selection'.
3223
3257
  * Defaults to 'clipboard'. Use 'selection' for linux only.
@@ -3992,6 +4026,40 @@ declare type CookieOption = {
3992
4026
  name: string;
3993
4027
  };
3994
4028
 
4029
+ /**
4030
+ * Reasons for a copy operation being blocked
4031
+ *
4032
+ * 'disabled': Copy operation is disabled through domain-based permissions.
4033
+ */
4034
+ declare type CopyBlockedEventReason = 'disabled';
4035
+
4036
+ /**
4037
+ * Control copy operations for a matched URL.
4038
+ */
4039
+ declare type CopyPermissions = {
4040
+ /**
4041
+ * @defaultValue 'allowed'
4042
+ *
4043
+ * Controls the behavior for copy operations for a matched URL.
4044
+ *
4045
+ * allow: Enables all copy operations.
4046
+ * block: Disables all copy operations.
4047
+ * protect: Protects any copied content. Only URLs that have set paste.behavior: 'all-content' will be allowed to paste this content.
4048
+ */
4049
+ behavior: 'allow' | 'block' | 'protect';
4050
+ /**
4051
+ * Additional copy operation options
4052
+ */
4053
+ options?: {
4054
+ /**
4055
+ * @defaultValue ''
4056
+ *
4057
+ * When setting behavior = 'protected' , this string will be pasted to other applications that do not have a matching URL instead of the original content.
4058
+ */
4059
+ replacementText: string;
4060
+ };
4061
+ };
4062
+
3995
4063
  /**
3996
4064
  * Defines and applies rounded corners for a frameless window. **NOTE:** On macOS corner is not ellipse but circle rounded by the
3997
4065
  * average of _height_ and _width_.
@@ -4598,6 +4666,15 @@ declare class EmitterBase<EmitterEvent extends BaseEvent, EmitterEventType exten
4598
4666
  eventNames: () => (string | symbol)[];
4599
4667
  /* Excluded from this release type: emit */
4600
4668
  private hasEmitter;
4669
+ /**
4670
+ * Cleans up after removal of a listener, e.g. deleting any lingering deregistration handlers for a
4671
+ * `once` subscription.
4672
+ *
4673
+ * @remarks Implementing this as a `removeListener` handler ensures that direct removal of a listener
4674
+ * on the base emitter will not leak additional core handlers. We could do this in the forwarding method,
4675
+ * which would involve less "magic," but would be more-vulnerable to accidental re-introduction of a leak.
4676
+ */
4677
+ private cleanUpRemovedListener;
4601
4678
  private getOrCreateEmitter;
4602
4679
  listeners: (type: string | symbol) => Function[];
4603
4680
  listenerCount: (type: string | symbol) => number;
@@ -4838,7 +4915,7 @@ declare type Event_4 = (WebContentsEvents.Event<'view'> & {
4838
4915
  */
4839
4916
  declare type Event_5<Topic extends string> = {
4840
4917
  topic: Topic;
4841
- } & (BlurredEvent | CertificateSelectionShownEvent | CrashedEvent_2 | DidChangeThemeColorEvent | FocusedEvent | NavigationRejectedEvent | UrlChangedEvent | DidFailLoadEvent | DidFinishLoadEvent | DidStartLoadingEvent | PageFaviconUpdatedEvent | PageTitleUpdatedEvent | ResourceLoadFailedEvent | ResourceResponseReceivedEvent | ChildContentBlockedEvent | ChildContentOpenedInBrowserEvent | ChildViewCreatedEvent | ChildWindowCreatedEvent | FileDownloadStartedEvent | FileDownloadProgressEvent | FileDownloadCompletedEvent | FoundInPageEvent | CertificateErrorEvent | ContentBlockedEvent | WillRedirectEvent);
4918
+ } & (BlurredEvent | CertificateSelectionShownEvent | CrashedEvent_2 | DidChangeThemeColorEvent | FocusedEvent | NavigationRejectedEvent | UrlChangedEvent | DidFailLoadEvent | DidFinishLoadEvent | DidStartLoadingEvent | PageFaviconUpdatedEvent | PageTitleUpdatedEvent | ResourceLoadFailedEvent | ResourceResponseReceivedEvent | ChildContentBlockedEvent | ChildContentOpenedInBrowserEvent | ChildViewCreatedEvent | ChildWindowCreatedEvent | FileDownloadStartedEvent | FileDownloadProgressEvent | FileDownloadCompletedEvent | FoundInPageEvent | CertificateErrorEvent | ContentBlockedEvent | WillRedirectEvent | ClipboardCopyBlockedEvent | ClipboardPasteBlockedEvent);
4842
4919
 
4843
4920
  /**
4844
4921
  * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by a {@link Window}. Events are
@@ -5940,11 +6017,8 @@ declare type FrameEventType = EventType_5;
5940
6017
  /**
5941
6018
  * @interface
5942
6019
  */
5943
- declare type FrameInfo = {
5944
- name: string;
5945
- uuid: string;
6020
+ declare type FrameInfo = EntityInfo & {
5946
6021
  url: string;
5947
- entityType: EntityType_4;
5948
6022
  parent: Identity_4;
5949
6023
  };
5950
6024
 
@@ -9660,6 +9734,8 @@ declare namespace OpenFin {
9660
9734
  ClientConnectionPayload,
9661
9735
  EntityInfo,
9662
9736
  EntityType_4 as EntityType,
9737
+ ScreenCaptureState,
9738
+ ScreenCapturePermission,
9663
9739
  Bounds,
9664
9740
  WindowBounds,
9665
9741
  GetBoundsOptions,
@@ -9880,7 +9956,11 @@ declare namespace OpenFin {
9880
9956
  StructuredContentBehavior,
9881
9957
  StructuredContentPermissions,
9882
9958
  ContentPermission,
9959
+ ScreenCaptureBehavior,
9883
9960
  PerDomainSettings,
9961
+ CopyPermissions,
9962
+ PastePermissions,
9963
+ ClipboardPermissions,
9884
9964
  DomainSettingsRule,
9885
9965
  FileDownloadBehavior,
9886
9966
  FileDownloadBehaviorNames,
@@ -10059,6 +10139,29 @@ declare type PageTitleUpdatedEvent = NamedEvent & {
10059
10139
  title: string;
10060
10140
  };
10061
10141
 
10142
+ /**
10143
+ * Reasons for a paste operation being blocked
10144
+ *
10145
+ * 'invalid-data': Copy protection is enabled and the pasted data is invalid.
10146
+ * 'disabled': Copy protection is turned on and the current URL for this WebContent has been disabled through domain-based settings from accessing the copied data.
10147
+ */
10148
+ declare type PasteBlockedEventReason = 'invalid-data' | 'disabled';
10149
+
10150
+ /**
10151
+ * Control copy operations for a matched URL.
10152
+ */
10153
+ declare type PastePermissions = {
10154
+ /**
10155
+ * @defaultValue 'non-protected-content'
10156
+ *
10157
+ * Controls the behavior for paste operations for a matched URL.
10158
+ *
10159
+ * non-protected-content: All matching URLs will be able to paste content copied from non-protected URLs.
10160
+ * all-content: All matching URLs will be able to paste content copied from both protected (copy.behavior = 'protect') and on-protected (copy.behavior = 'allow') URLs.
10161
+ */
10162
+ behavior: 'non-protected-content' | 'all-content';
10163
+ };
10164
+
10062
10165
  declare type PathServeRequest = ServeRequest & {
10063
10166
  path: string;
10064
10167
  };
@@ -10202,6 +10305,16 @@ declare type PerDomainSettings = {
10202
10305
  * {@inheritdoc ChromiumPolicies}
10203
10306
  */
10204
10307
  chromiumPolicies?: ChromiumPolicies;
10308
+ contentProtection?: {
10309
+ /**
10310
+ * {@inheritdoc ScreenCaptureBehavior}
10311
+ */
10312
+ screenCapture: ScreenCaptureBehavior;
10313
+ /**
10314
+ * {@inheritdoc ClipboardPermissions}
10315
+ */
10316
+ clipboard?: ClipboardPermissions;
10317
+ };
10205
10318
  };
10206
10319
 
10207
10320
  /**
@@ -12852,6 +12965,10 @@ declare interface ProtocolMap extends ProtocolMapBase {
12852
12965
  };
12853
12966
  response: OpenFin.PopupResult;
12854
12967
  };
12968
+ 'get-screen-capture-permissions': {
12969
+ request: OpenFin.Identity;
12970
+ response: OpenFin.ScreenCapturePermission;
12971
+ };
12855
12972
  'render-overlay': {
12856
12973
  request: {
12857
12974
  bounds: OpenFin.Bounds;
@@ -13381,6 +13498,31 @@ declare type RvmLaunchOptions = {
13381
13498
  subscribe?: (launch: LaunchEmitter) => void;
13382
13499
  };
13383
13500
 
13501
+ /**
13502
+ * @interface
13503
+ * Controls whether this content should be allowed or blocked when capturing the screen.
13504
+ */
13505
+ declare type ScreenCaptureBehavior = 'allow' | 'block';
13506
+
13507
+ /**
13508
+ * Returned by getScreenCapturePermission. Includes sub-entity permission states and the resulting permission.
13509
+ * @interface
13510
+ */
13511
+ declare type ScreenCapturePermission = {
13512
+ permission: ScreenCaptureBehavior;
13513
+ permissions: ScreenCaptureState[];
13514
+ };
13515
+
13516
+ /**
13517
+ * screenCapture state for a given entity as defined in domain settings.
13518
+ * @interface
13519
+ */
13520
+ declare type ScreenCaptureState = {
13521
+ info: EntityInfo;
13522
+ behavior: ScreenCaptureBehavior;
13523
+ url: string;
13524
+ };
13525
+
13384
13526
  /**
13385
13527
  * @interface
13386
13528
  */
@@ -17732,6 +17874,19 @@ declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
17732
17874
  * {@link OpenFin.WebContentsEvents event namespace}.
17733
17875
  */
17734
17876
  showPopupWindow(options: OpenFin.PopupOptions): Promise<OpenFin.PopupResult>;
17877
+ /**
17878
+ *
17879
+ * Get the screen capture permission for this content.
17880
+ *
17881
+ * @example
17882
+ * ```js
17883
+ * const { permission } = await fin.me.getScreenCapturePermission();
17884
+ *
17885
+ * console.log(`This content is currently ${permission}ed in screen captures.`);
17886
+ *
17887
+ * ```
17888
+ */
17889
+ getScreenCapturePermission(): Promise<OpenFin.ScreenCapturePermission>;
17735
17890
  }
17736
17891
 
17737
17892
  /**
@@ -17770,6 +17925,8 @@ declare namespace WebContentsEvents {
17770
17925
  FileDownloadProgressEvent,
17771
17926
  FileDownloadCompletedEvent,
17772
17927
  ContentBlockedEvent,
17928
+ ClipboardCopyBlockedEvent,
17929
+ ClipboardPasteBlockedEvent,
17773
17930
  Event_5 as Event,
17774
17931
  WebContentsEvent,
17775
17932
  WillPropagateWebContentsEvent,
@@ -3218,6 +3218,40 @@ declare class Clipboard_2 extends Base {
3218
3218
  getAvailableFormats(type?: OpenFin.ClipboardSelectionType): Promise<Array<string>>;
3219
3219
  }
3220
3220
 
3221
+ /**
3222
+ * Generated when a copy operation is blocked through {@link OpenFin.DomainSettings}.
3223
+ * @interface
3224
+ */
3225
+ declare type ClipboardCopyBlockedEvent = NamedEvent & {
3226
+ type: 'clipboard-copy-blocked';
3227
+ /**
3228
+ * URL of the Window or View that generated the event.
3229
+ */
3230
+ url: string;
3231
+ reason: CopyBlockedEventReason;
3232
+ };
3233
+
3234
+ /**
3235
+ * Generated when a paste operation is blocked through {@link OpenFin.DomainSettings}.
3236
+ * @interface
3237
+ */
3238
+ declare type ClipboardPasteBlockedEvent = NamedEvent & {
3239
+ type: 'clipboard-paste-blocked';
3240
+ /**
3241
+ * URL of the Window or View that generated the event.
3242
+ */
3243
+ url: string;
3244
+ reason: PasteBlockedEventReason;
3245
+ };
3246
+
3247
+ /**
3248
+ * Clipboard Permissions
3249
+ */
3250
+ declare type ClipboardPermissions = {
3251
+ copy?: CopyPermissions;
3252
+ paste?: PastePermissions;
3253
+ };
3254
+
3221
3255
  /**
3222
3256
  * The type of clipboard to write to, can be 'clipboard' or 'selection'.
3223
3257
  * Defaults to 'clipboard'. Use 'selection' for linux only.
@@ -3992,6 +4026,40 @@ declare type CookieOption = {
3992
4026
  name: string;
3993
4027
  };
3994
4028
 
4029
+ /**
4030
+ * Reasons for a copy operation being blocked
4031
+ *
4032
+ * 'disabled': Copy operation is disabled through domain-based permissions.
4033
+ */
4034
+ declare type CopyBlockedEventReason = 'disabled';
4035
+
4036
+ /**
4037
+ * Control copy operations for a matched URL.
4038
+ */
4039
+ declare type CopyPermissions = {
4040
+ /**
4041
+ * @defaultValue 'allowed'
4042
+ *
4043
+ * Controls the behavior for copy operations for a matched URL.
4044
+ *
4045
+ * allow: Enables all copy operations.
4046
+ * block: Disables all copy operations.
4047
+ * protect: Protects any copied content. Only URLs that have set paste.behavior: 'all-content' will be allowed to paste this content.
4048
+ */
4049
+ behavior: 'allow' | 'block' | 'protect';
4050
+ /**
4051
+ * Additional copy operation options
4052
+ */
4053
+ options?: {
4054
+ /**
4055
+ * @defaultValue ''
4056
+ *
4057
+ * When setting behavior = 'protected' , this string will be pasted to other applications that do not have a matching URL instead of the original content.
4058
+ */
4059
+ replacementText: string;
4060
+ };
4061
+ };
4062
+
3995
4063
  /**
3996
4064
  * Defines and applies rounded corners for a frameless window. **NOTE:** On macOS corner is not ellipse but circle rounded by the
3997
4065
  * average of _height_ and _width_.
@@ -4598,6 +4666,15 @@ declare class EmitterBase<EmitterEvent extends BaseEvent, EmitterEventType exten
4598
4666
  eventNames: () => (string | symbol)[];
4599
4667
  /* Excluded from this release type: emit */
4600
4668
  private hasEmitter;
4669
+ /**
4670
+ * Cleans up after removal of a listener, e.g. deleting any lingering deregistration handlers for a
4671
+ * `once` subscription.
4672
+ *
4673
+ * @remarks Implementing this as a `removeListener` handler ensures that direct removal of a listener
4674
+ * on the base emitter will not leak additional core handlers. We could do this in the forwarding method,
4675
+ * which would involve less "magic," but would be more-vulnerable to accidental re-introduction of a leak.
4676
+ */
4677
+ private cleanUpRemovedListener;
4601
4678
  private getOrCreateEmitter;
4602
4679
  listeners: (type: string | symbol) => Function[];
4603
4680
  listenerCount: (type: string | symbol) => number;
@@ -4838,7 +4915,7 @@ declare type Event_4 = (WebContentsEvents.Event<'view'> & {
4838
4915
  */
4839
4916
  declare type Event_5<Topic extends string> = {
4840
4917
  topic: Topic;
4841
- } & (BlurredEvent | CertificateSelectionShownEvent | CrashedEvent_2 | DidChangeThemeColorEvent | FocusedEvent | NavigationRejectedEvent | UrlChangedEvent | DidFailLoadEvent | DidFinishLoadEvent | DidStartLoadingEvent | PageFaviconUpdatedEvent | PageTitleUpdatedEvent | ResourceLoadFailedEvent | ResourceResponseReceivedEvent | ChildContentBlockedEvent | ChildContentOpenedInBrowserEvent | ChildViewCreatedEvent | ChildWindowCreatedEvent | FileDownloadStartedEvent | FileDownloadProgressEvent | FileDownloadCompletedEvent | FoundInPageEvent | CertificateErrorEvent | ContentBlockedEvent | WillRedirectEvent);
4918
+ } & (BlurredEvent | CertificateSelectionShownEvent | CrashedEvent_2 | DidChangeThemeColorEvent | FocusedEvent | NavigationRejectedEvent | UrlChangedEvent | DidFailLoadEvent | DidFinishLoadEvent | DidStartLoadingEvent | PageFaviconUpdatedEvent | PageTitleUpdatedEvent | ResourceLoadFailedEvent | ResourceResponseReceivedEvent | ChildContentBlockedEvent | ChildContentOpenedInBrowserEvent | ChildViewCreatedEvent | ChildWindowCreatedEvent | FileDownloadStartedEvent | FileDownloadProgressEvent | FileDownloadCompletedEvent | FoundInPageEvent | CertificateErrorEvent | ContentBlockedEvent | WillRedirectEvent | ClipboardCopyBlockedEvent | ClipboardPasteBlockedEvent);
4842
4919
 
4843
4920
  /**
4844
4921
  * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by a {@link Window}. Events are
@@ -5940,11 +6017,8 @@ declare type FrameEventType = EventType_5;
5940
6017
  /**
5941
6018
  * @interface
5942
6019
  */
5943
- declare type FrameInfo = {
5944
- name: string;
5945
- uuid: string;
6020
+ declare type FrameInfo = EntityInfo & {
5946
6021
  url: string;
5947
- entityType: EntityType_4;
5948
6022
  parent: Identity_4;
5949
6023
  };
5950
6024
 
@@ -9660,6 +9734,8 @@ declare namespace OpenFin {
9660
9734
  ClientConnectionPayload,
9661
9735
  EntityInfo,
9662
9736
  EntityType_4 as EntityType,
9737
+ ScreenCaptureState,
9738
+ ScreenCapturePermission,
9663
9739
  Bounds,
9664
9740
  WindowBounds,
9665
9741
  GetBoundsOptions,
@@ -9880,7 +9956,11 @@ declare namespace OpenFin {
9880
9956
  StructuredContentBehavior,
9881
9957
  StructuredContentPermissions,
9882
9958
  ContentPermission,
9959
+ ScreenCaptureBehavior,
9883
9960
  PerDomainSettings,
9961
+ CopyPermissions,
9962
+ PastePermissions,
9963
+ ClipboardPermissions,
9884
9964
  DomainSettingsRule,
9885
9965
  FileDownloadBehavior,
9886
9966
  FileDownloadBehaviorNames,
@@ -10059,6 +10139,29 @@ declare type PageTitleUpdatedEvent = NamedEvent & {
10059
10139
  title: string;
10060
10140
  };
10061
10141
 
10142
+ /**
10143
+ * Reasons for a paste operation being blocked
10144
+ *
10145
+ * 'invalid-data': Copy protection is enabled and the pasted data is invalid.
10146
+ * 'disabled': Copy protection is turned on and the current URL for this WebContent has been disabled through domain-based settings from accessing the copied data.
10147
+ */
10148
+ declare type PasteBlockedEventReason = 'invalid-data' | 'disabled';
10149
+
10150
+ /**
10151
+ * Control copy operations for a matched URL.
10152
+ */
10153
+ declare type PastePermissions = {
10154
+ /**
10155
+ * @defaultValue 'non-protected-content'
10156
+ *
10157
+ * Controls the behavior for paste operations for a matched URL.
10158
+ *
10159
+ * non-protected-content: All matching URLs will be able to paste content copied from non-protected URLs.
10160
+ * all-content: All matching URLs will be able to paste content copied from both protected (copy.behavior = 'protect') and on-protected (copy.behavior = 'allow') URLs.
10161
+ */
10162
+ behavior: 'non-protected-content' | 'all-content';
10163
+ };
10164
+
10062
10165
  declare type PathServeRequest = ServeRequest & {
10063
10166
  path: string;
10064
10167
  };
@@ -10202,6 +10305,16 @@ declare type PerDomainSettings = {
10202
10305
  * {@inheritdoc ChromiumPolicies}
10203
10306
  */
10204
10307
  chromiumPolicies?: ChromiumPolicies;
10308
+ contentProtection?: {
10309
+ /**
10310
+ * {@inheritdoc ScreenCaptureBehavior}
10311
+ */
10312
+ screenCapture: ScreenCaptureBehavior;
10313
+ /**
10314
+ * {@inheritdoc ClipboardPermissions}
10315
+ */
10316
+ clipboard?: ClipboardPermissions;
10317
+ };
10205
10318
  };
10206
10319
 
10207
10320
  /**
@@ -12852,6 +12965,10 @@ declare interface ProtocolMap extends ProtocolMapBase {
12852
12965
  };
12853
12966
  response: OpenFin.PopupResult;
12854
12967
  };
12968
+ 'get-screen-capture-permissions': {
12969
+ request: OpenFin.Identity;
12970
+ response: OpenFin.ScreenCapturePermission;
12971
+ };
12855
12972
  'render-overlay': {
12856
12973
  request: {
12857
12974
  bounds: OpenFin.Bounds;
@@ -13381,6 +13498,31 @@ declare type RvmLaunchOptions = {
13381
13498
  subscribe?: (launch: LaunchEmitter) => void;
13382
13499
  };
13383
13500
 
13501
+ /**
13502
+ * @interface
13503
+ * Controls whether this content should be allowed or blocked when capturing the screen.
13504
+ */
13505
+ declare type ScreenCaptureBehavior = 'allow' | 'block';
13506
+
13507
+ /**
13508
+ * Returned by getScreenCapturePermission. Includes sub-entity permission states and the resulting permission.
13509
+ * @interface
13510
+ */
13511
+ declare type ScreenCapturePermission = {
13512
+ permission: ScreenCaptureBehavior;
13513
+ permissions: ScreenCaptureState[];
13514
+ };
13515
+
13516
+ /**
13517
+ * screenCapture state for a given entity as defined in domain settings.
13518
+ * @interface
13519
+ */
13520
+ declare type ScreenCaptureState = {
13521
+ info: EntityInfo;
13522
+ behavior: ScreenCaptureBehavior;
13523
+ url: string;
13524
+ };
13525
+
13384
13526
  /**
13385
13527
  * @interface
13386
13528
  */
@@ -17732,6 +17874,19 @@ declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
17732
17874
  * {@link OpenFin.WebContentsEvents event namespace}.
17733
17875
  */
17734
17876
  showPopupWindow(options: OpenFin.PopupOptions): Promise<OpenFin.PopupResult>;
17877
+ /**
17878
+ *
17879
+ * Get the screen capture permission for this content.
17880
+ *
17881
+ * @example
17882
+ * ```js
17883
+ * const { permission } = await fin.me.getScreenCapturePermission();
17884
+ *
17885
+ * console.log(`This content is currently ${permission}ed in screen captures.`);
17886
+ *
17887
+ * ```
17888
+ */
17889
+ getScreenCapturePermission(): Promise<OpenFin.ScreenCapturePermission>;
17735
17890
  }
17736
17891
 
17737
17892
  /**
@@ -17770,6 +17925,8 @@ declare namespace WebContentsEvents {
17770
17925
  FileDownloadProgressEvent,
17771
17926
  FileDownloadCompletedEvent,
17772
17927
  ContentBlockedEvent,
17928
+ ClipboardCopyBlockedEvent,
17929
+ ClipboardPasteBlockedEvent,
17773
17930
  Event_5 as Event,
17774
17931
  WebContentsEvent,
17775
17932
  WillPropagateWebContentsEvent,
package/out/fdc3-api.d.ts CHANGED
@@ -3274,6 +3274,40 @@ declare class Clipboard_2 extends Base {
3274
3274
  getAvailableFormats(type?: OpenFin.ClipboardSelectionType): Promise<Array<string>>;
3275
3275
  }
3276
3276
 
3277
+ /**
3278
+ * Generated when a copy operation is blocked through {@link OpenFin.DomainSettings}.
3279
+ * @interface
3280
+ */
3281
+ declare type ClipboardCopyBlockedEvent = NamedEvent & {
3282
+ type: 'clipboard-copy-blocked';
3283
+ /**
3284
+ * URL of the Window or View that generated the event.
3285
+ */
3286
+ url: string;
3287
+ reason: CopyBlockedEventReason;
3288
+ };
3289
+
3290
+ /**
3291
+ * Generated when a paste operation is blocked through {@link OpenFin.DomainSettings}.
3292
+ * @interface
3293
+ */
3294
+ declare type ClipboardPasteBlockedEvent = NamedEvent & {
3295
+ type: 'clipboard-paste-blocked';
3296
+ /**
3297
+ * URL of the Window or View that generated the event.
3298
+ */
3299
+ url: string;
3300
+ reason: PasteBlockedEventReason;
3301
+ };
3302
+
3303
+ /**
3304
+ * Clipboard Permissions
3305
+ */
3306
+ declare type ClipboardPermissions = {
3307
+ copy?: CopyPermissions;
3308
+ paste?: PastePermissions;
3309
+ };
3310
+
3277
3311
  /**
3278
3312
  * The type of clipboard to write to, can be 'clipboard' or 'selection'.
3279
3313
  * Defaults to 'clipboard'. Use 'selection' for linux only.
@@ -4051,6 +4085,40 @@ declare type CookieOption = {
4051
4085
  name: string;
4052
4086
  };
4053
4087
 
4088
+ /**
4089
+ * Reasons for a copy operation being blocked
4090
+ *
4091
+ * 'disabled': Copy operation is disabled through domain-based permissions.
4092
+ */
4093
+ declare type CopyBlockedEventReason = 'disabled';
4094
+
4095
+ /**
4096
+ * Control copy operations for a matched URL.
4097
+ */
4098
+ declare type CopyPermissions = {
4099
+ /**
4100
+ * @defaultValue 'allowed'
4101
+ *
4102
+ * Controls the behavior for copy operations for a matched URL.
4103
+ *
4104
+ * allow: Enables all copy operations.
4105
+ * block: Disables all copy operations.
4106
+ * protect: Protects any copied content. Only URLs that have set paste.behavior: 'all-content' will be allowed to paste this content.
4107
+ */
4108
+ behavior: 'allow' | 'block' | 'protect';
4109
+ /**
4110
+ * Additional copy operation options
4111
+ */
4112
+ options?: {
4113
+ /**
4114
+ * @defaultValue ''
4115
+ *
4116
+ * When setting behavior = 'protected' , this string will be pasted to other applications that do not have a matching URL instead of the original content.
4117
+ */
4118
+ replacementText: string;
4119
+ };
4120
+ };
4121
+
4054
4122
  /**
4055
4123
  * Defines and applies rounded corners for a frameless window. **NOTE:** On macOS corner is not ellipse but circle rounded by the
4056
4124
  * average of _height_ and _width_.
@@ -4662,6 +4730,15 @@ declare class EmitterBase<EmitterEvent extends BaseEvent, EmitterEventType exten
4662
4730
  type: EventType;
4663
4731
  }>, ...args: any[]) => boolean;
4664
4732
  private hasEmitter;
4733
+ /**
4734
+ * Cleans up after removal of a listener, e.g. deleting any lingering deregistration handlers for a
4735
+ * `once` subscription.
4736
+ *
4737
+ * @remarks Implementing this as a `removeListener` handler ensures that direct removal of a listener
4738
+ * on the base emitter will not leak additional core handlers. We could do this in the forwarding method,
4739
+ * which would involve less "magic," but would be more-vulnerable to accidental re-introduction of a leak.
4740
+ */
4741
+ private cleanUpRemovedListener;
4665
4742
  private getOrCreateEmitter;
4666
4743
  listeners: (type: string | symbol) => Function[];
4667
4744
  listenerCount: (type: string | symbol) => number;
@@ -4902,7 +4979,7 @@ declare type Event_4 = (WebContentsEvents.Event<'view'> & {
4902
4979
  */
4903
4980
  declare type Event_5<Topic extends string> = {
4904
4981
  topic: Topic;
4905
- } & (BlurredEvent | CertificateSelectionShownEvent | CrashedEvent_2 | DidChangeThemeColorEvent | FocusedEvent | NavigationRejectedEvent | UrlChangedEvent | DidFailLoadEvent | DidFinishLoadEvent | DidStartLoadingEvent | PageFaviconUpdatedEvent | PageTitleUpdatedEvent | ResourceLoadFailedEvent | ResourceResponseReceivedEvent | ChildContentBlockedEvent | ChildContentOpenedInBrowserEvent | ChildViewCreatedEvent | ChildWindowCreatedEvent | FileDownloadStartedEvent | FileDownloadProgressEvent | FileDownloadCompletedEvent | FoundInPageEvent | CertificateErrorEvent | ContentBlockedEvent | WillRedirectEvent);
4982
+ } & (BlurredEvent | CertificateSelectionShownEvent | CrashedEvent_2 | DidChangeThemeColorEvent | FocusedEvent | NavigationRejectedEvent | UrlChangedEvent | DidFailLoadEvent | DidFinishLoadEvent | DidStartLoadingEvent | PageFaviconUpdatedEvent | PageTitleUpdatedEvent | ResourceLoadFailedEvent | ResourceResponseReceivedEvent | ChildContentBlockedEvent | ChildContentOpenedInBrowserEvent | ChildViewCreatedEvent | ChildWindowCreatedEvent | FileDownloadStartedEvent | FileDownloadProgressEvent | FileDownloadCompletedEvent | FoundInPageEvent | CertificateErrorEvent | ContentBlockedEvent | WillRedirectEvent | ClipboardCopyBlockedEvent | ClipboardPasteBlockedEvent);
4906
4983
 
4907
4984
  /**
4908
4985
  * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by a {@link Window}. Events are
@@ -6028,11 +6105,8 @@ declare type FrameEventType = EventType_5;
6028
6105
  /**
6029
6106
  * @interface
6030
6107
  */
6031
- declare type FrameInfo = {
6032
- name: string;
6033
- uuid: string;
6108
+ declare type FrameInfo = EntityInfo & {
6034
6109
  url: string;
6035
- entityType: EntityType_4;
6036
6110
  parent: Identity_4;
6037
6111
  };
6038
6112
 
@@ -9978,6 +10052,8 @@ declare namespace OpenFin {
9978
10052
  ClientConnectionPayload,
9979
10053
  EntityInfo,
9980
10054
  EntityType_4 as EntityType,
10055
+ ScreenCaptureState,
10056
+ ScreenCapturePermission,
9981
10057
  Bounds,
9982
10058
  WindowBounds,
9983
10059
  GetBoundsOptions,
@@ -10198,7 +10274,11 @@ declare namespace OpenFin {
10198
10274
  StructuredContentBehavior,
10199
10275
  StructuredContentPermissions,
10200
10276
  ContentPermission,
10277
+ ScreenCaptureBehavior,
10201
10278
  PerDomainSettings,
10279
+ CopyPermissions,
10280
+ PastePermissions,
10281
+ ClipboardPermissions,
10202
10282
  DomainSettingsRule,
10203
10283
  FileDownloadBehavior,
10204
10284
  FileDownloadBehaviorNames,
@@ -10377,6 +10457,29 @@ declare type PageTitleUpdatedEvent = NamedEvent & {
10377
10457
  title: string;
10378
10458
  };
10379
10459
 
10460
+ /**
10461
+ * Reasons for a paste operation being blocked
10462
+ *
10463
+ * 'invalid-data': Copy protection is enabled and the pasted data is invalid.
10464
+ * 'disabled': Copy protection is turned on and the current URL for this WebContent has been disabled through domain-based settings from accessing the copied data.
10465
+ */
10466
+ declare type PasteBlockedEventReason = 'invalid-data' | 'disabled';
10467
+
10468
+ /**
10469
+ * Control copy operations for a matched URL.
10470
+ */
10471
+ declare type PastePermissions = {
10472
+ /**
10473
+ * @defaultValue 'non-protected-content'
10474
+ *
10475
+ * Controls the behavior for paste operations for a matched URL.
10476
+ *
10477
+ * non-protected-content: All matching URLs will be able to paste content copied from non-protected URLs.
10478
+ * all-content: All matching URLs will be able to paste content copied from both protected (copy.behavior = 'protect') and on-protected (copy.behavior = 'allow') URLs.
10479
+ */
10480
+ behavior: 'non-protected-content' | 'all-content';
10481
+ };
10482
+
10380
10483
  declare type PathServeRequest = ServeRequest & {
10381
10484
  path: string;
10382
10485
  };
@@ -10520,6 +10623,16 @@ declare type PerDomainSettings = {
10520
10623
  * {@inheritdoc ChromiumPolicies}
10521
10624
  */
10522
10625
  chromiumPolicies?: ChromiumPolicies;
10626
+ contentProtection?: {
10627
+ /**
10628
+ * {@inheritdoc ScreenCaptureBehavior}
10629
+ */
10630
+ screenCapture: ScreenCaptureBehavior;
10631
+ /**
10632
+ * {@inheritdoc ClipboardPermissions}
10633
+ */
10634
+ clipboard?: ClipboardPermissions;
10635
+ };
10523
10636
  };
10524
10637
 
10525
10638
  /**
@@ -13253,6 +13366,10 @@ declare interface ProtocolMap extends ProtocolMapBase {
13253
13366
  };
13254
13367
  response: OpenFin.PopupResult;
13255
13368
  };
13369
+ 'get-screen-capture-permissions': {
13370
+ request: OpenFin.Identity;
13371
+ response: OpenFin.ScreenCapturePermission;
13372
+ };
13256
13373
  'render-overlay': {
13257
13374
  request: {
13258
13375
  bounds: OpenFin.Bounds;
@@ -13782,6 +13899,31 @@ declare type RvmLaunchOptions = {
13782
13899
  subscribe?: (launch: LaunchEmitter) => void;
13783
13900
  };
13784
13901
 
13902
+ /**
13903
+ * @interface
13904
+ * Controls whether this content should be allowed or blocked when capturing the screen.
13905
+ */
13906
+ declare type ScreenCaptureBehavior = 'allow' | 'block';
13907
+
13908
+ /**
13909
+ * Returned by getScreenCapturePermission. Includes sub-entity permission states and the resulting permission.
13910
+ * @interface
13911
+ */
13912
+ declare type ScreenCapturePermission = {
13913
+ permission: ScreenCaptureBehavior;
13914
+ permissions: ScreenCaptureState[];
13915
+ };
13916
+
13917
+ /**
13918
+ * screenCapture state for a given entity as defined in domain settings.
13919
+ * @interface
13920
+ */
13921
+ declare type ScreenCaptureState = {
13922
+ info: EntityInfo;
13923
+ behavior: ScreenCaptureBehavior;
13924
+ url: string;
13925
+ };
13926
+
13785
13927
  /**
13786
13928
  * @interface
13787
13929
  */
@@ -18183,6 +18325,19 @@ declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
18183
18325
  * {@link OpenFin.WebContentsEvents event namespace}.
18184
18326
  */
18185
18327
  showPopupWindow(options: OpenFin.PopupOptions): Promise<OpenFin.PopupResult>;
18328
+ /**
18329
+ *
18330
+ * Get the screen capture permission for this content.
18331
+ *
18332
+ * @example
18333
+ * ```js
18334
+ * const { permission } = await fin.me.getScreenCapturePermission();
18335
+ *
18336
+ * console.log(`This content is currently ${permission}ed in screen captures.`);
18337
+ *
18338
+ * ```
18339
+ */
18340
+ getScreenCapturePermission(): Promise<OpenFin.ScreenCapturePermission>;
18186
18341
  }
18187
18342
 
18188
18343
  /**
@@ -18221,6 +18376,8 @@ declare namespace WebContentsEvents {
18221
18376
  FileDownloadProgressEvent,
18222
18377
  FileDownloadCompletedEvent,
18223
18378
  ContentBlockedEvent,
18379
+ ClipboardCopyBlockedEvent,
18380
+ ClipboardPasteBlockedEvent,
18224
18381
  Event_5 as Event,
18225
18382
  WebContentsEvent,
18226
18383
  WillPropagateWebContentsEvent,
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.102.1",
3
+ "version": "40.103.1",
4
4
  "description": "OpenFin fdc3 module utilities and types.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "private": false,