obi-sdk 0.19.78-beta.2 → 0.19.78-beta.21
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.
|
@@ -14,5 +14,7 @@ export type SidePanelContainerProps = {
|
|
|
14
14
|
* Must match meet-style behavior — opaque `bg-background` here would hide the host page.
|
|
15
15
|
*/
|
|
16
16
|
sidePanelPipActive?: boolean;
|
|
17
|
+
/** Forwarded to obi-chat-web SdkPanel: keep PiP UI in the shadow host (no Document PiP window). */
|
|
18
|
+
preferHostPip?: boolean;
|
|
17
19
|
};
|
|
18
|
-
export declare function SidePanelContainer({ sdk, shadowHost, onPipChange, onDocumentPipChange, documentPipActive, sidePanelPipActive, }: SidePanelContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare function SidePanelContainer({ sdk, shadowHost, onPipChange, onDocumentPipChange, documentPipActive, sidePanelPipActive, preferHostPip, }: SidePanelContainerProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/src/sdk.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export type ObiSDKEvents = {
|
|
|
10
10
|
error: (err: Error) => void;
|
|
11
11
|
showMenu: (showMenu: boolean) => void;
|
|
12
12
|
showSidePanel: (show: boolean) => void;
|
|
13
|
+
preferHostPip: (value: boolean) => void;
|
|
13
14
|
configUpdated: () => void;
|
|
14
15
|
showMessage: (payload: {
|
|
15
16
|
text: string;
|
|
@@ -32,6 +33,9 @@ export declare class ObiSDK extends EventEmitter<ObiSDKEvents> {
|
|
|
32
33
|
completedWidgetDisplay?: string;
|
|
33
34
|
widgetPosition?: string;
|
|
34
35
|
showSidePanel: boolean;
|
|
36
|
+
preferHostPip: boolean;
|
|
37
|
+
tutorBaseUrl: string;
|
|
38
|
+
tutorProductAlias: string;
|
|
35
39
|
graphemes?: any;
|
|
36
40
|
commandLog: any[];
|
|
37
41
|
private commandQueue;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Storybook: Chromium exposes `documentPictureInPicture` as a read-only getter; assigning a mock
|
|
3
|
+
* throws. obi-chat-web checks `window.__obiSdkStorybookDocumentPip` first and uses this iframe-based
|
|
4
|
+
* `requestWindow` so "Host Layout Document PiP" can run without real OS PiP.
|
|
5
|
+
*/
|
|
6
|
+
export type StorybookDocumentPipBridge = {
|
|
7
|
+
requestWindow: (opts: {
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
}) => Promise<Window>;
|
|
11
|
+
};
|
|
12
|
+
declare global {
|
|
13
|
+
interface Window {
|
|
14
|
+
__obiSdkStorybookDocumentPip?: StorybookDocumentPipBridge;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export declare function installStorybookDocumentPipShim(options: {
|
|
18
|
+
/** Full-bleed story root; faux PiP iframe is absolutely positioned inside it */
|
|
19
|
+
getMountSurface: () => HTMLElement | null;
|
|
20
|
+
}): () => void;
|
package/dist/src/types.d.ts
CHANGED
|
@@ -14,4 +14,10 @@ export type Config = {
|
|
|
14
14
|
widgetDisplay?: string;
|
|
15
15
|
completedWidgetDisplay?: string;
|
|
16
16
|
widgetPosition?: string;
|
|
17
|
+
/** When true, never opens a Document PiP window; PiP stays in the shadow host. Use for testing or when DPiP is undesirable. */
|
|
18
|
+
preferHostPip?: boolean;
|
|
19
|
+
/** Base WebSocket URL for the tutor server (e.g. "wss://tutor.example.com"). When set, the side panel connects via convo WebSocket instead of obi-server SSE/LiveKit. */
|
|
20
|
+
tutorBaseUrl?: string;
|
|
21
|
+
/** Tutor product alias used in the WebSocket URL (/ws/chat/{alias}). Defaults to the obi-server app token if not set. */
|
|
22
|
+
tutorProductAlias?: string;
|
|
17
23
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "obi-sdk",
|
|
3
|
-
"version": "0.19.78-beta.
|
|
3
|
+
"version": "0.19.78-beta.21",
|
|
4
4
|
"description": "JavaScript SDK for Obi",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/obi-sdk.umd.js",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"dev:staging": "VITE_API_BASE_URL=https://staging.coragents.ai vite --mode staging",
|
|
26
26
|
"build": "vite build --mode production",
|
|
27
27
|
"build:staging": "VITE_API_BASE_URL=https://staging.coragents.ai vite build --mode staging",
|
|
28
|
+
"build:local": "VITE_API_BASE_URL=http://localhost:3001 vite build --mode development",
|
|
28
29
|
"build:publish": "pnpm build --mode production",
|
|
29
30
|
"build:ext": "vite build --mode production --config vite.config.ext.ts",
|
|
30
31
|
"lint": "eslint .",
|
|
@@ -91,8 +92,8 @@
|
|
|
91
92
|
"@types/react": "^19.2.10",
|
|
92
93
|
"@types/react-dom": "^19.2.3",
|
|
93
94
|
"@vitejs/plugin-react": "^5.1.2",
|
|
94
|
-
"@vitest/coverage-v8": "^
|
|
95
|
-
"@vitest/ui": "^
|
|
95
|
+
"@vitest/coverage-v8": "^4.0.15",
|
|
96
|
+
"@vitest/ui": "^4.0.15",
|
|
96
97
|
"eslint": "^9.39.0",
|
|
97
98
|
"eslint-config-prettier": "^9.1.2",
|
|
98
99
|
"eslint-plugin-import": "^2.32.0",
|
|
@@ -106,7 +107,7 @@
|
|
|
106
107
|
"typescript": "^5.9.3",
|
|
107
108
|
"typescript-eslint": "^8.56.0",
|
|
108
109
|
"vite": "^4.5.14",
|
|
109
|
-
"vitest": "^
|
|
110
|
+
"vitest": "^4.0.15"
|
|
110
111
|
},
|
|
111
112
|
"packageManager": "pnpm@10.5.2"
|
|
112
113
|
}
|