@openfin/workspace 23.2.9 → 23.2.11
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 -0
- package/client-api-platform/src/api/utils.d.ts +6 -0
- package/common/src/api/theming.d.ts +2 -1
- package/common/src/utils/env.d.ts +1 -1
- package/common/src/utils/theming.d.ts +6 -0
- package/externals.report.json +8 -8
- 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 +4 -4
- 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;
|
|
@@ -30,11 +30,30 @@ export declare class ThemeStorageController {
|
|
|
30
30
|
private themePaletteSheet?;
|
|
31
31
|
private generatedPalettes?;
|
|
32
32
|
private workspaceStorage?;
|
|
33
|
+
private recreateFactory?;
|
|
33
34
|
constructor(providerStorage: Pick<Storage, 'getItem' | 'setItem'>);
|
|
34
35
|
/**
|
|
35
36
|
* Set the current Storage Proxy to enable Workspace Storage properties to be populated.
|
|
36
37
|
*/
|
|
37
38
|
setWorkspaceStorageProxy: (proxy: StorageProxy) => void;
|
|
39
|
+
/**
|
|
40
|
+
* Set a factory to recreate the storage proxy if it was destroyed (e.g. when a new browser
|
|
41
|
+
* window is opened after the last one closed with preventQuitOnLastWindowClosed true).
|
|
42
|
+
* Called once at platform init; avoids createWindow needing URL/env dependencies.
|
|
43
|
+
*/
|
|
44
|
+
setRecreateFactory: (factory: () => Promise<StorageProxy>) => void;
|
|
45
|
+
/**
|
|
46
|
+
* Close the storage proxy window and clear the reference. Called when the last browser window
|
|
47
|
+
* closes so the platform can quit (storage proxy would otherwise keep the process alive).
|
|
48
|
+
* Clears the reference before awaiting destroy() to avoid a race with ensureWorkspaceStorageProxy.
|
|
49
|
+
*/
|
|
50
|
+
destroyWorkspaceStorageProxy: () => Promise<void>;
|
|
51
|
+
/**
|
|
52
|
+
* Ensure the workspace storage proxy exists, recreating via the factory set at init if it was
|
|
53
|
+
* previously destroyed. No-op if no factory was set (e.g. in tests). Call before using
|
|
54
|
+
* workspace storage (e.g. when creating a browser window).
|
|
55
|
+
*/
|
|
56
|
+
ensureWorkspaceStorageProxy: () => Promise<void>;
|
|
38
57
|
/**
|
|
39
58
|
* Check if there's an explicit user preference stored in localStorage.
|
|
40
59
|
* A user preference is indicated by the presence of a SelectedColorScheme key. Which is something assigned if you click on the Appearance dropdown.
|
|
@@ -4,3 +4,9 @@ export type StorageProxy = {
|
|
|
4
4
|
destroy: () => Promise<void>;
|
|
5
5
|
};
|
|
6
6
|
export declare const createStorageProxy: (url: string) => Promise<StorageProxy>;
|
|
7
|
+
/**
|
|
8
|
+
* Ensure the workspace storage proxy window exists. Recreates it if it was previously destroyed
|
|
9
|
+
* (e.g. when the last browser window closed with preventQuitOnLastWindowClosed true and a new
|
|
10
|
+
* browser window is now being created). Uses the factory registered at init; no-op in tests.
|
|
11
|
+
*/
|
|
12
|
+
export declare const ensureWorkspaceStorageProxy: () => Promise<void>;
|
|
@@ -315,12 +315,13 @@ export declare const OpenFinDarkTheme: {
|
|
|
315
315
|
};
|
|
316
316
|
export declare const DefaultOpenFinTheme: CustomThemes;
|
|
317
317
|
export declare const parseNotificationIndicatorColors: (customTheme: CustomTheme) => NotificationIndicatorColorsParsed;
|
|
318
|
+
export declare const constructThemePaletteSheet: (themes: GeneratedPalettes) => string;
|
|
318
319
|
export declare const getComputedPlatformTheme: (platformIdentity: OpenFin.Identity) => Promise<{
|
|
319
320
|
theme: GeneratedPalettes | CustomThemes;
|
|
320
321
|
defaultScheme: ColorSchemeOptionType;
|
|
322
|
+
themePaletteSheet: string;
|
|
321
323
|
}>;
|
|
322
324
|
export declare const setSelectedScheme: (ctx: ColorSchemeOptionType) => Promise<void>;
|
|
323
325
|
export declare const getComputedScheme: (identity?: OpenFin.Identity) => Promise<Exclude<ColorSchemeType, "system">>;
|
|
324
326
|
export declare const getComputedBackgroundColor: (platformIdentity: OpenFin.Identity) => Promise<string>;
|
|
325
|
-
export declare const constructThemePaletteSheet: (themes: GeneratedPalettes) => string;
|
|
326
327
|
export {};
|
|
@@ -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;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
+
import type OpenFin from '@openfin/core';
|
|
1
2
|
import { BackgroundLayers, CustomPaletteSet } from '../../../common/src/api/theming';
|
|
3
|
+
export type ColorSchemeValue = 'light' | 'dark' | 'system';
|
|
4
|
+
export type WorkspaceSchemeSetting = 'light' | 'dark' | 'system';
|
|
5
|
+
export type MediaSchemeValue = 'light' | 'dark';
|
|
6
|
+
/** Maps a color scheme to OpenFin native theme preferences. */
|
|
7
|
+
export declare const mapColorSchemeToNativeTheme: (scheme: ColorSchemeValue) => OpenFin.NativeTheme;
|
|
2
8
|
/**
|
|
3
9
|
* Parses a CSS color string (hex, rgb(a), or hsl(a)) into a structured RGB string and alpha value.
|
|
4
10
|
*
|
package/externals.report.json
CHANGED
|
@@ -7,14 +7,6 @@
|
|
|
7
7
|
"issuer": "client-api/src/notifications.ts"
|
|
8
8
|
}
|
|
9
9
|
],
|
|
10
|
-
"@openfin/microsoft365": [
|
|
11
|
-
{
|
|
12
|
-
"type": "explicit",
|
|
13
|
-
"version": "^1.0.1",
|
|
14
|
-
"packageName": "client-api/package.json",
|
|
15
|
-
"issuer": "client-api/src/integrations/microsoft.ts"
|
|
16
|
-
}
|
|
17
|
-
],
|
|
18
10
|
"title-case": [
|
|
19
11
|
{
|
|
20
12
|
"type": "explicit",
|
|
@@ -29,6 +21,14 @@
|
|
|
29
21
|
"issuer": "common/src/utils/color-linking.ts"
|
|
30
22
|
}
|
|
31
23
|
],
|
|
24
|
+
"@openfin/microsoft365": [
|
|
25
|
+
{
|
|
26
|
+
"type": "explicit",
|
|
27
|
+
"version": "^1.1.0",
|
|
28
|
+
"packageName": "client-api/package.json",
|
|
29
|
+
"issuer": "client-api/src/integrations/microsoft.ts"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
32
|
"lodash.debounce": [
|
|
33
33
|
{
|
|
34
34
|
"type": "explicit",
|