lt-ppt 1.0.28 → 1.0.30
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/{InnerApp-BkVsQnm2.js → InnerApp-DTdTRK-f.js} +4393 -4513
- package/dist/{index-e8Js74-o.js → index-CwjKu8Yc.js} +1 -1
- package/dist/{index-vmpIx8K7.js → index-jHhH4l0I.js} +1 -1
- package/dist/{lib-9k4fJaGf.js → lib-Dg5Oz41t.js} +429 -154
- package/dist/lt-ppt.css +1 -1
- package/dist/lt-ppt.es.js +1 -1
- package/dist/lt-ppt.umd.js +124 -124
- package/dist/{screen-Brvtzttu.js → screen-Du33f7h9.js} +1 -1
- package/dist/types/src/LtPPT.vue.d.ts +4 -2
- package/dist/types/src/components/WritingBoard.vue.d.ts +1 -1
- package/dist/types/src/lib.d.ts +2 -2
- package/dist/types/src/types/lt-ppt.d.ts +61 -3
- package/dist/types/src/views/Screen/WritingBoardTool.vue.d.ts +4 -4
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineStore as Js } from "./pinia-CVat9nJz.js";
|
|
2
2
|
import { customAlphabet as Uy } from "./index.browser-Wq18ov6h.js";
|
|
3
|
-
import { c as Jy } from "./lib-
|
|
3
|
+
import { c as Jy } from "./lib-Dg5Oz41t.js";
|
|
4
4
|
var Yf = /* @__PURE__ */ ((u) => (u.EL_ANIMATION = "elAnimation", u.EL_STYLE = "elStyle", u.EL_POSITION = "elPosition", u.SLIDE_DESIGN = "slideDesign", u.SLIDE_ANIMATION = "slideAnimation", u.MULTI_STYLE = "multiStyle", u.MULTI_POSITION = "multiPosition", u))(Yf || {});
|
|
5
5
|
function it(u) {
|
|
6
6
|
this.content = u;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ImageAIEntryClickParams, InsertImageParams, LtPPTProps, ReplaceImageParams, SupportedLocale, ThemeMode } from './types/lt-ppt';
|
|
2
|
-
import { PPTElement, PPTImageElement, Slide } from './types/slides';
|
|
1
|
+
import { ImageAIEntryClickParams, InsertImageParams, InsertVideoParams, LtPPTProps, ReplaceImageParams, ReplaceVideoParams, SupportedLocale, ThemeMode } from './types/lt-ppt';
|
|
2
|
+
import { PPTElement, PPTImageElement, PPTVideoElement, Slide } from './types/slides';
|
|
3
3
|
declare const _default: import('vue').DefineComponent<LtPPTProps, {
|
|
4
4
|
getSlides: () => Slide[];
|
|
5
5
|
getSelectedElements: () => PPTElement[];
|
|
@@ -8,6 +8,8 @@ declare const _default: import('vue').DefineComponent<LtPPTProps, {
|
|
|
8
8
|
getCurrentIndex: () => number;
|
|
9
9
|
insertImage: (params: InsertImageParams) => Promise<PPTImageElement | null>;
|
|
10
10
|
replaceImage: (params: ReplaceImageParams) => Promise<PPTImageElement | null>;
|
|
11
|
+
insertVideo: (params: InsertVideoParams) => Promise<PPTVideoElement | null>;
|
|
12
|
+
replaceVideo: (params: ReplaceVideoParams) => Promise<PPTVideoElement | null>;
|
|
11
13
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
12
14
|
"image-ai-entry-click": (payload: ImageAIEntryClickParams) => any;
|
|
13
15
|
}, string, import('vue').PublicProps, Readonly<LtPPTProps> & Readonly<{
|
|
@@ -20,7 +20,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
|
20
20
|
color: string;
|
|
21
21
|
model: "shape" | "pen" | "eraser" | "mark";
|
|
22
22
|
blackboard: boolean;
|
|
23
|
-
shapeType: "
|
|
23
|
+
shapeType: "rect" | "arrow" | "circle";
|
|
24
24
|
penSize: number;
|
|
25
25
|
markSize: number;
|
|
26
26
|
rubberSize: number;
|
package/dist/types/src/lib.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as LtPPT } from './LtPPT.vue';
|
|
2
2
|
export { LtPPT };
|
|
3
|
-
export type { LtPPTProps, LtPPTInstance, InitData, UploadFileParams, SaveCallbackParams, ImageAIEntryClickParams, InsertImageParams, ReplaceImageParams, SupportedLocale, ThemeMode } from './types/lt-ppt';
|
|
4
|
-
export type { Slide, PPTElement, PPTImageElement, SlideTheme } from './types/slides';
|
|
3
|
+
export type { LtPPTProps, LtPPTInstance, InitData, UploadFileParams, SaveCallbackParams, ImageAIEntryElement, ImageAIEntryClickParams, InsertImageParams, ReplaceImageParams, InsertVideoParams, ReplaceVideoParams, SupportedLocale, ThemeMode } from './types/lt-ppt';
|
|
4
|
+
export type { Slide, PPTElement, PPTImageElement, PPTVideoElement, SlideTheme } from './types/slides';
|
|
5
5
|
export { loadFonts } from './utils/fonts';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PPTElement, PPTImageElement, Slide } from './slides';
|
|
1
|
+
import { PPTElement, PPTImageElement, PPTVideoElement, Slide } from './slides';
|
|
2
2
|
export type SupportedLocale = 'zh-CN' | 'en';
|
|
3
3
|
export type ThemeMode = 'dark' | 'light';
|
|
4
4
|
export interface InitData {
|
|
@@ -21,9 +21,13 @@ export interface SaveCallbackParams {
|
|
|
21
21
|
/** 幻灯片图片 URL 列表 */
|
|
22
22
|
slideImages: string[];
|
|
23
23
|
}
|
|
24
|
+
export type ImageAIEntryElement = PPTImageElement & {
|
|
25
|
+
/** 按当前裁剪范围和裁剪形状生成的图片;导出失败时回退为 src */
|
|
26
|
+
clipSrc: string;
|
|
27
|
+
};
|
|
24
28
|
export interface ImageAIEntryClickParams {
|
|
25
|
-
/** 当前触发 AI
|
|
26
|
-
element:
|
|
29
|
+
/** 当前触发 AI 入口的图片元素;src 为原图,clipSrc 为裁剪后的图 */
|
|
30
|
+
element: ImageAIEntryElement;
|
|
27
31
|
}
|
|
28
32
|
export interface InsertImageParams {
|
|
29
33
|
/** 图片地址,支持 URL、base64 dataURL、blob URL */
|
|
@@ -69,6 +73,56 @@ export interface ReplaceImageParams {
|
|
|
69
73
|
/** 替换后是否选中该图片,默认 true */
|
|
70
74
|
select?: boolean;
|
|
71
75
|
}
|
|
76
|
+
export interface InsertVideoParams {
|
|
77
|
+
/** 视频地址,支持 URL、base64 dataURL、blob URL */
|
|
78
|
+
src: string;
|
|
79
|
+
/** 目标页面 ID;优先级高于 slideIndex */
|
|
80
|
+
slideId?: string;
|
|
81
|
+
/** 目标页面索引,默认当前页 */
|
|
82
|
+
slideIndex?: number;
|
|
83
|
+
/** 视频左上角横坐标,默认居中 */
|
|
84
|
+
left?: number;
|
|
85
|
+
/** 视频左上角纵坐标,默认居中 */
|
|
86
|
+
top?: number;
|
|
87
|
+
/** 视频宽度,未传时使用视频原始宽度并自动适配画布 */
|
|
88
|
+
width?: number;
|
|
89
|
+
/** 视频高度,未传时按视频比例计算或自动适配画布 */
|
|
90
|
+
height?: number;
|
|
91
|
+
/** 旋转角度,默认 0 */
|
|
92
|
+
rotate?: number;
|
|
93
|
+
/** 是否自动播放,默认 false */
|
|
94
|
+
autoplay?: boolean;
|
|
95
|
+
/** 视频封面 */
|
|
96
|
+
poster?: string;
|
|
97
|
+
/** 视频后缀,当资源链接缺少后缀时用该字段确认资源类型 */
|
|
98
|
+
ext?: string;
|
|
99
|
+
/** 插入后是否选中该视频,默认 true */
|
|
100
|
+
select?: boolean;
|
|
101
|
+
}
|
|
102
|
+
export interface ReplaceVideoParams {
|
|
103
|
+
/** 新视频地址,支持 URL、base64 dataURL、blob URL */
|
|
104
|
+
src: string;
|
|
105
|
+
/** 被替换的视频元素 ID;不传则替换当前选中的视频 */
|
|
106
|
+
elementId?: string;
|
|
107
|
+
/** 目标页面 ID;优先级高于 slideIndex */
|
|
108
|
+
slideId?: string;
|
|
109
|
+
/** 目标页面索引,默认当前页;当传入 elementId 且未传页面信息时会自动查找 */
|
|
110
|
+
slideIndex?: number;
|
|
111
|
+
/** 是否保持原视频元素尺寸和位置,默认 false;默认保持左上角和宽度,高度按新视频比例自适应 */
|
|
112
|
+
keepSize?: boolean;
|
|
113
|
+
/** 新宽度;默认使用原视频元素宽度 */
|
|
114
|
+
width?: number;
|
|
115
|
+
/** 新高度;不传时按新视频比例自适应 */
|
|
116
|
+
height?: number;
|
|
117
|
+
/** 是否自动播放,不传则沿用原元素配置 */
|
|
118
|
+
autoplay?: boolean;
|
|
119
|
+
/** 视频封面;传入空字符串可清空原封面 */
|
|
120
|
+
poster?: string;
|
|
121
|
+
/** 视频后缀,当资源链接缺少后缀时用该字段确认资源类型 */
|
|
122
|
+
ext?: string;
|
|
123
|
+
/** 替换后是否选中该视频,默认 true */
|
|
124
|
+
select?: boolean;
|
|
125
|
+
}
|
|
72
126
|
export interface LtPPTProps {
|
|
73
127
|
/** 初始化数据 */
|
|
74
128
|
initData?: InitData;
|
|
@@ -110,4 +164,8 @@ export interface LtPPTInstance {
|
|
|
110
164
|
insertImage: (params: InsertImageParams) => Promise<PPTImageElement | null>;
|
|
111
165
|
/** 替换指定图片元素,未指定元素时替换当前选中图片 */
|
|
112
166
|
replaceImage: (params: ReplaceImageParams) => Promise<PPTImageElement | null>;
|
|
167
|
+
/** 向指定页面插入视频 */
|
|
168
|
+
insertVideo: (params: InsertVideoParams) => Promise<PPTVideoElement | null>;
|
|
169
|
+
/** 替换指定视频元素,未指定元素时替换当前选中视频 */
|
|
170
|
+
replaceVideo: (params: ReplaceVideoParams) => Promise<PPTVideoElement | null>;
|
|
113
171
|
}
|
|
@@ -15,7 +15,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
15
15
|
writingBoardRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
16
16
|
color?: string | undefined;
|
|
17
17
|
model?: "shape" | "pen" | "eraser" | "mark" | undefined;
|
|
18
|
-
shapeType?: "
|
|
18
|
+
shapeType?: "rect" | "arrow" | "circle" | undefined;
|
|
19
19
|
blackboard?: boolean | undefined;
|
|
20
20
|
penSize?: number | undefined;
|
|
21
21
|
markSize?: number | undefined;
|
|
@@ -33,7 +33,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
33
33
|
color: string;
|
|
34
34
|
model: "shape" | "pen" | "eraser" | "mark";
|
|
35
35
|
blackboard: boolean;
|
|
36
|
-
shapeType: "
|
|
36
|
+
shapeType: "rect" | "arrow" | "circle";
|
|
37
37
|
penSize: number;
|
|
38
38
|
markSize: number;
|
|
39
39
|
rubberSize: number;
|
|
@@ -51,7 +51,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
51
51
|
}, Readonly<{
|
|
52
52
|
color?: string | undefined;
|
|
53
53
|
model?: "shape" | "pen" | "eraser" | "mark" | undefined;
|
|
54
|
-
shapeType?: "
|
|
54
|
+
shapeType?: "rect" | "arrow" | "circle" | undefined;
|
|
55
55
|
blackboard?: boolean | undefined;
|
|
56
56
|
penSize?: number | undefined;
|
|
57
57
|
markSize?: number | undefined;
|
|
@@ -67,7 +67,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
67
67
|
color: string;
|
|
68
68
|
model: "shape" | "pen" | "eraser" | "mark";
|
|
69
69
|
blackboard: boolean;
|
|
70
|
-
shapeType: "
|
|
70
|
+
shapeType: "rect" | "arrow" | "circle";
|
|
71
71
|
penSize: number;
|
|
72
72
|
markSize: number;
|
|
73
73
|
rubberSize: number;
|