@kepoai/provider 1.0.8 → 1.0.9

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 +20 -0
  2. package/package.json +2 -2
package/api/index.d.ts CHANGED
@@ -157,12 +157,32 @@ 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
+ widgetId?: string;
166
+ panelRequestId?: string;
167
+ }
168
+
169
+ export interface PopupLayerOpenedEventProps extends PopupLayerEventProps {
170
+ event: 'popupLayer:opened';
171
+ }
172
+
173
+ export interface PopupLayerClosedEventProps extends PopupLayerEventProps {
174
+ event: 'popupLayer:closed';
175
+ reason: 'user-close' | 'completed' | 'cancelled' | 'host-reset';
176
+ }
177
+
160
178
  // 系统事件类型
161
179
  export interface Events {
162
180
  onScheduled: (props: EventProps) => void; // 定时任务事件
163
181
  onCreated?: (props: EventProps) => void; // 创建事件
164
182
  onShow?: (props: EventProps) => void; // 显示事件
165
183
  onHide?: (props: EventProps) => void; // 隐藏事件
184
+ onPopupLayerOpened?: (props: PopupLayerOpenedEventProps) => void; // 弹出层打开完成事件
185
+ onPopupLayerClosed?: (props: PopupLayerClosedEventProps) => void; // 弹出层关闭完成事件
166
186
  }
167
187
 
168
188
  // 简化请求查询参数值
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kepoai/provider",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
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
  }