@netless/forge-slide 1.0.8 → 1.1.0-beta.1

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 CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@netless/forge-slide",
3
- "version": "1.0.8",
3
+ "version": "1.1.0-beta.1",
4
4
  "description": "",
5
- "main": "dist/index.js",
6
- "module": "dist/index.esm.js",
5
+ "main": "dist/slide.js",
6
+ "module": "dist/slide.esm.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "dependencies": {
9
9
  "@netless/slide": "^1.4.21"
@@ -12,8 +12,8 @@
12
12
  "eventemitter3": "^5.0.1",
13
13
  "yjs": "^13.6.18",
14
14
  "uuid": "^11.0.5",
15
- "@netless/forge-room": "1.0.8",
16
- "@netless/forge-whiteboard": "1.0.8"
15
+ "@netless/forge-room": "1.1.0-beta.1",
16
+ "@netless/forge-whiteboard": "1.1.0-beta.1"
17
17
  },
18
18
  "keywords": [],
19
19
  "author": "",
@@ -380,6 +380,8 @@ export class SlideApplication extends AbstractApplication<SlideApplicationOption
380
380
  whiteboardApp.userManager = this.userManager;
381
381
  // @ts-ignore
382
382
  whiteboardApp.deleteSubDoc = this.deleteSubDoc;
383
+ // @ts-ignore
384
+ whiteboardApp.writableManager = this.writableManager;
383
385
 
384
386
  const json = await fetch(`${option.prefix}/${option.taskId}/jsonOutput/slide-1.json`).then(res => res.json());
385
387
  this.slideCount = json.slideCount;
@@ -512,7 +514,7 @@ export class SlideApplication extends AbstractApplication<SlideApplicationOption
512
514
  } else {
513
515
  this.slide.renderSlide(1);
514
516
  }
515
- this.permissions = new ForgeSlidePermissions(this.userManager, (userId: string) => {
517
+ this.permissions = new ForgeSlidePermissions(this.writableManager, this.userManager, (userId: string) => {
516
518
  return this.userMap(userId);
517
519
  });
518
520
  this.permissions.on('change', (userId, flags, value) => {
@@ -551,10 +553,6 @@ export class SlideApplication extends AbstractApplication<SlideApplicationOption
551
553
  });
552
554
  this.bindKeyBoardEvent();
553
555
  }
554
- // @ts-ignore
555
- window.__forge_slide = this;
556
- // @ts-ignore
557
- window.slidePermissions = this.permissions;
558
556
  return Promise.resolve(undefined);
559
557
  }
560
558