@netless/app-slide 0.2.75 → 0.2.77
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/LICENSE +21 -0
- package/dist/index.d.ts +2 -1
- package/dist/main.cjs.js +4 -4
- package/dist/main.cjs.js.map +1 -1
- package/dist/main.es.js +9 -7
- package/dist/main.es.js.map +1 -1
- package/dist/main.iife.js +4 -4
- package/dist/main.iife.js.map +1 -1
- package/package.json +9 -9
- package/src/SlideController/index.ts +3 -1
- package/src/index.ts +0 -1
- package/src/typings.ts +2 -1
package/package.json
CHANGED
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netless/app-slide",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.77",
|
|
4
4
|
"main": "dist/main.cjs.js",
|
|
5
5
|
"module": "dist/main.es.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"types": "node scripts/build-types.mjs",
|
|
9
|
-
"build": "vite build && npm run types",
|
|
10
|
-
"build:dev": "vite build --mode development && npm run types",
|
|
11
|
-
"cleanup": "rimraf ./dist"
|
|
12
|
-
},
|
|
13
7
|
"files": [
|
|
14
8
|
"src",
|
|
15
9
|
"dist",
|
|
16
10
|
"README-zh.md"
|
|
17
11
|
],
|
|
18
12
|
"devDependencies": {
|
|
19
|
-
"@netless/slide": "1.4.
|
|
13
|
+
"@netless/slide": "1.4.36",
|
|
20
14
|
"@types/color-string": "^1.5.2",
|
|
21
15
|
"color-string": "^1.9.1",
|
|
22
16
|
"jspdf": "2.5.1",
|
|
@@ -30,5 +24,11 @@
|
|
|
30
24
|
"jspdf": {
|
|
31
25
|
"optional": true
|
|
32
26
|
}
|
|
27
|
+
},
|
|
28
|
+
"scripts": {
|
|
29
|
+
"types": "node scripts/build-types.mjs",
|
|
30
|
+
"build": "vite build && npm run types",
|
|
31
|
+
"build:dev": "vite build --mode development && npm run types",
|
|
32
|
+
"cleanup": "rimraf ./dist"
|
|
33
33
|
}
|
|
34
|
-
}
|
|
34
|
+
}
|
|
@@ -29,6 +29,7 @@ export const EmptyAttributes: Attributes = {
|
|
|
29
29
|
state: null,
|
|
30
30
|
resourceList: [],
|
|
31
31
|
previewList: [],
|
|
32
|
+
customLinks: [],
|
|
32
33
|
};
|
|
33
34
|
|
|
34
35
|
export interface SlideControllerOptions {
|
|
@@ -293,6 +294,7 @@ export class SlideController {
|
|
|
293
294
|
|
|
294
295
|
private createSlide(anchor: HTMLDivElement, defaults: Partial<ISlideConfig> = {}) {
|
|
295
296
|
const options = this.context.getAppOptions() || {};
|
|
297
|
+
const attribute = this.context.storage.state;
|
|
296
298
|
const slide = new Slide({
|
|
297
299
|
anchor,
|
|
298
300
|
interactive: true,
|
|
@@ -321,7 +323,7 @@ export class SlideController {
|
|
|
321
323
|
whiteTracker: defaults.whiteTracker,
|
|
322
324
|
timestamp: this.timestamp,
|
|
323
325
|
skipActionWhenFrozen: true,
|
|
324
|
-
customLinks:
|
|
326
|
+
customLinks: attribute.customLinks,
|
|
325
327
|
});
|
|
326
328
|
if (import.meta.env.DEV) {
|
|
327
329
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
package/src/index.ts
CHANGED
package/src/typings.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Slide, SLIDE_EVENTS, SyncEvent } from "@netless/slide";
|
|
1
|
+
import type { CustomLink, Slide, SLIDE_EVENTS, SyncEvent } from "@netless/slide";
|
|
2
2
|
|
|
3
3
|
export type SlideState = Slide["slideState"];
|
|
4
4
|
|
|
@@ -11,6 +11,7 @@ export interface Attributes {
|
|
|
11
11
|
state: SlideState | null;
|
|
12
12
|
resourceList: string[];
|
|
13
13
|
previewList: string[];
|
|
14
|
+
customLinks: CustomLink[];
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
export type MagixPayload = {
|