@wanghe1995/docx-editor-ui-lite 1.0.5 → 1.0.6

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.
@@ -0,0 +1,30 @@
1
+ import { IEditorData, IEditorOption, IElement } from '@wanghe1995/docx-editor-core';
2
+ export type ImportMode = 'overwrite' | 'append' | 'cancel';
3
+ export interface SaveSnapshot {
4
+ meta: {
5
+ id: string;
6
+ name: string;
7
+ createdAt: string;
8
+ submittedAt: string;
9
+ };
10
+ content: any;
11
+ }
12
+ export interface WordEditorOptions {
13
+ container: string | HTMLElement;
14
+ title?: string;
15
+ data?: IEditorData | IElement[];
16
+ options?: IEditorOption;
17
+ onReady?: (editor: any) => void;
18
+ onChange?: () => void;
19
+ onPageChange?: (pageNo: number) => void;
20
+ onScaleChange?: (scale: number) => void;
21
+ onSave?: (snapshot: SaveSnapshot) => void;
22
+ }
23
+ export interface LiteEditorShellExposed {
24
+ getInstance: () => any;
25
+ getCommand: () => any;
26
+ getListener: () => any;
27
+ executeCommand: (command: string, ...args: any[]) => any;
28
+ setTitle: (title: string) => void;
29
+ destroyShell: () => void;
30
+ }
@@ -0,0 +1,14 @@
1
+ import { WordEditorOptions } from '../object/word-editor.types';
2
+ type __VLS_Props = Omit<WordEditorOptions, 'container'>;
3
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {
4
+ getInstance: () => any;
5
+ getCommand: () => any;
6
+ getListener: () => any;
7
+ executeCommand: (command: string, ...args: any[]) => any;
8
+ setTitle: (title: string) => void;
9
+ destroyShell: () => void;
10
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
11
+ shellRef: HTMLDivElement;
12
+ editorContainerRef: HTMLDivElement;
13
+ }, HTMLDivElement>;
14
+ export default _default;
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@wanghe1995/docx-editor-ui-lite",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "DocxEditor 精简版UI库(Lite)",
5
5
  "author": "wanghe",
6
6
  "license": "MIT",
7
7
  "type": "module",
8
8
  "main": "./dist/docx-editor-lite.umd.cjs",
9
9
  "module": "./dist/docx-editor-lite.js",
10
- "types": "./dist/src/editor/index.d.ts",
10
+ "types": "./dist/editor/index.d.ts",
11
11
  "exports": {
12
12
  ".": {
13
- "types": "./dist/src/editor/index.d.ts",
13
+ "types": "./dist/editor/index.d.ts",
14
14
  "import": "./dist/docx-editor-lite.js",
15
15
  "require": "./dist/docx-editor-lite.umd.cjs"
16
16
  }
@@ -30,7 +30,7 @@
30
30
  "clean": "node -e \"const fs = require('fs'); if(fs.existsSync('dist')) fs.rmSync('dist', {recursive: true})\"",
31
31
  "build": "npm run clean && vite build --config vite.lib.config.ts",
32
32
  "lint": "eslint .",
33
- "type:check": "tsc --noEmit"
33
+ "type:check": "vue-tsc --noEmit"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@eslint/js": "^10.0.1",