@openfin/workspace 24.1.5 → 45.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client-api-platform/src/api/app-directory.d.ts +1 -1
- package/client-api-platform/src/api/controllers/theme-storage-controller.d.ts +19 -3
- package/client-api-platform/src/api/theming.d.ts +11 -1
- package/common/src/api/theming.d.ts +15 -1
- package/common/src/utils/env.d.ts +1 -1
- package/common/src/utils/menu-window-provider.d.ts +1 -1
- package/externals.report.json +9 -9
- package/home.js +1 -1
- package/home.js.map +1 -1
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/notifications.js +1 -1
- package/notifications.js.map +1 -1
- package/package.json +3 -3
- package/store.js +1 -1
- package/store.js.map +1 -1
|
@@ -7,7 +7,7 @@ import type { LaunchAppRequest, SearchSitesRequest, SearchSitesResponse, Site }
|
|
|
7
7
|
* @param app the app directory entry.
|
|
8
8
|
* @param opts launch options.
|
|
9
9
|
*/
|
|
10
|
-
export declare function launchApp({ app, target }: LaunchAppRequest): Promise<void | OpenFin.
|
|
10
|
+
export declare function launchApp({ app, target }: LaunchAppRequest): Promise<void | OpenFin.Identity | OpenFin.Platform | OpenFin.View | OpenFin.Application>;
|
|
11
11
|
export declare const enterpriseAppDirectoryChannelClient: () => Promise<OpenFin.ChannelClient>;
|
|
12
12
|
export declare function getResults(payload: {
|
|
13
13
|
req: SearchSitesRequest;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { GeneratedPalettes } from '../../../../common/src/api/theming';
|
|
2
1
|
import { StorageProxy } from '../../../../client-api-platform/src/api/utils';
|
|
3
2
|
import { ColorSchemeOptionType, CustomPaletteSet } from '../../../../client-api-platform/src/shapes';
|
|
3
|
+
/**
|
|
4
|
+
* Converts a string => (string | number) dictionary into a set of css vars.
|
|
5
|
+
*/
|
|
6
|
+
export declare const getVars: (vars: Record<string, string | number>) => string;
|
|
4
7
|
/**
|
|
5
8
|
* Palette extensions can be used to add new variables to the palette set.
|
|
6
9
|
*
|
|
@@ -23,13 +26,21 @@ export type Palettes = {
|
|
|
23
26
|
light: string;
|
|
24
27
|
dark: string;
|
|
25
28
|
};
|
|
29
|
+
/**
|
|
30
|
+
* Generates `--workspace-palette-*` CSS variable strings from a CustomPaletteSet.
|
|
31
|
+
* Used to produce legacy CSS vars for backwards compatibility with workspace apps
|
|
32
|
+
* that still consume the legacy theme system.
|
|
33
|
+
*/
|
|
34
|
+
export declare const generateLegacyCSSVars: (palettes: LegacyPalettes, isWindows: boolean) => {
|
|
35
|
+
light: string;
|
|
36
|
+
dark: string;
|
|
37
|
+
};
|
|
26
38
|
export declare class ThemeStorageController {
|
|
27
39
|
#private;
|
|
28
40
|
private providerStorage;
|
|
29
41
|
private darkPaletteVars?;
|
|
30
42
|
private lightPaletteVars?;
|
|
31
43
|
private themePaletteSheet?;
|
|
32
|
-
private generatedPalettes?;
|
|
33
44
|
private workspaceStorage?;
|
|
34
45
|
private storageFactory?;
|
|
35
46
|
private isLegacySinglePaletteTheme;
|
|
@@ -56,6 +67,12 @@ export declare class ThemeStorageController {
|
|
|
56
67
|
/**
|
|
57
68
|
* Synchronize the current palette and scheme with workspace's storage instance if
|
|
58
69
|
* storage based theming is enabled.
|
|
70
|
+
*
|
|
71
|
+
* Workspace storage is consumed by workspace apps still on the legacy theme system
|
|
72
|
+
* whose theme-loader does NOT set `data-scheme` on the document. To maintain
|
|
73
|
+
* backwards compatibility the sheet written here uses the legacy format: for an
|
|
74
|
+
* explicit light/dark scheme only that scheme's vars are placed inside `:root{}`,
|
|
75
|
+
* while "system" uses `@media (prefers-color-scheme)` queries with `:root`.
|
|
59
76
|
*/
|
|
60
77
|
synchronizeWorkspaceStorage: () => Promise<void>;
|
|
61
78
|
/**
|
|
@@ -89,7 +106,6 @@ export declare class ThemeStorageController {
|
|
|
89
106
|
* @param scheme The default scheme specified in the palette
|
|
90
107
|
*/
|
|
91
108
|
setThemeDefaultScheme(scheme: ColorSchemeOptionType): void;
|
|
92
|
-
setGeneratedPalettes(generatedPalettes: GeneratedPalettes): void;
|
|
93
109
|
/**
|
|
94
110
|
* Write the theme palette sheet to both in-memory state and providerStorage (namespaced localStorage)
|
|
95
111
|
* immediately. This ensures the theme is available for themeLoader on same-origin pages
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type OpenFin from '@openfin/core';
|
|
2
|
-
import type { BaseThemeOptions, CustomTheme, GenerateThemeParams } from '../../../common/src/api/theming';
|
|
2
|
+
import type { BaseThemeOptions, CustomPaletteSet, CustomTheme, GeneratedPalettes, GenerateThemeParams } from '../../../common/src/api/theming';
|
|
3
3
|
import { ColorSchemeOptionType, ThemeApi } from '../../../client-api-platform/src/shapes';
|
|
4
4
|
export declare const getThemingApi: (identity: OpenFin.ApplicationIdentity) => ThemeApi;
|
|
5
5
|
export declare const dispatchThemeToWorkspaceProvider: (themeData: {
|
|
@@ -16,4 +16,14 @@ export declare const getSelectedScheme: () => ColorSchemeOptionType | null | und
|
|
|
16
16
|
export declare const getIsLegacySinglePaletteTheme: () => boolean;
|
|
17
17
|
export declare const getThemePaletteSheet: () => string | undefined;
|
|
18
18
|
export declare const mapLegacyThemeToCustomTheme: (legacyTheme: CustomTheme) => GenerateThemeParams;
|
|
19
|
+
/**
|
|
20
|
+
* Reverse of mapLegacyThemeToCustomTheme.
|
|
21
|
+
* Takes the resolved token maps from a generated theme and maps them back to the
|
|
22
|
+
* legacy CustomPaletteSet shape so that workspace apps still on the legacy theme
|
|
23
|
+
* system can consume them.
|
|
24
|
+
*/
|
|
25
|
+
export declare const mapGeneratedPalettesToLegacyPalettes: (generatedPalettes: GeneratedPalettes) => {
|
|
26
|
+
light: CustomPaletteSet;
|
|
27
|
+
dark: CustomPaletteSet;
|
|
28
|
+
};
|
|
19
29
|
export declare const mapLegacyBrandIcons: (legacyBrand: BaseThemeOptions["brand"]) => GenerateThemeParams[1];
|
|
@@ -316,7 +316,21 @@ export declare const OpenFinDarkTheme: {
|
|
|
316
316
|
};
|
|
317
317
|
export declare const DefaultOpenFinTheme: CustomThemes;
|
|
318
318
|
export declare const parseNotificationIndicatorColors: (customTheme: CustomTheme) => NotificationIndicatorColorsParsed;
|
|
319
|
-
|
|
319
|
+
/**
|
|
320
|
+
* Builds a CSS stylesheet that exposes theme tokens as custom properties.
|
|
321
|
+
*
|
|
322
|
+
* The sheet is written to provider storage and consumed by same-origin pages
|
|
323
|
+
* via an adopted stylesheet. It uses `data-scheme` selectors for dark/system
|
|
324
|
+
* switching, which the new theme-loader sets on the document element.
|
|
325
|
+
*
|
|
326
|
+
* @param legacyVars Optional `--workspace-palette-*` CSS variable strings to
|
|
327
|
+
* merge alongside the new `--color-role-*` variables. When provided, apps on
|
|
328
|
+
* the legacy theme system that read these variables will receive correct values.
|
|
329
|
+
*/
|
|
330
|
+
export declare const constructThemePaletteSheet: (themes: GeneratedPalettes, legacyVars?: {
|
|
331
|
+
light: string;
|
|
332
|
+
dark: string;
|
|
333
|
+
}) => string;
|
|
320
334
|
export declare const getComputedPlatformTheme: (platformIdentity: OpenFin.Identity) => Promise<{
|
|
321
335
|
theme: GeneratedPalettes | CustomThemes;
|
|
322
336
|
defaultScheme: ColorSchemeOptionType;
|
|
@@ -11,7 +11,7 @@ export declare const isDocumentDefined: boolean;
|
|
|
11
11
|
export declare const isWindowDefinedWithIndexDB: boolean;
|
|
12
12
|
export declare const finUUID: string;
|
|
13
13
|
export declare const finName: string;
|
|
14
|
-
export declare const finEntityType: "" | "
|
|
14
|
+
export declare const finEntityType: "" | "view" | "window";
|
|
15
15
|
export declare const isEnvLocal: boolean;
|
|
16
16
|
export declare const isEnvDev: boolean;
|
|
17
17
|
export declare const isEnvStaging: boolean;
|
|
@@ -5,7 +5,7 @@ type MenuEventTypes = {
|
|
|
5
5
|
'response': [ModalResponseEvent];
|
|
6
6
|
'ready': [OpenFin.Identity];
|
|
7
7
|
'update': [string, Partial<OpenFin.Bounds>, string];
|
|
8
|
-
'modal-opened': [string];
|
|
8
|
+
'modal-opened': [name: string, parentName: string];
|
|
9
9
|
'modal-closed': [string];
|
|
10
10
|
'search-menu-opening': [string];
|
|
11
11
|
'search-menu-closed': [string];
|
package/externals.report.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"@openfin/notifications": [
|
|
3
3
|
{
|
|
4
4
|
"type": "explicit",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "45.0.0-alpha-4643",
|
|
6
6
|
"packageName": "client-api/package.json",
|
|
7
7
|
"issuer": "client-api/src/notifications.ts"
|
|
8
8
|
}
|
|
@@ -59,6 +59,14 @@
|
|
|
59
59
|
"issuer": "common/src/api/i18next.ts"
|
|
60
60
|
}
|
|
61
61
|
],
|
|
62
|
+
"lodash.clonedeep": [
|
|
63
|
+
{
|
|
64
|
+
"type": "explicit",
|
|
65
|
+
"version": "4.5.0",
|
|
66
|
+
"packageName": "common/package.json",
|
|
67
|
+
"issuer": "common/src/utils/layout.ts"
|
|
68
|
+
}
|
|
69
|
+
],
|
|
62
70
|
"dexie": [
|
|
63
71
|
{
|
|
64
72
|
"type": "root-implicit",
|
|
@@ -84,13 +92,5 @@
|
|
|
84
92
|
"packageName": "common/package.json",
|
|
85
93
|
"issuer": "common/src/utils/create-and-migrate-ibd-store.ts"
|
|
86
94
|
}
|
|
87
|
-
],
|
|
88
|
-
"lodash.clonedeep": [
|
|
89
|
-
{
|
|
90
|
-
"type": "explicit",
|
|
91
|
-
"version": "4.5.0",
|
|
92
|
-
"packageName": "common/package.json",
|
|
93
|
-
"issuer": "common/src/utils/layout.ts"
|
|
94
|
-
}
|
|
95
95
|
]
|
|
96
96
|
}
|