@openfin/workspace-platform 46.0.8 → 46.0.10

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 (52) hide show
  1. package/client-api-platform/src/api/context-menu/browser-logo-handler.test.d.ts +1 -0
  2. package/client-api-platform/src/api/context-menu/browser-pagetab-handler.d.ts +1 -1
  3. package/client-api-platform/src/api/context-menu/browser-pagetab-handler.test.d.ts +1 -0
  4. package/client-api-platform/src/api/context-menu/keyboard-shortcuts.d.ts +30 -0
  5. package/client-api-platform/src/api/context-menu/keyboard-shortcuts.test.d.ts +1 -0
  6. package/client-api-platform/src/api/context-menu/utils.d.ts +4 -1
  7. package/client-api-platform/src/api/context-menu/utils.test.d.ts +1 -0
  8. package/client-api-platform/src/api/controllers/__tests__/language-storage-controller.test.d.ts +1 -0
  9. package/client-api-platform/src/api/controllers/__tests__/workspace-storage-proxy-store.test.d.ts +1 -0
  10. package/client-api-platform/src/api/controllers/language-storage-controller-store.d.ts +2 -0
  11. package/client-api-platform/src/api/controllers/language-storage-controller.d.ts +25 -0
  12. package/client-api-platform/src/api/controllers/theme-storage-controller.d.ts +3 -4
  13. package/client-api-platform/src/api/controllers/workspace-storage-proxy-store.d.ts +13 -0
  14. package/client-api-platform/src/api/language.d.ts +3 -1
  15. package/client-api-platform/src/init/browser-window-focus.test.d.ts +1 -0
  16. package/client-api-platform/src/init/override-callback/commands.d.ts +8 -4
  17. package/client-api-platform/src/init/override-callback/commands.test.d.ts +1 -0
  18. package/client-api-platform/src/init/override-callback/dialogs.d.ts +1 -0
  19. package/client-api-platform/src/init/override-callback/dialogs.test.d.ts +1 -0
  20. package/client-api-platform/src/init/override-callback/mock-snapshots.d.ts +83 -0
  21. package/client-api-platform/src/init/override-callback/snapshot.test.d.ts +1 -0
  22. package/client-api-platform/src/init/override-callback/view-options.d.ts +11 -0
  23. package/client-api-platform/src/init/override-callback/view-options.test.d.ts +1 -0
  24. package/client-api-platform/src/shapes.d.ts +55 -5
  25. package/common/src/api/i18next.d.ts +4 -1
  26. package/common/src/api/pages/shapes.d.ts +4 -0
  27. package/common/src/api/protocol/shapes/connectors.d.ts +28 -0
  28. package/common/src/api/shapes/view-tab.d.ts +86 -0
  29. package/common/src/test/logger-mock.d.ts +10 -0
  30. package/common/src/utils/color-channels.d.ts +50 -41
  31. package/common/src/utils/enterprise-channels.d.ts +3 -0
  32. package/common/src/utils/enterpriseBrowser.d.ts +0 -1
  33. package/common/src/utils/global-context-menu.d.ts +11 -0
  34. package/common/src/utils/interop.d.ts +30 -0
  35. package/common/src/utils/keyboard-commands.d.ts +47 -0
  36. package/common/src/utils/local-storage-key.d.ts +1 -0
  37. package/common/src/utils/manage-connectors-modal.d.ts +21 -0
  38. package/common/src/utils/os.d.ts +2 -0
  39. package/common/src/utils/popup-window.d.ts +1 -0
  40. package/common/src/utils/route.d.ts +7 -3
  41. package/common/src/utils/usage-register.d.ts +8 -1
  42. package/common/src/utils/view-options.d.ts +20 -0
  43. package/common/src/utils/view-tab-appearance.d.ts +51 -0
  44. package/common/src/utils/window.d.ts +2 -0
  45. package/common/src/utils/workspace-modals.d.ts +6 -0
  46. package/externals.report.json +14 -8
  47. package/index.js +1 -1
  48. package/index.js.map +1 -1
  49. package/package.json +2 -2
  50. package/storefront-vpw/src/api/register.d.ts +1 -1
  51. package/workspace_platform.zip +0 -0
  52. package/common/src/utils/color-linking.d.ts +0 -4
@@ -0,0 +1 @@
1
+ import '@common/test/fin-mocks';
@@ -1,3 +1,3 @@
1
1
  import { OpenPageTabContextMenuPayload } from '../../../../client-api-platform/src/index';
2
2
  import { PageTabContextMenuItemData } from '../../../../client-api-platform/src/shapes';
3
- export declare const pageTabContextMenuItemHandler: (data: PageTabContextMenuItemData, payload: OpenPageTabContextMenuPayload, pageTabRect?: DOMRect) => Promise<void>;
3
+ export declare const pageTabContextMenuItemHandler: (data: PageTabContextMenuItemData, payload: OpenPageTabContextMenuPayload) => Promise<void>;
@@ -0,0 +1 @@
1
+ import '@common/test/fin-mocks';
@@ -0,0 +1,30 @@
1
+ import { KeyboardCommand } from '../../../../common/src/utils/keyboard-commands';
2
+ /**
3
+ * Maps a menu item's `data.type` to the keyboard command that performs the same action, or to a fixed
4
+ * `{ keys }` binding for shortcuts handled outside `getKeyboardCommands` (e.g. quit).
5
+ */
6
+ type MenuShortcutCommands = Partial<Record<string, KeyboardCommand | {
7
+ keys: string;
8
+ }>>;
9
+ export declare const ENTERPRISE_GLOBAL_MENU_SHORTCUTS: MenuShortcutCommands;
10
+ export declare const ENTERPRISE_PAGE_TAB_MENU_SHORTCUTS: MenuShortcutCommands;
11
+ /**
12
+ * View tab New Tab / Close Tab act on the inner view, while Cmd/Ctrl+T and Cmd/Ctrl+W act on the whole
13
+ * page, so they are not labelled.
14
+ */
15
+ export declare const ENTERPRISE_VIEW_TAB_MENU_SHORTCUTS: MenuShortcutCommands;
16
+ type ShortcutMenuItem = {
17
+ data?: {
18
+ type?: string;
19
+ } | null;
20
+ submenu?: ShortcutMenuItem[];
21
+ shortcut?: string;
22
+ };
23
+ /**
24
+ * Returns a copy of `template` with each item that has a registered hotkey labelled with it (as the
25
+ * `shortcut` the Enterprise popup menu renders), formatted for the current OS.
26
+ */
27
+ export declare const addKeyboardShortcuts: <T extends ShortcutMenuItem>(template: T[], shortcutCommands: MenuShortcutCommands) => Promise<(T & {
28
+ shortcut?: string;
29
+ })[]>;
30
+ export {};
@@ -1,5 +1,6 @@
1
1
  import type OpenFin from '@openfin/core';
2
2
  import { PositioningType } from '../../../../common/src/utils/positioning';
3
+ import type { PageCreationOrigin } from '../../../../common/src/api/pages/shapes';
3
4
  import { WorkspaceContextMenuItemData } from '../../../../client-api-platform/src/shapes';
4
5
  export declare const saveWorkspaceHandlerWithInjectables: ({ showModal, afterSuccessSave }: {
5
6
  showModal?: () => Promise<void>;
@@ -9,8 +10,10 @@ export declare const saveWorkspaceHandler: (identity: OpenFin.Identity) => Promi
9
10
  export declare const saveWorkspaceAsHandler: (identity: OpenFin.Identity) => void;
10
11
  /**
11
12
  * @param identity Identity of browser window to create a new page on.
13
+ * @param origin User interaction that requested the page. Menu callers omit this.
12
14
  */
13
- export declare const createNewPageHandler: (identity: OpenFin.Identity) => Promise<void>;
15
+ export declare const createNewPageHandler: (identity: OpenFin.Identity, origin?: PageCreationOrigin) => Promise<void>;
16
+ export declare const createNewWindowHandler: (identity: OpenFin.Identity) => Promise<void>;
14
17
  /**
15
18
  * @param identity Identity of browser window to execute save on.
16
19
  * @param pageId Id of a page to save. If omitted, active page is saved.
@@ -0,0 +1 @@
1
+ import '@common/test/fin-mocks';
@@ -0,0 +1,2 @@
1
+ import { LanguageStorageController } from '../../../../client-api-platform/src/api/controllers/language-storage-controller';
2
+ export declare const getLanguageStorageController: () => LanguageStorageController;
@@ -0,0 +1,25 @@
1
+ import { WorkspaceStorageProxyStore } from '../../../../client-api-platform/src/api/controllers/workspace-storage-proxy-store';
2
+ import { Locale } from '../../../../client-api-platform/src/shapes';
3
+ /**
4
+ * Stores the configured and user-selected languages on the platform origin and
5
+ * mirrors the effective preference into the Workspace UI origin.
6
+ *
7
+ * Twin of `ThemeStorageController`: `SelectedLanguage` is the user's explicit choice
8
+ * (Language menu), `DefaultLanguage` is the platform's init-time configuration, and
9
+ * resolution is `Selected ?? Default ?? en-US`.
10
+ */
11
+ export declare class LanguageStorageController {
12
+ private providerStorage;
13
+ private workspaceStorageProxyStore;
14
+ constructor(providerStorage: Pick<Storage, 'getItem' | 'setItem'>, workspaceStorageProxyStore?: WorkspaceStorageProxyStore);
15
+ setSelectedLanguage(locale: Locale): void;
16
+ setDefaultLanguage(locale: Locale): void;
17
+ getSelectedLanguage(): Locale | undefined;
18
+ getDefaultLanguage(): Locale;
19
+ getLanguage(): Locale;
20
+ /**
21
+ * Mirrors the language preference into Workspace UI storage so every UI document on
22
+ * that origin can read it before first paint and react to `storage` events.
23
+ */
24
+ synchronizeWorkspaceStorage: () => Promise<void>;
25
+ }
@@ -1,3 +1,4 @@
1
+ import { WorkspaceStorageProxyStore } from '../../../../client-api-platform/src/api/controllers/workspace-storage-proxy-store';
1
2
  import { StorageProxy } from '../../../../client-api-platform/src/api/utils';
2
3
  import { ColorSchemeOptionType, CustomPaletteSet } from '../../../../client-api-platform/src/shapes';
3
4
  /**
@@ -36,15 +37,13 @@ export declare const generateLegacyCSSVars: (palettes: LegacyPalettes, isWindows
36
37
  dark: string;
37
38
  };
38
39
  export declare class ThemeStorageController {
39
- #private;
40
40
  private providerStorage;
41
+ private workspaceStorageProxyStore;
41
42
  private darkPaletteVars?;
42
43
  private lightPaletteVars?;
43
44
  private themePaletteSheet?;
44
- private workspaceStorage?;
45
- private storageFactory?;
46
45
  private isLegacySinglePaletteTheme;
47
- constructor(providerStorage: Pick<Storage, 'getItem' | 'setItem' | 'removeItem'>);
46
+ constructor(providerStorage: Pick<Storage, 'getItem' | 'setItem' | 'removeItem'>, workspaceStorageProxyStore?: WorkspaceStorageProxyStore);
48
47
  /**
49
48
  * Sets the storage factory. This can only be done once, and will throw for subsequent calls.
50
49
  *
@@ -0,0 +1,13 @@
1
+ import { StorageProxy } from '../../../../client-api-platform/src/api/utils';
2
+ /**
3
+ * Owns the storage proxy shared by platform features that need to synchronize
4
+ * state into the Workspace UI origin.
5
+ */
6
+ export declare class WorkspaceStorageProxyStore {
7
+ private storageProxy?;
8
+ private storageFactory?;
9
+ setStorageFactory: (factory: () => StorageProxy) => void;
10
+ getOrCreateStorageProxy: () => Promise<StorageProxy>;
11
+ destroyStorageProxy: () => Promise<void>;
12
+ }
13
+ export declare const workspaceStorageProxyStore: WorkspaceStorageProxyStore;
@@ -10,5 +10,7 @@ export declare function getLanguageResourcesInternal(): {
10
10
  * initLanguage()
11
11
  * @param language - optional - ISO language code. Built-in languages are always accepted.
12
12
  * Any language code defined in the external `translation-override.json` is also accepted.
13
+ * @param languagePacksApiUrl - optional i18next-http-backend loadPath. When set,
14
+ * HTTP language packs are used instead of the bundled locale JSON.
13
15
  */
14
- export default function initLanguage(language?: Locale): Promise<void>;
16
+ export default function initLanguage(language?: Locale, languagePacksApiUrl?: string): Promise<void>;
@@ -0,0 +1 @@
1
+ import '@common/test/fin-mocks';
@@ -1,6 +1,10 @@
1
1
  import type OpenFin from '@openfin/core';
2
- export declare const KEYBOARD_COMMANDS: {
3
- readonly NEW_TAB: "workspace.newTab";
4
- readonly FIND_IN_PAGE: "findInPage.show";
5
- };
2
+ import { KEYBOARD_COMMANDS } from '../../../../common/src/utils/keyboard-commands';
3
+ export { KEYBOARD_COMMANDS };
6
4
  export declare const getKeyboardCommands: (superGetKeyboardCommands: () => OpenFin.ShortcutOverride[]) => OpenFin.ShortcutOverride[];
5
+ /**
6
+ * The first key binding registered for `command`, or `undefined` if it has none (never registered, or
7
+ * disabled via empty `keys`). Commands with several bindings list their primary one first, e.g. reload's
8
+ * `CommandOrControl+R` before `F5`.
9
+ */
10
+ export declare const getRegisteredShortcutKeys: (command: string) => string | undefined;
@@ -4,3 +4,4 @@ export declare const showQuitPlatformDialogInternal: (req: ShowQuitPlatformDialo
4
4
  export declare const showUpdateVersionModalInternal: (req: ShowUpdateVersionModalRequest, identity: OpenFin.ProviderIdentity | OpenFin.ClientIdentity) => Promise<void>;
5
5
  export declare const showApplyAndPublishModalInternal: (_identity: OpenFin.ProviderIdentity | OpenFin.ClientIdentity) => Promise<boolean>;
6
6
  export declare const showIntentsResolverModalInternal: (req: ShowIntentsResolverModalRequest) => Promise<IntentResolverResponse>;
7
+ export declare const showManageConnectorsModalInternal: () => Promise<void>;
@@ -1,3 +1,86 @@
1
+ export declare const viewTabColors: {
2
+ backgroundColor: {
3
+ default: string;
4
+ hover: string;
5
+ active: string;
6
+ focus: string;
7
+ };
8
+ fontColor: {
9
+ default: string;
10
+ active: string;
11
+ };
12
+ };
13
+ /** `viewTab` stays on `workspacePlatform`; only its siblings move into `_internalWorkspaceData`. */
14
+ export declare const mockSnapshotWithViewTab: {
15
+ windows: {
16
+ layout: {
17
+ content: {
18
+ type: string;
19
+ content: {
20
+ type: string;
21
+ componentName: string;
22
+ componentState: {
23
+ _internalWorkspaceData: {
24
+ viewIdentifier: string;
25
+ };
26
+ workspacePlatform: {
27
+ browserNavigationButtons: {
28
+ reload: boolean;
29
+ };
30
+ viewTab: {
31
+ backgroundColor: {
32
+ default: string;
33
+ hover: string;
34
+ active: string;
35
+ focus: string;
36
+ };
37
+ fontColor: {
38
+ default: string;
39
+ active: string;
40
+ };
41
+ };
42
+ };
43
+ };
44
+ }[];
45
+ }[];
46
+ };
47
+ }[];
48
+ };
49
+ export declare const mockSnapshotWithViewTabMapped: {
50
+ windows: {
51
+ layout: {
52
+ content: {
53
+ type: string;
54
+ content: {
55
+ type: string;
56
+ componentName: string;
57
+ componentState: {
58
+ _internalWorkspaceData: {
59
+ viewIdentifier: string;
60
+ browserNavigationButtons: {
61
+ reload: boolean;
62
+ };
63
+ };
64
+ workspacePlatform: {
65
+ viewTab: {
66
+ backgroundColor: {
67
+ default: string;
68
+ hover: string;
69
+ active: string;
70
+ focus: string;
71
+ };
72
+ fontColor: {
73
+ default: string;
74
+ active: string;
75
+ };
76
+ };
77
+ };
78
+ };
79
+ }[];
80
+ }[];
81
+ };
82
+ }[];
83
+ };
1
84
  export declare const mockSnapshotWithInternalData1: {
2
85
  windows: {
3
86
  layout: {
@@ -1,10 +1,21 @@
1
1
  import type OpenFin from '@openfin/core';
2
2
  import { BrowserCreateViewRequest, BrowserViewState, BrowserWorkspacePlatformViewOptions } from '../../../../client-api-platform/src/shapes';
3
+ /**
4
+ * Strips unusable `viewTab` colors instead of rejecting the request. A tab color is decoration, and this runs
5
+ * inside `createView`, so throwing here would abort view creation and leave the surrounding window
6
+ * half-built over a cosmetic typo. Discarded states fall back to their theme default in the stylesheet.
7
+ */
8
+ export declare const sanitizeViewWorkspacePlatform: (opts: BrowserCreateViewRequest) => BrowserCreateViewRequest;
3
9
  export declare function preserveInteropIfManifestConflict(opts: Partial<OpenFin.ViewOptions>, fetchManifest: ({ manifestUrl }: {
4
10
  manifestUrl: string;
5
11
  }, callerIdentity: OpenFin.Identity) => any, callerIdentity: OpenFin.Identity): Promise<any>;
6
12
  type ViewStateBase = Pick<BrowserViewState, '_internalWorkspaceData' | 'workspacePlatform'>;
7
13
  export declare const mapInternalWorkspaceDataToWorkspacePlatform: <T extends ViewStateBase>(viewState: T) => T;
14
+ /**
15
+ * Moves legacy workspace platform view options into `_internalWorkspaceData`, which Core round-trips through layout
16
+ * componentState. `viewTab` and newer options are exempt — Core now persists `workspacePlatform` on view options directly,
17
+ * so they stay put and the runtime becomes the single source of truth.
18
+ */
8
19
  export declare const mapWorkspacePlatformToInternalWorkspaceData: <T extends ViewStateBase>(viewState: T) => T;
9
20
  export declare const setHotkeysIfNavigationButtonsEnabled: (options: BrowserCreateViewRequest) => Promise<BrowserCreateViewRequest>;
10
21
  export declare const registerHotkeyListenersIfEnabled: (viewIdentity: OpenFin.Identity, buttonOptions?: BrowserWorkspacePlatformViewOptions["browserNavigationButtons"]) => void;
@@ -5,6 +5,7 @@ import type { AnalyticsEvent } from '../../common/src/utils/usage-register';
5
5
  import type { CustomActionSpecifier, CustomButtonConfig } from '../../common/src/api/action';
6
6
  import type { AddDefaultPagePayload, AttachedPage, BookmarkNode, CopyPagePayload, HandlePagesAndWindowClosePayload, HandlePagesAndWindowCloseResult, HandleSaveModalOnPageClosePayload, Page, PageLayoutsWithSelectedViews, PageWithUpdatableRuntimeAttribs, SaveModalOnPageCloseResult, SetActivePageForWindowPayload, ShouldPageClosePayload, ShouldPageCloseResult, ViewsPreventingUnloadPayload } from '../../common/src/api/pages/shapes';
7
7
  import type { NotificationsCustomManifestOptions } from '../../common/src/api/shapes/notifications';
8
+ import type { ViewTabAppearanceOptions } from '../../common/src/api/shapes/view-tab';
8
9
  import type { CustomThemes, GeneratedPalettes } from '../../common/src/api/theming';
9
10
  import type { App, DockProviderConfigWithIdentity, StoreButtonConfig } from '../../client-api/src/shapes';
10
11
  import type { WorkflowIntegration } from '../../client-api/src/shapes/integrations';
@@ -15,6 +16,7 @@ export type { App, AppIntent, Image } from '../../client-api/src/shapes';
15
16
  export type { CustomActionSpecifier, CustomButtonConfig } from '../../common/src/api/action';
16
17
  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';
17
18
  export { PanelPosition } from '../../common/src/api/pages/shapes';
19
+ export type { ThemedIcon, ViewTabAppearanceOptions, ViewTabColorRole, ViewTabControl, ViewTabControlPosition, ViewTabStateColorOptions } from '../../common/src/api/shapes/view-tab';
18
20
  export type { CustomThemes, CustomThemeOptions, ThemeOptions, CustomThemeOptionsWithScheme, CustomPaletteSet, BaseThemeOptions, ThemeExtension, WorkspaceThemeSet, NotificationIndicatorColorsSet, NotificationIndicatorColorsSetDarkScheme, NotificationIndicatorColorsSetLightScheme, NotificationIndicatorColorsWithScheme } from '../../common/src/api/theming';
19
21
  export type { AnalyticsEvent } from '../../common/src/utils/usage-register';
20
22
  export type { WorkflowIntegration } from '../../client-api/src/shapes/integrations';
@@ -120,6 +122,7 @@ export declare enum GlobalContextMenuOptionType {
120
122
  DeleteWorkspace = "DeleteWorkspace",
121
123
  Downloads = "Downloads",
122
124
  OpenStorefront = "OpenStorefront",
125
+ ManageConnectors = "ManageConnectors",
123
126
  ManageDesktopSignals = "ManageDesktopSignals",
124
127
  FindInPage = "FindInPage",
125
128
  Appearance = "Appearance",
@@ -232,7 +235,7 @@ export type ViewTabContextMenuTemplate = OpenFin.MenuItemTemplate<ViewTabMenuDat
232
235
  /**
233
236
  * UI elements within a view tab that can be navigated to via keyboard.
234
237
  */
235
- export type ViewTabElements = 'inactive-tab' | 'active-tab' | 'inactive-tab-close-button' | 'active-tab-close-button' | 'add-tab-button';
238
+ export type ViewTabElements = 'inactive-tab' | 'active-tab' | 'inactive-tab-close-button' | 'active-tab-close-button' | 'inactive-tab-custom-control' | 'active-tab-custom-control' | 'add-tab-button';
236
239
  /**
237
240
  * Configuration options for view tab keyboard navigation behavior.
238
241
  */
@@ -242,7 +245,7 @@ export interface ViewTabOptions {
242
245
  * arrow keys when an element in the view is selected.
243
246
  * The order of the items in the array have no impact.
244
247
  * Note: these are not mutually exclusive and can overlap.
245
- * Default (when undefined): ["inactive-tab","active-tab","active-tab-close-button","inactive-tab-close-button","add-tab-button"]
248
+ * Default (when undefined): ["inactive-tab","active-tab","active-tab-close-button","inactive-tab-close-button","active-tab-custom-control","inactive-tab-custom-control","add-tab-button"]
246
249
  */
247
250
  arrowNavigation?: ViewTabElements[];
248
251
  /**
@@ -369,6 +372,19 @@ export interface ViewTabCustomActionPayload {
369
372
  windowIdentity: OpenFin.Identity;
370
373
  selectedViews: OpenFin.Identity[];
371
374
  }
375
+ export interface ViewTabControlActionPayload {
376
+ callerType: CustomActionCallerType.ViewTabControl;
377
+ /** Identity of the Browser window containing the view tab. */
378
+ windowIdentity: OpenFin.Identity;
379
+ /** Identity of the view represented by the tab. */
380
+ viewIdentity: OpenFin.Identity;
381
+ /** Any data necessary for the functioning of the specified custom action. */
382
+ customData?: any;
383
+ /** Client x-coordinate where the control was invoked. */
384
+ x: number;
385
+ /** Client y-coordinate where the control was invoked. */
386
+ y: number;
387
+ }
372
388
  /**
373
389
  * Payload received by the openViewTabContextMenu provider override.
374
390
  */
@@ -608,12 +624,16 @@ export declare enum WindowType {
608
624
  Browser = "browser",
609
625
  Platform = "platform"
610
626
  }
627
+ /** How view tab widths are calculated. `'uniform'` is today's equal-width behavior. */
628
+ export type ViewTabWidthMode = 'uniform' | 'content';
611
629
  export interface BrowserWorkspacePlatformViewOptions {
612
630
  browserNavigationButtons?: RequireAtLeastOne<{
613
631
  back?: boolean;
614
632
  forward?: boolean;
615
633
  reload?: boolean;
616
634
  }>;
635
+ /** Per-view tab appearance options. */
636
+ viewTab?: ViewTabAppearanceOptions;
617
637
  }
618
638
  type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
619
639
  [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
@@ -690,16 +710,36 @@ export interface BrowserWorkspacePlatformWindowOptions {
690
710
  minWidth?: string;
691
711
  maxWidth?: string;
692
712
  };
693
- /** Specifies the min and max sizes for view tabs in a layout.
713
+ /**
714
+ * Specifies the min and max sizes for view tabs in a layout, and how those widths are calculated.
694
715
  * View tabs will expand to take all available space up to the specified maximum size.
695
716
  * Similarly, they will collapse down to the specified minimum size.
696
717
  * When there is not enough room to fit the tabs, the tabstrip will become scrollable.
697
718
  * Sizes can be specified as pixels (e.g. "100px") or as percentage of tab strip width (e.g. "20%").
698
- * The default value for both min and max is "120px". To maintain usability, minimum values below 28px will be ignored and 28px will be used as the minimum.
719
+ * Defaults depend on the width mode: `'uniform'` uses "120px" for both bounds, while `'content'` sizes a
720
+ * tab to its own chrome and so applies no minimum and a "200px" maximum.
721
+ * To maintain usability, minimum values below 28px will be ignored and 28px will be used as the minimum.
722
+ *
723
+ * @example
724
+ * ```ts
725
+ * workspacePlatform: {
726
+ * viewTabDimensions: {
727
+ * widthMode: 'content',
728
+ * minWidth: '50px',
729
+ * maxWidth: '200px'
730
+ * }
731
+ * }
732
+ * ```
699
733
  */
700
734
  viewTabDimensions?: {
701
735
  minWidth?: string;
702
736
  maxWidth?: string;
737
+ /**
738
+ * Controls how view tab widths are calculated.
739
+ * - `'uniform'` (default): current equal-width tab behavior.
740
+ * - `'content'`: tab width is driven by tab chrome (label, favicon, spinner, controls) within min/max bounds.
741
+ */
742
+ widthMode?: ViewTabWidthMode;
703
743
  };
704
744
  /**
705
745
  * Controls whether tab-search chevron buttons are shown for page tabs and view tabs.
@@ -1989,6 +2029,7 @@ export declare enum CustomActionCallerType {
1989
2029
  StoreCustomButton = "StoreCustomButton",
1990
2030
  CustomDropdownItem = "CustomDropdownItem",
1991
2031
  GlobalContextMenu = "GlobalContextMenu",
2032
+ ViewTabControl = "ViewTabControl",
1992
2033
  ViewTabContextMenu = "ViewTabContextMenu",
1993
2034
  PageTabContextMenu = "PageTabContextMenu",
1994
2035
  SaveButtonContextMenu = "SaveButtonContextMenu",
@@ -1999,7 +2040,7 @@ export declare enum CustomActionCallerType {
1999
2040
  * When `callerType == CustomActionCallerType.API`, the payload is defined by the code directly invoking the action.*/
2000
2041
  export type CustomActionPayload = {
2001
2042
  callerType: CustomActionCallerType.API;
2002
- } | CustomButtonActionPayload | StoreCustomButtonActionPayload | CustomDropdownItemActionPayload | GlobalContextMenuOptionActionPayload | ViewTabCustomActionPayload | PageTabContextMenuOptionActionPayload | OpenSaveContextMenuOptionActionPayload;
2043
+ } | CustomButtonActionPayload | StoreCustomButtonActionPayload | CustomDropdownItemActionPayload | GlobalContextMenuOptionActionPayload | ViewTabControlActionPayload | ViewTabCustomActionPayload | PageTabContextMenuOptionActionPayload | OpenSaveContextMenuOptionActionPayload;
2003
2044
  export interface GetCurrentWorkspaceOptions {
2004
2045
  skipSnapshotUpdate?: boolean;
2005
2046
  }
@@ -2244,6 +2285,10 @@ export interface WorkspacePlatformInitConfig {
2244
2285
  * external `translation-override.json` (configured via `translationOverridesUrl`) is
2245
2286
  * also accepted.
2246
2287
  *
2288
+ * When `languagePacksApiUrl` is set, i18next loads packs over HTTP from that
2289
+ * i18next-http-backend `loadPath` (e.g. `${origin}/platform/api/localization/{{lng}}/{{ns}}.json`)
2290
+ * instead of the bundled locale JSON. Omit it to keep the built-in packs.
2291
+ *
2247
2292
  * @example
2248
2293
  * ```ts
2249
2294
  * await WorkspacePlatform.init({
@@ -2260,6 +2305,11 @@ export interface WorkspacePlatformInitConfig {
2260
2305
  */
2261
2306
  language?: {
2262
2307
  initialLanguage?: Locale;
2308
+ /**
2309
+ * i18next-http-backend loadPath. When provided, HTTP language packs are used
2310
+ * even if the manifest did not inject `languagePacksApiUrl`.
2311
+ */
2312
+ languagePacksApiUrl?: string;
2263
2313
  };
2264
2314
  /**
2265
2315
  * Override workspace platform behavior
@@ -12,7 +12,10 @@ export declare const getHttpBackendOptions: (loadPath: string) => {
12
12
  * Fire-and-forget: first paint and the logo menu must not wait on this GET.
13
13
  */
14
14
  export declare const overlayEnglishFromHttpBackend: () => void;
15
- declare function initI18next(language?: Locale): Promise<void>;
15
+ export type InitI18nextOptions = {
16
+ languagePacksApiUrl?: string;
17
+ };
18
+ declare function initI18next(language?: Locale, options?: InitI18nextOptions): Promise<void>;
16
19
  export declare const setLanguageInI18next: (locale: Locale) => Promise<void>;
17
20
  declare const t: import("i18next").TFunction<["translation", ...string[]], undefined>;
18
21
  export { initI18next, i18next, t, type Resource };
@@ -259,11 +259,15 @@ export interface CopyPagePayload {
259
259
  /** Specifies the trigger for creating a copy. */
260
260
  reason: 'save-as' | 'duplicate';
261
261
  }
262
+ /** The user interaction that created a new page. Reported in the `Create Page` analytics event. */
263
+ export type PageCreationOrigin = 'new-tab-button' | 'menu' | 'hotkey' | 'dock' | 'new-window';
262
264
  export type AddDefaultPagePayload = {
263
265
  /** The OF window identity to attach the pages to. */
264
266
  identity: OpenFin.Identity;
265
267
  /** The page to attach. */
266
268
  page: PageWithUpdatableRuntimeAttribs;
269
+ /** The user interaction that requested the page. */
270
+ origin?: PageCreationOrigin;
267
271
  };
268
272
  export type AddPagePayload = {
269
273
  /** The OF window identity to attach the pages to. */
@@ -0,0 +1,28 @@
1
+ /** Wire status for a Manage Connectors row. `connecting` wins over ready/not-ready while Connect is in flight. */
2
+ export type ConnectorStatus = 'disconnected' | 'connecting' | 'connected';
3
+ /** Full connector row returned by `get-connectors`. */
4
+ export type ConnectorPayload = {
5
+ id: string;
6
+ title: string;
7
+ description?: string;
8
+ icon?: string;
9
+ status: ConnectorStatus;
10
+ };
11
+ /** Status-only update payload published on `on-connectors-changed`. */
12
+ export type ConnectorChangedPayload = {
13
+ id: string;
14
+ status: ConnectorStatus;
15
+ };
16
+ /** Single-provider update published on `search-provider-changed`; merged into the matching `SearchProvider` by `id`. */
17
+ export type SearchProviderChangedPayload = {
18
+ id: string;
19
+ connected: boolean;
20
+ };
21
+ /** `connect-connector` / `disconnect-connector` request payload. */
22
+ export type ConnectorIdPayload = {
23
+ id: string;
24
+ };
25
+ /** `customData` written onto the Manage Connectors popup window. */
26
+ export type ManageConnectorsCustomData = {
27
+ connectors: ConnectorPayload[];
28
+ };
@@ -0,0 +1,86 @@
1
+ import type { CustomButtonConfig } from '../../../../common/src/api/action';
2
+ /**
3
+ * A CSS color value per view tab state. Any omitted state keeps its theme default, so a partial
4
+ * object overrides only the states it names.
5
+ *
6
+ * An empty string means inherit — that state is unset and falls back to its theme default. This is the only
7
+ * way to remove a color from a view that already has one: `updateOptions` merges, so omitting a state leaves
8
+ * its current color in place, and an empty `viewTab` object is treated as no change at all.
9
+ */
10
+ export interface ViewTabStateColorOptions {
11
+ /** Color when the tab is inactive. */
12
+ default?: string;
13
+ /** Color when the tab is hovered (and not active). */
14
+ hover?: string;
15
+ /** Color when the tab is active. */
16
+ active?: string;
17
+ /** Color when the tab is active and its view is focused. */
18
+ focus?: string;
19
+ }
20
+ export type ViewTabControlPosition = {
21
+ /** Tab element used as the placement anchor. */
22
+ relativeTo: 'title' | 'favicon';
23
+ /** Side of the anchor on which the control is placed. */
24
+ placement: 'before' | 'after';
25
+ };
26
+ export type ThemedIcon = {
27
+ dark: string;
28
+ light: string;
29
+ };
30
+ export interface ViewTabControl extends Omit<CustomButtonConfig, 'iconUrl' | 'parentHover'> {
31
+ /** Icon URL, or URLs selected according to the current color scheme. */
32
+ iconUrl?: string | ThemedIcon;
33
+ /** Defaults to before the tab title. */
34
+ position?: ViewTabControlPosition;
35
+ }
36
+ export type ViewTabColorRole = 'backgroundColor' | 'fontColor';
37
+ /**
38
+ * Per-view view-tab appearance settings, nested under `workspacePlatform.viewTab` on view options.
39
+ *
40
+ * @example
41
+ * ```ts
42
+ * import * as WorkspacePlatform from '@openfin/workspace-platform';
43
+ *
44
+ * const platform = WorkspacePlatform.getCurrentSync();
45
+ * await platform.Browser.createView({
46
+ * url: 'https://example.com',
47
+ * workspacePlatform: {
48
+ * viewTab: {
49
+ * backgroundColor: { default: '#1e3a5f', active: '#356aa3' },
50
+ * fontColor: { default: '#c9d8ea', active: '#ffffff' }
51
+ * }
52
+ * }
53
+ * });
54
+ * ```
55
+ *
56
+ * @example
57
+ * Returning a view to its theme defaults, naming every state that should be unset:
58
+ * ```ts
59
+ * await view.updateOptions({
60
+ * workspacePlatform: {
61
+ * viewTab: {
62
+ * backgroundColor: { default: '', hover: '', active: '', focus: '' },
63
+ * fontColor: { default: '', hover: '', active: '', focus: '' }
64
+ * }
65
+ * }
66
+ * });
67
+ * ```
68
+ */
69
+ export interface ViewTabAppearanceOptions {
70
+ /** Tab background color per state. */
71
+ backgroundColor?: ViewTabStateColorOptions;
72
+ /** Tab title text color per state. Does not affect the close or lock icons. */
73
+ fontColor?: ViewTabStateColorOptions;
74
+ /**
75
+ * Snapshot-safe controls rendered in this view's tab.
76
+ *
77
+ * Rendering requires the GoldenLayout 2 engine with scrolling tab overflow, which is how the
78
+ * Core UI Browser creates its layouts (`experimental.layoutEngine: 'v2'`, the Browser default).
79
+ * Windows that opt back in to the v1 engine render their tabs without custom controls, and this
80
+ * option is ignored rather than rejected.
81
+ *
82
+ * Controls render at a fixed size, so the right-most ones are clipped on tabs that are too
83
+ * narrow to fit them.
84
+ */
85
+ controls?: ViewTabControl[];
86
+ }
@@ -1,5 +1,15 @@
1
1
  export declare const mockLogger: {
2
2
  debug: jest.Mock<any, any, any>;
3
+ info: jest.Mock<any, any, any>;
3
4
  warn: jest.Mock<any, any, any>;
4
5
  error: jest.Mock<any, any, any>;
5
6
  };
7
+ export declare const mockPerformanceLogger: {
8
+ debug: jest.Mock<any, any, any>;
9
+ info: jest.Mock<any, any, any>;
10
+ warn: jest.Mock<any, any, any>;
11
+ error: jest.Mock<any, any, any>;
12
+ startTimer: jest.Mock<any, any, any>;
13
+ endTimer: jest.Mock<any, any, any>;
14
+ clearTimer: jest.Mock<any, any, any>;
15
+ };