@openfin/workspace 24.0.13 → 24.0.15

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.
Files changed (36) hide show
  1. package/client-api/src/notifications.d.ts +5 -0
  2. package/client-api/src/notifications.test.d.ts +1 -0
  3. package/client-api-platform/src/api/app-directory.d.ts +1 -1
  4. package/client-api-platform/src/api/controllers/storage-proxies/channel-storage-proxy.d.ts +19 -0
  5. package/client-api-platform/src/api/controllers/storage-proxies/local-storage-proxy.d.ts +12 -0
  6. package/client-api-platform/src/api/controllers/theme-storage-controller-store.d.ts +17 -0
  7. package/client-api-platform/src/api/controllers/theme-storage-controller.d.ts +28 -22
  8. package/client-api-platform/src/api/pages/index.d.ts +7 -2
  9. package/client-api-platform/src/api/theming.d.ts +8 -4
  10. package/client-api-platform/src/api/utils.d.ts +2 -7
  11. package/client-api-platform/src/init/index.d.ts +2 -1
  12. package/client-api-platform/src/init/override-callback/browser-defaults.d.ts +1 -1
  13. package/client-api-platform/src/init/override-callback/page-defaults.d.ts +1 -1
  14. package/client-api-platform/src/init/panels.d.ts +8 -1
  15. package/client-api-platform/src/init/theming.d.ts +2 -1
  16. package/client-api-platform/src/shapes.d.ts +70 -1
  17. package/common/src/api/pages/enterprise-shapes.d.ts +4 -0
  18. package/common/src/api/pages/shapes.d.ts +10 -2
  19. package/common/src/api/protocol/workspace-platform.d.ts +3 -1
  20. package/common/src/api/theme-migration.d.ts +46 -0
  21. package/common/src/api/theming.d.ts +15 -1
  22. package/common/src/utils/indicators/showIndicator.d.ts +8 -1
  23. package/common/src/utils/indicators/workspace-indicators.d.ts +13 -0
  24. package/common/src/utils/layout.d.ts +9 -6
  25. package/common/src/utils/popup-window.d.ts +23 -4
  26. package/dock3/src/api/protocol.d.ts +2 -0
  27. package/externals.report.json +8 -8
  28. package/home.js +1 -1
  29. package/home.js.map +1 -1
  30. package/index.js +1 -1
  31. package/index.js.map +1 -1
  32. package/notifications.js +1 -1
  33. package/notifications.js.map +1 -1
  34. package/package.json +1 -1
  35. package/store.js +1 -1
  36. package/store.js.map +1 -1
@@ -2,6 +2,11 @@ import * as Notifications from '@openfin/notifications';
2
2
  import type { NotificationsPlatform, NotificationsRegisterOptions } from './shapes/notifications';
3
3
  export * from '@openfin/notifications';
4
4
  export * from './shapes/notifications';
5
+ /**
6
+ * Notifications Center <= 2.13 expects a legacy NotificationsThemeSet object.
7
+ * Versions >= 2.14 supports detailed theming.
8
+ */
9
+ export declare const isLegacyNotifications: (version: string) => boolean;
5
10
  /**
6
11
  * @deprecated Use `register` with {@link NotificationsRegisterOptions | options?: NotificationsRegisterOptions} argument instead.
7
12
  */
@@ -0,0 +1 @@
1
+ export {};
@@ -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.View | OpenFin.Platform | OpenFin.Application>;
10
+ export declare function launchApp({ app, target }: LaunchAppRequest): Promise<void | OpenFin.View | OpenFin.Identity | OpenFin.Platform | OpenFin.Application>;
11
11
  export declare const enterpriseAppDirectoryChannelClient: () => Promise<OpenFin.ChannelClient>;
12
12
  export declare function getResults(payload: {
13
13
  req: SearchSitesRequest;
@@ -0,0 +1,19 @@
1
+ import { StorageProxy } from '../../../../../client-api-platform/src/api/utils';
2
+ /**
3
+ * Channel Storage Proxy allows population of storage keys in a different origin, assuming that origin has set up
4
+ * a storage proxy on the specified URL.
5
+ *
6
+ * This is useful for writing to the localStorage of workspace when the provider is on a different origin.
7
+ */
8
+ export declare class ChannelStorageProxy implements StorageProxy {
9
+ #private;
10
+ constructor(url: string);
11
+ get isDestroyed(): boolean;
12
+ /**
13
+ * Sets a key in the proxied storage partition.
14
+ * @param key Key to set
15
+ * @param value Value.
16
+ */
17
+ setItem(key: string, value: string): Promise<void>;
18
+ destroy(): Promise<void>;
19
+ }
@@ -0,0 +1,12 @@
1
+ import { StorageProxy } from '../../../../../client-api-platform/src/api/utils';
2
+ /**
3
+ * LocalStorage backed StorageProxy, for use in same origin scenarios (i.e. when the provider and workspace UI are guaranteed
4
+ * to share a storage partition).
5
+ */
6
+ export declare class LocalStorageProxy implements StorageProxy {
7
+ #private;
8
+ constructor(storage: Pick<Storage, 'setItem'>);
9
+ setItem(key: string, value: string): Promise<void>;
10
+ destroy(): Promise<void>;
11
+ get isDestroyed(): boolean;
12
+ }
@@ -17,3 +17,20 @@ export declare const initialiseStoragePalettes: (customThemes: CustomThemes | un
17
17
  notificationIndicatorColors: NotificationIndicatorColorsParsed | null;
18
18
  };
19
19
  export declare const getThemeStorageController: () => ThemeStorageController;
20
+ /**
21
+ * Resolves when the first theme sync completes. Use this to ensure that we do not launch UI such as browser until this has completed.
22
+ *
23
+ * @param allowFailure Whether to suppress rejections and continue anyway. Recommended for most use cases.
24
+ */
25
+ export declare const waitForFirstThemeSync: (allowFailure?: boolean) => Promise<void>;
26
+ /**
27
+ * Creates and initialises the Theme Storage Controller singleton.
28
+ *
29
+ * Triggers the first theme sync, but does not await it. To ensure dependent UI can guarantee the theme palette is synced,
30
+ * you can call `await waitForFirstThemeSync` (e.g. in the createWindow provider override).
31
+ *
32
+ * @param isEnterprise Whether in enterprise mode (allows using local storage proxy directly).
33
+ * @param baseUrl Base url of the hosted workspace UI.
34
+ * @param syncTimeout How long `waitForFirstThemeSync` should wait before rejecting.
35
+ */
36
+ export declare const initialiseThemeController: (isEnterprise: boolean, baseUrl: string, syncTimeout: number) => void;
@@ -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,38 +26,38 @@ 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 {
39
+ #private;
27
40
  private providerStorage;
28
41
  private darkPaletteVars?;
29
42
  private lightPaletteVars?;
30
43
  private themePaletteSheet?;
31
- private generatedPalettes?;
32
44
  private workspaceStorage?;
33
- private recreateFactory?;
45
+ private storageFactory?;
34
46
  private isLegacySinglePaletteTheme;
35
47
  constructor(providerStorage: Pick<Storage, 'getItem' | 'setItem' | 'removeItem'>);
36
48
  /**
37
- * Set the current Storage Proxy to enable Workspace Storage properties to be populated.
38
- */
39
- setWorkspaceStorageProxy: (proxy: StorageProxy) => void;
40
- /**
41
- * Set a factory to recreate the storage proxy if it was destroyed (e.g. when a new browser
42
- * window is opened after the last one closed with preventQuitOnLastWindowClosed true).
43
- * Called once at platform init; avoids createWindow needing URL/env dependencies.
49
+ * Sets the storage factory. This can only be done once, and will throw for subsequent calls.
50
+ *
51
+ * All storage writes will be pending until the factory is created.
52
+ * @param factory
44
53
  */
45
- setRecreateFactory: (factory: () => Promise<StorageProxy>) => void;
54
+ setStorageFactory: (factory: () => StorageProxy) => void;
46
55
  /**
47
56
  * Close the storage proxy window and clear the reference. Called when the last browser window
48
57
  * closes so the platform can quit (storage proxy would otherwise keep the process alive).
49
- * Clears the reference before awaiting destroy() to avoid a race with ensureWorkspaceStorageProxy.
58
+ * Clears the reference before awaiting destroy() to avoid a race with getOrCreateStorageProxy.
50
59
  */
51
60
  destroyWorkspaceStorageProxy: () => Promise<void>;
52
- /**
53
- * Ensure the workspace storage proxy exists, recreating via the factory set at init if it was
54
- * previously destroyed. No-op if no factory was set (e.g. in tests). Call before using
55
- * workspace storage (e.g. when creating a browser window).
56
- */
57
- ensureWorkspaceStorageProxy: () => Promise<void>;
58
61
  /**
59
62
  * Check if there's an explicit user preference stored in localStorage.
60
63
  * A user preference is indicated by the presence of a SelectedColorScheme key. Which is something assigned if you click on the Appearance dropdown.
@@ -63,11 +66,15 @@ export declare class ThemeStorageController {
63
66
  private hasUserPreference;
64
67
  /**
65
68
  * Synchronize the current palette and scheme with workspace's storage instance if
66
- * storage based theming is enabled. Only syncs when user has explicitly selected a scheme.
69
+ * storage based theming is enabled.
67
70
  *
68
- * Wrapped in try/catch so it does not throw
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`.
69
76
  */
70
- trySynchronizeWorkspaceStorage: () => Promise<void>;
77
+ synchronizeWorkspaceStorage: () => Promise<void>;
71
78
  /**
72
79
  * Set the current Palette to be used by workspace. This palette will be converted into
73
80
  * css vars and combined into a single stylesheet. This stylesheet is exposed in localstorage
@@ -99,7 +106,6 @@ export declare class ThemeStorageController {
99
106
  * @param scheme The default scheme specified in the palette
100
107
  */
101
108
  setThemeDefaultScheme(scheme: ColorSchemeOptionType): void;
102
- setGeneratedPalettes(generatedPalettes: GeneratedPalettes): void;
103
109
  /**
104
110
  * Write the theme palette sheet to both in-memory state and providerStorage (namespaced localStorage)
105
111
  * immediately. This ensures the theme is available for themeLoader on same-origin pages
@@ -26,10 +26,15 @@ export declare const getActivePageIdForWindow: (identity: OpenFin.Identity) => P
26
26
  *
27
27
  * If the name is not unique, it will append a number to the end of the name.
28
28
  *
29
+ * When `BrowserInitConfig.allowDuplicatePageTitles` is `true`, this function
30
+ * short-circuits and returns the supplied name (or the default title) as-is,
31
+ * without appending a numeric suffix.
32
+ *
29
33
  * @param initialName The initial name to test
30
- * @returns string: a unique page name
34
+ * @param allowDuplicatePageTitles Whether duplicate page titles are permitted
35
+ * @returns string: a unique page name (or the input unchanged when duplicates are allowed)
31
36
  */
32
- export declare function getUniquePageTitle(initialName?: string): Promise<string>;
37
+ export declare function getUniquePageTitle(initialName?: string, allowDuplicatePageTitles?: boolean): Promise<string>;
33
38
  export declare function handleSaveModalOnPageClose({ page }: HandleSaveModalOnPageClosePayload): Promise<SaveModalOnPageCloseResult>;
34
39
  /**
35
40
  * Default implementation of shouldPageClose. If enableBeforeUnload isn't set to true, always returns True (proceed with close).
@@ -1,6 +1,6 @@
1
1
  import type OpenFin from '@openfin/core';
2
- import type { BaseThemeOptions, CustomTheme, GenerateThemeParams } from '../../../common/src/api/theming';
3
- import { ColorSchemeOptionType, ThemeApi } from '../../../client-api-platform/src/shapes';
2
+ import type { GeneratedPalettes, NotificationIndicatorColorsParsed } from '../../../common/src/api/theming';
3
+ import { ColorSchemeOptionType, LegacyNotificationsThemeSet, ThemeApi } from '../../../client-api-platform/src/shapes';
4
4
  export declare const getThemingApi: (identity: OpenFin.ApplicationIdentity) => ThemeApi;
5
5
  export declare const dispatchThemeToWorkspaceProvider: (themeData: {
6
6
  themePaletteSheet: string;
@@ -15,5 +15,9 @@ export declare const getSelectedScheme: () => ColorSchemeOptionType | null | und
15
15
  /** @internal */
16
16
  export declare const getIsLegacySinglePaletteTheme: () => boolean;
17
17
  export declare const getThemePaletteSheet: () => string | undefined;
18
- export declare const mapLegacyThemeToCustomTheme: (legacyTheme: CustomTheme) => GenerateThemeParams;
19
- export declare const mapLegacyBrandIcons: (legacyBrand: BaseThemeOptions["brand"]) => GenerateThemeParams[1];
18
+ export { assignIfDefined, mapGeneratedPalettesToLegacyPalettes, mapLegacyBrandIcons, mapLegacyThemeToCustomTheme } from '../../../common/src/api/theme-migration';
19
+ /**
20
+ * Builds a legacy NotificationsThemeSet from generated palettes and indicator colors.
21
+ * Used by the provider-side handler to serve old Notification Center versions (<=2.13).
22
+ */
23
+ export declare const buildLegacyNotificationsTheme: (generatedPalettes: GeneratedPalettes, notificationIndicatorColors: NotificationIndicatorColorsParsed | null) => Promise<LegacyNotificationsThemeSet | null>;
@@ -2,11 +2,6 @@ export declare const listenForStoreClose: () => void;
2
2
  export type StorageProxy = {
3
3
  setItem: (data: string, value: string) => Promise<void>;
4
4
  destroy: () => Promise<void>;
5
+ isDestroyed: boolean;
5
6
  };
6
- export declare const createStorageProxy: (url: string, isEnterprise: boolean) => 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>;
7
+ export declare const getStorageFactory: (isEnterprise: boolean, baseUrl: string) => (() => StorageProxy);
@@ -1,5 +1,6 @@
1
1
  import OpenFin from '@openfin/core';
2
2
  import { WorkspacePlatformInitConfig } from '../../../client-api-platform/src/shapes';
3
+ export declare const MAX_FIRST_THEME_SYNC_WAIT = 3000;
3
4
  /**
4
5
  * Initilaize a Workspace Platform.
5
6
  *
@@ -35,4 +36,4 @@ import { WorkspacePlatformInitConfig } from '../../../client-api-platform/src/sh
35
36
  * ```
36
37
  * @param options options for configuring the platform.
37
38
  */
38
- export declare const init: ({ theme, customActions, language, ...rest }: WorkspacePlatformInitConfig) => Promise<OpenFin.Platform>;
39
+ export declare const init: (config: WorkspacePlatformInitConfig) => Promise<OpenFin.Platform>;
@@ -4,4 +4,4 @@ import { BrowserInitConfig } from '../../../../client-api-platform/src/shapes';
4
4
  /**
5
5
  * Applies default options to the creation of browser windows.
6
6
  */
7
- export declare function applyBrowserDefaults(options: OpenFin.PlatformWindowCreationOptions, initOptions: Pick<BrowserInitConfig, 'defaultWindowOptions' | 'defaultPageOptions' | 'defaultViewOptions' | 'browserIconSize'> | undefined, themeData?: PreloadedThemeData): Promise<OpenFin.PlatformWindowCreationOptions>;
7
+ export declare function applyBrowserDefaults(options: OpenFin.PlatformWindowCreationOptions, initOptions: Pick<BrowserInitConfig, 'defaultWindowOptions' | 'defaultPageOptions' | 'defaultViewOptions' | 'browserIconSize' | 'allowDuplicatePageTitles'> | undefined, themeData?: PreloadedThemeData): Promise<OpenFin.PlatformWindowCreationOptions>;
@@ -1,4 +1,4 @@
1
1
  import OpenFin from '@openfin/core';
2
2
  import type { AttachedPage, AttachedPageInternal } from '../../../../common/src/api/pages/shapes';
3
3
  import { BrowserInitConfig } from '../..';
4
- export declare const applyPageDefaults: (pages: AttachedPage[], initOptions?: Pick<BrowserInitConfig, "defaultPageOptions" | "defaultViewOptions" | "defaultWindowOptions">, overrideOptions?: OpenFin.PlatformWindowCreationOptions) => Promise<AttachedPageInternal[]>;
4
+ export declare const applyPageDefaults: (pages: AttachedPage[], initOptions?: Pick<BrowserInitConfig, "defaultPageOptions" | "defaultViewOptions" | "defaultWindowOptions" | "allowDuplicatePageTitles">, overrideOptions?: OpenFin.PlatformWindowCreationOptions) => Promise<AttachedPageInternal[]>;
@@ -4,5 +4,12 @@ export declare function convertPanelViewOpts(panels: PanelConfig[], updatePageRe
4
4
  identity: OpenFin.Identity;
5
5
  pageId: string;
6
6
  }): Promise<ExtendedPanelConfig[]>;
7
- export declare function createPanelViewsForPages(pages: AttachedPage[]): Promise<void>;
7
+ /**
8
+ * Creates panel views for all pages in parallel. Returns a promise that callers
9
+ * may optionally await. In the initial window creation path the return value is
10
+ * intentionally ignored (fire-and-forget) so panel creation doesn't block
11
+ * `super.createWindow`. In the `attachPagesToWindow` path the promise is awaited
12
+ * so views exist before the browser dispatches `attachPanelViews`.
13
+ */
14
+ export declare function createPanelViewsForPages(pages: AttachedPage[]): Promise<PromiseSettledResult<unknown>[]> | undefined;
8
15
  export declare function createPanelViews(panels: PanelConfig[]): Promise<(void | OpenFin.View)[]>;
@@ -1,9 +1,10 @@
1
1
  import { GeneratedPalettes, NotificationIndicatorColorsParsed } from '../../../common/src/api/theming';
2
- import { CustomThemes } from '../shapes';
2
+ import { CustomThemes, LegacyNotificationsThemeSet } from '../shapes';
3
3
  export declare const getThemes: () => CustomThemes | null;
4
4
  export declare const getGeneratedPalettes: () => GeneratedPalettes;
5
5
  export declare const getThemePaletteSheet: () => string;
6
6
  export declare const getNotificationIndicatorColorsInternal: () => NotificationIndicatorColorsParsed;
7
+ export declare const getLegacyNotificationsThemeInternal: () => Promise<LegacyNotificationsThemeSet | null>;
7
8
  export declare const isThemePreInitialised: () => boolean;
8
9
  /**
9
10
  * initTheming()
@@ -1,6 +1,7 @@
1
1
  import type OpenFin from '@openfin/core';
2
2
  import type { IconProps, IconType, Languages } from '@openfin/ui-library';
3
3
  import type { ModalResponseEvent } from '../../common/src/utils/menu-window-provider';
4
+ import type { WorkspaceIndicatorConfig } from '../../common/src/utils/indicators/workspace-indicators';
4
5
  import type { AnalyticsEvent, AnalyticsEventInternal } from '../../common/src/utils/usage-register';
5
6
  import type { BaseCustomDropdownItem, CustomActionSpecifier, CustomButtonConfig } from '../../common/src/api/action';
6
7
  import type { Resource } from '../../common/src/api/i18next';
@@ -16,7 +17,7 @@ export * from '../../dock3/src/shapes';
16
17
  export { AppManifestType } from '../../client-api/src/shapes';
17
18
  export type { App, AppIntent, Image } from '../../client-api/src/shapes';
18
19
  export type { CustomActionSpecifier, CustomButtonConfig } from '../../common/src/api/action';
19
- export type { AttachedPage, Page, PageLayout, PageLayoutDetails, PageWithUpdatableRuntimeAttribs, PanelConfigHorizontal, PanelConfigVertical, PanelConfig, ExtendedPanelConfig, CopyPagePayload, HandleSaveModalOnPageClosePayload, SaveModalOnPageCloseResult, SetActivePageForWindowPayload, ShouldPageClosePayload, ShouldPageCloseResult, ViewsPreventingUnloadPayload } from '../../common/src/api/pages/shapes';
20
+ export type { AttachedPage, Page, PagePinnedState, PageLayout, PageLayoutDetails, PageWithUpdatableRuntimeAttribs, PanelConfigHorizontal, PanelConfigVertical, PanelConfig, ExtendedPanelConfig, CopyPagePayload, HandleSaveModalOnPageClosePayload, SaveModalOnPageCloseResult, SetActivePageForWindowPayload, ShouldPageClosePayload, ShouldPageCloseResult, ViewsPreventingUnloadPayload } from '../../common/src/api/pages/shapes';
20
21
  export { PanelPosition } from '../../common/src/api/pages/shapes';
21
22
  export type { CustomThemes, CustomThemeOptions, ThemeOptions, CustomThemeOptionsWithScheme, CustomPaletteSet, BaseThemeOptions, ThemeExtension, WorkspaceThemeSet, NotificationIndicatorColorsSet, NotificationIndicatorColorsSetDarkScheme, NotificationIndicatorColorsSetLightScheme, NotificationIndicatorColorsWithScheme } from '../../common/src/api/theming';
22
23
  export type { AnalyticsEvent } from '../../common/src/utils/usage-register';
@@ -160,6 +161,14 @@ export declare enum PageTabContextMenuOptionType {
160
161
  Save = "Save",
161
162
  SaveAs = "Save As",
162
163
  NewPage = "New Page",
164
+ /** Workspace Browser: pin a normal tab (sets `pinned: 'user'`). */
165
+ Pin = "Pin",
166
+ /** Workspace Browser: unpin a user-pinned tab (clears `pinned`). */
167
+ Unpin = "Unpin",
168
+ /** Enterprise Browser: toggle Golden Layout view tab headers (multi-view Supertabs).
169
+ * @internal
170
+ */
171
+ ShowHideTabs = "ShowHideTabs",// Enterprise
163
172
  DeletePage = "Delete Page",// Enterprise
164
173
  SaveWorkspaceAs = "SaveWorkspaceAs",// Enterprise
165
174
  Refresh = "Refresh",// Enterprise
@@ -848,6 +857,13 @@ export interface BrowserWorkspacePlatformWindowOptions {
848
857
  * When true, disables the ability to close pages in the window. False by default.
849
858
  */
850
859
  preventPageClose?: boolean;
860
+ /**
861
+ * When true, disables the find in page feature for the window.
862
+ * The find in page view will not be created and no find in page logic will run.
863
+ * This option must be set at window creation time and cannot be changed dynamically.
864
+ * False by default.
865
+ */
866
+ disableFindInPage?: boolean;
851
867
  /**
852
868
  * Taskbar Icon for the Browser Window. If light and dark icon are defined, then the taskbar icon will change when the scheme changes.
853
869
  */
@@ -1874,6 +1890,33 @@ export interface ThemeApi {
1874
1890
  * @returns the notification indicator colors.
1875
1891
  */
1876
1892
  getNotificationIndicatorColorsInternal(): Promise<NotificationIndicatorColorsParsed | null>;
1893
+ /**
1894
+ * @internal
1895
+ * Build a legacy NotificationsThemeSet from the current generated palettes.
1896
+ * Used for backwards compatibility with older Notification Center versions
1897
+ * that do not support detailed theming.
1898
+ */
1899
+ getLegacyNotificationsThemeInternal(): Promise<LegacyNotificationsThemeSet | null>;
1900
+ }
1901
+ /**
1902
+ * @internal
1903
+ * Legacy theme format expected by Notification Center <= 2.13.
1904
+ * Each scheme contains a styled-components DefaultTheme-compatible object
1905
+ * with optional embedded notification indicator colors.
1906
+ */
1907
+ export interface LegacyNotificationsThemeSet {
1908
+ light: Record<string, unknown> & {
1909
+ notificationIndicatorColors?: Record<string, {
1910
+ background: string;
1911
+ foreground: string;
1912
+ }>;
1913
+ };
1914
+ dark: Record<string, unknown> & {
1915
+ notificationIndicatorColors?: Record<string, {
1916
+ background: string;
1917
+ foreground: string;
1918
+ }>;
1919
+ };
1877
1920
  }
1878
1921
  /**
1879
1922
  * Controller for a Workspace Platform.
@@ -3011,6 +3054,32 @@ export interface BrowserInitConfig {
3011
3054
  * @internal
3012
3055
  */
3013
3056
  aiPanelOptions?: AiPanelOptions;
3057
+ /**
3058
+ * When true, allows multiple pages to share the same title across browser
3059
+ * windows. No numeric suffixes are appended and attach/add operations
3060
+ * will not reject on title collision. `pageId` remains the unique
3061
+ * identifier for all page operations.
3062
+ *
3063
+ * Defaults to `false` (current unique-title behavior preserved).
3064
+ */
3065
+ allowDuplicatePageTitles?: boolean;
3066
+ /**
3067
+ * Opt-in suppression flags for workspace success indicators.
3068
+ * Both flags default to `false`; existing platforms see no behaviour change.
3069
+ *
3070
+ * @example
3071
+ * ```ts
3072
+ * await WorkspacePlatform.init({
3073
+ * browser: {
3074
+ * indicators: {
3075
+ * suppressWorkspaceSwitched: true,
3076
+ * suppressWorkspaceSaved: true,
3077
+ * },
3078
+ * },
3079
+ * });
3080
+ * ```
3081
+ */
3082
+ indicators?: WorkspaceIndicatorConfig;
3014
3083
  }
3015
3084
  interface WorkspaceMetadata {
3016
3085
  APIVersion: string;
@@ -1,5 +1,6 @@
1
1
  import { OpenFin } from '@openfin/core';
2
2
  import { ExtendedPanelConfig, PageLayout, PanelConfig } from '../../../../client-api-platform/src/index';
3
+ import type { PagePinnedState } from '../../../../common/src/api/pages/shapes';
3
4
  export interface Page {
4
5
  /** A UI friendly title for the page. */
5
6
  title: string;
@@ -21,6 +22,9 @@ export interface Page {
21
22
  layout: PageLayout;
22
23
  /** True if the page is locked. */
23
24
  isLocked?: boolean;
25
+ /** Not used by enterprise — page pinning is a workspace-only feature. Declared here because
26
+ * shared code (page-tab-context-menu.ts) casts to AttachedPageInternal and accesses this field. */
27
+ pinned?: PagePinnedState;
24
28
  /** Used to manipulate behaviour of a close button on a page tab. If `undefined`, then close button is visible and actionable.
25
29
  * If either property true, this page tab's context menu will disable its 'Close Page' option.
26
30
  */
@@ -12,6 +12,8 @@ export interface PageLayoutDetails {
12
12
  export type PageLayout = OpenFin.LayoutOptions & {
13
13
  layoutDetails?: PageLayoutDetails;
14
14
  };
15
+ /** The pinned state of a page tab. `'platform'` = developer-locked; `'user'` = end-user pinned. */
16
+ export type PagePinnedState = 'platform' | 'user';
15
17
  /**
16
18
  * Provides configuration options for a set of Workspace Views. An array of Page objects is a required option of the {@link workspacePlatform}
17
19
  * property of the {@link BrowserCreateWindowRequest} interface.
@@ -62,6 +64,8 @@ export interface Page {
62
64
  layout: PageLayout;
63
65
  /** True if the page is locked. */
64
66
  isLocked?: boolean;
67
+ /** Pinned state: `'platform'` (developer-locked), `'user'` (end-user pinned), or omitted (normal). */
68
+ pinned?: PagePinnedState;
65
69
  /** Used to manipulate behaviour of a close button on a page tab. If `undefined`, then close button is visible and actionable.
66
70
  * If either property true, this page tab's context menu will disable its 'Close Page' option.
67
71
  */
@@ -124,17 +128,21 @@ export interface ReorderPagesForWindowPayload {
124
128
  /** The ordered ids of the attached pages. */
125
129
  pageIds: string[];
126
130
  }
131
+ /** Page fields for update payloads. `null` signals "clear this field" over IPC (null survives JSON serialization, undefined does not). */
132
+ type PageUpdateNullableOverrides = {
133
+ pinned?: PagePinnedState | null;
134
+ };
127
135
  export interface UpdatePageForWindowPayload {
128
136
  /** The OF window identity the pages to change the order of. */
129
137
  identity: OpenFin.Identity;
130
138
  /** The id of the attached page to update. */
131
139
  pageId: string;
132
140
  /** The partial updated state of the page. */
133
- page: Partial<PageWithUpdatableRuntimeAttribs>;
141
+ page: Omit<Partial<PageWithUpdatableRuntimeAttribs>, 'pinned'> & PageUpdateNullableOverrides;
134
142
  }
135
143
  export interface ExtendedUpdatePageForWindowPayload extends UpdatePageForWindowPayload {
136
144
  /** The partial updated state of the page. */
137
- page: Partial<AttachedPage>;
145
+ page: Omit<Partial<AttachedPage>, 'pinned'> & PageUpdateNullableOverrides;
138
146
  }
139
147
  export interface AttachPagesToWindowPayload {
140
148
  /** The OF window identity to attach the pages to. */
@@ -99,7 +99,9 @@ export declare enum WorkspacePlatformChannelAction {
99
99
  ShowApplyAndPublishModalInternal = "showApplyAndPublishModalInternal",// Enterprise
100
100
  GetNotificationIndicatorColorsInternal = "getNotificationIndicatorColorsInternal",// Custom Notification Indicators Colors
101
101
  /** @internal */
102
- GetIsLegacySinglePaletteTheme = "getIsLegacySinglePaletteTheme"
102
+ GetIsLegacySinglePaletteTheme = "getIsLegacySinglePaletteTheme",
103
+ /** @internal */
104
+ GetLegacyNotificationsThemeInternal = "getLegacyNotificationsThemeInternal"
103
105
  }
104
106
  export type PlatFormSupportedFeatures = boolean | {
105
107
  isWorkspacePlatform: boolean;
@@ -0,0 +1,46 @@
1
+ import type { BaseThemeOptions, CustomPaletteSet, CustomTheme, CustomThemes, GeneratedPalettes, GenerateThemeParams } from './theming';
2
+ export declare const assignIfDefined: (target: Record<string, unknown>, key: string, value: unknown) => void;
3
+ /**
4
+ * Maps a legacy palette-based theme to theme-engine seed + overrides.
5
+ *
6
+ * Legacy themes use `palette` (single scheme) or `palettes` (light/dark) with
7
+ * explicit color values. This function translates those values into the dotted
8
+ * token paths that `generateTheme` expects.
9
+ *
10
+ * Mapping reference: https://www.figma.com/design/bUbUpAHJl8xGEtFbpYZ5z3/Theme?node-id=0-1&p=f&m=dev
11
+ */
12
+ export declare const mapLegacyThemeToCustomTheme: (legacyTheme: CustomTheme) => GenerateThemeParams;
13
+ /**
14
+ * Reverse of mapLegacyThemeToCustomTheme.
15
+ * Takes the resolved token maps from a generated theme and maps them back to the
16
+ * legacy CustomPaletteSet shape so that workspace apps still on the legacy theme
17
+ * system can consume them.
18
+ */
19
+ export declare const mapGeneratedPalettesToLegacyPalettes: (generatedPalettes: GeneratedPalettes) => {
20
+ light: CustomPaletteSet;
21
+ dark: CustomPaletteSet;
22
+ };
23
+ export declare const mapLegacyBrandIcons: (legacyBrand: BaseThemeOptions["brand"]) => GenerateThemeParams[1];
24
+ /**
25
+ * Converts legacy CustomThemes (from old workspace platforms v23.0.22 and earlier)
26
+ * into GeneratedPalettes with toCSS() methods and a ready-to-inject palette sheet.
27
+ *
28
+ * This is the backward-compatibility bridge: when a new workspace app (home, dock,
29
+ * storefront) discovers it's running against a legacy platform — detected by
30
+ * `getGeneratedPalettes()` throwing because the channel action doesn't exist —
31
+ * it calls `getThemes()` to retrieve the old-format themes and runs them through
32
+ * this function to produce the same output the new pipeline expects.
33
+ *
34
+ * The conversion mirrors `initialiseStoragePalettes` in client-api-platform but
35
+ * omits storage controller side-effects (setPalettes, setThemePaletteSheet) since
36
+ * those belong to the platform init path, not the workspace app consumption path.
37
+ *
38
+ * Theme shape discrimination:
39
+ * - `palette`: single palette applied to both schemes (legacy single-scheme theme)
40
+ * - `palettes`: explicit light/dark palettes (legacy dual-scheme theme)
41
+ * - `seed`: already a token-based theme (should not reach this path, but handled for safety)
42
+ */
43
+ export declare const convertLegacyThemesToGeneratedPalettes: (themes: CustomThemes | null | undefined) => {
44
+ generatedPalettes: GeneratedPalettes;
45
+ themePaletteSheet: string;
46
+ };
@@ -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
- export declare const constructThemePaletteSheet: (themes: GeneratedPalettes) => string;
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;
@@ -50,6 +50,13 @@ export declare function showSuccess(payload: ShowSuccessPayload): Promise<void>;
50
50
  */
51
51
  export declare function showInfo(payload: ShowInfoPayload): Promise<void>;
52
52
  /**
53
- * Creates a window centered on monitor containing a success indicator for switching workspaces
53
+ * Creates a window centered on monitor containing a success indicator for switching workspaces.
54
+ * No-ops when `suppressWorkspaceSwitched` has been set via `BrowserInitConfig.indicators`.
54
55
  */
55
56
  export declare function showSwitchWorkspaceSuccess(): Promise<void>;
57
+ /**
58
+ * Creates a success indicator for workspace save and save-as operations.
59
+ * No-ops when `suppressWorkspaceSaved` has been set via `BrowserInitConfig.indicators`.
60
+ * Rename operations are intentionally unaffected — use `showSuccess` directly for those.
61
+ */
62
+ export declare const showWorkspaceSavedSuccess: (payload: ShowSuccessPayload) => Promise<void>;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Configuration for suppressing workspace success indicators.
3
+ */
4
+ export interface WorkspaceIndicatorConfig {
5
+ /** Suppress the "Workspace Switched" indicator on all applyWorkspace calls. @default false */
6
+ suppressWorkspaceSwitched?: boolean;
7
+ /** Suppress the "Workspace Saved" indicator on regular workspace save only. Save-as and rename are unaffected. @default false */
8
+ suppressWorkspaceSaved?: boolean;
9
+ }
10
+ export declare const initWorkspaceIndicators: (config?: WorkspaceIndicatorConfig) => void;
11
+ export declare const getSuppressWorkspaceSwitched: () => boolean;
12
+ /** Returns true when the "Workspace Saved" indicator should be suppressed (save only; save-as and rename are unaffected). */
13
+ export declare const getSuppressWorkspaceSaved: () => boolean;
@@ -1,4 +1,5 @@
1
1
  import type OpenFin from '@openfin/core';
2
+ import type { PagePinnedState } from '../../../common/src/api/pages/shapes';
2
3
  import { WindowIdentity } from '../../../common/src/utils/window';
3
4
  import { AttachedPage, PageLayout } from '../../../client-api-platform/src/shapes';
4
5
  export type LayoutDOMEventType =
@@ -91,12 +92,6 @@ export declare const generateViewNameAndIdentifierNameIfNotExists: <T extends {
91
92
  */
92
93
  export declare const cloneLayoutAndConvertViewOptions: (layout: PageLayout, initViewOptions?: Partial<OpenFin.ViewOptions>) => Promise<PageLayout>;
93
94
  export declare const cloneViewComponentWithoutName: (componentState: any) => any;
94
- /**
95
- * Deep clones a layout and removes view names.
96
- * @param layout The Layout to be cloned
97
- * @returns A copy of the layout with names removed
98
- */
99
- export declare const cloneLayoutAndRemoveNames: (layout: PageLayout) => any;
100
95
  /**
101
96
  * Deep clones a layout and removes generated view names.
102
97
  * @param layout The Layout to be cloned
@@ -121,6 +116,14 @@ export declare const cleanupLayoutObservers: (layoutName: string) => void;
121
116
  * Initialize the layout for the current OF window.
122
117
  */
123
118
  export declare const initLayoutListeners: () => Promise<void>;
119
+ /**
120
+ * Returns true when a page's in-page layout should be locked.
121
+ * This applies for user-locked pages (`isLocked`) and platform-pinned pages (`pinned === 'platform'`).
122
+ */
123
+ export declare const isPageLayoutLocked: (page: {
124
+ isLocked?: boolean;
125
+ pinned?: PagePinnedState;
126
+ }) => boolean;
124
127
  /**
125
128
  * Deep clones a layout and changes its settings to make it "locked".
126
129
  * @param layout The Layout to be locked