@quanta-intellect/vessel-browser 0.1.86 → 0.1.90
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.
package/out/preload/index.js
CHANGED
|
@@ -187,7 +187,12 @@ const Channels = {
|
|
|
187
187
|
CLEAR_BROWSING_DATA: "browsing-data:clear",
|
|
188
188
|
CLEAR_BROWSING_DATA_OPEN: "browsing-data:open",
|
|
189
189
|
// Picture-in-Picture
|
|
190
|
-
TAB_TOGGLE_PIP: "tab:toggle-pip"
|
|
190
|
+
TAB_TOGGLE_PIP: "tab:toggle-pip",
|
|
191
|
+
// Codex OAuth
|
|
192
|
+
CODEX_START_AUTH: "codex:start-auth",
|
|
193
|
+
CODEX_CANCEL_AUTH: "codex:cancel-auth",
|
|
194
|
+
CODEX_AUTH_STATUS: "codex:auth-status",
|
|
195
|
+
CODEX_DISCONNECT: "codex:disconnect"
|
|
191
196
|
};
|
|
192
197
|
const api = {
|
|
193
198
|
tabs: {
|
|
@@ -527,6 +532,16 @@ const api = {
|
|
|
527
532
|
},
|
|
528
533
|
pip: {
|
|
529
534
|
toggle: () => electron.ipcRenderer.invoke(Channels.TAB_TOGGLE_PIP)
|
|
535
|
+
},
|
|
536
|
+
codex: {
|
|
537
|
+
startAuth: () => electron.ipcRenderer.invoke(Channels.CODEX_START_AUTH),
|
|
538
|
+
cancelAuth: () => electron.ipcRenderer.invoke(Channels.CODEX_CANCEL_AUTH),
|
|
539
|
+
disconnect: () => electron.ipcRenderer.invoke(Channels.CODEX_DISCONNECT),
|
|
540
|
+
onAuthStatus: (cb) => {
|
|
541
|
+
const handler = (_, payload) => cb(payload);
|
|
542
|
+
electron.ipcRenderer.on(Channels.CODEX_AUTH_STATUS, handler);
|
|
543
|
+
return () => electron.ipcRenderer.removeListener(Channels.CODEX_AUTH_STATUS, handler);
|
|
544
|
+
}
|
|
530
545
|
}
|
|
531
546
|
};
|
|
532
547
|
electron.contextBridge.exposeInMainWorld("vessel", api);
|