@netless/window-manager 0.4.54 → 0.4.56

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/docs/advanced.md CHANGED
@@ -1,56 +1,56 @@
1
- ## 进阶使用
1
+ ## Advanced usage
2
2
 
3
- - 目录
4
- - [撤销重做](#redo-undo)
5
- - [清屏](#clean-current-scene)
6
- - [判断是否打开某种 APP](#has-kind)
7
- - [页面控制器](#page-control)
8
- - [视角](#view-mode)
9
- - [插入图片到当前app](#insert-image-to-app)
3
+ - Table of contents
4
+ - [Undo Redo](#redo-undo)
5
+ - [clean screen](#clean-current-scene)
6
+ - [Judging whether to open a certain APP](#has-kind)
7
+ - [page controller](#page-control)
8
+ - [viewpoint](#view-mode)
9
+ - [Insert image to current app](#insert-image-to-app)
10
10
 
11
11
 
12
- <h3 id="redo-undo">撤销重做</h3>
12
+ <h3 id="redo-undo">Undo redo</h3>
13
13
 
14
- > 以下事件和属性都会根据 `focus` 的窗口来进行自动切换应用对象
14
+ > The following events and properties will automatically switch application objects according to the `focus` window
15
15
 
16
- #### 获取可以撤销/重做的步数
16
+ #### Get the number of steps that can be undone/redoed
17
17
 
18
18
  ```ts
19
19
  manager.canUndoSteps
20
20
  manager.canRedoSteps
21
21
  ```
22
22
 
23
- #### 监听可以撤销/重做的步数的变化
23
+ #### Monitor changes in the number of steps that can be undone/redoed
24
24
 
25
- `canRedoStepsChange` `canUndoStepsChange` 会在切换窗口时重新触发
25
+ `canRedoStepsChange` and `canUndoStepsChange` will retrigger when switching windows
26
26
 
27
27
  ```ts
28
28
  manager.emitter.on("canUndoStepsChange", (steps: number) => {
29
- // 可以撤销的步数更新
29
+ // undoable steps update
30
30
  })
31
31
  manager.emitter.on("canRedoStepsChange", (steps: number) => {
32
- // 可以重做的步数更新
32
+ // Update the number of steps that can be redone
33
33
  })
34
34
  ```
35
35
 
36
- #### 撤销/重做
36
+ #### Undo/Redo
37
37
 
38
38
  ```ts
39
- manager.undo() //撤销
40
- manager.redo() // 重做
39
+ manager.undo() // undo
40
+ manager.redo() // redo
41
41
  ```
42
42
 
43
43
  <br>
44
44
 
45
- <h3 id="clean-current-scene">清屏</h3>
45
+ <h3 id="clean-current-scene">Clear screen</h3>
46
46
 
47
- 因为在多窗口模式下有多个白板, 如果想要清除当前 `focus` 的白板只需要调用
47
+ Because there are multiple whiteboards in multi-window mode, if you want to clear the current `focus` whiteboard, you only need to call
48
48
 
49
49
  ```ts
50
50
  manager.cleanCurrentScene()
51
51
  ```
52
52
 
53
- 只想清理主白板的笔迹则需要
53
+ If you only want to clean up the handwriting on the main whiteboard, you need
54
54
 
55
55
  ```ts
56
56
  manager.mainView.cleanCurrentScene()
@@ -59,31 +59,31 @@ manager.mainView.cleanCurrentScene()
59
59
 
60
60
  <br>
61
61
 
62
- <h3 id="has-kind">判断是否打开某种 APP</h3>
62
+ <h3 id="has-kind">Determine whether to open a certain APP</h3>
63
63
 
64
64
  ```ts
65
- manager.emitter.on("ready", () => { // ready 事件在所有 app 创建完成后触发
66
- const apps = manager.queryAll(); // 获取所有已经打开的 App
67
- const hasSlide = apps.some(app => app.kind === "Slide"); // 判断已经打开的 APP 中是否有 Slide
65
+ manager.emitter.on("ready", () => { // ready event is triggered after all app creation is complete
66
+ const apps = manager.queryAll(); // Get all opened apps
67
+ const hasSlide = apps.some(app => app.kind === "Slide"); // Determine whether there is Slide in the opened APP
68
68
  });
69
69
  ```
70
70
 
71
71
  <br>
72
72
 
73
- <h3 id="page-control">页面控制器</h3>
73
+ <h3 id="page-control">page controller</h3>
74
74
 
75
- `manager` 提供了一个 `pageState` 来获取当前的 index 和总页数
75
+ `manager` provides a `pageState` to get the current index and the total number of pages
76
76
 
77
77
  ```ts
78
- manager.pageState.index // 当前的 index
79
- manager.pageState.length // 总页数
78
+ manager.pageState.index // current index
79
+ manager.pageState.length // total number of pages
80
80
 
81
81
  manager.emitter.on("pageStateChange", state => {
82
- // 当前 index 变化和总页数变化会触发此事件
82
+ // This event will be triggered when the current index changes and the total number of pages changes
83
83
  });
84
84
  ```
85
85
 
86
- 上一页/下一页/添加一页
86
+ Previous/Next/Add a page
87
87
 
88
88
  ```ts
89
89
  manager.nextPage()
@@ -93,45 +93,45 @@ manager.addPage()
93
93
 
94
94
  <br>
95
95
 
96
- <h3 id="view-mode">视角跟随</h3>
96
+ <h3 id="view-mode">View follow</h3>
97
97
 
98
- 多窗口中 `ViewMode` `broadcaster` `freedom` 两种模式
98
+ `ViewMode` in multi-window has `broadcaster` `freedom` two modes
99
99
 
100
100
  - `freedom`
101
101
 
102
- 自由模式,用户可以自由放缩、移动视角
102
+ Free mode, users can freely zoom and move the viewing angle
103
103
 
104
- 即便房间里有主播,主播也无法影响用户的视角
104
+ Even if there is an anchor in the room, the anchor cannot affect the user's perspective
105
105
 
106
106
  - `broadcaster`
107
107
 
108
- 主播模式, 操作时其他人的视角都会跟随我
108
+ Host mode, other people's perspectives will follow me during operation
109
109
 
110
- 同时其他为 `broadcaster` 模式的人也会影响我的视角
110
+ At the same time, other people in `broadcaster` mode will also affect my perspective
111
111
 
112
- `isWritable` `false` 时只会跟随其他 `broadcaster` 的视角
112
+ When `isWritable` is `false`, it will only follow other `broadcaster` perspectives
113
113
 
114
114
  <br>
115
115
 
116
- <h3 id="insert-image-to-app">插入图片到当前 app</h3>
116
+ <h3 id="insert-image-to-app">Insert an image into the current app</h3>
117
117
 
118
118
  ```ts
119
- // 判断当前是否为最大化
119
+ // Determine whether the current is maximized
120
120
  if (manager.boxState === "maximized") {
121
- // `focused` 的值的会根据当前 focus app 不同而变化
122
- const app = manager.queryOne(manager.focused)
123
- // view app 才可以插入图片, 像是 视频,音频之类的 app 是没有 view
124
- if (app.view) {
125
- var imageInformation = {
126
- uuid: uuid,
127
- centerX: centerX,
128
- centerY: centerY,
129
- width: width,
130
- height: height,
131
- locked: false,
132
- };
133
- app.view.insertImage(imageInformation);
134
- app.view.completeImageUpload(uuid, src);
135
- }
121
+ // The value of `focused` will vary depending on the currently focused app
122
+ const app = manager.queryOne(manager. focused)
123
+ // Only apps with a view can insert pictures, apps like video and audio do not have a view
124
+ if (app.view) {
125
+ var imageInformation = {
126
+ uuid: uuid,
127
+ centerX: centerX,
128
+ centerY: centerY,
129
+ width: width,
130
+ height: height,
131
+ locked: false,
132
+ };
133
+ app.view.insertImage(imageInformation);
134
+ app.view.completeImageUpload(uuid, src);
135
+ }
136
136
  }
137
137
  ```
package/docs/api.md CHANGED
@@ -1,83 +1,85 @@
1
1
  # API
2
2
 
3
- ## 目录
4
- - [静态方法](#static-methods)
5
- - [`mount`](#mount)
6
- - [`register`](#register)
7
- - [`registered`](#registered)
8
- - [`setContainer`](#set-container)
9
- - [`setCollectorContainer`](#set-collector-container)
10
- - [实例方法](#instance-methods)
11
- - [`addApp`](#addApp)
12
- - [`closeApp`](#closeApp)
13
- - [`focusApp`](#focusApp)
14
- - [`setMainViewSceneIndex`](#setMainViewSceneIndex)
15
- - [`setBoxState`](#setBoxState)
16
- - [`cleanCurrentScene`](#cleanCurrentScene)
17
- - [`redo`](#redo)
18
- - [`undo`](#undo)
19
- - [`copy`](#copy)
20
- - [`paste`](#paste)
21
- - [`delete`](#delete)
22
- - [`duplicate`](#duplicate)
23
- - [`insertText`](#insertText)
24
- - [`insertImage`](#insertImage)
25
- - [`completeImageUpload`](#completeImageUpload)
26
- - [`lockImage`](#lockImage)
27
- - [`lockImages`](#lockImages)
28
- - [`nextPage`](#nextPage)
29
- - [`prevPage`](#prevPage)
30
- - [`addPage`](#addPage)
31
- - [`removePage`](#removePage)
32
- - [`refresh`](#refresh)
33
- - [`setContainerSizeRatio`](#setContainerSizeRatio)
34
- - [实例属性](#prototypes)
35
- - [事件回调](#events)
3
+ ## Table of contents
4
+ - [Static methods](#static-methods)
5
+ - [`mount`](#mount)
6
+ - [`register`](#register)
7
+ - [`registered`](#registered)
8
+ - [`setContainer`](#set-container)
9
+ - [`setCollectorContainer`](#set-collector-container)
10
+ - [instance methods](#instance-methods)
11
+ - [`addApp`](#addApp)
12
+ - [`closeApp`](#closeApp)
13
+ - [`focusApp`](#focusApp)
14
+ - [`setMainViewSceneIndex`](#setMainViewSceneIndex)
15
+ - [`setBoxState`](#setBoxState)
16
+ - [`cleanCurrentScene`](#cleanCurrentScene)
17
+ - [`redo`](#redo)
18
+ - [`undo`](#undo)
19
+ - [`copy`](#copy)
20
+ - [`paste`](#paste)
21
+ - [`delete`](#delete)
22
+ - [`duplicate`](#duplicate)
23
+ - [`insertText`](#insertText)
24
+ - [`insertImage`](#insertImage)
25
+ - [`completeImageUpload`](#completeImageUpload)
26
+ - [`lockImage`](#lockImage)
27
+ - [`lockImages`](#lockImages)
28
+ - [`nextPage`](#nextPage)
29
+ - [`prevPage`](#prevPage)
30
+ - [`addPage`](#addPage)
31
+ - [`removePage`](#removePage)
32
+ - [`refresh`](#refresh)
33
+ - [`setContainerSizeRatio`](#setContainerSizeRatio)
34
+ - [instance properties](#prototypes)
35
+ - [event callback](#events)
36
36
 
37
37
  <br>
38
38
 
39
- <h2 id="static-methods">静态方法</h2>
39
+ <h2 id="static-methods">Static methods</h2>
40
40
 
41
41
  <h3 id="mount">WindowManager.mount</h3>
42
42
 
43
- > 挂载 WindowManager
43
+ > mount WindowManager
44
44
 
45
45
  ```typescript
46
- const manager = await WindowManager.mount(
47
- room: room,
48
- container: document.getElementById("container")
49
- // 完整配置见下方
46
+ const manager = await WindowManager. mount(
47
+ room: room,
48
+ container: document. getElementById("container")
49
+ // full configuration see below
50
50
  );
51
51
  ```
52
52
 
53
- 参数
53
+ parameter
54
+
54
55
 
55
56
  | name | type | default | desc |
56
57
  | ---------------------- | --------------------------------------- | ------- | ---------------------------- |
57
- | room | [require] Room | | 房间实例 |
58
- | container | [require] HTMLElement | | 房间挂载容器 |
59
- | containerSizeRatio | [optional] number | 9 / 16 | 多窗口区域的高宽比,默认为 9 : 16 |
60
- | chessboard | [optional] boolean | true | 多窗口区域以外的空间显示 PS 棋盘背景,默认 true |
61
- | collectorContainer | [optional] HTMLElement | | 用于多窗口最小化图标挂载的 dom |
62
- | collectorStyles | [optional] Partial{CSSStyleDeclaration} | | 配置 collector 的样式 |
63
- | overwriteStyles | [optional] string | | 用于覆盖窗口的样式 |
64
- | cursor | [optional] boolean | false | 开启光标同步 |
65
- | disableCameraTransform | [optional] boolean | | 禁用主白板的相机移动 |
58
+ | room | [require] Room | | room instance |
59
+ | container | [require] HTMLElement | | room mount container |
60
+ | containerSizeRatio | [optional] number | 9 / 16 | The aspect ratio of the multi-window area, the default is 9 : 16 |
61
+ | chessboard | [optional] boolean | true | The space outside the multi-window area displays PS checkerboard background, default true |
62
+ | collectorContainer | [optional] HTMLElement | | dom for multi-window minimize icon mount |
63
+ | collectorStyles | [optional] Partial{CSSStyleDeclaration} | | Configure collector style |
64
+ | overwriteStyles | [optional] string | | The style to use for the overlay window |
65
+ | cursor | [optional] boolean | false | Turn on cursor sync |
66
+ | disableCameraTransform | [optional] boolean | | Disable camera movement for the main whiteboard |
66
67
  | prefersColorScheme | [optional] string | light | auto, light, dark |
67
- | debug | [optional] boolean | false | 打印日志信息
68
- | applianceIcons | [optional] {ApplianceNames, string} | | 配置光标使用的教具图片
68
+ | debug | [optional] boolean | false | print log information |
69
+ | applianceIcons | [optional] {ApplianceNames, string} | | Configure the teaching aid picture used by the cursor |
70
+
69
71
 
70
- <h3 id="register">WindowManager.register</h3>
72
+ <h3 id="register">WindowManager. register</h3>
71
73
 
72
- > 注册 `APP` `WindowManager`
74
+ > Register `APP` to `WindowManager`
73
75
 
74
76
  ```typescript
75
- WindowManager.register({
76
- kind: "helloWorld",
77
+ WindowManager. register({
78
+ kind: "hello World",
77
79
  src: NetlessApp,
78
80
  appOptions: () => "appOptions",
79
81
  addHooks: (emitter) => {
80
- emitter.on("created", result => {
82
+ emitter.on("created", result => {
81
83
  console.log("HelloWordResult", result);
82
84
  });
83
85
  emitter.on("focus", result => {
@@ -94,7 +96,7 @@ WindowManager.register({
94
96
 
95
97
  <h3 id="registered">WindowManager.registered</h3>
96
98
 
97
- > 获取已经注册过的 `App`
99
+ > Get the registered `App`
98
100
 
99
101
  ```ts
100
102
  WindowManager.registered
@@ -104,7 +106,7 @@ WindowManager.registered
104
106
 
105
107
  <h3 id="set-container">setContainer</h3>
106
108
 
107
- > 设置白板挂载容器
109
+ > Set whiteboard mount container
108
110
 
109
111
  ```typescript
110
112
  WindowManager.setContainer(document.getElementById("container"));
@@ -112,7 +114,7 @@ WindowManager.setContainer(document.getElementById("container"));
112
114
 
113
115
  <h3 id="set-container">setCollectorContainer</h3>
114
116
 
115
- > 设置 `Collector` 挂载的容器
117
+ > Set container mounted by `Collector`
116
118
 
117
119
  ```typescript
118
120
  WindowManager.setCollectorContainer(document.getElementById("collector-container"));
@@ -120,25 +122,25 @@ WindowManager.setCollectorContainer(document.getElementById("collector-container
120
122
 
121
123
  <br>
122
124
 
123
- <h2 id="instance-methods">实例方法</h2>
125
+ <h2 id="instance-methods">Instance methods</h2>
124
126
 
125
127
  <h3 id="addApp">addApp</h3>
126
128
 
127
- > 添加 `app` 至白板
129
+ > add `app` to whiteboard
128
130
 
129
131
  ```typescript
130
132
  const appId = await manager.addApp({
131
- kind: "helloWorld"
132
- options: { // 可选配置
133
- scenePath: "/hello-world"
134
- }
133
+ kind: "hello World"
134
+ options: { // optional configuration
135
+ scenePath: "/hello-world"
136
+ }
135
137
  })
136
138
  ```
137
- 具体参数请参考 `APP` 本身的要求
139
+ For specific parameters, please refer to the requirements of `APP` itself
138
140
 
139
141
  <h3 id="closeApp">closeApp</h3>
140
142
 
141
- > 关闭已经打开的 `APP`
143
+ > Close any open `APP`
142
144
 
143
145
  ```typescript
144
146
  manager.closeApp(appId)
@@ -146,7 +148,7 @@ manager.closeApp(appId)
146
148
 
147
149
  <h3 id="focusApp">focusApp</h3>
148
150
 
149
- > 切换当前 `focus` `app`, 并把此 `app` 置为最前
151
+ > Switch the `app` of the current `focus`, and set this `app` to the front
150
152
 
151
153
  ```typescript
152
154
  manager.focusApp(appId)
@@ -154,7 +156,7 @@ manager.focusApp(appId)
154
156
 
155
157
  <h3 id="setMainViewSceneIndex">setMainViewSceneIndex</h3>
156
158
 
157
- > 设置主白板的 `SceneIndex`
159
+ > Set the `SceneIndex` of the main whiteboard
158
160
 
159
161
  ```ts
160
162
  manager.setMainViewSceneIndex(1)
@@ -162,7 +164,7 @@ manager.setMainViewSceneIndex(1)
162
164
 
163
165
  <h3 id="setBoxState">setBoxState</h3>
164
166
 
165
- > 设置当前的 `boxState`
167
+ > Set the current `boxState`
166
168
 
167
169
  ```ts
168
170
  manager.setBoxState("normal") // boxState: normal | maximized | minimized
@@ -170,7 +172,7 @@ manager.setBoxState("normal") // boxState: normal | maximized | minimized
170
172
 
171
173
  <h3 id="cleanCurrentScene">cleanCurrentScene</h3>
172
174
 
173
- > 清除当前 focus view 的笔迹
175
+ > Clear the handwriting of the currently focused view
174
176
 
175
177
  ```ts
176
178
  manager.cleanCurrentScene()
@@ -178,7 +180,7 @@ manager.cleanCurrentScene()
178
180
 
179
181
  <h3 id="redo">redo</h3>
180
182
 
181
- > 在当前 focus view 上重做上一步操作
183
+ > Redo the last operation on the currently focused view
182
184
 
183
185
  ```ts
184
186
  manager.redo()
@@ -186,7 +188,7 @@ manager.redo()
186
188
 
187
189
  <h3 id="undo">undo</h3>
188
190
 
189
- > 在当前 focus view 上撤消上一步操作
191
+ > Undo the last action on the currently focused view
190
192
 
191
193
  ```ts
192
194
  manager.undo()
@@ -194,49 +196,49 @@ manager.undo()
194
196
 
195
197
  <h3 id="nextPage">nextPage</h3>
196
198
 
197
- > 切换主白板至下一页
199
+ > Switch main whiteboard to next page
198
200
 
199
201
  ```ts
200
202
  const success = await manager.nextPage()
201
203
  if (!success) {
202
- // 已经到了最后一页
204
+ // reached the last page
203
205
  }
204
206
  ```
205
207
 
206
208
  <h3 id="prevPage">prevPage</h3>
207
209
 
208
- > 切换主白板至上一页
210
+ > Switch main whiteboard to previous page
209
211
 
210
212
  ```ts
211
213
  const success = await manager.prevPage()
212
214
  if (!success) {
213
- // 已经到了第一页
215
+ // have reached the first page
214
216
  }
215
217
  ```
216
218
 
217
219
  <h3 id="addPage">addPage</h3>
218
220
 
219
- > 在主白板添加一页
221
+ > Add a page to the main whiteboard
220
222
 
221
223
  ```ts
222
- manager.addPage() // 默认在最后添加一页
223
- manager.addPage({ after: true }) // 在当前页后添加一页
224
- manager.addPage({ scene: { name: "page2" } }) // 传入 page 信息
224
+ manager.addPage() // add a page at the end by default
225
+ manager.addPage({ after: true }) // add a page after the current page
226
+ manager.addPage({ scene: { name: "page2" } }) // pass in page information
225
227
  ```
226
228
 
227
229
  <h3 id="removePage">removePage</h3>
228
230
 
229
- > 移除一页
230
- > 当只剩一页时, 最后一页不允许被删除
231
+ > remove a page
232
+ > When there is only one page left, the last page is not allowed to be deleted
231
233
 
232
234
  ```ts
233
- const success = await manager.removePage() // 默认删除当前页
234
- const success = await manager.removePage(1) // 可以删除指定 index
235
+ const success = await manager.removePage() // delete the current page by default
236
+ const success = await manager.removePage(1) // can delete the specified index
235
237
  ```
236
238
 
237
239
  <h3 id="refresh">refresh</h3>
238
240
 
239
- > 刷新 `manager` 的内部状态, 用于从其他房间 `copy` `attributes`
241
+ > Refreshes `manager` internal state for `copy` `attributes` from other rooms
240
242
 
241
243
  ```ts
242
244
  manager.refresh()
@@ -244,7 +246,7 @@ manager.refresh()
244
246
 
245
247
  <h3 id="setContainerSizeRatio">setContainerSizeRatio</h3>
246
248
 
247
- > 设置白板同步区域的宽高比
249
+ > Set the aspect ratio of the whiteboard synchronization area
248
250
 
249
251
  ```ts
250
252
  manager.setContainerSizeRatio(10 / 16)
@@ -252,25 +254,25 @@ manager.setContainerSizeRatio(10 / 16)
252
254
 
253
255
  <br>
254
256
 
255
- <h2 id="prototypes">实例属性</h2>
257
+ <h2 id="prototypes">Instance attributes</h2>
256
258
 
257
259
  | name | type | default | desc |
258
260
  | ------------------ | ------- | ------- | ----------------- |
259
- | mainView | View | | 主白板 |
260
- | mainViewSceneIndex | number | | 当前主白板的 SceneIndex |
261
- | mainViewScenesLength | number | | mainView scenes 长度 |
262
- | boxState | string | | 当前窗口状态 |
263
- | darkMode | boolean | | 黑夜模式 |
264
- | prefersColorScheme | string | | 颜色主题 |
265
- | focused | string | | focus app |
266
- | canRedoSteps | number | | 当前 focus view 可以重做的步数 |
267
- | canRedoSteps | number | | 当前 focus view 可以撤销的步数 |
268
- | sceneState | SceneState | | 兼容原本 SDK sceneState 属性, 只对 mainView 生效 |
269
- | pageState | PageState | | 组合 mainView index scenes 的修改 |
261
+ | mainView | View | | main whiteboard |
262
+ | mainViewSceneIndex | number | | The SceneIndex of the current main whiteboard |
263
+ | mainViewScenesLength | number | | mainView's scenes length |
264
+ | boxState | string | | current window status |
265
+ | darkMode | boolean | | dark mode |
266
+ | prefersColorScheme | string | | color theme |
267
+ | focused | string | | focus app |
268
+ | canRedoSteps | number | | The number of steps that the currently focused view can redo |
269
+ | canRedoSteps | number | | The number of steps that the currently focused view can undo |
270
+ | sceneState | SceneState | | Compatible with the sceneState property of the original SDK, only valid for mainView |
271
+ | pageState | PageState | | Combine the index and scenes modification of mainView |
270
272
 
271
273
  <br>
272
274
 
273
- <h2 id="events">事件回调</h2>
275
+ <h2 id="events">event callback</h2>
274
276
 
275
277
  ```typescript
276
278
  manager.callbacks.on(events, listener)
@@ -284,26 +286,26 @@ manager.callbacks.on(events, listener)
284
286
  | darkModeChange | boolean | | |
285
287
  | prefersColorSchemeChange | string | | auto,light,dark |
286
288
  | cameraStateChange | CameraState | | |
287
- | focusedChange | string, undefined | | 当前 focus appId,主白板时为 undefined |
288
- | mainViewScenesLengthChange | number | | mainView scenes 添加或删除时触发 |
289
- | canRedoStepsChange | number | | 当前 focus view 可重做步数改变 |
290
- | canUndoStepsChange | number | | 当前 focus view 可撤销步数改变 |
291
- | loadApp | LoadAppEvent | | 加载远程APP 事件 |
292
- | ready | undefined | | 当所有 APP 创建完毕时触发 |
293
- | sceneStateChange | SceneState | | sceneState 修改时触发 |
294
- | pageStateChange | PageState | |
289
+ | focusedChange | string, undefined | | The appId of the current focus, undefined for the main whiteboard |
290
+ | mainViewScenesLengthChange | number | | fires when mainView scenes are added or removed |
291
+ | canRedoStepsChange | number | | The view of the current focus can redo the number of steps to change |
292
+ | canUndoStepsChange | number | | The current focus view can undo the step change |
293
+ | loadApp | LoadAppEvent | | Load remote APP event |
294
+ | ready | undefined | | Triggered when all apps are created |
295
+ | sceneStateChange | SceneState | | Fired when sceneState is modified |
296
+ | pageStateChange | PageState | | |
295
297
 
296
298
  ```ts
297
299
  type LoadAppEvent = {
298
- kind: string;
299
- status: "start" | "success" | "failed";
300
- reason?: string;
300
+ kind: string;
301
+ status: "start" | "success" | "failed";
302
+ reason?: string;
301
303
  }
302
304
  ```
303
305
 
304
306
  ```ts
305
307
  type PageState = {
306
- index: number;
307
- length: number;
308
+ index: number;
309
+ length: number;
308
310
  }
309
- ```
311
+ ```