@ap666/office-word 0.1.5 → 0.1.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.
package/dist/types.d.ts CHANGED
@@ -2,9 +2,17 @@ import { JSONContent } from '@tiptap/core';
2
2
  export type RichTextEditorProps = {
3
3
  modelValue?: JSONContent | null;
4
4
  editable?: boolean;
5
+ mode?: 'edit' | 'preview';
6
+ outlinePlacement?: 'left' | 'right';
7
+ enabledExportItems?: RichTextEditorExportItemKey[] | null;
8
+ enabledInsertMenuItems?: RichTextEditorInsertMenuItemKey[] | null;
9
+ enabledToolbarActions?: RichTextEditorToolbarActionKey[] | null;
5
10
  placeholder?: string;
6
11
  collaboration?: RichTextEditorCollaborationOptions | null;
7
12
  };
13
+ export type RichTextEditorExportItemKey = 'pdf' | 'html' | 'image' | 'print';
14
+ export type RichTextEditorInsertMenuItemKey = 'image' | 'video' | 'table' | 'local-file' | 'columns' | 'highlight-block' | 'date' | 'code-block' | 'formula' | 'blockquote' | 'emoji' | 'link' | 'divider' | 'countdown' | 'markdown-import';
15
+ export type RichTextEditorToolbarActionKey = 'blockquote';
8
16
  export type RichTextEditorCollaborationDocument = {
9
17
  getXmlFragment: (field: string) => unknown;
10
18
  };
@@ -54,6 +62,12 @@ export type RichTextEditorFilePayload = {
54
62
  widthPercent?: number;
55
63
  height?: number;
56
64
  };
65
+ export type RichTextEditorLocalFilePayload = {
66
+ url: string;
67
+ name: string;
68
+ size?: number;
69
+ mimeType?: string;
70
+ };
57
71
  export type RichTextEditorImageExportOptions = {
58
72
  type?: 'image/png' | 'image/jpeg';
59
73
  quality?: number;
@@ -65,6 +79,8 @@ export type RichTextEditorInstance = {
65
79
  insertImage: (payload: RichTextEditorImagePayload | RichTextEditorImagePayload[]) => boolean;
66
80
  insertVideo: (payload: RichTextEditorVideoPayload) => boolean;
67
81
  insertFile: (payload: RichTextEditorFilePayload) => boolean;
82
+ insertLocalFile: (payload: RichTextEditorLocalFilePayload) => boolean;
83
+ openLocalFilePicker: () => void;
68
84
  focus: () => void;
69
85
  getJSON: () => JSONContent | null;
70
86
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ap666/office-word",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "A reusable Vue 3 rich text editor component built with Tiptap 3.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.umd.cjs",