@openfin/core 43.100.104 → 43.100.106

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.
@@ -94,6 +94,34 @@ declare type AnalyticsProtocolMap = {
94
94
  [k in AnalyticsOnlyCalls]: VoidCall;
95
95
  };
96
96
 
97
+ /**
98
+ * Represents an anchor configuration consisting of a bounding rectangle
99
+ * and an anchor point describing which part of that rectangle should be
100
+ * used as the reference for positioning the download bubble.
101
+ * @interface
102
+ */
103
+ declare type Anchor = {
104
+ /**
105
+ * The DOM or screen-space rectangle that defines the anchor area.
106
+ */
107
+ bounds: Rectangle;
108
+ /**
109
+ * The location within the rectangle that should act as the anchor
110
+ * (e.g., `topRight`, `bottomLeft`, `center`, etc.).
111
+ * For example, `topRight` means the rectangle's top-right corner is used
112
+ * as the anchoring reference point.
113
+ */
114
+ location: AnchorLocation;
115
+ };
116
+
117
+ /**
118
+ * Defines the point within the rectangle that should be used as the anchor
119
+ * when positioning UI elements relative to another surface.
120
+ *
121
+ * @interface
122
+ */
123
+ declare type AnchorLocation = 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight' | 'leftTop' | 'rightTop' | 'leftBottom' | 'rightBottom' | 'topCenter' | 'bottomCenter' | 'leftCenter' | 'rightCenter' | 'none' | 'float';
124
+
97
125
  declare type AnchorType = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
98
126
 
99
127
  declare type AnyStrategy = ChannelStrategy<any>;
@@ -1392,6 +1420,56 @@ declare type ApplicationWindowInfo = {
1392
1420
  uuid: string;
1393
1421
  };
1394
1422
 
1423
+ /**
1424
+ * `appLogLevel` allows the verbosity of app logs that are collected for a Window or View to be controlled when the app logging feature is enabled for its application.
1425
+ *
1426
+ * Please note, `enableAppLogging` must be specified in the application manifest's `platform` or `startup_app` key for this feature to be activated.
1427
+ *
1428
+ * If not specified, and `enableAppLogging` is true for the application, the default level will be 'silent'.
1429
+ *
1430
+ * This setting can also be specified in a Domain Setting Rule, allowing per url exceptions to the default behavior to be made. Please note, when a domain setting is actively
1431
+ * controlling a url's appLogLevel, its options will be ignored.
1432
+ *
1433
+ * @default 'debug'
1434
+ *
1435
+ * @example Controlling App Logs With DefaultViewOptions + Domain Settings
1436
+ *
1437
+ * In this example manifest, we use `defaultViewOptions to set the default verbosity to 'warn'.
1438
+ *
1439
+ * We also use domain settings to suppress logs entirely for an example URL, and to lower verbosity to 'debug' for another.
1440
+ *
1441
+ * ```ts
1442
+ * {
1443
+ * <rest of settings>
1444
+ * "platform": {
1445
+ * <rest of settings>
1446
+ * "enableAppLogging": "true",
1447
+ * "defaultViewOptions": {
1448
+ * "appLogLevel": "warn"
1449
+ * },
1450
+ * "domainSettings": {
1451
+ * "default": { <rest of settings> }
1452
+ * "rules": [
1453
+ * <rest of rules>
1454
+ * {
1455
+ * "match": ["*://*?app-logging-level=silent"],
1456
+ * "options": {
1457
+ * "appLogLevel": "silent"
1458
+ * }
1459
+ * },
1460
+ * {
1461
+ * "match": ["*://*?app-logging-level=debug"],
1462
+ * "options": {
1463
+ * "appLogLevel": "debug"
1464
+ * }
1465
+ * },
1466
+ * ]
1467
+ * }
1468
+ * }
1469
+ * }
1470
+ */
1471
+ declare type AppLogLevel = 'silent' | 'debug' | 'info' | 'warn' | 'error';
1472
+
1395
1473
  /**
1396
1474
  * @interface
1397
1475
  */
@@ -3867,6 +3945,10 @@ declare type ConstWindowOptions = {
3867
3945
  * Controls whether frameless window should have rounded corners. Default is false for Windows and true for MacOS. Setting this property to false will prevent the window from being fullscreenable on macOS. On Windows versions older than Windows 11 Build 22000 this property has no effect, and frameless windows will not have rounded corners.
3868
3946
  */
3869
3947
  roundedCorners: boolean;
3948
+ /**
3949
+ * Configuration for download bubble UI.
3950
+ */
3951
+ downloadBubble?: DownloadBubbleOptions;
3870
3952
  };
3871
3953
 
3872
3954
  /**
@@ -4619,6 +4701,50 @@ declare type DomainSettingsRule = {
4619
4701
  matchOptions?: RuleMatchOptions;
4620
4702
  };
4621
4703
 
4704
+ /**
4705
+ * Configuration options for enabling and positioning the download bubble UI.
4706
+ * @interface
4707
+ */
4708
+ declare type DownloadBubbleOptions = {
4709
+ /**
4710
+ * Whether the download bubble feature is enabled.
4711
+ */
4712
+ enabled: boolean;
4713
+ /**
4714
+ * Anchor configuration describing where the download bubble should attach.
4715
+ */
4716
+ anchor: Anchor;
4717
+ };
4718
+
4719
+ /**
4720
+ * Generated when the download button icon needs to be updated. Only raised if the download bubble feature is enabled.
4721
+ *
4722
+ * @interface
4723
+ */
4724
+ declare type DownloadButtonIconUpdatedEvent = BaseEvent_5 & {
4725
+ type: 'download-button-icon-updated';
4726
+ disabled: boolean;
4727
+ active: boolean;
4728
+ touchMode: boolean;
4729
+ progressIndicatorState: 'idle' | 'scanning' | 'downloading' | 'dormant';
4730
+ progressDownloadCount: number;
4731
+ progressPercentage: number;
4732
+ buttonTooltip: string;
4733
+ };
4734
+
4735
+ /**
4736
+ * Generated when the visibility of the window's download button changes. Only raised if the download bubble feature is enabled.
4737
+ *
4738
+ * @interface
4739
+ */
4740
+ declare type DownloadButtonVisibilityChangedEvent = BaseEvent_5 & {
4741
+ type: 'download-button-visibility-changed';
4742
+ /**
4743
+ * True if the download button should be displayed, false if it should be hidden.
4744
+ */
4745
+ visible: boolean;
4746
+ };
4747
+
4622
4748
  /**
4623
4749
  * Metadata returned from a preload script download request.
4624
4750
  *
@@ -4678,6 +4804,7 @@ declare type DownloadRule = {
4678
4804
  *
4679
4805
  * @remarks This will control the styling for the download shelf regardless of whether its display was
4680
4806
  * triggered by the window itself, or a view targeting the window.
4807
+ * @deprecated Use the DownloadBubble API instead.
4681
4808
  */
4682
4809
  declare type DownloadShelfOptions = {
4683
4810
  /**
@@ -4713,6 +4840,7 @@ declare type DownloadShelfOptions = {
4713
4840
  * Generated when the visibility of the window's download shelf changes.
4714
4841
  *
4715
4842
  * @interface
4843
+ * @deprecated use DownloadBubble API instead
4716
4844
  */
4717
4845
  declare type DownloadShelfVisibilityChangedEvent = BaseEvent_5 & {
4718
4846
  type: 'download-shelf-visibility-changed';
@@ -4979,7 +5107,7 @@ declare type Event_10 = ApplicationEvents.Event | ApiReadyEvent | SnapshotApplie
4979
5107
  * under the {@link OpenFin.SystemEvents} namespace (payloads inherited from propagated events are defined in the namespace
4980
5108
  * from which they propagate).
4981
5109
  */
4982
- 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;
5110
+ 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 | ThemePaletteChangedEvent | NativeThemeUpdatedEvent;
4983
5111
 
4984
5112
  /**
4985
5113
  * [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.
@@ -8590,6 +8718,42 @@ declare type LayoutOptions = {
8590
8718
  */
8591
8719
  preventDragIn?: boolean;
8592
8720
  /* Excluded from this release type: disableTabOverflowDropdown */
8721
+ /**
8722
+ * When set to 'scroll', enables horizontal scrolling of tabs when they overflow the stack width.
8723
+ * When set to 'dropdown', the default behavior occurs, in which excess tabs appear in a menu.
8724
+ *
8725
+ * Setting this to `scroll` might break styles written for the default dropdown behavior, as it significantly changes the DOM structure and CSS of tabs.
8726
+ *
8727
+ * The DOM structure is modified in this way:
8728
+ * - `lm_tabs` is wrapped in a div with class `lm_scroll_shadow`. This div is revealed by a mask on the tabs when they are overflowing.
8729
+ * - the `.newTabButton` (if enabled) is a direct child of `.lm_header`
8730
+ *
8731
+ * **The following CSS variables are available to customize tab appearance:**
8732
+ *
8733
+ * - `--layout-tab-width`: The default (max) width of the tabs. Using this enables using `lm_tab` as a queryable CSS container (must be an absolute value to use container queries). Default: `fit-content`
8734
+ * - `--layout-tab-min-width`: The minimum width of the tabs before they start overflowing. Set this to enable tab shrinking. Defaults to the same value as `--layout-tab-width` (no shrinking).
8735
+ * - `--layout-tab-overflow-fade-size`: The width of the scroll shadows when tabs are overflowing. Default: `20px`
8736
+ * - `--layout-tab-overflow-shadow-color`: The color of the scroll shadows when tabs are overflowing. Enabling a contrasting shadow color may require setting the background color on `.lm_tabs` if it was not previously set via `--tabs-background-color`. Default is transparent so overlowing tabs fade into the background.
8737
+ *
8738
+ * **CSS Variables for advanced customization (dynamically updated and set on `lm_tabs`):**
8739
+ *
8740
+ * - `--layout-tab-overflow-fade-left`: The strength of the left fade when tabs are overflowing. This is a number between 0 and 1 where 0 means no fade and 1 means a full fade.
8741
+ * - `--layout-tab-overflow-fade-right`: The strength of the right fade when tabs are overflowing. This is a number between 0 and 1 where 0 means no fade and 1 means a full fade.
8742
+ * - `--layout-tabs-overflowing`: A [CSS space toggle](https://css-tricks.com/the-css-custom-property-toggle-trick/) that is empty when tabs are overflowing and `initial` otherwise. If you are targeting only Chrome 137 or greater, you might want to use the `if()` function with left/right fade instead of this toggle.
8743
+ *
8744
+ * @example
8745
+ * ```css
8746
+ * .lm_tabs {
8747
+ * --layout-tab-width: 200px;
8748
+ * --layout-tab-min-width: 100px;
8749
+ * --layout-tab-overflow-fade-size: 20px;
8750
+ * --layout-tab-overflow-shadow-color: rgba(0, 0, 0, 0.3);
8751
+ * }
8752
+ * ```
8753
+ *
8754
+ * @defaultValue 'dropdown'
8755
+ */
8756
+ tabOverflowBehavior?: 'dropdown' | 'scroll';
8593
8757
  };
8594
8758
  /**
8595
8759
  * Content of the layout. There can only be one top-level LayoutItem in the content array.
@@ -8697,6 +8861,12 @@ declare type LogInfo = {
8697
8861
  */
8698
8862
  declare type LogLevel = 'verbose' | 'info' | 'warning' | 'error' | 'fatal';
8699
8863
 
8864
+ declare type LogPath = 'debug.log' | 'app.log';
8865
+
8866
+ declare type LogTarget = {
8867
+ type: LogPath;
8868
+ };
8869
+
8700
8870
  /**
8701
8871
  * Log types
8702
8872
  *
@@ -8842,6 +9012,7 @@ declare type Manifest = {
8842
9012
  policies?: {
8843
9013
  CloudAPAuthEnabled?: 'enabled' | 'disabled';
8844
9014
  };
9015
+ themePalette?: Array<ThemePalette>;
8845
9016
  };
8846
9017
  services?: string[];
8847
9018
  shortcut?: {
@@ -9215,6 +9386,10 @@ declare type MutableViewOptions = {
9215
9386
  * {@inheritDoc ChromiumPolicies}
9216
9387
  */
9217
9388
  chromiumPolicies: ChromiumPolicies;
9389
+ /**
9390
+ * Specifies the AppLogLevel for the specified View. See {@link AppLogLevel} for more information.
9391
+ */
9392
+ appLogLevel?: AppLogLevel;
9218
9393
  };
9219
9394
 
9220
9395
  /**
@@ -9489,6 +9664,10 @@ declare type MutableWindowOptions = {
9489
9664
  * {@inheritDoc ChromiumPolicies}
9490
9665
  */
9491
9666
  chromiumPolicies: ChromiumPolicies;
9667
+ /**
9668
+ * Specifies the AppLogLevel for the Window. See {@link AppLogLevel} for more information.
9669
+ */
9670
+ appLogLevel?: AppLogLevel;
9492
9671
  };
9493
9672
 
9494
9673
  declare type NackHandler = (payloadOrMessage: RuntimeErrorPayload | string) => void;
@@ -9501,6 +9680,78 @@ declare type NamedEvent = IdentityEvent & {
9501
9680
  name: string;
9502
9681
  };
9503
9682
 
9683
+ /**
9684
+ * @interface
9685
+ *
9686
+ * Represents the native theme of the operating system.
9687
+ * This is used to determine how the application should render its UI based on the system's theme settings.
9688
+ * Defer to CSS properties whenever possible.
9689
+ *
9690
+ * Re-exported from Electron's `NativeTheme` type.
9691
+ */
9692
+ declare type NativeTheme = {
9693
+ /**
9694
+ * A `boolean` indicating whether Chromium is in forced colors mode, controlled by
9695
+ * system accessibility settings. Currently, Windows high contrast is the only
9696
+ * system setting that triggers forced colors mode.
9697
+ *
9698
+ * @platform win32
9699
+ */
9700
+ inForcedColorsMode: boolean;
9701
+ /**
9702
+ * A `boolean` that indicates the whether the user has chosen via system
9703
+ * accessibility settings to reduce transparency at the OS level.
9704
+ *
9705
+ */
9706
+ prefersReducedTransparency: boolean;
9707
+ /**
9708
+ * A `boolean` for if the OS / Chromium currently has a dark mode enabled or is
9709
+ * being instructed to show a dark-style UI. If you want to modify this value you
9710
+ * should use `themeSource` below.
9711
+ *
9712
+ */
9713
+ shouldUseDarkColors: boolean;
9714
+ /**
9715
+ * A `boolean` property indicating whether or not the system theme has been set to
9716
+ * dark or light.
9717
+ *
9718
+ * On Windows this property distinguishes between system and app light/dark theme,
9719
+ * returning `true` if the system theme is set to dark theme and `false` otherwise.
9720
+ * On macOS the return value will be the same as `nativeTheme.shouldUseDarkColors`.
9721
+ *
9722
+ * @platform darwin,win32
9723
+ */
9724
+ shouldUseDarkColorsForSystemIntegratedUI: boolean;
9725
+ /**
9726
+ * A `boolean` for if the OS / Chromium currently has high-contrast mode enabled or
9727
+ * is being instructed to show a high-contrast UI.
9728
+ *
9729
+ * @platform darwin,win32
9730
+ */
9731
+ shouldUseHighContrastColors: boolean;
9732
+ /**
9733
+ * A `boolean` for if the OS / Chromium currently has an inverted color scheme or
9734
+ * is being instructed to use an inverted color scheme.
9735
+ *
9736
+ * @platform darwin,win32
9737
+ */
9738
+ shouldUseInvertedColorScheme: boolean;
9739
+ /**
9740
+ * A `string` property that can be `system`, `light` or `dark`. It is used (via `setTheme) to
9741
+ * override and supersede the value that Chromium has chosen to use internally.
9742
+ */
9743
+ themeSource: 'system' | 'light' | 'dark';
9744
+ };
9745
+
9746
+ /**
9747
+ * Generated when the operating system's theme preferences change.
9748
+ * Occurs when dark mode, high contrast mode, or inverted color scheme settings are modified.
9749
+ */
9750
+ declare type NativeThemeUpdatedEvent = BaseEvent_9 & {
9751
+ type: 'native-theme-updated';
9752
+ theme: OpenFin_2.NativeTheme;
9753
+ };
9754
+
9504
9755
  /**
9505
9756
  * @interface
9506
9757
  */
@@ -9786,6 +10037,9 @@ declare namespace OpenFin_2 {
9786
10037
  CustomProtocolOptions,
9787
10038
  InteropBrokerOptions,
9788
10039
  ContextGroupInfo,
10040
+ AnchorLocation,
10041
+ Anchor,
10042
+ DownloadBubbleOptions,
9789
10043
  DisplayMetadata,
9790
10044
  LegacyWinOptionsInAppOptions,
9791
10045
  Snapshot,
@@ -9812,6 +10066,9 @@ declare namespace OpenFin_2 {
9812
10066
  InheritableOptions,
9813
10067
  PolicyOptions,
9814
10068
  ChromiumPolicies,
10069
+ AppLogLevel,
10070
+ LogPath,
10071
+ LogTarget,
9815
10072
  MutableWindowOptions,
9816
10073
  WorkspacePlatformOptions,
9817
10074
  WebRequestHeader,
@@ -9889,9 +10146,14 @@ declare namespace OpenFin_2 {
9889
10146
  LogUploaderUIOptions,
9890
10147
  LogTypes,
9891
10148
  LogUploadOptions,
10149
+ ThemeColorsMap,
10150
+ ThemeColorId,
10151
+ ThemePalette,
9892
10152
  Manifest,
9893
10153
  LayoutContent,
9894
10154
  LayoutItemConfig,
10155
+ ThemePreferences,
10156
+ NativeTheme,
9895
10157
  LayoutRow,
9896
10158
  LayoutColumn,
9897
10159
  LayoutComponent,
@@ -10111,6 +10373,7 @@ declare namespace OpenFin_2 {
10111
10373
  ChannelProviderDisconnectionListener,
10112
10374
  RoutingInfo,
10113
10375
  DownloadShelfOptions,
10376
+ SnapZoneOptions,
10114
10377
  ViewShowAtOptions,
10115
10378
  WebNotificationProperties,
10116
10379
  WebNotificationInfo,
@@ -10387,6 +10650,11 @@ declare type PerDomainSettings = {
10387
10650
  */
10388
10651
  drag?: 'allow' | 'block';
10389
10652
  };
10653
+ /**
10654
+ * Allows the app log level of any matching content to be overriden.
10655
+ * See also {@link AppLogLevel} for more information.
10656
+ */
10657
+ appLogLevel?: AppLogLevel;
10390
10658
  };
10391
10659
 
10392
10660
  /**
@@ -12024,7 +12292,7 @@ declare type PositioningOptions = {
12024
12292
  /**
12025
12293
  * Context menu item with an implementation provided by OpenFin.
12026
12294
  */
12027
- declare type PrebuiltContextMenuItem = 'separator' | 'undo' | 'redo' | 'cut' | 'copy' | 'copyImage' | 'paste' | 'selectAll' | 'spellCheck' | 'inspect' | 'reload' | 'navigateForward' | 'navigateBack' | 'print';
12295
+ declare type PrebuiltContextMenuItem = 'separator' | 'undo' | 'redo' | 'cut' | 'copy' | 'copyImage' | 'paste' | 'selectAll' | 'spellCheck' | 'inspect' | 'reload' | 'navigateForward' | 'navigateBack' | 'print' | 'snapToTop' | 'snapToBottom';
12028
12296
 
12029
12297
  /**
12030
12298
  * A script that is run before page load.
@@ -12722,6 +12990,12 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
12722
12990
  'create-window': VoidCall;
12723
12991
  'get-current-window': VoidCall;
12724
12992
  'get-current-window-sync': VoidCall;
12993
+ 'show-download-bubble': IdentityCall<{
12994
+ anchor?: OpenFin_2.Anchor;
12995
+ }, void>;
12996
+ 'update-download-bubble-anchor': IdentityCall<{
12997
+ anchor: OpenFin_2.Anchor;
12998
+ }, void>;
12725
12999
  'get-external-application-info': ApiCall<OpenFin_2.ApplicationIdentity, OpenFin_2.ExternalApplicationInfo>;
12726
13000
  'external-application-wrap': VoidCall;
12727
13001
  'external-application-wrap-sync': VoidCall;
@@ -12818,6 +13092,10 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
12818
13092
  request: any;
12819
13093
  response: any;
12820
13094
  };
13095
+ 'set-theme-preferences': ApiCall<{
13096
+ preferences: OpenFin_2.ThemePreferences;
13097
+ }, OpenFin_2.NativeTheme>;
13098
+ 'get-theme-preferences': GetterCall<OpenFin_2.NativeTheme>;
12821
13099
  'get-version': GetterCall<string>;
12822
13100
  'clear-cache': ApiCall<OpenFin_2.ClearCacheOption, void>;
12823
13101
  'delete-cache-request': VoidCall;
@@ -12905,6 +13183,9 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
12905
13183
  'write-to-log': ApiCall<{
12906
13184
  level: string;
12907
13185
  message: string;
13186
+ target?: {
13187
+ type?: 'app.log' | 'debug.log';
13188
+ };
12908
13189
  }, void>;
12909
13190
  'open-url-with-browser': ApiCall<{
12910
13191
  url: string;
@@ -13068,6 +13349,15 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
13068
13349
  request: void;
13069
13350
  response: OpenFin_2.ExtensionInfo[];
13070
13351
  };
13352
+ 'set-theme-palette': ApiCall<{
13353
+ themePalette: Array<OpenFin_2.ThemePalette>;
13354
+ }, void> & {
13355
+ themePalette: Array<OpenFin_2.ThemePalette>;
13356
+ };
13357
+ 'get-theme-palette': ApiCall<void, Array<OpenFin_2.ThemePalette>> & {
13358
+ request: void;
13359
+ response: Array<OpenFin_2.ThemePalette>;
13360
+ };
13071
13361
  'fdc3-add-context-listener': VoidCall;
13072
13362
  'fdc3-add-intent-listener': VoidCall;
13073
13363
  'fdc3-raise-intent': VoidCall;
@@ -14143,6 +14433,15 @@ declare type Size = TransitionBase & {
14143
14433
  height: number;
14144
14434
  };
14145
14435
 
14436
+ /**
14437
+ * Generated when a window is snapped to a screen edge.
14438
+ * @interface
14439
+ */
14440
+ declare type SnappedEvent = BoundsEvent & {
14441
+ type: 'snapped';
14442
+ snapLocation: 'top' | 'bottom';
14443
+ };
14444
+
14146
14445
  /**
14147
14446
  * @interface
14148
14447
  */
@@ -14287,6 +14586,52 @@ declare class SnapshotSourceModule extends Base {
14287
14586
  wrap(identity: OpenFin_2.ApplicationIdentity): Promise<SnapshotSource>;
14288
14587
  }
14289
14588
 
14589
+ /**
14590
+ * Generated when a window enters or exits a snap zone during drag.
14591
+ * This event fires whenever the snap zone state changes (entry or exit).
14592
+ * @interface
14593
+ */
14594
+ declare type SnapZoneChangedEvent = BaseEvent_5 & {
14595
+ type: 'snap-zone-changed';
14596
+ /**
14597
+ * Array of locations that the window is currently in snap zones for.
14598
+ * Empty array indicates the window is not in any snap zone.
14599
+ * Can contain multiple locations if the window is in multiple zones simultaneously.
14600
+ */
14601
+ locations: Array<'top' | 'bottom'>;
14602
+ };
14603
+
14604
+ /**
14605
+ * @interface
14606
+ *
14607
+ * Configures snap zone behavior for a window. When enabled, the window will automatically snap to screen edges
14608
+ * when dragged near them during user drag interactions.
14609
+ */
14610
+ declare type SnapZoneOptions = {
14611
+ /**
14612
+ * Whether snap zone functionality is enabled for this window.
14613
+ *
14614
+ * @default false
14615
+ */
14616
+ enabled: boolean;
14617
+ /**
14618
+ * The distance in pixels from the screen edge that triggers the snap zone.
14619
+ * When the window is dragged within this threshold of the top or bottom edge,
14620
+ * it will be considered in a snap zone.
14621
+ *
14622
+ * @default 50
14623
+ */
14624
+ threshold?: number;
14625
+ /**
14626
+ * Ordered array of edge preferences when the window is in multiple snap zones simultaneously.
14627
+ * The first edge in the array that the window is in will be used for snapping.
14628
+ * If not provided, defaults to ['top', 'bottom'] (preferring top over bottom).
14629
+ *
14630
+ * @default ['top', 'bottom']
14631
+ */
14632
+ locationPreference?: Array<'top' | 'bottom'>;
14633
+ };
14634
+
14290
14635
  /**
14291
14636
  * Generated when an application has started.
14292
14637
  * @interface
@@ -15064,13 +15409,14 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
15064
15409
  * Writes the passed message into both the log file and the console.
15065
15410
  * @param level The log level for the entry. Can be either "info", "warning" or "error"
15066
15411
  * @param message The log message text
15412
+ * @param target The log stream this message will be sent to, defaults to 'debug.log'. Specify 'app.log' to log to the app log of the sending View / Window. Note, when using `app.log`, it will always log to app.log irrespective of the `enableAppLogging` setting for the sender. This is particularly useful if you wish to log certain things from a View / Window but ignore generic console logs.
15067
15413
  *
15068
15414
  * @example
15069
15415
  * ```js
15070
- * fin.System.log("info", "An example log message").then(() => console.log('Log info message')).catch(err => console.log(err));
15416
+ * fin.System.log("info", "An example log message", { type: 'debug.log' }).then(() => console.log('Log info message')).catch(err => console.log(err));
15071
15417
  * ```
15072
15418
  */
15073
- log(level: string, message: string): Promise<void>;
15419
+ log(level: string, message: string, target?: OpenFin_2.LogTarget): Promise<void>;
15074
15420
  /**
15075
15421
  * Opens the passed URL in the default web browser.
15076
15422
  *
@@ -15809,11 +16155,123 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
15809
16155
  * Not indended for general use, will be used by the `@openfin/workspace-platform` package.
15810
16156
  */
15811
16157
  serveAsset(options: OpenFin_2.ServeAssetOptions): Promise<OpenFin_2.ServedAssetInfo>;
16158
+ /**
16159
+ * Get's the native theme preferences for the current runtime.
16160
+ * Prefer css media-queries wherever possible, but this can be useful to see if the system setting has been overridden.
16161
+ * See @link OpenFin.NativeTheme for more information.
16162
+ * @example Theme selector menu
16163
+ * ```ts
16164
+ async function handleThemeMenu(e: React.MouseEvent<HTMLDivElement>) {
16165
+ const currentTheme = await fin.System.getThemePreferences();
16166
+ const result = await (fin.me as OpenFin.Window).showPopupMenu({
16167
+ x: e.clientX,
16168
+ y: e.clientY,
16169
+ template: [
16170
+ {
16171
+ label: 'Light',
16172
+ type: 'checkbox',
16173
+ checked: currentTheme.themeSource === 'light',
16174
+ data: { themeSource: 'light' } as const
16175
+ },
16176
+ {
16177
+ label: 'Dark',
16178
+ type: 'checkbox',
16179
+ checked: currentTheme.themeSource === 'dark',
16180
+ data: { themeSource: 'dark' } as const
16181
+ },
16182
+ {
16183
+ label: 'System',
16184
+ type: 'checkbox',
16185
+ checked: currentTheme.themeSource === 'system',
16186
+ data: { themeSource: 'system' } as const
16187
+ }
16188
+ ]
16189
+ });
16190
+ if (result.result === 'clicked') {
16191
+ await fin.System.setThemePreferences(result.data);
16192
+ }
16193
+ }
16194
+ ```
16195
+ */
16196
+ getThemePreferences(): Promise<OpenFin_2.NativeTheme>;
16197
+ /**
16198
+ * Sets the native theme preferences for the current runtime.
16199
+ * Can be used to force runtime-wide light or dark mode.
16200
+ * @important Due to this impacting all applications on a runtime, this method is only usable if a security realm has been set.
16201
+ * @example Theme selector menu
16202
+ * ```ts
16203
+ async function handleThemeMenu(e: React.MouseEvent<HTMLDivElement>) {
16204
+ const currentTheme = await fin.System.getThemePreferences();
16205
+ const result = await (fin.me as OpenFin.Window).showPopupMenu({
16206
+ x: e.clientX,
16207
+ y: e.clientY,
16208
+ template: [
16209
+ {
16210
+ label: 'Light',
16211
+ type: 'checkbox',
16212
+ checked: currentTheme.themeSource === 'light',
16213
+ data: { themeSource: 'light' } as const
16214
+ },
16215
+ {
16216
+ label: 'Dark',
16217
+ type: 'checkbox',
16218
+ checked: currentTheme.themeSource === 'dark',
16219
+ data: { themeSource: 'dark' } as const
16220
+ },
16221
+ {
16222
+ label: 'System',
16223
+ type: 'checkbox',
16224
+ checked: currentTheme.themeSource === 'system',
16225
+ data: { themeSource: 'system' } as const
16226
+ }
16227
+ ]
16228
+ });
16229
+ if (result.result === 'clicked') {
16230
+ await fin.System.setThemePreferences(result.data);
16231
+ }
16232
+ }
16233
+ ```
16234
+ */
16235
+ setThemePreferences(preferences: OpenFin_2.ThemePreferences): Promise<OpenFin_2.ThemePreferences>;
15812
16236
  /**
15813
16237
  * Launches the Log Uploader. Full documentation can be found [here](https://resources.here.io/docs/core/develop/debug/log-uploader/).
15814
16238
  * @experimental
15815
16239
  */
15816
16240
  launchLogUploader(options: OpenFin_2.LogUploaderOptions): Promise<void>;
16241
+ /**
16242
+ * Overrides original Chromium theme color providers matching key (currently except high contrast ones). Only colors passed in the map will be overridden.
16243
+ * @param overrides - Array of ColorProviderOverrides objects
16244
+ * @example
16245
+ * ```ts
16246
+ * await fin.System.setThemePalette([
16247
+ * {
16248
+ * colorProviderKey: { colorMode: 'light' },
16249
+ * colorsMap: {
16250
+ * kColorLabelForeground: 4278190080,
16251
+ * kColorBubbleBackground: 4293980400
16252
+ * }
16253
+ * },
16254
+ * {
16255
+ * colorProviderKey: { colorMode: 'dark' },
16256
+ * colorsMap: {
16257
+ * kColorLabelForeground: 4293980400,
16258
+ * kColorBubbleBackground: 4293980400
16259
+ * }
16260
+ * }
16261
+ * ]);
16262
+ * ```
16263
+ */
16264
+ setThemePalette(themePalette: Array<OpenFin_2.ThemePalette>): Promise<void>;
16265
+ /**
16266
+ * Retrieves currently used color overrides
16267
+ * @returns Array of ColorProviderOverrides objects
16268
+ * @example
16269
+ * ```ts
16270
+ * const themePalette = await fin.System.getThemePalette();
16271
+ * console.log(themePalette);
16272
+ * ```
16273
+ */
16274
+ getThemePalette(): Promise<Array<OpenFin_2.ThemePalette>>;
15817
16275
  }
15818
16276
 
15819
16277
  /**
@@ -15852,6 +16310,8 @@ declare namespace SystemEvents {
15852
16310
  ExtensionsInstallFailedEvent,
15853
16311
  ExtensionInstallFailedEvent,
15854
16312
  ExtensionsInitializationFailedEvent,
16313
+ ThemePaletteChangedEvent,
16314
+ NativeThemeUpdatedEvent,
15855
16315
  Event_11 as Event,
15856
16316
  SystemEvent,
15857
16317
  EventType_8 as EventType,
@@ -15975,6 +16435,7 @@ declare class TabStack extends LayoutNode {
15975
16435
  * and rendered at the front of the tab-stack, while the underlying order of tabs will remain unchanged.
15976
16436
  * If that happens and then getViews() is called, it will return the identities in a different order than
15977
16437
  * than the currently rendered tab order.
16438
+ * Note: This issue does not occur when using `tabOverflowBehavior: 'scroll'` in the layout configuration.
15978
16439
  *
15979
16440
  *
15980
16441
  * @throws If the {@link TabStack} has been destroyed.
@@ -15999,6 +16460,7 @@ declare class TabStack extends LayoutNode {
15999
16460
  *
16000
16461
  * @remarks Known Issue: If adding a view overflows the tab-container, the added view will be set as active
16001
16462
  * and rendered at the front of the tab-stack, while the underlying order of tabs will remain unchanged.
16463
+ * Note: This issue does not occur when using `tabOverflowBehavior: 'scroll'` in the layout configuration.
16002
16464
  *
16003
16465
  * @param view The identity of an existing view to add, or options to create a view.
16004
16466
  * @param options Optional view options: index number used to insert the view into the stack at that index. Defaults to 0 (front of the stack)
@@ -16120,6 +16582,109 @@ declare type TerminateExternalRequestType = {
16120
16582
  killTree: boolean;
16121
16583
  };
16122
16584
 
16585
+ /**
16586
+ * String literal type of all supported theme color IDs.
16587
+ * Useful wherever you need to refer to a color slot by name.
16588
+ * @interface
16589
+ */
16590
+ declare type ThemeColorId = keyof ThemeColorsMap;
16591
+
16592
+ /**
16593
+ * All supported color slots for the Download Bubble and related UI.
16594
+ * @interface
16595
+ */
16596
+ declare interface ThemeColorsMap {
16597
+ /**
16598
+ * Enterprise/Window/Background – bubble header and footer background.
16599
+ */
16600
+ kColorBubbleBackground?: number;
16601
+ /**
16602
+ * Windows only – Enterprise/Window/Border.
16603
+ */
16604
+ kColorBubbleBorder?: number;
16605
+ /**
16606
+ * Windows only – Enterprise/Window/Border (large shadow).
16607
+ */
16608
+ kColorBubbleBorderShadowLarge?: number;
16609
+ /**
16610
+ * Windows only – Enterprise/Window/Border (small shadow).
16611
+ */
16612
+ kColorBubbleBorderShadowSmall?: number;
16613
+ /**
16614
+ * Enterprise/Window/Background – downloaded item row background.
16615
+ */
16616
+ kColorDialogBackground?: number;
16617
+ /**
16618
+ * Enterprise/Search Result/Background/Hover – download item row hover.
16619
+ */
16620
+ kColorDownloadBubbleRowHover?: number;
16621
+ /**
16622
+ * Enterprise/Window/Icon – “Show all downloads” icon color.
16623
+ */
16624
+ kColorDownloadBubbleShowAllDownloadsIcon?: number;
16625
+ /**
16626
+ * Enterprise/Search Result/Background/Hover – full download history
16627
+ * button (full row) hover background.
16628
+ */
16629
+ kColorHoverButtonBackgroundHovered?: number;
16630
+ /**
16631
+ * Shared/Icon Button/Subtle/Icon/Default – SVG icon color
16632
+ * (except full download history button).
16633
+ */
16634
+ kColorIcon?: number;
16635
+ /**
16636
+ * Enterprise/Window/Text/Base – main label text color.
16637
+ * May be post-processed to increase readability on kColorDialogBackground
16638
+ * (can be disabled via transparent kColorLabelBackground).
16639
+ */
16640
+ kColorLabelForeground?: number;
16641
+ /**
16642
+ * Label background used for readability adjustment.
16643
+ * Set to transparent (0) to disable Chromium’s readability alignment logic.
16644
+ */
16645
+ kColorLabelBackground?: number;
16646
+ /**
16647
+ * Enterprise/Window/Text/Soft – secondary text color.
16648
+ * May be post-processed to increase readability on kColorDialogBackground
16649
+ * (can be disabled via transparent kColorLabelBackground).
16650
+ */
16651
+ kColorSecondaryForeground?: number;
16652
+ }
16653
+
16654
+ /**
16655
+ * Defines a set of color overrides for Chromium UI surfaces based on a theme
16656
+ * provider (e.g., light or dark mode).
16657
+ * @interface
16658
+ */
16659
+ declare type ThemePalette = {
16660
+ /**
16661
+ * Identifies the color provider mode that the palette applies to.
16662
+ */
16663
+ colorProviderKey: {
16664
+ /**
16665
+ * The UI color mode that this palette is intended to style.
16666
+ */
16667
+ colorMode: 'light' | 'dark';
16668
+ };
16669
+ /**
16670
+ * A mapping of known Chromium color IDs to ARGB values (0xAARRGGBB).
16671
+ */
16672
+ colorsMap: ThemeColorsMap;
16673
+ };
16674
+
16675
+ /**
16676
+ * An event that fires when the system theme palette is changed.
16677
+ */
16678
+ declare type ThemePaletteChangedEvent = BaseEvent_9 & {
16679
+ type: 'theme-palette-changed';
16680
+ themePalette: OpenFin_2.ThemePalette;
16681
+ };
16682
+
16683
+ /**
16684
+ * Settable options for the native theme of the operating system.
16685
+ */
16686
+ declare type ThemePreferences = Pick<NativeTheme, 'themeSource'>;
16687
+
16123
16688
  /**
16124
16689
  * @interface
16125
16690
  */
@@ -19307,6 +19872,62 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
19307
19872
  * To print the views embedded in their page context, set `content` to `screenshot`.
19308
19873
  */
19309
19874
  print(options?: OpenFin_2.WindowPrintOptions): Promise<void>;
19875
+ /**
19876
+ * Displays the download bubble UI. If an anchor is provided, the bubble
19877
+ * will be positioned according to the specified rectangle and anchor point.
19878
+ *
19879
+ * @param {OpenFin.Anchor} options
19880
+ * Anchor configuration used to position the download bubble. This includes
19881
+ * the bounding rectangle and the anchor location within that rectangle.
19882
+ *
19883
+ * @returns {Promise<void>}
19884
+ * A promise that resolves once the request to show the download bubble
19885
+ * has been processed.
19886
+ * @example
19887
+ * ```js
19888
+ * const w = fin.Window.getCurrentSync();
19889
+ * const el = document.getElementById("download-bubble-button");
19890
+ * const rect = el.getBoundingClientRect();
19891
+ * const anchor = {
19892
+ * bounds: rect,
19893
+ * location: "topRight"
19894
+ * };
19895
+ * w.showDownloadBubble(anchor);
19896
+ * ```
19897
+ */
19898
+ showDownloadBubble(anchor?: OpenFin_2.Anchor): Promise<void>;
19899
+ /**
19900
+ * Updates the anchor used for positioning the download bubble. This allows
19901
+ * moving the bubble reactively—for example, in response to window resizes,
19902
+ * layout changes, or DOM element repositioning.
19903
+ *
19904
+ * @param {OpenFin.Anchor} options
19905
+ * New anchor configuration describing the updated position and anchor
19906
+ * location for the download bubble.
19907
+ *
19908
+ * @returns {Promise<void>}
19909
+ * A promise that resolves once the anchor update has been applied.
19910
+ * @example
19911
+ * ```js
19912
+ * var w = fin.Window.getCurrentSync();
19913
+ * w.on('download-button-visibility-changed', (evt) => {
19914
+ * if (evt.visible) {
19915
+ * const el = document.getElementById("download-bubble-button");
19916
+ * //We show our button and get it's bounding rect
19917
+ * el.classList.remove("hidden");
19918
+ * const rect = el.getBoundingClientRect();
19919
+ * const anchor = {
19920
+ * bounds: rect,
19921
+ * location: "topRight"
19922
+ * }
19923
+ * w.updateDownloadBubbleAnchor(anchor);
19924
+ * } else {
19925
+ * //We hide our button
19926
+ * document.getElementById("download-bubble-button")?.classList.add("hidden");
19927
+ * }
19928
+ });
19929
+ */
19930
+ updateDownloadBubbleAnchor(anchor: OpenFin_2.Anchor): Promise<void>;
19310
19931
  }
19311
19932
 
19312
19933
  /**
@@ -19461,6 +20082,8 @@ declare namespace WindowEvents {
19461
20082
  BoundsChangingEvent,
19462
20083
  DisabledMovementBoundsChangedEvent,
19463
20084
  DisabledMovementBoundsChangingEvent,
20085
+ SnappedEvent,
20086
+ SnapZoneChangedEvent,
19464
20087
  UserBoundsChangeEvent,
19465
20088
  BeginUserBoundsChangingEvent,
19466
20089
  EndUserBoundsChangingEvent,
@@ -19500,6 +20123,8 @@ declare namespace WindowEvents {
19500
20123
  NonPropagatedWindowEvent,
19501
20124
  ShowAllDownloadsEvent,
19502
20125
  DownloadShelfVisibilityChangedEvent,
20126
+ DownloadButtonVisibilityChangedEvent,
20127
+ DownloadButtonIconUpdatedEvent,
19503
20128
  WindowSourcedEvent,
19504
20129
  WillPropagateWindowEvent,
19505
20130
  Event_6 as Event,
@@ -19703,7 +20328,7 @@ declare type WindowShowRequestedEvent = ShowRequestedEvent;
19703
20328
  * A union of all events that emit natively on the `Window` topic, i.e. excluding those that propagate
19704
20329
  * from {@link OpenFin.ViewEvents}.
19705
20330
  */
19706
- declare type WindowSourcedEvent = WebContentsEvents.Event<'window'> | WindowViewEvent | AuthRequestedEvent | BeginUserBoundsChangingEvent | BoundsChangedEvent | BoundsChangingEvent | ContextChangedEvent | CloseRequestedEvent | ClosedEvent_2 | ClosingEvent | DisabledMovementBoundsChangedEvent | DisabledMovementBoundsChangingEvent | EmbeddedEvent | EndUserBoundsChangingEvent | ExternalProcessExitedEvent | ExternalProcessStartedEvent | HiddenEvent_2 | HotkeyEvent_2 | InitializedEvent_2 | LayoutInitializedEvent | LayoutReadyEvent | LayoutCreatedEvent | LayoutDestroyedEvent | LayoutSnapshotAppliedEvent | MaximizedEvent | MinimizedEvent | OptionsChangedEvent | PerformanceReportEvent | PreloadScriptsStateChangedEvent | PreloadScriptsStateChangingEvent | ReloadedEvent | RestoredEvent | ShowRequestedEvent | ShownEvent_2 | UserMovementDisabledEvent | UserMovementEnabledEvent | WillMoveEvent | WillResizeEvent | ShowAllDownloadsEvent | DownloadShelfVisibilityChangedEvent;
20331
+ declare type WindowSourcedEvent = WebContentsEvents.Event<'window'> | WindowViewEvent | AuthRequestedEvent | BeginUserBoundsChangingEvent | BoundsChangedEvent | BoundsChangingEvent | ContextChangedEvent | CloseRequestedEvent | ClosedEvent_2 | ClosingEvent | DisabledMovementBoundsChangedEvent | DisabledMovementBoundsChangingEvent | EmbeddedEvent | EndUserBoundsChangingEvent | ExternalProcessExitedEvent | ExternalProcessStartedEvent | HiddenEvent_2 | HotkeyEvent_2 | InitializedEvent_2 | LayoutInitializedEvent | LayoutReadyEvent | LayoutCreatedEvent | LayoutDestroyedEvent | LayoutSnapshotAppliedEvent | MaximizedEvent | MinimizedEvent | OptionsChangedEvent | PerformanceReportEvent | PreloadScriptsStateChangedEvent | PreloadScriptsStateChangingEvent | ReloadedEvent | RestoredEvent | ShowRequestedEvent | ShownEvent_2 | UserMovementDisabledEvent | UserMovementEnabledEvent | WillMoveEvent | WillResizeEvent | ShowAllDownloadsEvent | DownloadShelfVisibilityChangedEvent | DownloadButtonVisibilityChangedEvent | DownloadButtonIconUpdatedEvent | SnappedEvent | SnapZoneChangedEvent;
19707
20332
 
19708
20333
  /**
19709
20334
  * Generated when a child window starts loading.