@openfin/core 44.100.48 → 44.100.49

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.
@@ -4979,7 +4979,7 @@ declare type Event_10 = ApplicationEvents.Event | ApiReadyEvent | SnapshotApplie
4979
4979
  * under the {@link OpenFin.SystemEvents} namespace (payloads inherited from propagated events are defined in the namespace
4980
4980
  * from which they propagate).
4981
4981
  */
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;
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 | NativeThemeUpdatedEvent;
4983
4983
 
4984
4984
  /**
4985
4985
  * [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 +8590,42 @@ declare type LayoutOptions = {
8590
8590
  */
8591
8591
  preventDragIn?: boolean;
8592
8592
  /* Excluded from this release type: disableTabOverflowDropdown */
8593
+ /**
8594
+ * When set to 'scroll', enables horizontal scrolling of tabs when they overflow the stack width.
8595
+ * When set to 'dropdown' the default golden-layouts behavior will apply.
8596
+ *
8597
+ * Setting this to `scroll` may break styles written for the default dropdown behavior, as it significantly changes the dom structure and css of tabs.
8598
+ *
8599
+ * The DOM structure will be modified in this way:
8600
+ * - `lm_tabs` will be wrapped in a div with class `lm_scroll_shadow`. This div will be revealed by a mask on the tabs when they are overflowing.
8601
+ * - the `.newTabButton` (if enabled) will be a direct child of `.lm_header`
8602
+ *
8603
+ * **The following css variables are available to customize tab appearance:**
8604
+ *
8605
+ * - `--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`
8606
+ * - `--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).
8607
+ * - `--layout-tab-overflow-fade-size`: The width of the scroll shadows when tabs are overflowing. Default: `20px`
8608
+ * - `--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.
8609
+ *
8610
+ * **CSS Variables for advanced customization (dynamically updated and set on `lm_tabs`):**
8611
+ *
8612
+ * - `--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.
8613
+ * - `--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.
8614
+ * - `--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 only targeting Chrome > 137 you may want to use the `if()` function with left/right fade instead of this toggle.
8615
+ *
8616
+ * @example
8617
+ * ```css
8618
+ * .lm_tabs {
8619
+ * --layout-tab-width: 200px;
8620
+ * --layout-tab-min-width: 100px;
8621
+ * --layout-tab-overflow-fade-size: 20px;
8622
+ * --layout-tab-overflow-shadow-color: rgba(0, 0, 0, 0.3);
8623
+ * }
8624
+ * ```
8625
+ *
8626
+ * @defaultValue 'dropdown'
8627
+ */
8628
+ tabOverflowBehavior?: 'dropdown' | 'scroll';
8593
8629
  };
8594
8630
  /**
8595
8631
  * Content of the layout. There can only be one top-level LayoutItem in the content array.
@@ -9501,6 +9537,78 @@ declare type NamedEvent = IdentityEvent & {
9501
9537
  name: string;
9502
9538
  };
9503
9539
 
9540
+ /**
9541
+ * @interface
9542
+ *
9543
+ * Represents the native theme of the operating system.
9544
+ * This is used to determine how the application should render its UI based on the system's theme settings.
9545
+ * Defer to CSS properties whenever possible.
9546
+ *
9547
+ * Re-exported from Electron's `NativeTheme` type.
9548
+ */
9549
+ declare type NativeTheme = {
9550
+ /**
9551
+ * A `boolean` indicating whether Chromium is in forced colors mode, controlled by
9552
+ * system accessibility settings. Currently, Windows high contrast is the only
9553
+ * system setting that triggers forced colors mode.
9554
+ *
9555
+ * @platform win32
9556
+ */
9557
+ inForcedColorsMode: boolean;
9558
+ /**
9559
+ * A `boolean` that indicates the whether the user has chosen via system
9560
+ * accessibility settings to reduce transparency at the OS level.
9561
+ *
9562
+ */
9563
+ prefersReducedTransparency: boolean;
9564
+ /**
9565
+ * A `boolean` for if the OS / Chromium currently has a dark mode enabled or is
9566
+ * being instructed to show a dark-style UI. If you want to modify this value you
9567
+ * should use `themeSource` below.
9568
+ *
9569
+ */
9570
+ shouldUseDarkColors: boolean;
9571
+ /**
9572
+ * A `boolean` property indicating whether or not the system theme has been set to
9573
+ * dark or light.
9574
+ *
9575
+ * On Windows this property distinguishes between system and app light/dark theme,
9576
+ * returning `true` if the system theme is set to dark theme and `false` otherwise.
9577
+ * On macOS the return value will be the same as `nativeTheme.shouldUseDarkColors`.
9578
+ *
9579
+ * @platform darwin,win32
9580
+ */
9581
+ shouldUseDarkColorsForSystemIntegratedUI: boolean;
9582
+ /**
9583
+ * A `boolean` for if the OS / Chromium currently has high-contrast mode enabled or
9584
+ * is being instructed to show a high-contrast UI.
9585
+ *
9586
+ * @platform darwin,win32
9587
+ */
9588
+ shouldUseHighContrastColors: boolean;
9589
+ /**
9590
+ * A `boolean` for if the OS / Chromium currently has an inverted color scheme or
9591
+ * is being instructed to use an inverted color scheme.
9592
+ *
9593
+ * @platform darwin,win32
9594
+ */
9595
+ shouldUseInvertedColorScheme: boolean;
9596
+ /**
9597
+ * A `string` property that can be `system`, `light` or `dark`. It is used (via `setTheme) to
9598
+ * override and supersede the value that Chromium has chosen to use internally.
9599
+ */
9600
+ themeSource: 'system' | 'light' | 'dark';
9601
+ };
9602
+
9603
+ /**
9604
+ * Generated when the operating system's theme preferences change.
9605
+ * Occurs when dark mode, high contrast mode, or inverted color scheme settings are modified.
9606
+ */
9607
+ declare type NativeThemeUpdatedEvent = BaseEvent_9 & {
9608
+ type: 'native-theme-updated';
9609
+ theme: OpenFin_2.NativeTheme;
9610
+ };
9611
+
9504
9612
  /**
9505
9613
  * @interface
9506
9614
  */
@@ -9892,6 +10000,8 @@ declare namespace OpenFin_2 {
9892
10000
  Manifest,
9893
10001
  LayoutContent,
9894
10002
  LayoutItemConfig,
10003
+ ThemePreferences,
10004
+ NativeTheme,
9895
10005
  LayoutRow,
9896
10006
  LayoutColumn,
9897
10007
  LayoutComponent,
@@ -12819,6 +12929,10 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
12819
12929
  request: any;
12820
12930
  response: any;
12821
12931
  };
12932
+ 'set-theme-preferences': ApiCall<{
12933
+ preferences: OpenFin_2.ThemePreferences;
12934
+ }, OpenFin_2.NativeTheme>;
12935
+ 'get-theme-preferences': GetterCall<OpenFin_2.NativeTheme>;
12822
12936
  'get-version': GetterCall<string>;
12823
12937
  'clear-cache': ApiCall<OpenFin_2.ClearCacheOption, void>;
12824
12938
  'delete-cache-request': VoidCall;
@@ -15865,6 +15979,84 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
15865
15979
  * Not indended for general use, will be used by the `@openfin/workspace-platform` package.
15866
15980
  */
15867
15981
  serveAsset(options: OpenFin_2.ServeAssetOptions): Promise<OpenFin_2.ServedAssetInfo>;
15982
+ /**
15983
+ * Get's the native theme preferences for the current runtime.
15984
+ * Prefer css media-queries wherever possible, but this can be useful to see if the system setting has been overridden.
15985
+ * See @link OpenFin.NativeTheme for more information.
15986
+ * @example Theme selector menu
15987
+ * ```ts
15988
+ async function handleThemeMenu(e: React.MouseEvent<HTMLDivElement>) {
15989
+ const currentTheme = await fin.System.getThemePreferences();
15990
+ const result = await (fin.me as OpenFin.Window).showPopupMenu({
15991
+ x: e.clientX,
15992
+ y: e.clientY,
15993
+ template: [
15994
+ {
15995
+ label: 'Light',
15996
+ type: 'checkbox',
15997
+ checked: currentTheme.themeSource === 'light',
15998
+ data: { themeSource: 'light' } as const
15999
+ },
16000
+ {
16001
+ label: 'Dark',
16002
+ type: 'checkbox',
16003
+ checked: currentTheme.themeSource === 'dark',
16004
+ data: { themeSource: 'dark' } as const
16005
+ },
16006
+ {
16007
+ label: 'System',
16008
+ type: 'checkbox',
16009
+ checked: currentTheme.themeSource === 'system',
16010
+ data: { themeSource: 'system' } as const
16011
+ }
16012
+ ]
16013
+ });
16014
+ if (result.result === 'clicked') {
16015
+ await fin.System.setThemePreferences(result.data);
16016
+ }
16017
+ }
16018
+ ```
16019
+ */
16020
+ getThemePreferences(): Promise<OpenFin_2.NativeTheme>;
16021
+ /**
16022
+ * Sets the native theme preferences for the current runtime.
16023
+ * Can be used to force runtime-wide light or dark mode.
16024
+ * @important Due to this impacting all applications on a runtime, this method is only usable if a security realm has been set.
16025
+ * @example Theme selector menu
16026
+ * ```ts
16027
+ async function handleThemeMenu(e: React.MouseEvent<HTMLDivElement>) {
16028
+ const currentTheme = await fin.System.getThemePreferences();
16029
+ const result = await (fin.me as OpenFin.Window).showPopupMenu({
16030
+ x: e.clientX,
16031
+ y: e.clientY,
16032
+ template: [
16033
+ {
16034
+ label: 'Light',
16035
+ type: 'checkbox',
16036
+ checked: currentTheme.themeSource === 'light',
16037
+ data: { themeSource: 'light' } as const
16038
+ },
16039
+ {
16040
+ label: 'Dark',
16041
+ type: 'checkbox',
16042
+ checked: currentTheme.themeSource === 'dark',
16043
+ data: { themeSource: 'dark' } as const
16044
+ },
16045
+ {
16046
+ label: 'System',
16047
+ type: 'checkbox',
16048
+ checked: currentTheme.themeSource === 'system',
16049
+ data: { themeSource: 'system' } as const
16050
+ }
16051
+ ]
16052
+ });
16053
+ if (result.result === 'clicked') {
16054
+ await fin.System.setThemePreferences(result.data);
16055
+ }
16056
+ }
16057
+ ```
16058
+ */
16059
+ setThemePreferences(preferences: OpenFin_2.ThemePreferences): Promise<OpenFin_2.ThemePreferences>;
15868
16060
  /**
15869
16061
  * Launches the Log Uploader. Full documentation can be found [here](https://resources.here.io/docs/core/develop/debug/log-uploader/).
15870
16062
  * @experimental
@@ -15908,6 +16100,7 @@ declare namespace SystemEvents {
15908
16100
  ExtensionsInstallFailedEvent,
15909
16101
  ExtensionInstallFailedEvent,
15910
16102
  ExtensionsInitializationFailedEvent,
16103
+ NativeThemeUpdatedEvent,
15911
16104
  Event_11 as Event,
15912
16105
  SystemEvent,
15913
16106
  EventType_8 as EventType,
@@ -16031,6 +16224,7 @@ declare class TabStack extends LayoutNode {
16031
16224
  * and rendered at the front of the tab-stack, while the underlying order of tabs will remain unchanged.
16032
16225
  * If that happens and then getViews() is called, it will return the identities in a different order than
16033
16226
  * than the currently rendered tab order.
16227
+ * Note: This issue does not occur when using `tabOverflowBehavior: 'scroll'` in the layout configuration.
16034
16228
  *
16035
16229
  *
16036
16230
  * @throws If the {@link TabStack} has been destroyed.
@@ -16055,6 +16249,7 @@ declare class TabStack extends LayoutNode {
16055
16249
  *
16056
16250
  * @remarks Known Issue: If adding a view overflows the tab-container, the added view will be set as active
16057
16251
  * and rendered at the front of the tab-stack, while the underlying order of tabs will remain unchanged.
16252
+ * Note: This issue does not occur when using `tabOverflowBehavior: 'scroll'` in the layout configuration.
16058
16253
  *
16059
16254
  * @param view The identity of an existing view to add, or options to create a view.
16060
16255
  * @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)
@@ -16176,6 +16371,11 @@ declare type TerminateExternalRequestType = {
16176
16371
  killTree: boolean;
16177
16372
  };
16178
16373
 
16374
+ /**
16375
+ * Settable options for the native theme of the operating system.
16376
+ */
16377
+ declare type ThemePreferences = Pick<NativeTheme, 'themeSource'>;
16378
+
16179
16379
  /**
16180
16380
  * @interface
16181
16381
  */
@@ -4979,7 +4979,7 @@ declare type Event_10 = ApplicationEvents.Event | ApiReadyEvent | SnapshotApplie
4979
4979
  * under the {@link OpenFin.SystemEvents} namespace (payloads inherited from propagated events are defined in the namespace
4980
4980
  * from which they propagate).
4981
4981
  */
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;
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 | NativeThemeUpdatedEvent;
4983
4983
 
4984
4984
  /**
4985
4985
  * [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 +8590,42 @@ declare type LayoutOptions = {
8590
8590
  */
8591
8591
  preventDragIn?: boolean;
8592
8592
  /* Excluded from this release type: disableTabOverflowDropdown */
8593
+ /**
8594
+ * When set to 'scroll', enables horizontal scrolling of tabs when they overflow the stack width.
8595
+ * When set to 'dropdown' the default golden-layouts behavior will apply.
8596
+ *
8597
+ * Setting this to `scroll` may break styles written for the default dropdown behavior, as it significantly changes the dom structure and css of tabs.
8598
+ *
8599
+ * The DOM structure will be modified in this way:
8600
+ * - `lm_tabs` will be wrapped in a div with class `lm_scroll_shadow`. This div will be revealed by a mask on the tabs when they are overflowing.
8601
+ * - the `.newTabButton` (if enabled) will be a direct child of `.lm_header`
8602
+ *
8603
+ * **The following css variables are available to customize tab appearance:**
8604
+ *
8605
+ * - `--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`
8606
+ * - `--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).
8607
+ * - `--layout-tab-overflow-fade-size`: The width of the scroll shadows when tabs are overflowing. Default: `20px`
8608
+ * - `--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.
8609
+ *
8610
+ * **CSS Variables for advanced customization (dynamically updated and set on `lm_tabs`):**
8611
+ *
8612
+ * - `--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.
8613
+ * - `--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.
8614
+ * - `--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 only targeting Chrome > 137 you may want to use the `if()` function with left/right fade instead of this toggle.
8615
+ *
8616
+ * @example
8617
+ * ```css
8618
+ * .lm_tabs {
8619
+ * --layout-tab-width: 200px;
8620
+ * --layout-tab-min-width: 100px;
8621
+ * --layout-tab-overflow-fade-size: 20px;
8622
+ * --layout-tab-overflow-shadow-color: rgba(0, 0, 0, 0.3);
8623
+ * }
8624
+ * ```
8625
+ *
8626
+ * @defaultValue 'dropdown'
8627
+ */
8628
+ tabOverflowBehavior?: 'dropdown' | 'scroll';
8593
8629
  };
8594
8630
  /**
8595
8631
  * Content of the layout. There can only be one top-level LayoutItem in the content array.
@@ -9501,6 +9537,78 @@ declare type NamedEvent = IdentityEvent & {
9501
9537
  name: string;
9502
9538
  };
9503
9539
 
9540
+ /**
9541
+ * @interface
9542
+ *
9543
+ * Represents the native theme of the operating system.
9544
+ * This is used to determine how the application should render its UI based on the system's theme settings.
9545
+ * Defer to CSS properties whenever possible.
9546
+ *
9547
+ * Re-exported from Electron's `NativeTheme` type.
9548
+ */
9549
+ declare type NativeTheme = {
9550
+ /**
9551
+ * A `boolean` indicating whether Chromium is in forced colors mode, controlled by
9552
+ * system accessibility settings. Currently, Windows high contrast is the only
9553
+ * system setting that triggers forced colors mode.
9554
+ *
9555
+ * @platform win32
9556
+ */
9557
+ inForcedColorsMode: boolean;
9558
+ /**
9559
+ * A `boolean` that indicates the whether the user has chosen via system
9560
+ * accessibility settings to reduce transparency at the OS level.
9561
+ *
9562
+ */
9563
+ prefersReducedTransparency: boolean;
9564
+ /**
9565
+ * A `boolean` for if the OS / Chromium currently has a dark mode enabled or is
9566
+ * being instructed to show a dark-style UI. If you want to modify this value you
9567
+ * should use `themeSource` below.
9568
+ *
9569
+ */
9570
+ shouldUseDarkColors: boolean;
9571
+ /**
9572
+ * A `boolean` property indicating whether or not the system theme has been set to
9573
+ * dark or light.
9574
+ *
9575
+ * On Windows this property distinguishes between system and app light/dark theme,
9576
+ * returning `true` if the system theme is set to dark theme and `false` otherwise.
9577
+ * On macOS the return value will be the same as `nativeTheme.shouldUseDarkColors`.
9578
+ *
9579
+ * @platform darwin,win32
9580
+ */
9581
+ shouldUseDarkColorsForSystemIntegratedUI: boolean;
9582
+ /**
9583
+ * A `boolean` for if the OS / Chromium currently has high-contrast mode enabled or
9584
+ * is being instructed to show a high-contrast UI.
9585
+ *
9586
+ * @platform darwin,win32
9587
+ */
9588
+ shouldUseHighContrastColors: boolean;
9589
+ /**
9590
+ * A `boolean` for if the OS / Chromium currently has an inverted color scheme or
9591
+ * is being instructed to use an inverted color scheme.
9592
+ *
9593
+ * @platform darwin,win32
9594
+ */
9595
+ shouldUseInvertedColorScheme: boolean;
9596
+ /**
9597
+ * A `string` property that can be `system`, `light` or `dark`. It is used (via `setTheme) to
9598
+ * override and supersede the value that Chromium has chosen to use internally.
9599
+ */
9600
+ themeSource: 'system' | 'light' | 'dark';
9601
+ };
9602
+
9603
+ /**
9604
+ * Generated when the operating system's theme preferences change.
9605
+ * Occurs when dark mode, high contrast mode, or inverted color scheme settings are modified.
9606
+ */
9607
+ declare type NativeThemeUpdatedEvent = BaseEvent_9 & {
9608
+ type: 'native-theme-updated';
9609
+ theme: OpenFin_2.NativeTheme;
9610
+ };
9611
+
9504
9612
  /**
9505
9613
  * @interface
9506
9614
  */
@@ -9892,6 +10000,8 @@ declare namespace OpenFin_2 {
9892
10000
  Manifest,
9893
10001
  LayoutContent,
9894
10002
  LayoutItemConfig,
10003
+ ThemePreferences,
10004
+ NativeTheme,
9895
10005
  LayoutRow,
9896
10006
  LayoutColumn,
9897
10007
  LayoutComponent,
@@ -12819,6 +12929,10 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
12819
12929
  request: any;
12820
12930
  response: any;
12821
12931
  };
12932
+ 'set-theme-preferences': ApiCall<{
12933
+ preferences: OpenFin_2.ThemePreferences;
12934
+ }, OpenFin_2.NativeTheme>;
12935
+ 'get-theme-preferences': GetterCall<OpenFin_2.NativeTheme>;
12822
12936
  'get-version': GetterCall<string>;
12823
12937
  'clear-cache': ApiCall<OpenFin_2.ClearCacheOption, void>;
12824
12938
  'delete-cache-request': VoidCall;
@@ -15865,6 +15979,84 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
15865
15979
  * Not indended for general use, will be used by the `@openfin/workspace-platform` package.
15866
15980
  */
15867
15981
  serveAsset(options: OpenFin_2.ServeAssetOptions): Promise<OpenFin_2.ServedAssetInfo>;
15982
+ /**
15983
+ * Get's the native theme preferences for the current runtime.
15984
+ * Prefer css media-queries wherever possible, but this can be useful to see if the system setting has been overridden.
15985
+ * See @link OpenFin.NativeTheme for more information.
15986
+ * @example Theme selector menu
15987
+ * ```ts
15988
+ async function handleThemeMenu(e: React.MouseEvent<HTMLDivElement>) {
15989
+ const currentTheme = await fin.System.getThemePreferences();
15990
+ const result = await (fin.me as OpenFin.Window).showPopupMenu({
15991
+ x: e.clientX,
15992
+ y: e.clientY,
15993
+ template: [
15994
+ {
15995
+ label: 'Light',
15996
+ type: 'checkbox',
15997
+ checked: currentTheme.themeSource === 'light',
15998
+ data: { themeSource: 'light' } as const
15999
+ },
16000
+ {
16001
+ label: 'Dark',
16002
+ type: 'checkbox',
16003
+ checked: currentTheme.themeSource === 'dark',
16004
+ data: { themeSource: 'dark' } as const
16005
+ },
16006
+ {
16007
+ label: 'System',
16008
+ type: 'checkbox',
16009
+ checked: currentTheme.themeSource === 'system',
16010
+ data: { themeSource: 'system' } as const
16011
+ }
16012
+ ]
16013
+ });
16014
+ if (result.result === 'clicked') {
16015
+ await fin.System.setThemePreferences(result.data);
16016
+ }
16017
+ }
16018
+ ```
16019
+ */
16020
+ getThemePreferences(): Promise<OpenFin_2.NativeTheme>;
16021
+ /**
16022
+ * Sets the native theme preferences for the current runtime.
16023
+ * Can be used to force runtime-wide light or dark mode.
16024
+ * @important Due to this impacting all applications on a runtime, this method is only usable if a security realm has been set.
16025
+ * @example Theme selector menu
16026
+ * ```ts
16027
+ async function handleThemeMenu(e: React.MouseEvent<HTMLDivElement>) {
16028
+ const currentTheme = await fin.System.getThemePreferences();
16029
+ const result = await (fin.me as OpenFin.Window).showPopupMenu({
16030
+ x: e.clientX,
16031
+ y: e.clientY,
16032
+ template: [
16033
+ {
16034
+ label: 'Light',
16035
+ type: 'checkbox',
16036
+ checked: currentTheme.themeSource === 'light',
16037
+ data: { themeSource: 'light' } as const
16038
+ },
16039
+ {
16040
+ label: 'Dark',
16041
+ type: 'checkbox',
16042
+ checked: currentTheme.themeSource === 'dark',
16043
+ data: { themeSource: 'dark' } as const
16044
+ },
16045
+ {
16046
+ label: 'System',
16047
+ type: 'checkbox',
16048
+ checked: currentTheme.themeSource === 'system',
16049
+ data: { themeSource: 'system' } as const
16050
+ }
16051
+ ]
16052
+ });
16053
+ if (result.result === 'clicked') {
16054
+ await fin.System.setThemePreferences(result.data);
16055
+ }
16056
+ }
16057
+ ```
16058
+ */
16059
+ setThemePreferences(preferences: OpenFin_2.ThemePreferences): Promise<OpenFin_2.ThemePreferences>;
15868
16060
  /**
15869
16061
  * Launches the Log Uploader. Full documentation can be found [here](https://resources.here.io/docs/core/develop/debug/log-uploader/).
15870
16062
  * @experimental
@@ -15908,6 +16100,7 @@ declare namespace SystemEvents {
15908
16100
  ExtensionsInstallFailedEvent,
15909
16101
  ExtensionInstallFailedEvent,
15910
16102
  ExtensionsInitializationFailedEvent,
16103
+ NativeThemeUpdatedEvent,
15911
16104
  Event_11 as Event,
15912
16105
  SystemEvent,
15913
16106
  EventType_8 as EventType,
@@ -16031,6 +16224,7 @@ declare class TabStack extends LayoutNode {
16031
16224
  * and rendered at the front of the tab-stack, while the underlying order of tabs will remain unchanged.
16032
16225
  * If that happens and then getViews() is called, it will return the identities in a different order than
16033
16226
  * than the currently rendered tab order.
16227
+ * Note: This issue does not occur when using `tabOverflowBehavior: 'scroll'` in the layout configuration.
16034
16228
  *
16035
16229
  *
16036
16230
  * @throws If the {@link TabStack} has been destroyed.
@@ -16055,6 +16249,7 @@ declare class TabStack extends LayoutNode {
16055
16249
  *
16056
16250
  * @remarks Known Issue: If adding a view overflows the tab-container, the added view will be set as active
16057
16251
  * and rendered at the front of the tab-stack, while the underlying order of tabs will remain unchanged.
16252
+ * Note: This issue does not occur when using `tabOverflowBehavior: 'scroll'` in the layout configuration.
16058
16253
  *
16059
16254
  * @param view The identity of an existing view to add, or options to create a view.
16060
16255
  * @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)
@@ -16176,6 +16371,11 @@ declare type TerminateExternalRequestType = {
16176
16371
  killTree: boolean;
16177
16372
  };
16178
16373
 
16374
+ /**
16375
+ * Settable options for the native theme of the operating system.
16376
+ */
16377
+ declare type ThemePreferences = Pick<NativeTheme, 'themeSource'>;
16378
+
16179
16379
  /**
16180
16380
  * @interface
16181
16381
  */
@@ -4979,7 +4979,7 @@ declare type Event_10 = ApplicationEvents.Event | ApiReadyEvent | SnapshotApplie
4979
4979
  * under the {@link OpenFin.SystemEvents} namespace (payloads inherited from propagated events are defined in the namespace
4980
4980
  * from which they propagate).
4981
4981
  */
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;
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 | NativeThemeUpdatedEvent;
4983
4983
 
4984
4984
  /**
4985
4985
  * [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 +8590,42 @@ declare type LayoutOptions = {
8590
8590
  */
8591
8591
  preventDragIn?: boolean;
8592
8592
  /* Excluded from this release type: disableTabOverflowDropdown */
8593
+ /**
8594
+ * When set to 'scroll', enables horizontal scrolling of tabs when they overflow the stack width.
8595
+ * When set to 'dropdown' the default golden-layouts behavior will apply.
8596
+ *
8597
+ * Setting this to `scroll` may break styles written for the default dropdown behavior, as it significantly changes the dom structure and css of tabs.
8598
+ *
8599
+ * The DOM structure will be modified in this way:
8600
+ * - `lm_tabs` will be wrapped in a div with class `lm_scroll_shadow`. This div will be revealed by a mask on the tabs when they are overflowing.
8601
+ * - the `.newTabButton` (if enabled) will be a direct child of `.lm_header`
8602
+ *
8603
+ * **The following css variables are available to customize tab appearance:**
8604
+ *
8605
+ * - `--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`
8606
+ * - `--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).
8607
+ * - `--layout-tab-overflow-fade-size`: The width of the scroll shadows when tabs are overflowing. Default: `20px`
8608
+ * - `--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.
8609
+ *
8610
+ * **CSS Variables for advanced customization (dynamically updated and set on `lm_tabs`):**
8611
+ *
8612
+ * - `--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.
8613
+ * - `--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.
8614
+ * - `--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 only targeting Chrome > 137 you may want to use the `if()` function with left/right fade instead of this toggle.
8615
+ *
8616
+ * @example
8617
+ * ```css
8618
+ * .lm_tabs {
8619
+ * --layout-tab-width: 200px;
8620
+ * --layout-tab-min-width: 100px;
8621
+ * --layout-tab-overflow-fade-size: 20px;
8622
+ * --layout-tab-overflow-shadow-color: rgba(0, 0, 0, 0.3);
8623
+ * }
8624
+ * ```
8625
+ *
8626
+ * @defaultValue 'dropdown'
8627
+ */
8628
+ tabOverflowBehavior?: 'dropdown' | 'scroll';
8593
8629
  };
8594
8630
  /**
8595
8631
  * Content of the layout. There can only be one top-level LayoutItem in the content array.
@@ -9501,6 +9537,78 @@ declare type NamedEvent = IdentityEvent & {
9501
9537
  name: string;
9502
9538
  };
9503
9539
 
9540
+ /**
9541
+ * @interface
9542
+ *
9543
+ * Represents the native theme of the operating system.
9544
+ * This is used to determine how the application should render its UI based on the system's theme settings.
9545
+ * Defer to CSS properties whenever possible.
9546
+ *
9547
+ * Re-exported from Electron's `NativeTheme` type.
9548
+ */
9549
+ declare type NativeTheme = {
9550
+ /**
9551
+ * A `boolean` indicating whether Chromium is in forced colors mode, controlled by
9552
+ * system accessibility settings. Currently, Windows high contrast is the only
9553
+ * system setting that triggers forced colors mode.
9554
+ *
9555
+ * @platform win32
9556
+ */
9557
+ inForcedColorsMode: boolean;
9558
+ /**
9559
+ * A `boolean` that indicates the whether the user has chosen via system
9560
+ * accessibility settings to reduce transparency at the OS level.
9561
+ *
9562
+ */
9563
+ prefersReducedTransparency: boolean;
9564
+ /**
9565
+ * A `boolean` for if the OS / Chromium currently has a dark mode enabled or is
9566
+ * being instructed to show a dark-style UI. If you want to modify this value you
9567
+ * should use `themeSource` below.
9568
+ *
9569
+ */
9570
+ shouldUseDarkColors: boolean;
9571
+ /**
9572
+ * A `boolean` property indicating whether or not the system theme has been set to
9573
+ * dark or light.
9574
+ *
9575
+ * On Windows this property distinguishes between system and app light/dark theme,
9576
+ * returning `true` if the system theme is set to dark theme and `false` otherwise.
9577
+ * On macOS the return value will be the same as `nativeTheme.shouldUseDarkColors`.
9578
+ *
9579
+ * @platform darwin,win32
9580
+ */
9581
+ shouldUseDarkColorsForSystemIntegratedUI: boolean;
9582
+ /**
9583
+ * A `boolean` for if the OS / Chromium currently has high-contrast mode enabled or
9584
+ * is being instructed to show a high-contrast UI.
9585
+ *
9586
+ * @platform darwin,win32
9587
+ */
9588
+ shouldUseHighContrastColors: boolean;
9589
+ /**
9590
+ * A `boolean` for if the OS / Chromium currently has an inverted color scheme or
9591
+ * is being instructed to use an inverted color scheme.
9592
+ *
9593
+ * @platform darwin,win32
9594
+ */
9595
+ shouldUseInvertedColorScheme: boolean;
9596
+ /**
9597
+ * A `string` property that can be `system`, `light` or `dark`. It is used (via `setTheme) to
9598
+ * override and supersede the value that Chromium has chosen to use internally.
9599
+ */
9600
+ themeSource: 'system' | 'light' | 'dark';
9601
+ };
9602
+
9603
+ /**
9604
+ * Generated when the operating system's theme preferences change.
9605
+ * Occurs when dark mode, high contrast mode, or inverted color scheme settings are modified.
9606
+ */
9607
+ declare type NativeThemeUpdatedEvent = BaseEvent_9 & {
9608
+ type: 'native-theme-updated';
9609
+ theme: OpenFin_2.NativeTheme;
9610
+ };
9611
+
9504
9612
  /**
9505
9613
  * @interface
9506
9614
  */
@@ -9892,6 +10000,8 @@ declare namespace OpenFin_2 {
9892
10000
  Manifest,
9893
10001
  LayoutContent,
9894
10002
  LayoutItemConfig,
10003
+ ThemePreferences,
10004
+ NativeTheme,
9895
10005
  LayoutRow,
9896
10006
  LayoutColumn,
9897
10007
  LayoutComponent,
@@ -12819,6 +12929,10 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
12819
12929
  request: any;
12820
12930
  response: any;
12821
12931
  };
12932
+ 'set-theme-preferences': ApiCall<{
12933
+ preferences: OpenFin_2.ThemePreferences;
12934
+ }, OpenFin_2.NativeTheme>;
12935
+ 'get-theme-preferences': GetterCall<OpenFin_2.NativeTheme>;
12822
12936
  'get-version': GetterCall<string>;
12823
12937
  'clear-cache': ApiCall<OpenFin_2.ClearCacheOption, void>;
12824
12938
  'delete-cache-request': VoidCall;
@@ -15865,6 +15979,84 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
15865
15979
  * Not indended for general use, will be used by the `@openfin/workspace-platform` package.
15866
15980
  */
15867
15981
  serveAsset(options: OpenFin_2.ServeAssetOptions): Promise<OpenFin_2.ServedAssetInfo>;
15982
+ /**
15983
+ * Get's the native theme preferences for the current runtime.
15984
+ * Prefer css media-queries wherever possible, but this can be useful to see if the system setting has been overridden.
15985
+ * See @link OpenFin.NativeTheme for more information.
15986
+ * @example Theme selector menu
15987
+ * ```ts
15988
+ async function handleThemeMenu(e: React.MouseEvent<HTMLDivElement>) {
15989
+ const currentTheme = await fin.System.getThemePreferences();
15990
+ const result = await (fin.me as OpenFin.Window).showPopupMenu({
15991
+ x: e.clientX,
15992
+ y: e.clientY,
15993
+ template: [
15994
+ {
15995
+ label: 'Light',
15996
+ type: 'checkbox',
15997
+ checked: currentTheme.themeSource === 'light',
15998
+ data: { themeSource: 'light' } as const
15999
+ },
16000
+ {
16001
+ label: 'Dark',
16002
+ type: 'checkbox',
16003
+ checked: currentTheme.themeSource === 'dark',
16004
+ data: { themeSource: 'dark' } as const
16005
+ },
16006
+ {
16007
+ label: 'System',
16008
+ type: 'checkbox',
16009
+ checked: currentTheme.themeSource === 'system',
16010
+ data: { themeSource: 'system' } as const
16011
+ }
16012
+ ]
16013
+ });
16014
+ if (result.result === 'clicked') {
16015
+ await fin.System.setThemePreferences(result.data);
16016
+ }
16017
+ }
16018
+ ```
16019
+ */
16020
+ getThemePreferences(): Promise<OpenFin_2.NativeTheme>;
16021
+ /**
16022
+ * Sets the native theme preferences for the current runtime.
16023
+ * Can be used to force runtime-wide light or dark mode.
16024
+ * @important Due to this impacting all applications on a runtime, this method is only usable if a security realm has been set.
16025
+ * @example Theme selector menu
16026
+ * ```ts
16027
+ async function handleThemeMenu(e: React.MouseEvent<HTMLDivElement>) {
16028
+ const currentTheme = await fin.System.getThemePreferences();
16029
+ const result = await (fin.me as OpenFin.Window).showPopupMenu({
16030
+ x: e.clientX,
16031
+ y: e.clientY,
16032
+ template: [
16033
+ {
16034
+ label: 'Light',
16035
+ type: 'checkbox',
16036
+ checked: currentTheme.themeSource === 'light',
16037
+ data: { themeSource: 'light' } as const
16038
+ },
16039
+ {
16040
+ label: 'Dark',
16041
+ type: 'checkbox',
16042
+ checked: currentTheme.themeSource === 'dark',
16043
+ data: { themeSource: 'dark' } as const
16044
+ },
16045
+ {
16046
+ label: 'System',
16047
+ type: 'checkbox',
16048
+ checked: currentTheme.themeSource === 'system',
16049
+ data: { themeSource: 'system' } as const
16050
+ }
16051
+ ]
16052
+ });
16053
+ if (result.result === 'clicked') {
16054
+ await fin.System.setThemePreferences(result.data);
16055
+ }
16056
+ }
16057
+ ```
16058
+ */
16059
+ setThemePreferences(preferences: OpenFin_2.ThemePreferences): Promise<OpenFin_2.ThemePreferences>;
15868
16060
  /**
15869
16061
  * Launches the Log Uploader. Full documentation can be found [here](https://resources.here.io/docs/core/develop/debug/log-uploader/).
15870
16062
  * @experimental
@@ -15908,6 +16100,7 @@ declare namespace SystemEvents {
15908
16100
  ExtensionsInstallFailedEvent,
15909
16101
  ExtensionInstallFailedEvent,
15910
16102
  ExtensionsInitializationFailedEvent,
16103
+ NativeThemeUpdatedEvent,
15911
16104
  Event_11 as Event,
15912
16105
  SystemEvent,
15913
16106
  EventType_8 as EventType,
@@ -16031,6 +16224,7 @@ declare class TabStack extends LayoutNode {
16031
16224
  * and rendered at the front of the tab-stack, while the underlying order of tabs will remain unchanged.
16032
16225
  * If that happens and then getViews() is called, it will return the identities in a different order than
16033
16226
  * than the currently rendered tab order.
16227
+ * Note: This issue does not occur when using `tabOverflowBehavior: 'scroll'` in the layout configuration.
16034
16228
  *
16035
16229
  *
16036
16230
  * @throws If the {@link TabStack} has been destroyed.
@@ -16055,6 +16249,7 @@ declare class TabStack extends LayoutNode {
16055
16249
  *
16056
16250
  * @remarks Known Issue: If adding a view overflows the tab-container, the added view will be set as active
16057
16251
  * and rendered at the front of the tab-stack, while the underlying order of tabs will remain unchanged.
16252
+ * Note: This issue does not occur when using `tabOverflowBehavior: 'scroll'` in the layout configuration.
16058
16253
  *
16059
16254
  * @param view The identity of an existing view to add, or options to create a view.
16060
16255
  * @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)
@@ -16176,6 +16371,11 @@ declare type TerminateExternalRequestType = {
16176
16371
  killTree: boolean;
16177
16372
  };
16178
16373
 
16374
+ /**
16375
+ * Settable options for the native theme of the operating system.
16376
+ */
16377
+ declare type ThemePreferences = Pick<NativeTheme, 'themeSource'>;
16378
+
16179
16379
  /**
16180
16380
  * @interface
16181
16381
  */
package/out/stub.d.ts CHANGED
@@ -5043,7 +5043,7 @@ declare type Event_10 = ApplicationEvents.Event | ApiReadyEvent | SnapshotApplie
5043
5043
  * under the {@link OpenFin.SystemEvents} namespace (payloads inherited from propagated events are defined in the namespace
5044
5044
  * from which they propagate).
5045
5045
  */
5046
- 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;
5046
+ 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 | NativeThemeUpdatedEvent;
5047
5047
 
5048
5048
  /**
5049
5049
  * [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.
@@ -8724,7 +8724,7 @@ declare abstract class LayoutNode {
8724
8724
  * Known Issue: If the number of views to add overflows the tab-container, the added views will be set as active
8725
8725
  * during each render, and then placed at the front of the tab-stack, while the underlying order of tabs will remain unchanged.
8726
8726
  * This means the views you pass to createAdjacentStack() may not render in the order given by the array.
8727
- * Until fixed, this problem can be avoided only if your window is wide enough to fit creating all the views in the tabstack.
8727
+ * Note: This issue does not occur when using `tabOverflowBehavior: 'scroll'` in the layout configuration.
8728
8728
  *
8729
8729
  * @param views The views that will populate the new TabStack.
8730
8730
  * @param options Additional options that control new TabStack creation.
@@ -8899,6 +8899,42 @@ declare type LayoutOptions = {
8899
8899
  * @defaultValue false
8900
8900
  */
8901
8901
  disableTabOverflowDropdown?: boolean;
8902
+ /**
8903
+ * When set to 'scroll', enables horizontal scrolling of tabs when they overflow the stack width.
8904
+ * When set to 'dropdown' the default golden-layouts behavior will apply.
8905
+ *
8906
+ * Setting this to `scroll` may break styles written for the default dropdown behavior, as it significantly changes the dom structure and css of tabs.
8907
+ *
8908
+ * The DOM structure will be modified in this way:
8909
+ * - `lm_tabs` will be wrapped in a div with class `lm_scroll_shadow`. This div will be revealed by a mask on the tabs when they are overflowing.
8910
+ * - the `.newTabButton` (if enabled) will be a direct child of `.lm_header`
8911
+ *
8912
+ * **The following css variables are available to customize tab appearance:**
8913
+ *
8914
+ * - `--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`
8915
+ * - `--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).
8916
+ * - `--layout-tab-overflow-fade-size`: The width of the scroll shadows when tabs are overflowing. Default: `20px`
8917
+ * - `--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.
8918
+ *
8919
+ * **CSS Variables for advanced customization (dynamically updated and set on `lm_tabs`):**
8920
+ *
8921
+ * - `--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.
8922
+ * - `--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.
8923
+ * - `--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 only targeting Chrome > 137 you may want to use the `if()` function with left/right fade instead of this toggle.
8924
+ *
8925
+ * @example
8926
+ * ```css
8927
+ * .lm_tabs {
8928
+ * --layout-tab-width: 200px;
8929
+ * --layout-tab-min-width: 100px;
8930
+ * --layout-tab-overflow-fade-size: 20px;
8931
+ * --layout-tab-overflow-shadow-color: rgba(0, 0, 0, 0.3);
8932
+ * }
8933
+ * ```
8934
+ *
8935
+ * @defaultValue 'dropdown'
8936
+ */
8937
+ tabOverflowBehavior?: 'dropdown' | 'scroll';
8902
8938
  };
8903
8939
  /**
8904
8940
  * Content of the layout. There can only be one top-level LayoutItem in the content array.
@@ -9822,6 +9858,78 @@ declare type NamedEvent = IdentityEvent & {
9822
9858
  name: string;
9823
9859
  };
9824
9860
 
9861
+ /**
9862
+ * @interface
9863
+ *
9864
+ * Represents the native theme of the operating system.
9865
+ * This is used to determine how the application should render its UI based on the system's theme settings.
9866
+ * Defer to CSS properties whenever possible.
9867
+ *
9868
+ * Re-exported from Electron's `NativeTheme` type.
9869
+ */
9870
+ declare type NativeTheme = {
9871
+ /**
9872
+ * A `boolean` indicating whether Chromium is in forced colors mode, controlled by
9873
+ * system accessibility settings. Currently, Windows high contrast is the only
9874
+ * system setting that triggers forced colors mode.
9875
+ *
9876
+ * @platform win32
9877
+ */
9878
+ inForcedColorsMode: boolean;
9879
+ /**
9880
+ * A `boolean` that indicates the whether the user has chosen via system
9881
+ * accessibility settings to reduce transparency at the OS level.
9882
+ *
9883
+ */
9884
+ prefersReducedTransparency: boolean;
9885
+ /**
9886
+ * A `boolean` for if the OS / Chromium currently has a dark mode enabled or is
9887
+ * being instructed to show a dark-style UI. If you want to modify this value you
9888
+ * should use `themeSource` below.
9889
+ *
9890
+ */
9891
+ shouldUseDarkColors: boolean;
9892
+ /**
9893
+ * A `boolean` property indicating whether or not the system theme has been set to
9894
+ * dark or light.
9895
+ *
9896
+ * On Windows this property distinguishes between system and app light/dark theme,
9897
+ * returning `true` if the system theme is set to dark theme and `false` otherwise.
9898
+ * On macOS the return value will be the same as `nativeTheme.shouldUseDarkColors`.
9899
+ *
9900
+ * @platform darwin,win32
9901
+ */
9902
+ shouldUseDarkColorsForSystemIntegratedUI: boolean;
9903
+ /**
9904
+ * A `boolean` for if the OS / Chromium currently has high-contrast mode enabled or
9905
+ * is being instructed to show a high-contrast UI.
9906
+ *
9907
+ * @platform darwin,win32
9908
+ */
9909
+ shouldUseHighContrastColors: boolean;
9910
+ /**
9911
+ * A `boolean` for if the OS / Chromium currently has an inverted color scheme or
9912
+ * is being instructed to use an inverted color scheme.
9913
+ *
9914
+ * @platform darwin,win32
9915
+ */
9916
+ shouldUseInvertedColorScheme: boolean;
9917
+ /**
9918
+ * A `string` property that can be `system`, `light` or `dark`. It is used (via `setTheme) to
9919
+ * override and supersede the value that Chromium has chosen to use internally.
9920
+ */
9921
+ themeSource: 'system' | 'light' | 'dark';
9922
+ };
9923
+
9924
+ /**
9925
+ * Generated when the operating system's theme preferences change.
9926
+ * Occurs when dark mode, high contrast mode, or inverted color scheme settings are modified.
9927
+ */
9928
+ declare type NativeThemeUpdatedEvent = BaseEvent_9 & {
9929
+ type: 'native-theme-updated';
9930
+ theme: OpenFin_2.NativeTheme;
9931
+ };
9932
+
9825
9933
  /**
9826
9934
  * @interface
9827
9935
  */
@@ -10226,6 +10334,8 @@ declare namespace OpenFin_2 {
10226
10334
  Manifest,
10227
10335
  LayoutContent,
10228
10336
  LayoutItemConfig,
10337
+ ThemePreferences,
10338
+ NativeTheme,
10229
10339
  LayoutRow,
10230
10340
  LayoutColumn,
10231
10341
  LayoutComponent,
@@ -13236,6 +13346,10 @@ declare type ProtocolMap = ExternalAdapterOnlyCallsMap & AnalyticsProtocolMap &
13236
13346
  request: any;
13237
13347
  response: any;
13238
13348
  };
13349
+ 'set-theme-preferences': ApiCall<{
13350
+ preferences: OpenFin_2.ThemePreferences;
13351
+ }, OpenFin_2.NativeTheme>;
13352
+ 'get-theme-preferences': GetterCall<OpenFin_2.NativeTheme>;
13239
13353
  'get-version': GetterCall<string>;
13240
13354
  'clear-cache': ApiCall<OpenFin_2.ClearCacheOption, void>;
13241
13355
  'delete-cache-request': VoidCall;
@@ -16288,6 +16402,84 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
16288
16402
  * Not indended for general use, will be used by the `@openfin/workspace-platform` package.
16289
16403
  */
16290
16404
  serveAsset(options: OpenFin_2.ServeAssetOptions): Promise<OpenFin_2.ServedAssetInfo>;
16405
+ /**
16406
+ * Get's the native theme preferences for the current runtime.
16407
+ * Prefer css media-queries wherever possible, but this can be useful to see if the system setting has been overridden.
16408
+ * See @link OpenFin.NativeTheme for more information.
16409
+ * @example Theme selector menu
16410
+ * ```ts
16411
+ async function handleThemeMenu(e: React.MouseEvent<HTMLDivElement>) {
16412
+ const currentTheme = await fin.System.getThemePreferences();
16413
+ const result = await (fin.me as OpenFin.Window).showPopupMenu({
16414
+ x: e.clientX,
16415
+ y: e.clientY,
16416
+ template: [
16417
+ {
16418
+ label: 'Light',
16419
+ type: 'checkbox',
16420
+ checked: currentTheme.themeSource === 'light',
16421
+ data: { themeSource: 'light' } as const
16422
+ },
16423
+ {
16424
+ label: 'Dark',
16425
+ type: 'checkbox',
16426
+ checked: currentTheme.themeSource === 'dark',
16427
+ data: { themeSource: 'dark' } as const
16428
+ },
16429
+ {
16430
+ label: 'System',
16431
+ type: 'checkbox',
16432
+ checked: currentTheme.themeSource === 'system',
16433
+ data: { themeSource: 'system' } as const
16434
+ }
16435
+ ]
16436
+ });
16437
+ if (result.result === 'clicked') {
16438
+ await fin.System.setThemePreferences(result.data);
16439
+ }
16440
+ }
16441
+ ```
16442
+ */
16443
+ getThemePreferences(): Promise<OpenFin_2.NativeTheme>;
16444
+ /**
16445
+ * Sets the native theme preferences for the current runtime.
16446
+ * Can be used to force runtime-wide light or dark mode.
16447
+ * @important Due to this impacting all applications on a runtime, this method is only usable if a security realm has been set.
16448
+ * @example Theme selector menu
16449
+ * ```ts
16450
+ async function handleThemeMenu(e: React.MouseEvent<HTMLDivElement>) {
16451
+ const currentTheme = await fin.System.getThemePreferences();
16452
+ const result = await (fin.me as OpenFin.Window).showPopupMenu({
16453
+ x: e.clientX,
16454
+ y: e.clientY,
16455
+ template: [
16456
+ {
16457
+ label: 'Light',
16458
+ type: 'checkbox',
16459
+ checked: currentTheme.themeSource === 'light',
16460
+ data: { themeSource: 'light' } as const
16461
+ },
16462
+ {
16463
+ label: 'Dark',
16464
+ type: 'checkbox',
16465
+ checked: currentTheme.themeSource === 'dark',
16466
+ data: { themeSource: 'dark' } as const
16467
+ },
16468
+ {
16469
+ label: 'System',
16470
+ type: 'checkbox',
16471
+ checked: currentTheme.themeSource === 'system',
16472
+ data: { themeSource: 'system' } as const
16473
+ }
16474
+ ]
16475
+ });
16476
+ if (result.result === 'clicked') {
16477
+ await fin.System.setThemePreferences(result.data);
16478
+ }
16479
+ }
16480
+ ```
16481
+ */
16482
+ setThemePreferences(preferences: OpenFin_2.ThemePreferences): Promise<OpenFin_2.ThemePreferences>;
16291
16483
  /**
16292
16484
  * Launches the Log Uploader. Full documentation can be found [here](https://resources.here.io/docs/core/develop/debug/log-uploader/).
16293
16485
  * @experimental
@@ -16331,6 +16523,7 @@ declare namespace SystemEvents {
16331
16523
  ExtensionsInstallFailedEvent,
16332
16524
  ExtensionInstallFailedEvent,
16333
16525
  ExtensionsInitializationFailedEvent,
16526
+ NativeThemeUpdatedEvent,
16334
16527
  Event_11 as Event,
16335
16528
  SystemEvent,
16336
16529
  EventType_8 as EventType,
@@ -16461,6 +16654,7 @@ declare class TabStack extends LayoutNode {
16461
16654
  * and rendered at the front of the tab-stack, while the underlying order of tabs will remain unchanged.
16462
16655
  * If that happens and then getViews() is called, it will return the identities in a different order than
16463
16656
  * than the currently rendered tab order.
16657
+ * Note: This issue does not occur when using `tabOverflowBehavior: 'scroll'` in the layout configuration.
16464
16658
  *
16465
16659
  *
16466
16660
  * @throws If the {@link TabStack} has been destroyed.
@@ -16485,6 +16679,7 @@ declare class TabStack extends LayoutNode {
16485
16679
  *
16486
16680
  * @remarks Known Issue: If adding a view overflows the tab-container, the added view will be set as active
16487
16681
  * and rendered at the front of the tab-stack, while the underlying order of tabs will remain unchanged.
16682
+ * Note: This issue does not occur when using `tabOverflowBehavior: 'scroll'` in the layout configuration.
16488
16683
  *
16489
16684
  * @param view The identity of an existing view to add, or options to create a view.
16490
16685
  * @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)
@@ -16606,6 +16801,11 @@ declare type TerminateExternalRequestType = {
16606
16801
  killTree: boolean;
16607
16802
  };
16608
16803
 
16804
+ /**
16805
+ * Settable options for the native theme of the operating system.
16806
+ */
16807
+ declare type ThemePreferences = Pick<NativeTheme, 'themeSource'>;
16808
+
16609
16809
  /**
16610
16810
  * @interface
16611
16811
  */
package/out/stub.js CHANGED
@@ -7287,6 +7287,88 @@ class System extends base_1$m.EmitterBase {
7287
7287
  async serveAsset(options) {
7288
7288
  return (await this.wire.sendAction('serve-asset', { options })).payload.data;
7289
7289
  }
7290
+ /**
7291
+ * Get's the native theme preferences for the current runtime.
7292
+ * Prefer css media-queries wherever possible, but this can be useful to see if the system setting has been overridden.
7293
+ * See @link OpenFin.NativeTheme for more information.
7294
+ * @example Theme selector menu
7295
+ * ```ts
7296
+ async function handleThemeMenu(e: React.MouseEvent<HTMLDivElement>) {
7297
+ const currentTheme = await fin.System.getThemePreferences();
7298
+ const result = await (fin.me as OpenFin.Window).showPopupMenu({
7299
+ x: e.clientX,
7300
+ y: e.clientY,
7301
+ template: [
7302
+ {
7303
+ label: 'Light',
7304
+ type: 'checkbox',
7305
+ checked: currentTheme.themeSource === 'light',
7306
+ data: { themeSource: 'light' } as const
7307
+ },
7308
+ {
7309
+ label: 'Dark',
7310
+ type: 'checkbox',
7311
+ checked: currentTheme.themeSource === 'dark',
7312
+ data: { themeSource: 'dark' } as const
7313
+ },
7314
+ {
7315
+ label: 'System',
7316
+ type: 'checkbox',
7317
+ checked: currentTheme.themeSource === 'system',
7318
+ data: { themeSource: 'system' } as const
7319
+ }
7320
+ ]
7321
+ });
7322
+ if (result.result === 'clicked') {
7323
+ await fin.System.setThemePreferences(result.data);
7324
+ }
7325
+ }
7326
+ ```
7327
+ */
7328
+ async getThemePreferences() {
7329
+ return (await this.wire.sendAction('get-theme-preferences')).payload.data;
7330
+ }
7331
+ /**
7332
+ * Sets the native theme preferences for the current runtime.
7333
+ * Can be used to force runtime-wide light or dark mode.
7334
+ * @important Due to this impacting all applications on a runtime, this method is only usable if a security realm has been set.
7335
+ * @example Theme selector menu
7336
+ * ```ts
7337
+ async function handleThemeMenu(e: React.MouseEvent<HTMLDivElement>) {
7338
+ const currentTheme = await fin.System.getThemePreferences();
7339
+ const result = await (fin.me as OpenFin.Window).showPopupMenu({
7340
+ x: e.clientX,
7341
+ y: e.clientY,
7342
+ template: [
7343
+ {
7344
+ label: 'Light',
7345
+ type: 'checkbox',
7346
+ checked: currentTheme.themeSource === 'light',
7347
+ data: { themeSource: 'light' } as const
7348
+ },
7349
+ {
7350
+ label: 'Dark',
7351
+ type: 'checkbox',
7352
+ checked: currentTheme.themeSource === 'dark',
7353
+ data: { themeSource: 'dark' } as const
7354
+ },
7355
+ {
7356
+ label: 'System',
7357
+ type: 'checkbox',
7358
+ checked: currentTheme.themeSource === 'system',
7359
+ data: { themeSource: 'system' } as const
7360
+ }
7361
+ ]
7362
+ });
7363
+ if (result.result === 'clicked') {
7364
+ await fin.System.setThemePreferences(result.data);
7365
+ }
7366
+ }
7367
+ ```
7368
+ */
7369
+ async setThemePreferences(preferences) {
7370
+ return (await this.wire.sendAction('set-theme-preferences', { preferences })).payload.data;
7371
+ }
7290
7372
  /**
7291
7373
  * Launches the Log Uploader. Full documentation can be found [here](https://resources.here.io/docs/core/develop/debug/log-uploader/).
7292
7374
  * @experimental
@@ -11688,7 +11770,7 @@ class LayoutNode {
11688
11770
  * Known Issue: If the number of views to add overflows the tab-container, the added views will be set as active
11689
11771
  * during each render, and then placed at the front of the tab-stack, while the underlying order of tabs will remain unchanged.
11690
11772
  * This means the views you pass to createAdjacentStack() may not render in the order given by the array.
11691
- * Until fixed, this problem can be avoided only if your window is wide enough to fit creating all the views in the tabstack.
11773
+ * Note: This issue does not occur when using `tabOverflowBehavior: 'scroll'` in the layout configuration.
11692
11774
  *
11693
11775
  * @param views The views that will populate the new TabStack.
11694
11776
  * @param options Additional options that control new TabStack creation.
@@ -11824,6 +11906,7 @@ class TabStack extends LayoutNode {
11824
11906
  * and rendered at the front of the tab-stack, while the underlying order of tabs will remain unchanged.
11825
11907
  * If that happens and then getViews() is called, it will return the identities in a different order than
11826
11908
  * than the currently rendered tab order.
11909
+ * Note: This issue does not occur when using `tabOverflowBehavior: 'scroll'` in the layout configuration.
11827
11910
  *
11828
11911
  *
11829
11912
  * @throws If the {@link TabStack} has been destroyed.
@@ -11848,6 +11931,7 @@ class TabStack extends LayoutNode {
11848
11931
  *
11849
11932
  * @remarks Known Issue: If adding a view overflows the tab-container, the added view will be set as active
11850
11933
  * and rendered at the front of the tab-stack, while the underlying order of tabs will remain unchanged.
11934
+ * Note: This issue does not occur when using `tabOverflowBehavior: 'scroll'` in the layout configuration.
11851
11935
  *
11852
11936
  * @param view The identity of an existing view to add, or options to create a view.
11853
11937
  * @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)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/core",
3
- "version": "44.100.48",
3
+ "version": "44.100.49",
4
4
  "description": "The core renderer entry point of OpenFin",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "main": "out/stub.js",