@ap666/office-word 0.1.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/LICENSE +21 -0
- package/README.md +175 -0
- package/dist/chunk-efA98nb6.js +13 -0
- package/dist/components/ColumnsBlockView.vue.d.ts +26 -0
- package/dist/components/CountdownBlockView.vue.d.ts +3 -0
- package/dist/components/EmojiPickerPanel.vue.d.ts +11 -0
- package/dist/components/FormulaBlockView.vue.d.ts +3 -0
- package/dist/components/FormulaEditorDialog.vue.d.ts +20 -0
- package/dist/components/HighlightBlockView.vue.d.ts +28 -0
- package/dist/components/ImageBlockView.vue.d.ts +6 -0
- package/dist/components/LinkBlockView.vue.d.ts +5 -0
- package/dist/components/OfficeCodeBlockView.vue.d.ts +28 -0
- package/dist/components/OfficeColorIcon.vue.d.ts +10 -0
- package/dist/components/OfficeIcon.vue.d.ts +12 -0
- package/dist/components/OutlinePanel.vue.d.ts +17 -0
- package/dist/components/RichTextEditor.vue.d.ts +51 -0
- package/dist/components/ScrollArea.vue.d.ts +24 -0
- package/dist/components/VideoBlockView.vue.d.ts +7 -0
- package/dist/composables/useRichTextEditor.d.ts +9 -0
- package/dist/data/emoji.d.ts +13 -0
- package/dist/extensions/columns-block.d.ts +2 -0
- package/dist/extensions/columns-column.d.ts +2 -0
- package/dist/extensions/countdown-block.d.ts +2 -0
- package/dist/extensions/formula-block.d.ts +2 -0
- package/dist/extensions/highlight-block.d.ts +2 -0
- package/dist/extensions/image-block.d.ts +2 -0
- package/dist/extensions/indent.d.ts +17 -0
- package/dist/extensions/link-block.d.ts +2 -0
- package/dist/extensions/office-code-block.d.ts +1 -0
- package/dist/extensions/quote-style.d.ts +19 -0
- package/dist/extensions/text-align.d.ts +12 -0
- package/dist/extensions/video-block.d.ts +2 -0
- package/dist/html2canvas-Bwmq6fGh.js +4025 -0
- package/dist/icons.d.ts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.es-C4X5YiRo.js +5751 -0
- package/dist/index.js +54037 -0
- package/dist/index.umd.cjs +5319 -0
- package/dist/jspdf.es.min-ByaXFVjc.js +18214 -0
- package/dist/purify.es-B5ixYH9L.js +549 -0
- package/dist/style.css +2 -0
- package/dist/typeof-Dz1Ap89p.js +11 -0
- package/dist/types.d.ts +57 -0
- package/dist/utils/columns.d.ts +4 -0
- package/dist/utils/markdown-import.d.ts +2 -0
- package/docs/usage.md +19 -0
- package/package.json +61 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region ../../node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
2
|
+
function e(t) {
|
|
3
|
+
"@babel/helpers - typeof";
|
|
4
|
+
return e = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
5
|
+
return typeof e;
|
|
6
|
+
} : function(e) {
|
|
7
|
+
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
8
|
+
}, e(t);
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { e as t };
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { JSONContent } from '@tiptap/core';
|
|
2
|
+
export type RichTextEditorProps = {
|
|
3
|
+
modelValue?: JSONContent | null;
|
|
4
|
+
editable?: boolean;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
};
|
|
7
|
+
export type RichTextEditorAlign = 'left' | 'center' | 'right';
|
|
8
|
+
export type RichTextEditorImagePayload = {
|
|
9
|
+
src: string;
|
|
10
|
+
alt?: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
link?: string;
|
|
14
|
+
rotation?: number;
|
|
15
|
+
};
|
|
16
|
+
export type RichTextEditorVideoPayload = {
|
|
17
|
+
src: string;
|
|
18
|
+
name?: string;
|
|
19
|
+
description?: string;
|
|
20
|
+
mimeType?: string;
|
|
21
|
+
align?: RichTextEditorAlign;
|
|
22
|
+
widthPercent?: number;
|
|
23
|
+
height?: number;
|
|
24
|
+
};
|
|
25
|
+
export type RichTextEditorFilePayload = {
|
|
26
|
+
url: string;
|
|
27
|
+
name: string;
|
|
28
|
+
displayMode?: 'text' | 'card' | 'preview';
|
|
29
|
+
align?: RichTextEditorAlign;
|
|
30
|
+
widthPercent?: number;
|
|
31
|
+
height?: number;
|
|
32
|
+
};
|
|
33
|
+
export type RichTextEditorImageExportOptions = {
|
|
34
|
+
type?: 'image/png' | 'image/jpeg';
|
|
35
|
+
quality?: number;
|
|
36
|
+
};
|
|
37
|
+
export type RichTextEditorInstance = {
|
|
38
|
+
exportPdf: () => Promise<Blob | null>;
|
|
39
|
+
exportImage: (options?: RichTextEditorImageExportOptions) => Promise<Blob | null>;
|
|
40
|
+
exportHtml: () => string | null;
|
|
41
|
+
insertImage: (payload: RichTextEditorImagePayload | RichTextEditorImagePayload[]) => boolean;
|
|
42
|
+
insertVideo: (payload: RichTextEditorVideoPayload) => boolean;
|
|
43
|
+
insertFile: (payload: RichTextEditorFilePayload) => boolean;
|
|
44
|
+
focus: () => void;
|
|
45
|
+
getJSON: () => JSONContent | null;
|
|
46
|
+
};
|
|
47
|
+
export type OfficeIconProps = {
|
|
48
|
+
name: string;
|
|
49
|
+
size?: number | string;
|
|
50
|
+
color?: string;
|
|
51
|
+
backgroundColor?: string;
|
|
52
|
+
};
|
|
53
|
+
export type OfficeColorIconProps = {
|
|
54
|
+
name: string;
|
|
55
|
+
size?: number | string;
|
|
56
|
+
backgroundColor?: string;
|
|
57
|
+
};
|
package/docs/usage.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Package Usage
|
|
2
|
+
|
|
3
|
+
This file is shipped with the npm package so consumers can view the usage guide locally after installation.
|
|
4
|
+
|
|
5
|
+
See the package root `README.md` for the primary integration guide.
|
|
6
|
+
|
|
7
|
+
## Quick Start
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { RichTextEditor } from '@ap666/office-word'
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Main Capabilities
|
|
14
|
+
|
|
15
|
+
- rich text editing with a built-in toolbar UI
|
|
16
|
+
- export to PDF, image, and HTML through instance methods
|
|
17
|
+
- external upload integration for image, video, and file insertion
|
|
18
|
+
- typed public instance API for Vue `ref` usage
|
|
19
|
+
|
package/package.json
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ap666/office-word",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "A reusable Vue 3 rich text editor component built with Tiptap 3.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.umd.cjs",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"require": "./dist/index.umd.cjs"
|
|
14
|
+
},
|
|
15
|
+
"./style.css": "./dist/style.css"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist",
|
|
19
|
+
"README.md",
|
|
20
|
+
"docs",
|
|
21
|
+
"LICENSE"
|
|
22
|
+
],
|
|
23
|
+
"sideEffects": [
|
|
24
|
+
"*.css"
|
|
25
|
+
],
|
|
26
|
+
"keywords": [
|
|
27
|
+
"vue3",
|
|
28
|
+
"tiptap",
|
|
29
|
+
"rich-text-editor",
|
|
30
|
+
"component-library"
|
|
31
|
+
],
|
|
32
|
+
"license": "MIT",
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"access": "public",
|
|
35
|
+
"registry": "https://registry.npmjs.org/"
|
|
36
|
+
},
|
|
37
|
+
"peerDependencies": {
|
|
38
|
+
"@tiptap/core": "^3.22.1",
|
|
39
|
+
"@tiptap/extension-code-block": "^3.22.1",
|
|
40
|
+
"@tiptap/extension-code-block-lowlight": "^3.22.1",
|
|
41
|
+
"@tiptap/extension-font-family": "^3.22.1",
|
|
42
|
+
"@tiptap/extension-placeholder": "^3.22.1",
|
|
43
|
+
"@tiptap/extension-subscript": "^3.22.1",
|
|
44
|
+
"@tiptap/extension-superscript": "^3.22.1",
|
|
45
|
+
"@tiptap/extension-task-item": "^3.22.1",
|
|
46
|
+
"@tiptap/extension-task-list": "^3.22.1",
|
|
47
|
+
"@tiptap/extension-text-style": "^3.22.1",
|
|
48
|
+
"@tiptap/extension-underline": "^3.22.1",
|
|
49
|
+
"@tiptap/starter-kit": "^3.22.1",
|
|
50
|
+
"@tiptap/vue-3": "^3.22.1",
|
|
51
|
+
"lowlight": "^3.3.0",
|
|
52
|
+
"vue": "^3.5.0"
|
|
53
|
+
},
|
|
54
|
+
"dependencies": {
|
|
55
|
+
"html2canvas": "^1.4.1",
|
|
56
|
+
"jspdf": "^4.2.1",
|
|
57
|
+
"katex": "^0.16.44",
|
|
58
|
+
"marked": "^17.0.5",
|
|
59
|
+
"plyr": "^3.8.4"
|
|
60
|
+
}
|
|
61
|
+
}
|