@openfin/workspace-platform 23.0.2 → 23.0.3
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-store.d.ts +14 -1
- package/client-api-platform/src/api/controllers/theme-storage-controller.d.ts +3 -1
- package/client-api-platform/src/init/theming.d.ts +3 -1
- package/client-api-platform/src/shapes.d.ts +19 -4
- package/common/src/api/protocol/workspace-platform.d.ts +2 -0
- package/common/src/api/protocol/workspace.d.ts +2 -2
- package/common/src/api/theming.d.ts +3 -2
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +2 -2
- package/workspace_platform.zip +0 -0
|
@@ -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.Identity | OpenFin.
|
|
10
|
+
export declare function launchApp({ app, target }: LaunchAppRequest): Promise<void | OpenFin.Identity | OpenFin.View | OpenFin.Platform | OpenFin.Application>;
|
|
11
11
|
export declare const enterpriseAppDirectoryChannelClient: () => Promise<OpenFin.ChannelClient>;
|
|
12
12
|
export declare function getResults(payload: {
|
|
13
13
|
req: SearchSitesRequest;
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
import { GeneratedPalettes } from '../../../../common/src/api/theming';
|
|
2
2
|
import { ThemeStorageController } from '../../../../client-api-platform/src/api/controllers/theme-storage-controller';
|
|
3
3
|
import { CustomThemes } from '../../../../client-api-platform/src/shapes';
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Initialises the storage palettes from the custom themes. This function is called on platform init.
|
|
6
|
+
* This function takes both the legacy themes and the new theme system tokens and
|
|
7
|
+
* passes them into the theme engine to generate the css variables.
|
|
8
|
+
*
|
|
9
|
+
* @param customThemes the custom themes to initialise the storage palettes from.
|
|
10
|
+
* @param isWindows whether the operating system is Windows.
|
|
11
|
+
* @returns the generated palettes fromt the theme engine, theme palette sheet which is injected into the DOM, and legacy theme object if it exists.
|
|
12
|
+
*/
|
|
13
|
+
export declare const initialiseStoragePalettes: (customThemes: CustomThemes | undefined, isWindows: boolean) => {
|
|
14
|
+
generatedPalettes: GeneratedPalettes;
|
|
15
|
+
themePaletteSheet: string;
|
|
16
|
+
legacyTheme: CustomThemes | null;
|
|
17
|
+
};
|
|
5
18
|
export declare const getThemeStorageController: () => ThemeStorageController;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { GeneratedPalettes } from '../../../../common/src/api/theming';
|
|
1
2
|
import { ColorSchemeOptionType, CustomPaletteSet } from '../../../../client-api-platform/src/shapes';
|
|
2
3
|
/**
|
|
3
4
|
* Palette extensions can be used to add new variables to the palette set.
|
|
@@ -40,8 +41,8 @@ export declare class ThemeStorageController {
|
|
|
40
41
|
private lightPaletteVars?;
|
|
41
42
|
private workspaceStorage?;
|
|
42
43
|
private themePaletteSheet?;
|
|
44
|
+
private generatedPalettes?;
|
|
43
45
|
constructor(providerStorage: Pick<Storage, 'getItem' | 'setItem'>);
|
|
44
|
-
private getVarsByScheme;
|
|
45
46
|
/**
|
|
46
47
|
* Set the current Storage Proxy to enable Workspace Storage properties to be populated.
|
|
47
48
|
*
|
|
@@ -87,6 +88,7 @@ export declare class ThemeStorageController {
|
|
|
87
88
|
* @param scheme The default scheme specified in the palette
|
|
88
89
|
*/
|
|
89
90
|
setThemeDefaultScheme(scheme: ColorSchemeOptionType): void;
|
|
91
|
+
setGeneratedPalettes(generatedPalettes: GeneratedPalettes): void;
|
|
90
92
|
/**
|
|
91
93
|
* Returns the current scheme
|
|
92
94
|
* @returns 'light' | 'system' | 'dark'
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { GeneratedPalettes } from '../../../common/src/api/theming';
|
|
2
2
|
import { CustomThemes } from '../shapes';
|
|
3
|
-
export declare const getThemes: () =>
|
|
3
|
+
export declare const getThemes: () => CustomThemes | null;
|
|
4
|
+
export declare const getGeneratedPalettes: () => GeneratedPalettes;
|
|
5
|
+
export declare const getThemePaletteSheet: () => string;
|
|
4
6
|
/**
|
|
5
7
|
* initTheming()
|
|
6
8
|
* @param customThemes array of theme objects
|
|
@@ -1420,12 +1420,27 @@ export interface LaunchAppRequest {
|
|
|
1420
1420
|
target?: OpenFin.EntityInfo;
|
|
1421
1421
|
app: App;
|
|
1422
1422
|
}
|
|
1423
|
-
/**
|
|
1424
|
-
* Get Themes from API
|
|
1425
|
-
*/
|
|
1426
1423
|
export interface ThemeApi {
|
|
1427
|
-
|
|
1424
|
+
/**
|
|
1425
|
+
* @deprecated This method is deprecated. It is recommended to use {@link getGeneratedPalettes} instead.
|
|
1426
|
+
* Get the legacy themes from the platform provider.
|
|
1427
|
+
* @returns the legacy themes or null if the platform provider is using the new theme system.
|
|
1428
|
+
*/
|
|
1429
|
+
getThemes(): Promise<CustomThemes | null>;
|
|
1430
|
+
/**
|
|
1431
|
+
* Get the generated palettes from the platform provider.
|
|
1432
|
+
* @returns the generated palettes.
|
|
1433
|
+
*/
|
|
1434
|
+
getGeneratedPalettes(): Promise<GeneratedPalettes>;
|
|
1435
|
+
/**
|
|
1436
|
+
* Set the selected scheme for the platform provider.
|
|
1437
|
+
* @param newScheme the new scheme to set.
|
|
1438
|
+
*/
|
|
1428
1439
|
setSelectedScheme(newScheme: ColorSchemeOptionType): Promise<void>;
|
|
1440
|
+
/**
|
|
1441
|
+
* Get the selected scheme from the platform provider.
|
|
1442
|
+
* @returns the selected scheme.
|
|
1443
|
+
*/
|
|
1429
1444
|
getSelectedScheme(): Promise<ColorSchemeOptionType>;
|
|
1430
1445
|
}
|
|
1431
1446
|
/**
|
|
@@ -35,6 +35,8 @@ export declare enum WorkspacePlatformChannelAction {
|
|
|
35
35
|
GetLastFocusedBrowserWindow = "getLastFocusedBrowserWindow",
|
|
36
36
|
GetPageByViewIdentity = "getPageByViewIdentity",
|
|
37
37
|
GetThemes = "getThemes",
|
|
38
|
+
GetGeneratedPalettes = "getGeneratedPalettes",
|
|
39
|
+
GetThemePaletteSheet = "getThemePaletteSheet",
|
|
38
40
|
GetSelectedScheme = "getSelectedScheme",
|
|
39
41
|
SetSelectedScheme = "setSelectedScheme",
|
|
40
42
|
OpenGlobalContextMenuInternal = "openGlobalContextMenuInternal",
|
|
@@ -19,8 +19,8 @@ export declare const launchProvider: () => Promise<void>;
|
|
|
19
19
|
*/
|
|
20
20
|
export declare const getChannelClientAndLaunchProvider: () => Promise<WorkspaceComponentChannelClient>;
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* Gets the theme data from the Platform provider, then launches the Workspace provider if it is not running, and then dispatches the theme data to the Workspace provider.
|
|
23
23
|
* Then gets a Channel Client that is connected to the Workspace Provider.
|
|
24
24
|
* @returns the Channel Client that is connected to the Workspace Provider.
|
|
25
25
|
*/
|
|
26
|
-
export declare const
|
|
26
|
+
export declare const getChannelClientAndInitializeWorkspaceProvider: () => Promise<WorkspaceAPIClientChannelClient>;
|
|
@@ -281,10 +281,11 @@ export declare const OpenFinDarkTheme: {
|
|
|
281
281
|
export declare const DefaultOpenFinTheme: CustomThemes;
|
|
282
282
|
export declare const getComputedPaletteSets: (customTheme: CustomThemeOptions | CustomThemeOptionsWithScheme) => WorkspaceThemeSet;
|
|
283
283
|
export declare const getComputedPlatformTheme: (platformIdentity: OpenFin.Identity) => Promise<{
|
|
284
|
-
theme:
|
|
284
|
+
theme: CustomThemes | GeneratedPalettes;
|
|
285
285
|
defaultScheme: ColorSchemeOptionType;
|
|
286
286
|
}>;
|
|
287
287
|
export declare const setSelectedScheme: (ctx: ColorSchemeOptionType) => Promise<void>;
|
|
288
288
|
export declare const getComputedScheme: (identity?: OpenFin.Identity) => Promise<Exclude<ColorSchemeType, "system">>;
|
|
289
|
-
export declare const getComputedBackgroundColor: () => Promise<string>;
|
|
289
|
+
export declare const getComputedBackgroundColor: (platformIdentity: OpenFin.Identity) => Promise<string>;
|
|
290
|
+
export declare const constructThemePaletteSheet: (themes: GeneratedPalettes) => string;
|
|
290
291
|
export {};
|