@netless/app-slide 0.2.38 → 0.2.39-alpha.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/README-zh.md +53 -53
- package/README.md +68 -68
- package/dist/index.d.ts +294 -294
- package/dist/main.cjs.js +2 -2
- package/dist/main.cjs.js.map +1 -1
- package/dist/main.es.js +8 -11
- package/dist/main.es.js.map +1 -1
- package/dist/main.iife.js +2 -2
- package/dist/main.iife.js.map +1 -1
- package/package.json +8 -8
- package/src/DocsViewer/icons/arrow-left.svg +4 -4
- package/src/DocsViewer/icons/arrow-left.ts +18 -18
- package/src/DocsViewer/icons/arrow-right.svg +4 -4
- package/src/DocsViewer/icons/arrow-right.ts +18 -18
- package/src/DocsViewer/icons/pause.svg +4 -4
- package/src/DocsViewer/icons/pause.ts +18 -18
- package/src/DocsViewer/icons/play.svg +4 -4
- package/src/DocsViewer/icons/play.ts +18 -18
- package/src/DocsViewer/icons/sidebar.svg +4 -4
- package/src/DocsViewer/icons/sidebar.ts +18 -18
- package/src/DocsViewer/index.ts +381 -381
- package/src/DocsViewer/style.scss +228 -228
- package/src/DocsViewer/variables.scss +1 -1
- package/src/SlideController/helpers.ts +48 -48
- package/src/SlideController/index.ts +351 -351
- package/src/SlideDocsViewer/index.ts +11 -11
- package/src/SlideDocsViewer/style.scss +28 -28
- package/src/SlidePreviewer/index.ts +225 -225
- package/src/index.ts +283 -283
- package/src/style.scss +14 -14
- package/src/typings.ts +21 -21
- package/src/utils/bgcolor.ts +45 -45
- package/src/utils/freezer.ts +116 -116
- package/src/utils/helpers.ts +32 -32
- package/src/utils/logger.ts +106 -106
- package/LICENSE +0 -21
package/README-zh.md
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
## @netless/app-slide
|
|
2
|
-
|
|
3
|
-
WebGL 版 PPT 展示插件。
|
|
4
|
-
|
|
5
|
-
### 用法
|
|
6
|
-
|
|
7
|
-
```ts
|
|
8
|
-
import type { Attributes as SlideAttributes } from "@netless/app-slide";
|
|
9
|
-
|
|
10
|
-
// 1. 在加入房间前注册此 app
|
|
11
|
-
WindowManager.register({
|
|
12
|
-
kind: "Slide",
|
|
13
|
-
appOptions: {
|
|
14
|
-
// 打开这个选项显示 debug 工具栏
|
|
15
|
-
debug: false,
|
|
16
|
-
},
|
|
17
|
-
src: async () => {
|
|
18
|
-
const app = await import("@netless/app-slide");
|
|
19
|
-
return app.default ?? app;
|
|
20
|
-
},
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
// 2. 加入房间后,这样插入 PPT
|
|
24
|
-
manager.addApp({
|
|
25
|
-
kind: "Slide",
|
|
26
|
-
options: {
|
|
27
|
-
scenePath: `/ppt/${uuid}`, // [1]
|
|
28
|
-
title: "a.pptx",
|
|
29
|
-
},
|
|
30
|
-
attributes: {
|
|
31
|
-
taskId: "1234567...", // [2]
|
|
32
|
-
url: "https://convertcdn.netless.link/dynamicConvert", // [3]
|
|
33
|
-
} as SlideAttributes,
|
|
34
|
-
});
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
参数:
|
|
38
|
-
|
|
39
|
-
1. (**必须**) `scenePath`
|
|
40
|
-
|
|
41
|
-
全局唯一路径,建议为 `"/ppt/" + taskId`。
|
|
42
|
-
|
|
43
|
-
2. (**必须**) `taskId`
|
|
44
|
-
|
|
45
|
-
[PPT 转换](https://developer.netless.link/server-en/home/server-conversion) 任务 ID。
|
|
46
|
-
|
|
47
|
-
3. (可选) `url`
|
|
48
|
-
|
|
49
|
-
PPT 转码后资源存储服务器链接前缀,默认为 `https://convertcdn.netless.link/dynamicConvert`。
|
|
50
|
-
|
|
51
|
-
### 协议
|
|
52
|
-
|
|
53
|
-
MIT @ [netless](https://github.com/netless-io)
|
|
1
|
+
## @netless/app-slide
|
|
2
|
+
|
|
3
|
+
WebGL 版 PPT 展示插件。
|
|
4
|
+
|
|
5
|
+
### 用法
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import type { Attributes as SlideAttributes } from "@netless/app-slide";
|
|
9
|
+
|
|
10
|
+
// 1. 在加入房间前注册此 app
|
|
11
|
+
WindowManager.register({
|
|
12
|
+
kind: "Slide",
|
|
13
|
+
appOptions: {
|
|
14
|
+
// 打开这个选项显示 debug 工具栏
|
|
15
|
+
debug: false,
|
|
16
|
+
},
|
|
17
|
+
src: async () => {
|
|
18
|
+
const app = await import("@netless/app-slide");
|
|
19
|
+
return app.default ?? app;
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
// 2. 加入房间后,这样插入 PPT
|
|
24
|
+
manager.addApp({
|
|
25
|
+
kind: "Slide",
|
|
26
|
+
options: {
|
|
27
|
+
scenePath: `/ppt/${uuid}`, // [1]
|
|
28
|
+
title: "a.pptx",
|
|
29
|
+
},
|
|
30
|
+
attributes: {
|
|
31
|
+
taskId: "1234567...", // [2]
|
|
32
|
+
url: "https://convertcdn.netless.link/dynamicConvert", // [3]
|
|
33
|
+
} as SlideAttributes,
|
|
34
|
+
});
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
参数:
|
|
38
|
+
|
|
39
|
+
1. (**必须**) `scenePath`
|
|
40
|
+
|
|
41
|
+
全局唯一路径,建议为 `"/ppt/" + taskId`。
|
|
42
|
+
|
|
43
|
+
2. (**必须**) `taskId`
|
|
44
|
+
|
|
45
|
+
[PPT 转换](https://developer.netless.link/server-en/home/server-conversion) 任务 ID。
|
|
46
|
+
|
|
47
|
+
3. (可选) `url`
|
|
48
|
+
|
|
49
|
+
PPT 转码后资源存储服务器链接前缀,默认为 `https://convertcdn.netless.link/dynamicConvert`。
|
|
50
|
+
|
|
51
|
+
### 协议
|
|
52
|
+
|
|
53
|
+
MIT @ [netless](https://github.com/netless-io)
|
package/README.md
CHANGED
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
## @netless/app-slide
|
|
2
|
-
|
|
3
|
-
Netless App for viewing animated slides, in our new engine.
|
|
4
|
-
|
|
5
|
-
[中文](./README-zh.md)
|
|
6
|
-
|
|
7
|
-
### Usage
|
|
8
|
-
|
|
9
|
-
```ts
|
|
10
|
-
import type { Attributes as SlideAttributes } from "@netless/app-slide";
|
|
11
|
-
|
|
12
|
-
// 1. register before joining room
|
|
13
|
-
WindowManager.register({
|
|
14
|
-
kind: "Slide",
|
|
15
|
-
appOptions: {
|
|
16
|
-
// turn on to show debug controller
|
|
17
|
-
debug: false,
|
|
18
|
-
},
|
|
19
|
-
src: async () => {
|
|
20
|
-
const app = await import("@netless/app-slide");
|
|
21
|
-
return app.default ?? app;
|
|
22
|
-
},
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
// 2. when joined room, add ppt to whiteboard
|
|
26
|
-
manager.addApp({
|
|
27
|
-
kind: "Slide",
|
|
28
|
-
options: {
|
|
29
|
-
scenePath: `/ppt/${uuid}`, // [1]
|
|
30
|
-
title: "a.pptx",
|
|
31
|
-
},
|
|
32
|
-
attributes: {
|
|
33
|
-
taskId: "1234567...", // [2]
|
|
34
|
-
url: "https://convertcdn.netless.link/dynamicConvert", // [3]
|
|
35
|
-
} as SlideAttributes,
|
|
36
|
-
});
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
Parameters:
|
|
40
|
-
|
|
41
|
-
1. (**required**) `scenePath`
|
|
42
|
-
|
|
43
|
-
Which scene to be put on top of slides.
|
|
44
|
-
|
|
45
|
-
2. (**required**) `taskId`
|
|
46
|
-
|
|
47
|
-
The [PPT conversion](https://developer.netless.link/server-en/home/server-conversion) task id.
|
|
48
|
-
|
|
49
|
-
3. (optional) `url`
|
|
50
|
-
|
|
51
|
-
The base url of ppt resources, `https://convertcdn.netless.link/dynamicConvert` by default.
|
|
52
|
-
|
|
53
|
-
### Preview
|
|
54
|
-
|
|
55
|
-
```ts
|
|
56
|
-
import { previewSlide } from "@netless/app-slide";
|
|
57
|
-
|
|
58
|
-
const previewer = previewSlide({
|
|
59
|
-
container: document.getElementById("preview"),
|
|
60
|
-
taskId: "1234567...",
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
previewer.destroy();
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### License
|
|
67
|
-
|
|
68
|
-
MIT @ [netless](https://github.com/netless-io)
|
|
1
|
+
## @netless/app-slide
|
|
2
|
+
|
|
3
|
+
Netless App for viewing animated slides, in our new engine.
|
|
4
|
+
|
|
5
|
+
[中文](./README-zh.md)
|
|
6
|
+
|
|
7
|
+
### Usage
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import type { Attributes as SlideAttributes } from "@netless/app-slide";
|
|
11
|
+
|
|
12
|
+
// 1. register before joining room
|
|
13
|
+
WindowManager.register({
|
|
14
|
+
kind: "Slide",
|
|
15
|
+
appOptions: {
|
|
16
|
+
// turn on to show debug controller
|
|
17
|
+
debug: false,
|
|
18
|
+
},
|
|
19
|
+
src: async () => {
|
|
20
|
+
const app = await import("@netless/app-slide");
|
|
21
|
+
return app.default ?? app;
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
// 2. when joined room, add ppt to whiteboard
|
|
26
|
+
manager.addApp({
|
|
27
|
+
kind: "Slide",
|
|
28
|
+
options: {
|
|
29
|
+
scenePath: `/ppt/${uuid}`, // [1]
|
|
30
|
+
title: "a.pptx",
|
|
31
|
+
},
|
|
32
|
+
attributes: {
|
|
33
|
+
taskId: "1234567...", // [2]
|
|
34
|
+
url: "https://convertcdn.netless.link/dynamicConvert", // [3]
|
|
35
|
+
} as SlideAttributes,
|
|
36
|
+
});
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Parameters:
|
|
40
|
+
|
|
41
|
+
1. (**required**) `scenePath`
|
|
42
|
+
|
|
43
|
+
Which scene to be put on top of slides.
|
|
44
|
+
|
|
45
|
+
2. (**required**) `taskId`
|
|
46
|
+
|
|
47
|
+
The [PPT conversion](https://developer.netless.link/server-en/home/server-conversion) task id.
|
|
48
|
+
|
|
49
|
+
3. (optional) `url`
|
|
50
|
+
|
|
51
|
+
The base url of ppt resources, `https://convertcdn.netless.link/dynamicConvert` by default.
|
|
52
|
+
|
|
53
|
+
### Preview
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
import { previewSlide } from "@netless/app-slide";
|
|
57
|
+
|
|
58
|
+
const previewer = previewSlide({
|
|
59
|
+
container: document.getElementById("preview"),
|
|
60
|
+
taskId: "1234567...",
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
previewer.destroy();
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### License
|
|
67
|
+
|
|
68
|
+
MIT @ [netless](https://github.com/netless-io)
|