azs-doc-editor 1.0.0

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/package.json ADDED
@@ -0,0 +1,87 @@
1
+ {
2
+ "name": "azs-doc-editor",
3
+ "version": "1.0.0",
4
+ "description": "A Vue 3 component for editing DOCX and XLSX documents",
5
+ "main": "./dist/azs-doc-editor.umd.js",
6
+ "module": "./dist/azs-doc-editor.es.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/azs-doc-editor.es.js",
11
+ "require": "./dist/azs-doc-editor.umd.js",
12
+ "types": "./dist/index.d.ts"
13
+ },
14
+ "./style.css": "./dist/style.css"
15
+ },
16
+ "files": [
17
+ "dist",
18
+ "public",
19
+ "types"
20
+ ],
21
+ "sideEffects": [
22
+ "**/*.css",
23
+ "**/*.less"
24
+ ],
25
+ "scripts": {
26
+ "dev": "vite",
27
+ "build": "vite build",
28
+ "prepublishOnly": "npm run build"
29
+ },
30
+ "keywords": [
31
+ "vue",
32
+ "vue3",
33
+ "document",
34
+ "editor",
35
+ "converter",
36
+ "docx",
37
+ "xlsx",
38
+ "excel",
39
+ "word",
40
+ "tiptap",
41
+ "luckysheet"
42
+ ],
43
+ "author": "",
44
+ "license": "MIT",
45
+ "peerDependencies": {
46
+ "vue": "^3.0.0",
47
+ "vue-router": "^4.0.0"
48
+ },
49
+ "dependencies": {
50
+ "@element-plus/icons-vue": "^2.3.1",
51
+ "@tiptap/core": "^2.9.1",
52
+ "@tiptap/extension-color": "^2.9.1",
53
+ "@tiptap/extension-font-family": "^2.9.1",
54
+ "@tiptap/extension-highlight": "^2.9.1",
55
+ "@tiptap/extension-image": "^2.9.1",
56
+ "@tiptap/extension-link": "^2.9.1",
57
+ "@tiptap/extension-subscript": "^2.9.1",
58
+ "@tiptap/extension-superscript": "^2.9.1",
59
+ "@tiptap/extension-table": "^2.9.1",
60
+ "@tiptap/extension-table-cell": "^2.9.1",
61
+ "@tiptap/extension-table-header": "^2.9.1",
62
+ "@tiptap/extension-table-row": "^2.9.1",
63
+ "@tiptap/extension-task-item": "^2.9.1",
64
+ "@tiptap/extension-task-list": "^2.9.1",
65
+ "@tiptap/extension-text-align": "^2.9.1",
66
+ "@tiptap/extension-text-style": "^2.9.1",
67
+ "@tiptap/extension-underline": "^2.9.1",
68
+ "@tiptap/pm": "^2.9.1",
69
+ "@tiptap/starter-kit": "^2.9.1",
70
+ "@tiptap/vue-3": "^2.9.1",
71
+ "docx-preview": "^0.3.0",
72
+ "element-plus": "^2.8.0",
73
+ "lodash-es": "^4.17.21",
74
+ "luckyexcel": "^1.0.1",
75
+ "remixicon": "^4.2.0",
76
+ "tiptap-extension-font-size": "^1.2.0"
77
+ },
78
+ "devDependencies": {
79
+ "@types/lodash-es": "^4.17.12",
80
+ "@vitejs/plugin-vue": "^4.2.3",
81
+ "less": "^4.1.3",
82
+ "typescript": "^5.0.2",
83
+ "vite": "^4.4.5",
84
+ "vite-plugin-static-copy": "^0.17.1",
85
+ "vue-tsc": "^1.8.5"
86
+ }
87
+ }
@@ -0,0 +1,34 @@
1
+ import { DefineComponent, App } from 'vue'
2
+
3
+ export interface ConversionResult {
4
+ type: 'docx' | 'xlsx'
5
+ content: any
6
+ fileName: string
7
+ }
8
+
9
+ export interface SaveHandler {
10
+ (result: ConversionResult): Promise<{ _id: string }> | { _id: string }
11
+ }
12
+
13
+ export interface DocumentEditorPageProps {
14
+ fileUrl?: string
15
+ fileType?: 'docx' | 'xlsx'
16
+ documentId?: string
17
+ editable?: boolean
18
+ loadHandler?: (id: string) => Promise<{ type: 'docx' | 'xlsx'; content: any; title: string }>
19
+ saveHandler?: SaveHandler
20
+ }
21
+
22
+ export interface DocumentEditorPageEmits {
23
+ (e: 'saved', data: { _id: string; result: ConversionResult }): void
24
+ (e: 'error', error: string): void
25
+ (e: 'loaded', data: { type: 'docx' | 'xlsx'; content: any; title: string }): void
26
+ }
27
+
28
+ export declare const DocumentEditorPage: DefineComponent<DocumentEditorPageProps, {}, {}>
29
+
30
+ declare const plugin: {
31
+ install(app: App): void
32
+ }
33
+
34
+ export default plugin