@xopcai/extension-ui-sdk 0.0.303 → 0.0.304
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/package.json +1 -1
- package/src/client.ts +0 -15
- package/src/types.ts +0 -2
package/package.json
CHANGED
package/src/client.ts
CHANGED
|
@@ -87,9 +87,6 @@ export function createExtensionClient(options?: CreateExtensionClientOptions): E
|
|
|
87
87
|
async showNotification(options) {
|
|
88
88
|
await transport.request('ui.notification', options);
|
|
89
89
|
},
|
|
90
|
-
closePanel() {
|
|
91
|
-
transport.emit('ui.closePanel', undefined);
|
|
92
|
-
},
|
|
93
90
|
async navigate(path: string) {
|
|
94
91
|
await transport.request('ui.navigate', { path });
|
|
95
92
|
},
|
|
@@ -124,18 +121,6 @@ export function createExtensionClient(options?: CreateExtensionClientOptions): E
|
|
|
124
121
|
});
|
|
125
122
|
},
|
|
126
123
|
|
|
127
|
-
onDidChangeVisibility(handler: (visible: boolean) => void) {
|
|
128
|
-
return transport.on('panel.visibility', (data) => {
|
|
129
|
-
const v =
|
|
130
|
-
typeof data === 'object' &&
|
|
131
|
-
data !== null &&
|
|
132
|
-
'visible' in data &&
|
|
133
|
-
typeof (data as { visible: unknown }).visible === 'boolean'
|
|
134
|
-
? (data as { visible: boolean }).visible
|
|
135
|
-
: Boolean(data);
|
|
136
|
-
handler(v);
|
|
137
|
-
});
|
|
138
|
-
},
|
|
139
124
|
};
|
|
140
125
|
|
|
141
126
|
return client;
|
package/src/types.ts
CHANGED
|
@@ -95,7 +95,6 @@ export interface ExtensionClient {
|
|
|
95
95
|
title: string;
|
|
96
96
|
message?: string;
|
|
97
97
|
}): Promise<void>;
|
|
98
|
-
closePanel(): void;
|
|
99
98
|
navigate(path: string): Promise<void>;
|
|
100
99
|
openProduct(reference: ProductReferenceLocator): Promise<void>;
|
|
101
100
|
/** Chat/tool widget iframe: host sends the tool result via `widget.data` after load. */
|
|
@@ -106,6 +105,5 @@ export interface ExtensionClient {
|
|
|
106
105
|
on(event: string, handler: (data: unknown) => void): () => void;
|
|
107
106
|
};
|
|
108
107
|
onDispose(handler: () => void): () => void;
|
|
109
|
-
onDidChangeVisibility(handler: (visible: boolean) => void): () => void;
|
|
110
108
|
}
|
|
111
109
|
import type { ProductReferenceLocator } from '@xopcai/gateway-contract';
|