@pisell/core 1.1.5 → 1.1.6

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.
@@ -20,7 +20,7 @@ export declare class RouterManager {
20
20
  get(name: string): RouteType;
21
21
  has(name: string): boolean;
22
22
  remove(name: string): void;
23
- renderComponent(item: RouteType, children?: React.ReactNode): string | number | boolean | React.ReactFragment | JSX.Element | null | undefined;
23
+ renderComponent(item: RouteType, children?: React.ReactNode): string | number | boolean | JSX.Element | React.ReactFragment | null | undefined;
24
24
  getPageByRoute(route: string): ApplicationInterface | undefined;
25
25
  getRouterComponent({ fallback }: {
26
26
  fallback?: React.ReactNode;
@@ -332,6 +332,7 @@ export var SocketMonitor = /*#__PURE__*/function () {
332
332
  id: message.id || "out_".concat(Date.now()),
333
333
  timestamp: Date.now(),
334
334
  direction: 'out',
335
+ //@ts-ignore
335
336
  message: this.options.recordMessageContent ? message : {
336
337
  event: message.event
337
338
  },
@@ -363,6 +364,7 @@ export var SocketMonitor = /*#__PURE__*/function () {
363
364
  id: message.id || "in_".concat(Date.now()),
364
365
  timestamp: Date.now(),
365
366
  direction: 'in',
367
+ //@ts-ignore
366
368
  message: this.options.recordMessageContent ? message : {
367
369
  event: message.event
368
370
  },
@@ -38,13 +38,14 @@ export declare enum SocketStatus {
38
38
  /**
39
39
  * Socket消息格式
40
40
  */
41
- export interface SocketMessage<T = any> {
41
+ export interface SocketMessage {
42
42
  /** 事件类型 */
43
43
  type: string;
44
44
  /** 消息数据 */
45
- data?: T;
45
+ data?: any;
46
46
  /** 消息ID */
47
47
  id?: string;
48
+ event?: any;
48
49
  }
49
50
  /**
50
51
  * 心跳配置选项
@@ -74,7 +74,9 @@ var ApplicationManager = class {
74
74
  * @returns
75
75
  */
76
76
  getAllComponents() {
77
- return Array.from(this.applications.values()).flatMap((application) => Array.from(application.components.values())).filter((component) => component.autoRender).map((component) => component.Component);
77
+ return Array.from(this.applications.values()).flatMap(
78
+ (application) => Array.from(application.components.values())
79
+ ).filter((component) => component.autoRender).map((component) => component.Component);
78
80
  }
79
81
  };
80
82
  // Annotate the CommonJS export names for ESM import in node:
@@ -2,7 +2,7 @@ import App from "../app";
2
2
  /**
3
3
  * IndexDB 管理器模块
4
4
  *
5
- * 这个模块提供了对浏览器 IndexedDB 的简单封装,并在不支持 IndexedDB 的环境中
5
+ * 这个模块使用 Dexie.js 提供了对浏览器 IndexedDB 的简单封装,并在不支持 IndexedDB 的环境中
6
6
  * 自动降级使用内存存储作为备选存储方案。
7
7
  */
8
8
  /**
@@ -34,7 +34,7 @@ export interface DBOptions {
34
34
  }
35
35
  /**
36
36
  * IndexDB 管理器类
37
- * 提供对 IndexedDB 的简单封装,支持自动降级到内存存储
37
+ * 使用 Dexie.js 提供对 IndexedDB 的封装,支持自动降级到内存存储
38
38
  * @class IndexDBManager
39
39
  */
40
40
  declare class IndexDBManager {