@openfin/workspace-platform 23.2.8 → 23.2.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.
@@ -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>;
@@ -37,14 +37,6 @@
37
37
  "issuer": "common/src/utils/layout.ts"
38
38
  }
39
39
  ],
40
- "title-case": [
41
- {
42
- "type": "root-implicit",
43
- "version": "3.0.3",
44
- "packageName": "common/package.json",
45
- "issuer": "common/src/utils/color-linking.ts"
46
- }
47
- ],
48
40
  "dexie": [
49
41
  {
50
42
  "type": "root-implicit",
@@ -70,5 +62,13 @@
70
62
  "packageName": "common/package.json",
71
63
  "issuer": "common/src/utils/create-and-migrate-ibd-store.ts"
72
64
  }
65
+ ],
66
+ "title-case": [
67
+ {
68
+ "type": "root-implicit",
69
+ "version": "3.0.3",
70
+ "packageName": "common/package.json",
71
+ "issuer": "common/src/utils/color-linking.ts"
72
+ }
73
73
  ]
74
74
  }