@yiitap/vue 0.15.0 → 0.16.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@yiitap/vue",
3
3
  "description": "A WYSIWYG rich-text block-based editor built on top of tiptap.",
4
- "version": "0.15.0",
4
+ "version": "0.16.0",
5
5
  "private": false,
6
6
  "author": {
7
7
  "name": "Yiitap",
@@ -61,37 +61,37 @@
61
61
  "@tiptap/vue-3": "^3.20.0",
62
62
  "tippy.js": "^6.3.7",
63
63
  "uuid": "^10.0.0",
64
- "@yiitap/extension-ai-block": "0.15.0",
65
- "@yiitap/core": "0.15.0",
66
- "@yiitap/extension-callout": "0.15.0",
67
- "@yiitap/extension-color-highlighter": "0.15.0",
68
- "@yiitap/extension-char-command": "0.15.0",
69
- "@yiitap/extension-image": "0.15.0",
70
- "@yiitap/extension-multi-column": "0.15.0",
71
- "@yiitap/extension-inline-placeholder": "0.15.0",
72
- "@yiitap/extension-placeholder": "0.15.0",
73
- "@yiitap/extension-selection-decoration": "0.15.0",
74
- "@yiitap/extension-shortcut": "0.15.0",
75
- "@yiitap/extension-table": "0.15.0",
76
- "@yiitap/extension-table-wrapper": "0.15.0",
77
- "@yiitap/extension-video": "0.15.0",
78
- "@yiitap/extension-task-item": "0.15.0"
64
+ "@yiitap/core": "0.16.0",
65
+ "@yiitap/extension-ai-block": "0.16.0",
66
+ "@yiitap/extension-callout": "0.16.0",
67
+ "@yiitap/extension-char-command": "0.16.0",
68
+ "@yiitap/extension-color-highlighter": "0.16.0",
69
+ "@yiitap/extension-image": "0.16.0",
70
+ "@yiitap/extension-model-viewer": "0.16.0",
71
+ "@yiitap/extension-inline-placeholder": "0.16.0",
72
+ "@yiitap/extension-multi-column": "0.16.0",
73
+ "@yiitap/extension-placeholder": "0.16.0",
74
+ "@yiitap/extension-selection-decoration": "0.16.0",
75
+ "@yiitap/extension-shortcut": "0.16.0",
76
+ "@yiitap/extension-table": "0.16.0",
77
+ "@yiitap/extension-table-wrapper": "0.16.0",
78
+ "@yiitap/extension-task-item": "0.16.0",
79
+ "@yiitap/extension-video": "0.16.0"
79
80
  },
80
81
  "peerDependencies": {
82
+ "@mermaid-js/layout-elk": "^0.2.0",
81
83
  "@tiptap/extension-audio": "^3.20.0",
82
84
  "@tiptap/extension-mathematics": "^3.20.0",
83
85
  "@tiptap/markdown": "^3.20.0",
84
86
  "@types/uuid": "^10.0.0",
85
- "@mermaid-js/layout-elk": "^0.2.0",
86
87
  "katex": "^0.16.25",
87
88
  "lowlight": "^3.3.0",
88
89
  "markdown-it": "^14.1.1",
89
90
  "mermaid": "^11.12.0",
90
- "openai": "^4.88.0",
91
91
  "vue": "^3.3.8",
92
- "@yiitap/util-emoji": "0.15.0",
93
- "@yiitap/vue": "0.15.0",
94
- "@yiitap/i18n": "0.15.0"
92
+ "@yiitap/i18n": "0.16.0",
93
+ "@yiitap/util-emoji": "0.16.0",
94
+ "@yiitap/vue": "0.16.0"
95
95
  },
96
96
  "devDependencies": {
97
97
  "rollup-plugin-visualizer": "^5.14.0",
@@ -1,5 +1,6 @@
1
1
  import { type PropType } from 'vue';
2
2
  import type { FocusPosition } from '@tiptap/core';
3
+ import type { AiOptions } from '@yiitap/core';
3
4
  import { Editor } from '@tiptap/core';
4
5
  type SideMenuAddType = 'menu' | 'empty';
5
6
  interface SideMenuConfig {
@@ -151,8 +152,8 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
151
152
  default: string;
152
153
  validator: (value: string) => boolean;
153
154
  };
154
- aiOption: {
155
- type: PropType<AiOption>;
155
+ aiOptions: {
156
+ type: PropType<AiOptions>;
156
157
  default: () => void;
157
158
  };
158
159
  /**
@@ -320,8 +321,8 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
320
321
  default: string;
321
322
  validator: (value: string) => boolean;
322
323
  };
323
- aiOption: {
324
- type: PropType<AiOption>;
324
+ aiOptions: {
325
+ type: PropType<AiOptions>;
325
326
  default: () => void;
326
327
  };
327
328
  /**
@@ -342,7 +343,6 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
342
343
  }) => any;
343
344
  }>, {
344
345
  title: boolean;
345
- aiOption: AiOption;
346
346
  locale: string;
347
347
  darkMode: boolean;
348
348
  content: string | Record<string, any>;
@@ -350,6 +350,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
350
350
  autofocus: FocusPosition;
351
351
  extensions: string[];
352
352
  editable: boolean;
353
+ aiOptions: AiOptions;
353
354
  bubbleMenu: string[];
354
355
  sideMenu: SideMenuConfig;
355
356
  showMainMenu: boolean;
@@ -1,4 +1,6 @@
1
+ import { type PropType } from 'vue';
1
2
  import { Editor } from '@tiptap/core';
3
+ import type { AiOptions } from '@yiitap/core';
2
4
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
3
5
  editor: {
4
6
  type: typeof Editor;
@@ -8,6 +10,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
8
10
  type: StringConstructor;
9
11
  default: string;
10
12
  };
13
+ aiOptions: {
14
+ type: PropType<AiOptions>;
15
+ default: () => void;
16
+ };
11
17
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
18
  confirm: (...args: any[]) => void;
13
19
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
@@ -19,9 +25,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
19
25
  type: StringConstructor;
20
26
  default: string;
21
27
  };
28
+ aiOptions: {
29
+ type: PropType<AiOptions>;
30
+ default: () => void;
31
+ };
22
32
  }>> & Readonly<{
23
33
  onConfirm?: (...args: any[]) => any;
24
34
  }>, {
25
35
  menuClass: string;
36
+ aiOptions: AiOptions;
26
37
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
27
38
  export default _default;
@@ -1,4 +1,6 @@
1
+ import { type PropType } from 'vue';
1
2
  import { Editor } from '@tiptap/core';
3
+ import type { AiOptions } from '@yiitap/core';
2
4
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
3
5
  editor: {
4
6
  type: typeof Editor;
@@ -15,6 +17,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
15
17
  type: StringConstructor;
16
18
  default: string;
17
19
  };
20
+ aiOptions: {
21
+ type: PropType<AiOptions>;
22
+ default: () => void;
23
+ };
18
24
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
19
25
  editor: {
20
26
  type: typeof Editor;
@@ -31,9 +37,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
31
37
  type: StringConstructor;
32
38
  default: string;
33
39
  };
40
+ aiOptions: {
41
+ type: PropType<AiOptions>;
42
+ default: () => void;
43
+ };
34
44
  }>> & Readonly<{}>, {
35
45
  menu: unknown[];
36
46
  menuClass: string;
47
+ aiOptions: AiOptions;
37
48
  tableToolbar: unknown[];
38
49
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
39
50
  export default _default;
@@ -16,12 +16,10 @@ export declare const ImageBubble: string[];
16
16
  export declare const ImageLinkBubble: string[];
17
17
  export declare const MoreBubble: string[];
18
18
  export declare const TableBubble: string[];
19
- export declare const TableWrapperBubble: string[];
20
19
  /**
21
20
  * Floating Menu
22
21
  */
23
22
  export declare const DefaultFloating: string[];
24
- export declare const TableFloating: string[];
25
23
  export declare const DefaultEmbedServices: {
26
24
  video: string[];
27
25
  map: string[];
@@ -43,6 +43,7 @@ import ODetails, { type ODetailsOptions } from './details';
43
43
  import OHorizontalRule from './horizontal-rule';
44
44
  import OImage from './image';
45
45
  import OLink from './link';
46
+ import OModelViewer from './model-viewer';
46
47
  import OTableCell from './table-cell';
47
48
  import OTableHeader from './table-header';
48
49
  import OTableWrapper from './table-wrapper';
@@ -51,5 +52,5 @@ import OVideo from './video';
51
52
  * Default extensions enabled via StarterKit
52
53
  */
53
54
  export declare const DefaultExtensionNames: string[];
54
- export { BackgroundColor, BlockMath, Collaboration, CollaborationCaret, Color, Details, DetailsContent, DetailsSummary, Focus, FontFamily, Highlight, Image, InlineMath, Link, Markdown, Mention, Subscript, Superscript, Table, TableHeader, TableCell, TableRow, TaskItem, TaskList, TextAlign, TextStyle, Typography, Underline, UniqueID, OAiBlock, OAudio, OBlockMath, OBlockquote, OCallout, OCharCommand, OCodeBlock, OColonCommand, OColorHighlighter, ODetails, OHorizontalRule, OImage, OInlinePlaceholder, OLink, OPlaceholder, OSelectionDecoration, OShortcut, OSlashCommand, OSlashZhCommand, OTable, OTableCell, OTableHeader, OTableWrapper, OTaskItem, OVideo, Column, ColumnContainer, MultiColumn, ColumnDropCursor, ColonSuggestion, SlashSuggestion, EmojiSuggestion, };
55
+ export { BackgroundColor, BlockMath, Collaboration, CollaborationCaret, Color, Details, DetailsContent, DetailsSummary, Focus, FontFamily, Highlight, Image, InlineMath, Link, Markdown, Mention, Subscript, Superscript, Table, TableHeader, TableCell, TableRow, TaskItem, TaskList, TextAlign, TextStyle, Typography, Underline, UniqueID, OAiBlock, OAudio, OBlockMath, OBlockquote, OCallout, OCharCommand, OCodeBlock, OColonCommand, OColorHighlighter, ODetails, OHorizontalRule, OImage, OInlinePlaceholder, OLink, OModelViewer, OPlaceholder, OSelectionDecoration, OShortcut, OSlashCommand, OSlashZhCommand, OTable, OTableCell, OTableHeader, OTableWrapper, OTaskItem, OVideo, Column, ColumnContainer, MultiColumn, ColumnDropCursor, ColonSuggestion, SlashSuggestion, EmojiSuggestion, };
55
56
  export type { AnyExtension, BackgroundColorOptions, BlockMathOptions, CollaborationOptions, CollaborationCaretOptions, ColorOptions, FocusOptions, FontFamilyOptions, HighlightOptions, HorizontalRuleOptions, ImageOptions, InlineMathOptions, LinkOptions, MarkdownExtensionOptions, MentionOptions, SubscriptExtensionOptions, SuperscriptExtensionOptions, TaskItemOptions, TaskListOptions, TextAlignOptions, TextStyleOptions, TypographyOptions, UnderlineOptions, UniqueIDOptions, AiBlockOptions, AudioOptions, CalloutOptions, OBlockquoteOptions, OCodeBlockOptions, ODetailsOptions, ColumnDropCursorOptions, MultiColumnOptions, ShortcutOptions, };
@@ -59,6 +59,9 @@ export interface ExtensionOptions {
59
59
  HTMLAttributes?: Record<string, any>;
60
60
  };
61
61
  OLink: LinkOptions;
62
+ OModelViewer: {
63
+ HTMLAttributes?: Record<string, any>;
64
+ };
62
65
  OMultiColumn: MultiColumnOptions;
63
66
  OColumnDropCursor: ColumnDropCursorOptions;
64
67
  OShortcut: ShortcutOptions;
@@ -0,0 +1,2 @@
1
+ export declare const OModelViewer: import("@tiptap/core").Node<any, any>;
2
+ export default OModelViewer;
@@ -0,0 +1,92 @@
1
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ editor: {
3
+ type: import("vue").PropType<import("@tiptap/core").NodeViewProps["editor"]>;
4
+ required: true;
5
+ };
6
+ node: {
7
+ type: import("vue").PropType<import("@tiptap/core").NodeViewProps["node"]>;
8
+ required: true;
9
+ };
10
+ decorations: {
11
+ type: import("vue").PropType<import("@tiptap/core").NodeViewProps["decorations"]>;
12
+ required: true;
13
+ };
14
+ selected: {
15
+ type: import("vue").PropType<import("@tiptap/core").NodeViewProps["selected"]>;
16
+ required: true;
17
+ };
18
+ extension: {
19
+ type: import("vue").PropType<import("@tiptap/core").NodeViewProps["extension"]>;
20
+ required: true;
21
+ };
22
+ getPos: {
23
+ type: import("vue").PropType<import("@tiptap/core").NodeViewProps["getPos"]>;
24
+ required: true;
25
+ };
26
+ updateAttributes: {
27
+ type: import("vue").PropType<import("@tiptap/core").NodeViewProps["updateAttributes"]>;
28
+ required: true;
29
+ };
30
+ deleteNode: {
31
+ type: import("vue").PropType<import("@tiptap/core").NodeViewProps["deleteNode"]>;
32
+ required: true;
33
+ };
34
+ view: {
35
+ type: import("vue").PropType<import("@tiptap/core").NodeViewProps["view"]>;
36
+ required: true;
37
+ };
38
+ innerDecorations: {
39
+ type: import("vue").PropType<import("@tiptap/core").NodeViewProps["innerDecorations"]>;
40
+ required: true;
41
+ };
42
+ HTMLAttributes: {
43
+ type: import("vue").PropType<import("@tiptap/core").NodeViewProps["HTMLAttributes"]>;
44
+ required: true;
45
+ };
46
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
47
+ editor: {
48
+ type: import("vue").PropType<import("@tiptap/core").NodeViewProps["editor"]>;
49
+ required: true;
50
+ };
51
+ node: {
52
+ type: import("vue").PropType<import("@tiptap/core").NodeViewProps["node"]>;
53
+ required: true;
54
+ };
55
+ decorations: {
56
+ type: import("vue").PropType<import("@tiptap/core").NodeViewProps["decorations"]>;
57
+ required: true;
58
+ };
59
+ selected: {
60
+ type: import("vue").PropType<import("@tiptap/core").NodeViewProps["selected"]>;
61
+ required: true;
62
+ };
63
+ extension: {
64
+ type: import("vue").PropType<import("@tiptap/core").NodeViewProps["extension"]>;
65
+ required: true;
66
+ };
67
+ getPos: {
68
+ type: import("vue").PropType<import("@tiptap/core").NodeViewProps["getPos"]>;
69
+ required: true;
70
+ };
71
+ updateAttributes: {
72
+ type: import("vue").PropType<import("@tiptap/core").NodeViewProps["updateAttributes"]>;
73
+ required: true;
74
+ };
75
+ deleteNode: {
76
+ type: import("vue").PropType<import("@tiptap/core").NodeViewProps["deleteNode"]>;
77
+ required: true;
78
+ };
79
+ view: {
80
+ type: import("vue").PropType<import("@tiptap/core").NodeViewProps["view"]>;
81
+ required: true;
82
+ };
83
+ innerDecorations: {
84
+ type: import("vue").PropType<import("@tiptap/core").NodeViewProps["innerDecorations"]>;
85
+ required: true;
86
+ };
87
+ HTMLAttributes: {
88
+ type: import("vue").PropType<import("@tiptap/core").NodeViewProps["HTMLAttributes"]>;
89
+ required: true;
90
+ };
91
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
92
+ export default _default;
@@ -1,6 +1,3 @@
1
- import { type Ref } from 'vue';
2
1
  export default function (): {
3
2
  md: any;
4
- aiOption: Ref<AiOption, AiOption>;
5
- createStreamingChatCompletion: (messages: ChatMessage[], onProgress: (chunk: string) => void) => Promise<string>;
6
3
  };
package/types/index.d.ts CHANGED
@@ -8,5 +8,8 @@ declare const YiiEditorPlugin: {
8
8
  export { YiiEditor, YiiEditorPlugin };
9
9
  export * from './components';
10
10
  export * from './constants';
11
- export * from './hooks';
12
11
  export * from './extensions';
12
+ export * from './hooks';
13
+ export * from './utils';
14
+ export * from '@yiitap/core';
15
+ export * from '@tiptap/core';
@@ -2,5 +2,6 @@ export interface DialogOption {
2
2
  show: boolean;
3
3
  icon?: string;
4
4
  title?: string;
5
+ dialogClass?: string;
5
6
  fullscreen: boolean;
6
7
  }
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import { Editor } from '@tiptap/core';
5
5
  export declare const toJSON: (editor: Editor, html: string) => Record<string, any>;
6
+ export declare const htmlToJSON: (editor: Editor, html: string) => Record<string, any>;
6
7
  export declare const systemKeymap: () => {
7
8
  mod: string;
8
9
  alt: string;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Remove elements' attributes based on a CSS selector
3
+ * @param {string} htmlString - The HTML string
4
+ * @param {string} selector - The CSS selector (e.g., '[data-id]')
5
+ * @returns {string} - Processed HTML string
6
+ */
7
+ export declare const removeHtmlAttributes: (htmlString: string, selector: string) => string;
@@ -0,0 +1,2 @@
1
+ export * from './convert';
2
+ export * from './html';