@openfin/workspace-platform 22.5.6 → 22.5.8
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.
|
@@ -47,9 +47,15 @@ export declare class ThemeStorageController {
|
|
|
47
47
|
* `git revert 233e843cda6cd68968fd5831fb20597e0d5bb7cc --no-commit`
|
|
48
48
|
*/
|
|
49
49
|
setWorkspaceStorage: (proxy: Pick<Storage, 'setItem'>) => void;
|
|
50
|
+
/**
|
|
51
|
+
* Check if there's an explicit user preference stored in localStorage.
|
|
52
|
+
* A user preference is indicated by the presence of a SelectedColorScheme key. Which is something assigned if you click on the Appearance dropdown.
|
|
53
|
+
* @returns true if user has manually selected a scheme, false if using defaults
|
|
54
|
+
*/
|
|
55
|
+
private hasUserPreference;
|
|
50
56
|
/**
|
|
51
57
|
* Synchronize the current palette and scheme with workspace's storage instance if
|
|
52
|
-
* storage based theming is enabled
|
|
58
|
+
* storage based theming is enabled. Only syncs when user has explicitly selected a scheme.
|
|
53
59
|
*/
|
|
54
60
|
trySynchronizeWorkspaceStorage: () => void;
|
|
55
61
|
/**
|
|
@@ -67,6 +73,11 @@ export declare class ThemeStorageController {
|
|
|
67
73
|
* @param scheme 'light', 'dark' or 'system'.
|
|
68
74
|
*/
|
|
69
75
|
setScheme(scheme: ColorSchemeOptionType): void;
|
|
76
|
+
/**
|
|
77
|
+
* Set the theme's default scheme from palette configuration
|
|
78
|
+
* @param scheme The default scheme specified in the palette
|
|
79
|
+
*/
|
|
80
|
+
setThemeDefaultScheme(scheme: ColorSchemeOptionType): void;
|
|
70
81
|
/**
|
|
71
82
|
* Returns the current scheme
|
|
72
83
|
* @returns 'light' | 'system' | 'dark'
|
|
@@ -8,6 +8,7 @@ declare enum LocalStorageKey {
|
|
|
8
8
|
SelectedColorScheme = "SelectedColorScheme",
|
|
9
9
|
ThemePaletteSheet = "ThemePaletteSheet",
|
|
10
10
|
HasMovedStore = "HasMovedStore",
|
|
11
|
-
PageDragState = "BrowserPageDragState"
|
|
11
|
+
PageDragState = "BrowserPageDragState",
|
|
12
|
+
ThemePaletteDefaultScheme = "ThemePaletteDefaultScheme"
|
|
12
13
|
}
|
|
13
14
|
export default LocalStorageKey;
|