@openfin/workspace-platform 45.2.0 → 45.2.2

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 (26) hide show
  1. package/client-api-platform/src/api/app-directory.d.ts +1 -1
  2. package/client-api-platform/src/api/controllers/__tests__/language-storage-controller.test.d.ts +1 -0
  3. package/client-api-platform/src/api/controllers/__tests__/workspace-storage-proxy-store.test.d.ts +1 -0
  4. package/client-api-platform/src/api/controllers/language-storage-controller-store.d.ts +2 -0
  5. package/client-api-platform/src/api/controllers/language-storage-controller.d.ts +25 -0
  6. package/client-api-platform/src/api/controllers/theme-storage-controller.d.ts +3 -4
  7. package/client-api-platform/src/api/controllers/workspace-storage-proxy-store.d.ts +13 -0
  8. package/client-api-platform/src/api/language.d.ts +3 -1
  9. package/client-api-platform/src/init/override-callback/mock-snapshots.d.ts +83 -0
  10. package/client-api-platform/src/init/override-callback/view-options.d.ts +11 -0
  11. package/client-api-platform/src/init/override-callback/view-options.test.d.ts +1 -0
  12. package/client-api-platform/src/shapes.d.ts +54 -5
  13. package/common/src/api/i18next.d.ts +4 -1
  14. package/common/src/api/shapes/view-tab.d.ts +86 -0
  15. package/common/src/test/logger-mock.d.ts +10 -0
  16. package/common/src/utils/color-channels.d.ts +44 -41
  17. package/common/src/utils/enterpriseBrowser.d.ts +0 -1
  18. package/common/src/utils/local-storage-key.d.ts +1 -0
  19. package/common/src/utils/view-options.d.ts +20 -0
  20. package/common/src/utils/view-tab-appearance.d.ts +59 -0
  21. package/externals.report.json +13 -13
  22. package/index.js +1 -1
  23. package/index.js.map +1 -1
  24. package/package.json +2 -2
  25. package/workspace_platform.zip +0 -0
  26. package/common/src/utils/color-linking.d.ts +0 -4
@@ -0,0 +1,59 @@
1
+ import type OpenFin from '@openfin/core';
2
+ import type { ViewTabAppearanceOptions, ViewTabColorRole } from '../../../common/src/api/shapes/view-tab';
3
+ export declare const VIEW_TAB_STATES: readonly ["default", "hover", "active", "focus"];
4
+ export type ViewTabState = (typeof VIEW_TAB_STATES)[number];
5
+ /** A color that was discarded during sanitization, for the caller to log. */
6
+ export interface RejectedViewTabColor {
7
+ role: ViewTabColorRole;
8
+ /** Absent when the whole role was malformed rather than one of its states. */
9
+ state?: ViewTabState;
10
+ value: unknown;
11
+ }
12
+ /**
13
+ * Drops every state whose value is not a supported CSS color, returning what survived alongside what was
14
+ * discarded. Tab color is decoration, so a malformed value degrades that state to its theme default instead
15
+ * of failing the operation that carried it.
16
+ *
17
+ * Only the two color roles are validated. Every other `viewTab` option — `controls`, and whatever follows it
18
+ * — is carried through untouched, so a bad color cannot take an unrelated tab option down with it. Appearance
19
+ * is omitted only when nothing at all is left, which keeps a wholly-invalid object out of persistence.
20
+ */
21
+ export declare const sanitizeViewTabAppearance: (viewTab: unknown) => {
22
+ appearance?: ViewTabAppearanceOptions;
23
+ rejected: RejectedViewTabColor[];
24
+ };
25
+ /** Formats a rejected color for a log line, e.g. `viewTab.fontColor.default "##EDE8D0"`. */
26
+ export declare const describeRejectedViewTabColor: ({ role, state, value }: RejectedViewTabColor) => string;
27
+ type ViewOptionsWithWorkspacePlatform = {
28
+ workspacePlatform?: {
29
+ viewTab?: ViewTabAppearanceOptions;
30
+ };
31
+ };
32
+ /**
33
+ * True when this `view-options-changed` diff touched `workspacePlatform.viewTab`, so that unrelated view
34
+ * option changes do not repaint tabs.
35
+ *
36
+ * `oldVal` is checked as well as `newVal` because clearing the appearance drops `viewTab` from `newVal`
37
+ * entirely — that case only shows up on the old side, and it still needs a repaint to restore the theme
38
+ * defaults.
39
+ */
40
+ export declare const hasViewTabAppearanceDiff: (diff: unknown) => boolean;
41
+ export declare const getViewTabAppearanceFromViewOptions: (options: ViewOptionsWithWorkspacePlatform) => ViewTabAppearanceOptions | undefined;
42
+ /**
43
+ * Reads view tab appearance from the view. Core persists `workspacePlatform` on view options across create,
44
+ * `updateOptions`, snapshot, and `getOptions`, so `getOptions` is the single source of truth.
45
+ */
46
+ export declare const getViewTabAppearanceFromView: (view: OpenFin.View) => Promise<ViewTabAppearanceOptions | undefined>;
47
+ /**
48
+ * Writes the per-state custom properties for a single tab element. Values are set inline so that sibling tabs
49
+ * in the same tab strip are unaffected.
50
+ */
51
+ export declare const applyViewTabAppearance: (tab: HTMLElement, appearance?: ViewTabAppearanceOptions) => void;
52
+ export declare const applyViewTabAppearanceFromViewOptions: (tab: HTMLElement, view: OpenFin.View) => Promise<void>;
53
+ /**
54
+ * A single listener shared by every view in the window. View `options-changed` propagates to the parent
55
+ * window as `view-options-changed`, so one subscription covers all layouts — and nothing leaks when a view is
56
+ * reparented, which moves it between windows without destroying it.
57
+ */
58
+ export declare const registerWindowViewTabAppearanceListener: (win: OpenFin.Window, getTab: (viewIdentity: OpenFin.Identity) => HTMLElement | null | undefined) => (() => void);
59
+ export {};
@@ -45,14 +45,6 @@
45
45
  "issuer": "common/src/utils/layout.ts"
46
46
  }
47
47
  ],
48
- "title-case": [
49
- {
50
- "type": "explicit",
51
- "version": "3.0.3",
52
- "packageName": "common/package.json",
53
- "issuer": "common/src/utils/color-linking.ts"
54
- }
55
- ],
56
48
  "dexie": [
57
49
  {
58
50
  "type": "explicit",
@@ -60,6 +52,12 @@
60
52
  "packageName": "common/package.json",
61
53
  "issuer": "common/src/api/pages/idb.ts"
62
54
  },
55
+ {
56
+ "type": "explicit",
57
+ "version": "^4.0.11",
58
+ "packageName": "client-api-platform/package.json",
59
+ "issuer": "client-api-platform/src/api/dock/idb.ts"
60
+ },
63
61
  {
64
62
  "type": "root-implicit",
65
63
  "version": "^4.0.11",
@@ -69,14 +67,16 @@
69
67
  {
70
68
  "type": "explicit",
71
69
  "version": "^4.0.11",
72
- "packageName": "client-api-platform/package.json",
73
- "issuer": "client-api-platform/src/api/dock/idb.ts"
74
- },
70
+ "packageName": "common/package.json",
71
+ "issuer": "common/src/utils/create-and-migrate-ibd-store.ts"
72
+ }
73
+ ],
74
+ "title-case": [
75
75
  {
76
76
  "type": "explicit",
77
- "version": "^4.0.11",
77
+ "version": "3.0.3",
78
78
  "packageName": "common/package.json",
79
- "issuer": "common/src/utils/create-and-migrate-ibd-store.ts"
79
+ "issuer": "common/src/utils/color-channels.ts"
80
80
  }
81
81
  ]
82
82
  }