lt-ppt 1.0.46 → 1.0.48
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-CmA-Kj7k.js → InnerApp-BtUPJ4ZS.js} +8746 -8741
- package/dist/{database-BZ03D3nd.js → database-Bf4mf4zB.js} +6 -4
- package/dist/{index-CkLzEmTQ.js → index-BCi1-wbw.js} +2 -2
- package/dist/{index-Bj1hv5_G.js → index-Bq-Ibq6O.js} +1 -1
- package/dist/{lib-Rq3CFxDV.js → lib-rw4q3jVO.js} +2070 -2027
- package/dist/lt-ppt.css +1 -1
- package/dist/lt-ppt.es.js +1 -1
- package/dist/lt-ppt.umd.js +127 -127
- package/dist/{screen-D2QPPJex.js → screen-DyQzVM2d.js} +1 -1
- package/dist/types/src/LtPPT.vue.d.ts +3 -2
- package/dist/types/src/lib.d.ts +1 -1
- package/dist/types/src/store/slides.d.ts +1 -1
- package/dist/types/src/types/lt-ppt.d.ts +20 -2
- package/dist/{useExport-4XpAsxLA.js → useExport-as1vhZAE.js} +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ImageAIEntryClickParams, InsertImageParams, InsertVideoParams, LtPPTProps, LtPPTMode, ReplaceImageParams, ReplaceVideoParams, SupportedLocale, ThemeMode } from './types/lt-ppt';
|
|
1
|
+
import { ImageAIEntryClickParams, InsertImageFromDragParams, InsertImageParams, InsertVideoParams, LtPPTProps, LtPPTMode, ReplaceImageParams, ReplaceVideoParams, SupportedLocale, ThemeMode } from './types/lt-ppt';
|
|
2
2
|
import { PPTElement, PPTImageElement, PPTVideoElement, Slide } from './types/slides';
|
|
3
3
|
declare const _default: import('vue').DefineComponent<LtPPTProps, {
|
|
4
4
|
getSlides: () => Slide[];
|
|
@@ -9,9 +9,10 @@ declare const _default: import('vue').DefineComponent<LtPPTProps, {
|
|
|
9
9
|
hasUnsavedChanges: () => boolean;
|
|
10
10
|
save: () => Promise<void>;
|
|
11
11
|
downloadPPT: () => void;
|
|
12
|
-
|
|
12
|
+
generateDefaultPPT: () => Promise<File>;
|
|
13
13
|
setMode: (mode: LtPPTMode) => void;
|
|
14
14
|
insertImage: (params: InsertImageParams) => Promise<PPTImageElement | null>;
|
|
15
|
+
insertImageFromDrag: (params: InsertImageFromDragParams) => Promise<PPTImageElement | null>;
|
|
15
16
|
replaceImage: (params: ReplaceImageParams) => Promise<PPTImageElement | null>;
|
|
16
17
|
insertVideo: (params: InsertVideoParams) => Promise<PPTVideoElement | null>;
|
|
17
18
|
replaceVideo: (params: ReplaceVideoParams) => Promise<PPTVideoElement | null>;
|
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, LtPPTMode, InitData, UploadFileParams, CustomImageSource, SaveCallbackParams, ImageAIEntryElement, ImageAIEntryClickParams, InsertImageParams, ReplaceImageParams, InsertVideoParams, ReplaceVideoParams, SupportedLocale, ThemeMode } from './types/lt-ppt';
|
|
3
|
+
export type { LtPPTProps, LtPPTInstance, LtPPTMode, InitData, UploadFileParams, CustomImageSource, SaveCallbackParams, ImageAIEntryElement, ImageAIEntryClickParams, InsertImageParams, InsertImageFromDragParams, ReplaceImageParams, InsertVideoParams, ReplaceVideoParams, SupportedLocale, ThemeMode } from './types/lt-ppt';
|
|
4
4
|
export type { Slide, PPTElement, PPTImageElement, PPTVideoElement, SlideTheme } from './types/slides';
|
|
5
5
|
export { loadFonts } from './utils/fonts';
|
|
@@ -1607,7 +1607,7 @@ export declare const useSlidesStore: import('pinia').StoreDefinition<"slides", S
|
|
|
1607
1607
|
removeSlideProps(data: RemovePropData): void;
|
|
1608
1608
|
deleteSlide(slideId: string | string[]): void;
|
|
1609
1609
|
updateSlideIndex(index: number): void;
|
|
1610
|
-
addElement(element: PPTElement | PPTElement[]): void;
|
|
1610
|
+
addElement(element: PPTElement | PPTElement[], slideId?: string): void;
|
|
1611
1611
|
deleteElement(elementId: string | string[]): void;
|
|
1612
1612
|
updateElement(data: UpdateElementData): void;
|
|
1613
1613
|
removeElementProps(data: RemovePropData): void;
|
|
@@ -27,7 +27,7 @@ export interface SaveCallbackParams {
|
|
|
27
27
|
pptUrl: string;
|
|
28
28
|
/** JSON 数据 */
|
|
29
29
|
json: Record<string, any>;
|
|
30
|
-
/**
|
|
30
|
+
/** 首页预览图 URL 列表,无页面或生成失败时为空 */
|
|
31
31
|
slideImages: string[];
|
|
32
32
|
}
|
|
33
33
|
export type ImageAIEntryElement = PPTImageElement & {
|
|
@@ -60,6 +60,22 @@ export interface InsertImageParams {
|
|
|
60
60
|
/** 插入后是否选中该图片,默认 true */
|
|
61
61
|
select?: boolean;
|
|
62
62
|
}
|
|
63
|
+
export interface InsertImageFromDragParams {
|
|
64
|
+
/** 图片地址,支持 URL、base64 dataURL、blob URL */
|
|
65
|
+
src: string;
|
|
66
|
+
/** 鼠标释放点的浏览器视口横坐标,可直接传入 DragEvent.clientX */
|
|
67
|
+
clientX: number;
|
|
68
|
+
/** 鼠标释放点的浏览器视口纵坐标,可直接传入 DragEvent.clientY */
|
|
69
|
+
clientY: number;
|
|
70
|
+
/** 图片宽度占 PPT 画布宽度的比例,必须为有限正数,默认 0.2 */
|
|
71
|
+
widthRatio?: number;
|
|
72
|
+
/** 是否锁定宽高比例,默认 true */
|
|
73
|
+
fixedRatio?: boolean;
|
|
74
|
+
/** 旋转角度,默认 0 */
|
|
75
|
+
rotate?: number;
|
|
76
|
+
/** 插入后是否选中该图片,默认 true */
|
|
77
|
+
select?: boolean;
|
|
78
|
+
}
|
|
63
79
|
export interface ReplaceImageParams {
|
|
64
80
|
/** 新图片地址,支持 URL、base64 dataURL、blob URL */
|
|
65
81
|
src: string;
|
|
@@ -182,11 +198,13 @@ export interface LtPPTInstance {
|
|
|
182
198
|
/** 打开下载 PPT 弹层 */
|
|
183
199
|
downloadPPT: () => void;
|
|
184
200
|
/** 使用全部幻灯片、保留音视频并覆盖默认母版生成 PPTX 文件 */
|
|
185
|
-
|
|
201
|
+
generateDefaultPPT: () => Promise<File>;
|
|
186
202
|
/** 切换编辑器显示模式 */
|
|
187
203
|
setMode: (mode: LtPPTMode) => void;
|
|
188
204
|
/** 向指定页面插入图片 */
|
|
189
205
|
insertImage: (params: InsertImageParams) => Promise<PPTImageElement | null>;
|
|
206
|
+
/** 在当前页面以拖拽释放点为中心插入图片 */
|
|
207
|
+
insertImageFromDrag: (params: InsertImageFromDragParams) => Promise<PPTImageElement | null>;
|
|
190
208
|
/** 替换指定图片元素,未指定元素时替换当前选中图片 */
|
|
191
209
|
replaceImage: (params: ReplaceImageParams) => Promise<PPTImageElement | null>;
|
|
192
210
|
/** 向指定页面插入视频 */
|
|
@@ -3,8 +3,8 @@ var iA = (e, r, t) => r in e ? aA(e, r, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var ft = (e, r, t) => iA(e, typeof r != "symbol" ? r + "" : r, t);
|
|
4
4
|
import { markRaw as ma, openBlock as nt, createElementBlock as gt, createElementVNode as Re, defineComponent as vi, ref as vl, onBeforeMount as oA, onMounted as sA, createBlock as Yr, Transition as lA, withCtx as cA, createCommentVNode as Lr, toDisplayString as q0, createVNode as po, render as ra, normalizeStyle as na, computed as Tt, Fragment as X0, renderList as j0, unref as Xr, normalizeClass as fA } from "vue";
|
|
5
5
|
import { storeToRefs as Bu } from "./pinia-CVat9nJz.js";
|
|
6
|
-
import { g as $l, a as Be, b as uA, _ as e0, l as gl } from "./lib-
|
|
7
|
-
import { a as Du } from "./database-
|
|
6
|
+
import { g as $l, a as Be, b as uA, _ as e0, l as gl } from "./lib-rw4q3jVO.js";
|
|
7
|
+
import { a as Du } from "./database-Bf4mf4zB.js";
|
|
8
8
|
import { nanoid as xl } from "./index.browser-Wq18ov6h.js";
|
|
9
9
|
function Ia(e) {
|
|
10
10
|
throw new Error('Could not dynamically require "' + e + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|