lt-ppt 1.0.31 → 1.0.34

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.
@@ -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-BKX8gHfd.js";
3
+ import { c as Jy } from "./lib-BkSt5-a-.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,4 +1,4 @@
1
- import { ImageAIEntryClickParams, InsertImageParams, InsertVideoParams, LtPPTProps, ReplaceImageParams, ReplaceVideoParams, SupportedLocale, ThemeMode } from './types/lt-ppt';
1
+ import { ImageAIEntryClickParams, 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[];
@@ -6,6 +6,7 @@ declare const _default: import('vue').DefineComponent<LtPPTProps, {
6
6
  setSlides: (slides: Slide[]) => void;
7
7
  startScreening: () => void;
8
8
  getCurrentIndex: () => number;
9
+ setMode: (mode: LtPPTMode) => void;
9
10
  insertImage: (params: InsertImageParams) => Promise<PPTImageElement | null>;
10
11
  replaceImage: (params: ReplaceImageParams) => Promise<PPTImageElement | null>;
11
12
  insertVideo: (params: InsertVideoParams) => Promise<PPTVideoElement | null>;
@@ -19,6 +20,7 @@ declare const _default: import('vue').DefineComponent<LtPPTProps, {
19
20
  width: string;
20
21
  locale: SupportedLocale;
21
22
  theme: ThemeMode;
23
+ mode: LtPPTMode;
22
24
  readonly: boolean;
23
25
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
24
26
  containerRef: HTMLDivElement;
@@ -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, ImageAIEntryElement, ImageAIEntryClickParams, InsertImageParams, ReplaceImageParams, InsertVideoParams, ReplaceVideoParams, SupportedLocale, ThemeMode } from './types/lt-ppt';
3
+ export type { LtPPTProps, LtPPTInstance, LtPPTMode, InitData, UploadFileParams, SaveCallbackParams, ImageAIEntryElement, ImageAIEntryClickParams, InsertImageParams, 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';
@@ -475,6 +475,7 @@ declare const _default: {
475
475
  aspectRatioPortrait: string;
476
476
  aspectRatioLandscape: string;
477
477
  borderRadius: string;
478
+ quoteToChat: string;
478
479
  replaceImageBtn: string;
479
480
  resetStyleBtn: string;
480
481
  setAsBackgroundBtn: string;
@@ -511,6 +511,7 @@ declare const i18n: import('./useLocale.ts').I18n<{
511
511
  aspectRatioPortrait: string;
512
512
  aspectRatioLandscape: string;
513
513
  borderRadius: string;
514
+ quoteToChat: string;
514
515
  replaceImageBtn: string;
515
516
  resetStyleBtn: string;
516
517
  setAsBackgroundBtn: string;
@@ -1602,6 +1603,7 @@ declare const i18n: import('./useLocale.ts').I18n<{
1602
1603
  aspectRatioPortrait: string;
1603
1604
  aspectRatioLandscape: string;
1604
1605
  borderRadius: string;
1606
+ quoteToChat: string;
1605
1607
  replaceImageBtn: string;
1606
1608
  resetStyleBtn: string;
1607
1609
  setAsBackgroundBtn: string;
@@ -507,6 +507,7 @@ declare const _default: {
507
507
  aspectRatioPortrait: string;
508
508
  aspectRatioLandscape: string;
509
509
  borderRadius: string;
510
+ quoteToChat: string;
510
511
  replaceImageBtn: string;
511
512
  resetStyleBtn: string;
512
513
  setAsBackgroundBtn: string;
@@ -1,6 +1,7 @@
1
1
  import { PPTElement, PPTImageElement, PPTVideoElement, Slide } from './slides';
2
2
  export type SupportedLocale = 'zh-CN' | 'en';
3
3
  export type ThemeMode = 'dark' | 'light';
4
+ export type LtPPTMode = 'default' | 'mini';
4
5
  export interface InitData {
5
6
  /** JSON 数据(包含 slides, theme 等) */
6
7
  json?: Record<string, any>;
@@ -144,6 +145,8 @@ export interface LtPPTProps {
144
145
  readonly?: boolean;
145
146
  /** 主题模式,dark 或 light,默认 dark */
146
147
  theme?: ThemeMode;
148
+ /** 编辑器显示模式,default 为完整编辑器,mini 为精简编辑器 */
149
+ mode?: LtPPTMode;
147
150
  /** 返回按钮回调,传入后头部左侧显示返回图标 */
148
151
  onReturn?: () => void;
149
152
  /** 点击图片 AI 入口时触发 */
@@ -160,6 +163,8 @@ export interface LtPPTInstance {
160
163
  startScreening: () => void;
161
164
  /** 获取当前幻灯片索引 */
162
165
  getCurrentIndex: () => number;
166
+ /** 切换编辑器显示模式 */
167
+ setMode: (mode: LtPPTMode) => void;
163
168
  /** 向指定页面插入图片 */
164
169
  insertImage: (params: InsertImageParams) => Promise<PPTImageElement | null>;
165
170
  /** 替换指定图片元素,未指定元素时替换当前选中图片 */
@@ -0,0 +1,16 @@
1
+ import { PPTElement, PPTImageElement } from '../../../types/slides';
2
+ type __VLS_Props = {
3
+ elementInfo: PPTElement;
4
+ canvasScale: number;
5
+ viewportLeft: number;
6
+ viewportTop: number;
7
+ imageAIEntryEnabled?: boolean;
8
+ };
9
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
10
+ "image-ai-entry-click": (element: PPTImageElement) => any;
11
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
12
+ "onImage-ai-entry-click"?: ((element: PPTImageElement) => any) | undefined;
13
+ }>, {
14
+ imageAIEntryEnabled: boolean;
15
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
16
+ export default _default;
@@ -1,5 +1,4 @@
1
1
  declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
2
- titleInputRef: unknown;
3
2
  offscreenCoverRef: HTMLDivElement;
4
3
  }, HTMLDivElement>;
5
4
  export default _default;
@@ -0,0 +1,11 @@
1
+ type __VLS_Props = {
2
+ visible: boolean;
3
+ };
4
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
5
+ select: () => any;
6
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
7
+ onSelect?: (() => any) | undefined;
8
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
9
+ previewRef: HTMLDivElement;
10
+ }, HTMLDivElement>;
11
+ export default _default;
@@ -0,0 +1,4 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
2
+ toolbarRef: HTMLDivElement;
3
+ }, HTMLDivElement>;
4
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lt-ppt",
3
- "version": "1.0.31",
3
+ "version": "1.0.34",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/lt-ppt.umd.js",