@openfin/workspace 45.0.14 → 45.1.0-alpha.2c917c4a

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 (60) hide show
  1. package/client-api/src/internal/providers.d.ts +4 -3
  2. package/client-api-platform/src/api/app-directory.d.ts +1 -1
  3. package/client-api-platform/src/api/language.d.ts +3 -2
  4. package/client-api-platform/src/index.d.ts +2 -0
  5. package/client-api-platform/src/init/override-callback/view-defaults.d.ts +2 -1
  6. package/client-api-platform/src/init/view-tab-new-tab-shortcut-usage.d.ts +4 -0
  7. package/client-api-platform/src/shapes.d.ts +106 -9
  8. package/common/src/api/home-search-host.d.ts +8 -0
  9. package/common/src/api/home-vpw-search-channel.d.ts +2 -0
  10. package/common/src/api/home-vpw-search-host.d.ts +4 -0
  11. package/common/src/api/i18next.d.ts +2 -2
  12. package/common/src/api/protocol/workspace.d.ts +1 -0
  13. package/common/src/api/workspace-events.d.ts +53 -0
  14. package/common/src/errors/AppError.d.ts +37 -0
  15. package/common/src/errors/errors.d.ts +23 -0
  16. package/common/src/errors/index.d.ts +6 -0
  17. package/common/src/errors/result.d.ts +23 -0
  18. package/common/src/errors/toAppError.d.ts +14 -0
  19. package/common/src/utils/color-linking.d.ts +38 -1
  20. package/common/src/utils/context-menu.d.ts +1 -0
  21. package/common/src/utils/env.d.ts +1 -1
  22. package/common/src/utils/layout.d.ts +9 -3
  23. package/common/src/utils/navigate.d.ts +23 -0
  24. package/common/src/utils/route.d.ts +6 -0
  25. package/common/src/utils/usage-register.d.ts +15 -1
  26. package/common/src/utils/window.d.ts +3 -1
  27. package/externals.report.json +1 -1
  28. package/home-vpw/src/api/constants.d.ts +3 -0
  29. package/home-vpw/src/api/ensure-infrastructure.d.ts +6 -0
  30. package/home-vpw/src/api/index.d.ts +3 -0
  31. package/home-vpw/src/api/internal/channel-handlers.d.ts +23 -0
  32. package/home-vpw/src/api/internal/provider-registration.d.ts +8 -0
  33. package/home-vpw/src/api/internal/providers-map.d.ts +22 -0
  34. package/home-vpw/src/api/launch.d.ts +6 -0
  35. package/home-vpw/src/api/protocol.d.ts +44 -0
  36. package/home-vpw/src/api/provider.d.ts +19 -0
  37. package/home-vpw/src/api/register.d.ts +10 -0
  38. package/home-vpw/src/api/visibility.d.ts +3 -0
  39. package/home.js +1 -1
  40. package/home.js.map +1 -1
  41. package/index.js +1 -1
  42. package/index.js.map +1 -1
  43. package/notifications.js +1 -1
  44. package/notifications.js.map +1 -1
  45. package/package.json +3 -3
  46. package/store.js +1 -1
  47. package/store.js.map +1 -1
  48. package/storefront-vpw/src/api/constants.d.ts +2 -0
  49. package/storefront-vpw/src/api/ensure-infrastructure.d.ts +6 -0
  50. package/storefront-vpw/src/api/index.d.ts +5 -0
  51. package/storefront-vpw/src/api/internal/assert-provider-process.d.ts +2 -0
  52. package/storefront-vpw/src/api/internal/provider-registration.d.ts +7 -0
  53. package/storefront-vpw/src/api/internal/providers-map.d.ts +23 -0
  54. package/storefront-vpw/src/api/launch.d.ts +2 -0
  55. package/storefront-vpw/src/api/protocol.d.ts +67 -0
  56. package/storefront-vpw/src/api/provider.d.ts +23 -0
  57. package/storefront-vpw/src/api/register.d.ts +79 -0
  58. package/storefront-vpw/src/api/visibility.d.ts +43 -0
  59. package/storefront-vpw/src/shapes/index.d.ts +1 -0
  60. package/storefront-vpw/src/shapes/shapes.d.ts +4 -0
@@ -26,7 +26,9 @@ export declare enum WindowName {
26
26
  ApplyAndPublishModal = "here-apply-and-publish-modal",
27
27
  PublishOnCloseModal = "here-publish-on-close-modal",
28
28
  DesktopSignalsModal = "here-desktop-signals-modal",
29
- IntentsResolverModal = "here-intents-resolver-modal"
29
+ IntentsResolverModal = "here-intents-resolver-modal",
30
+ /** Browser-zone Home VPW window (platform child window). */
31
+ HomeVpw = "home-vpw"
30
32
  }
31
33
  export interface WindowIdentity {
32
34
  uuid: ApplicationUUID | string;
@@ -2,7 +2,7 @@
2
2
  "@openfin/notifications": [
3
3
  {
4
4
  "type": "explicit",
5
- "version": "45.0.0-alpha-4860",
5
+ "version": "45.1.0-alpha-4882",
6
6
  "packageName": "client-api/package.json",
7
7
  "issuer": "client-api/src/notifications.ts"
8
8
  }
@@ -0,0 +1,3 @@
1
+ import { WindowName } from '../../../common/src/utils/window';
2
+ export declare const HOME_VPW_WINDOW_NAME = WindowName.HomeVpw;
3
+ export declare const getHomeVpwChannelName: (uuid?: string) => string;
@@ -0,0 +1,6 @@
1
+ import type { CLIProvider, HomeProvider } from '../../../client-api/src/shapes';
2
+ import { HomeVpwProvider } from './provider';
3
+ /** Creates the platform channel and {@link HomeVpwProvider} instance if not already running. */
4
+ export declare const ensureHomeVpwChannel: () => Promise<HomeVpwProvider>;
5
+ /** Launches the browser-zone Home VPW window and waits for the client `ready` handshake. */
6
+ export declare const launchHomeVpwWindow: (provider: Pick<HomeProvider | CLIProvider, "id" | "title" | "icon" | "subHeader">) => Promise<void>;
@@ -0,0 +1,3 @@
1
+ export { deregister, hide, register, show } from './register';
2
+ export type { CLIProvider, HomeProvider, HomeRegistration, SetSearchQueryOptions } from './register';
3
+ export { getHomeVpwChannelName, HOME_VPW_WINDOW_NAME } from './constants';
@@ -0,0 +1,23 @@
1
+ import type OpenFin from '@openfin/core';
2
+ import { withDisconnectListener } from '../../../../common/src/utils/channels';
3
+ import { SearchAPIClientChannelClient } from '../../../../common/src/api/protocol/shapes/search';
4
+ import type { HomeClientApiDataRequest, HomeClientApiDispatchRequest, HomeClientApiSearchCloseRequest, HomeInternalDataResponse, HomeInternalErrorResponse, InternalSearchListenerRequest } from '../../../../common/src/api/shapes/home';
5
+ import { HomeVpwProvidersMap } from './providers-map';
6
+ import type { CLIProvider, HomeProvider } from '../../../../client-api/src/shapes';
7
+ export type HomeVpwChannelHandlersContext = {
8
+ providers: HomeVpwProvidersMap<HomeProvider | CLIProvider>;
9
+ searchRequests: Map<string, InternalSearchListenerRequest>;
10
+ getSearchClientAPIChannelClient: () => Promise<withDisconnectListener<SearchAPIClientChannelClient>>;
11
+ };
12
+ export type HomeVpwChannelHandlers = {
13
+ handleDataRequest: (req: HomeClientApiDataRequest) => Promise<HomeInternalDataResponse | HomeInternalErrorResponse>;
14
+ handleResultDispatch: (req: HomeClientApiDispatchRequest, identity: OpenFin.Identity) => Promise<void>;
15
+ handleSearchRequestClose: (req: HomeClientApiSearchCloseRequest) => void;
16
+ handleChannelDisconnection: () => Promise<void>;
17
+ };
18
+ export declare const createHomeVpwChannelHandlers: (ctx: HomeVpwChannelHandlersContext) => HomeVpwChannelHandlers;
19
+ type HomeVpwSearchChannelClient = withDisconnectListener<SearchAPIClientChannelClient> & {
20
+ homeVpwChannelActionsRegistered?: boolean;
21
+ };
22
+ export declare const registerHomeVpwChannelClientActions: (channel: HomeVpwSearchChannelClient, handlers: HomeVpwChannelHandlers) => void;
23
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { CLIProvider, HomeProvider, RegisterMetaInfoInternal } from '../../../../client-api/src/shapes';
2
+ import { HomeVpwProvidersMap } from './providers-map';
3
+ /** VPW search providers — separate from legacy Home provider registration in client-api. */
4
+ export declare const HomeVpwProviders: HomeVpwProvidersMap<HomeProvider | CLIProvider>;
5
+ export declare const registerHomeVpwProviderInternal: (provider: HomeProvider | CLIProvider) => Promise<RegisterMetaInfoInternal>;
6
+ export declare const registerHomeVpwBuiltinProviderInternal: (provider: HomeProvider | CLIProvider) => Promise<RegisterMetaInfoInternal | void>;
7
+ export declare const deregisterHomeVpwProviderInternal: (providerId: string) => Promise<void>;
8
+ export declare const hasRegisteredHomeVpwIntegrator: () => boolean;
@@ -0,0 +1,22 @@
1
+ import { PlatformError } from '../../../../common/src/errors';
2
+ type HomeVpwProviderRecord = {
3
+ id: string;
4
+ };
5
+ export declare class HomeVpwProviderAlreadyRegisteredError extends PlatformError {
6
+ constructor(id: string);
7
+ }
8
+ /**
9
+ * In-process registry for Home VPW search provider callbacks.
10
+ * VPW-only — not shared with legacy Home provider registration in client-api.
11
+ */
12
+ export declare class HomeVpwProvidersMap<T extends HomeVpwProviderRecord> {
13
+ private readonly providersMap;
14
+ getProvider(id: string): T | undefined;
15
+ hasProvider(id: string): boolean;
16
+ assertNotAlreadyRegistered(id: string): void;
17
+ hasProviderMatching(predicate: (id: string) => boolean): boolean;
18
+ addProvider(provider: T): void;
19
+ deleteProvider(id: string): void;
20
+ getProviderOrFail(id: string): T;
21
+ }
22
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { CLIProvider, HomeProvider } from '../../../client-api/src/shapes';
2
+ /**
3
+ * Create the Home VPW window from the Workspace Platform (e.g. Studio).
4
+ * Uses fin.Window.create so creation runs in the platform process — same pattern as Dock3.
5
+ */
6
+ export declare const launchHomeVpw: (provider: Pick<HomeProvider | CLIProvider, "subHeader">) => Promise<void>;
@@ -0,0 +1,44 @@
1
+ import type { OpenFin } from '@openfin/core';
2
+ type ChannelActionMap = {
3
+ [action: string]: (...args: any[]) => any;
4
+ };
5
+ type TypedChannelClient<ProviderActions extends ChannelActionMap, ClientActions extends ChannelActionMap> = Omit<OpenFin.ChannelClient, 'dispatch' | 'register'> & {
6
+ dispatch: <T extends keyof ProviderActions>(action: T, payload: Parameters<ProviderActions[T]>[0]) => Promise<Awaited<ReturnType<ProviderActions[T]>>>;
7
+ register: <T extends keyof ClientActions>(action: T, handler: (payload: Parameters<ClientActions[T]>[0], id: OpenFin.ProviderIdentity | OpenFin.ClientIdentity) => Promise<Awaited<ReturnType<ClientActions[T]>>>) => boolean;
8
+ };
9
+ type TypedChannelProvider<ProviderActions extends ChannelActionMap, ClientActions extends ChannelActionMap> = Omit<OpenFin.ChannelProvider, 'dispatch' | 'register'> & {
10
+ dispatch: <T extends keyof ClientActions>(to: OpenFin.ClientIdentity, action: T, payload: Parameters<ClientActions[T]>[0]) => Promise<Awaited<ReturnType<ClientActions[T]>>>;
11
+ register: <T extends keyof ProviderActions>(action: T, handler: (payload: Parameters<ProviderActions[T]>[0], id: OpenFin.ProviderIdentity | OpenFin.ClientIdentity) => Promise<Awaited<ReturnType<ProviderActions[T]>>>) => boolean;
12
+ };
13
+ export type SetSearchQueryPayload = {
14
+ query: string;
15
+ providerId?: string;
16
+ context?: Record<string, unknown>;
17
+ };
18
+ export type SearchInvokedPayload = {
19
+ query?: string;
20
+ providerId?: string;
21
+ context?: Record<string, unknown>;
22
+ };
23
+ /**
24
+ * Actions the VPW window dispatches TO the platform provider (provider handles these).
25
+ * @internal
26
+ */
27
+ export type HomeVpwChannelProviderChannelActions = {
28
+ ready: () => void;
29
+ };
30
+ /**
31
+ * Actions the platform provider dispatches TO the VPW window (client handles these).
32
+ * @internal
33
+ */
34
+ export type HomeVpwChannelClientChannelActions = {
35
+ 'search-invoked': (payload: SearchInvokedPayload) => void;
36
+ 'set-search-query': (payload: SetSearchQueryPayload) => void;
37
+ /** Immediate show — mirrors legacy `show-home` / `showAndFocus`. */
38
+ 'show': () => void;
39
+ /** Deferred show after resize animation and theme sync — mirrors legacy `setSearchQuery` show path. */
40
+ 'show-when-ready': () => void;
41
+ };
42
+ export type HomeVpwChannelProvider = TypedChannelProvider<HomeVpwChannelProviderChannelActions, HomeVpwChannelClientChannelActions>;
43
+ export type HomeVpwChannelClient = TypedChannelClient<HomeVpwChannelProviderChannelActions, HomeVpwChannelClientChannelActions>;
44
+ export {};
@@ -0,0 +1,19 @@
1
+ import type { OpenFin } from '@openfin/core';
2
+ import type { HomeVpwChannelProvider } from './protocol';
3
+ export declare class HomeVpwProvider {
4
+ #private;
5
+ static getOverrideConstructor(channel: HomeVpwChannelProvider): new () => HomeVpwProvider;
6
+ static instance: HomeVpwProvider | null;
7
+ constructor(channel: HomeVpwChannelProvider);
8
+ get ready(): Promise<void>;
9
+ private ensureClientConnected;
10
+ show(): Promise<void>;
11
+ showWhenReady(): Promise<void>;
12
+ hide(): Promise<void>;
13
+ shutdown(): Promise<void>;
14
+ getWindowSync(): OpenFin.Window;
15
+ dispatchSearchInvoked(query?: string, providerId?: string, context?: Record<string, unknown>): Promise<void>;
16
+ dispatchSetSearchQuery(query: string, providerId?: string, context?: Record<string, unknown>): Promise<void>;
17
+ private registerChannelActions;
18
+ }
19
+ export type HomeVpwConstructorOverride = (Base: new () => HomeVpwProvider) => new () => HomeVpwProvider;
@@ -0,0 +1,10 @@
1
+ import type { CLIProvider, HomeProvider, HomeRegistration } from '../../../client-api/src/shapes';
2
+ export type { CLIProvider, HomeProvider, HomeRegistration, SetSearchQueryOptions } from '../../../client-api/src/shapes';
3
+ export { hide, show } from './visibility';
4
+ /**
5
+ * Register a Home VPW integrator — stands up channel, browser-zone window, and search topic registration.
6
+ * Mirrors legacy Home.register: window is created hidden; call show to display.
7
+ */
8
+ export declare const register: (provider: HomeProvider | CLIProvider) => Promise<HomeRegistration>;
9
+ export declare const deregister: (providerId: string) => Promise<void>;
10
+ export declare const registerBuiltin: (provider: HomeProvider | CLIProvider) => Promise<void>;
@@ -0,0 +1,3 @@
1
+ export declare const show: () => Promise<void>;
2
+ export declare const hide: () => Promise<void>;
3
+ export declare const showWhenReady: () => Promise<void>;