@kepoai/provider 1.0.8 → 1.0.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.
Files changed (2) hide show
  1. package/api/index.d.ts +21 -0
  2. package/package.json +2 -2
package/api/index.d.ts CHANGED
@@ -157,12 +157,33 @@ export interface EventProps {
157
157
  size: size;
158
158
  }
159
159
 
160
+ export interface PopupLayerEventProps {
161
+ event: 'popupLayer:opened' | 'popupLayer:closed';
162
+ popupLayerId: string;
163
+ type: 'browser' | 'custom';
164
+ source: 'widget' | 'panel';
165
+ context?: Record<string, unknown>;
166
+ widgetId?: string;
167
+ panelRequestId?: string;
168
+ }
169
+
170
+ export interface PopupLayerOpenedEventProps extends PopupLayerEventProps {
171
+ event: 'popupLayer:opened';
172
+ }
173
+
174
+ export interface PopupLayerClosedEventProps extends PopupLayerEventProps {
175
+ event: 'popupLayer:closed';
176
+ reason: 'user-close' | 'completed' | 'cancelled' | 'host-reset';
177
+ }
178
+
160
179
  // 系统事件类型
161
180
  export interface Events {
162
181
  onScheduled: (props: EventProps) => void; // 定时任务事件
163
182
  onCreated?: (props: EventProps) => void; // 创建事件
164
183
  onShow?: (props: EventProps) => void; // 显示事件
165
184
  onHide?: (props: EventProps) => void; // 隐藏事件
185
+ onPopupLayerOpened?: (props: PopupLayerOpenedEventProps) => void; // 弹出层打开完成事件
186
+ onPopupLayerClosed?: (props: PopupLayerClosedEventProps) => void; // 弹出层关闭完成事件
166
187
  }
167
188
 
168
189
  // 简化请求查询参数值
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kepoai/provider",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "",
5
5
  "files": [
6
6
  "api"
@@ -21,6 +21,6 @@
21
21
  "@types/uuid": "^9.0.7",
22
22
  "puppeteer-core": "^22.4.1",
23
23
  "typescript": "^5.3.3",
24
- "@kepoai/types": "^0.0.11"
24
+ "@kepoai/types": "^0.0.12"
25
25
  }
26
26
  }