floating-live 0.15.8 → 0.15.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.
package/dist/live.d.ts CHANGED
@@ -29,7 +29,7 @@ export declare class FloatingLive extends EventEmitter {
29
29
  throw(err: Error, options?: ErrorOptions): void;
30
30
  throw(options: ErrorOptions): void;
31
31
  getSnapshot(): {
32
- room: import("./core").LiveRoom[];
32
+ room: import("./types").RoomInfo[];
33
33
  value: Record<string, any>;
34
34
  manifest: Record<string, Record<string, any>>;
35
35
  command: string[];
@@ -28,5 +28,5 @@ export declare class ModRoom {
28
28
  /** 更改某个房间的顺序 */
29
29
  move(roomKey: string, position: number): void;
30
30
  /** 获取快照 */
31
- getSnapshot(): LiveRoom[];
31
+ getSnapshot(): RoomInfo[];
32
32
  }
@@ -153,7 +153,7 @@ class ModRoom {
153
153
  }
154
154
  /** 获取快照 */
155
155
  getSnapshot() {
156
- return [...this.list.values()];
156
+ return [...this.list.values()].map((room) => room.info);
157
157
  }
158
158
  }
159
159
  exports.ModRoom = ModRoom;
@@ -19,7 +19,6 @@ class ModValue {
19
19
  unregister(name) {
20
20
  this.list.delete(name);
21
21
  this.main.emit("value:remove", name);
22
- this.main.emit("value:change", name, undefined);
23
22
  }
24
23
  /** 获取值 */
25
24
  get(name) {
@@ -150,6 +150,6 @@ export class ModRoom {
150
150
  }
151
151
  /** 获取快照 */
152
152
  getSnapshot() {
153
- return [...this.list.values()];
153
+ return [...this.list.values()].map((room) => room.info);
154
154
  }
155
155
  }
@@ -16,7 +16,6 @@ export class ModValue {
16
16
  unregister(name) {
17
17
  this.list.delete(name);
18
18
  this.main.emit("value:remove", name);
19
- this.main.emit("value:change", name, undefined);
20
19
  }
21
20
  /** 获取值 */
22
21
  get(name) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "floating-live",
3
- "version": "0.15.8",
3
+ "version": "0.15.10",
4
4
  "type": "commonjs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",