@halo-dev/richtext-editor 2.21.0 → 2.22.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.
Files changed (149) hide show
  1. package/README.md +61 -0
  2. package/dist/components/Editor.vue.d.ts +5 -4
  3. package/dist/components/EditorHeader.vue.d.ts +4 -4
  4. package/dist/components/base/DropdownItem.vue.d.ts +29 -0
  5. package/dist/components/base/Input.vue.d.ts +29 -0
  6. package/dist/components/base/index.d.ts +2 -0
  7. package/dist/components/block/BlockActionButton.vue.d.ts +13 -8
  8. package/dist/{dev/App.vue.d.ts → components/block/BlockActionHorizontalSeparator.vue.d.ts} +1 -1
  9. package/dist/components/block/BlockActionSeparator.vue.d.ts +2 -1
  10. package/dist/components/block/index.d.ts +1 -2
  11. package/dist/components/bubble/BubbleButton.vue.d.ts +28 -0
  12. package/dist/components/bubble/BubbleItem.vue.d.ts +3 -37
  13. package/dist/components/{EditorBubbleMenu.vue.d.ts → bubble/EditorBubbleMenu.vue.d.ts} +3 -3
  14. package/dist/components/bubble/index.d.ts +2 -1
  15. package/dist/components/common/ColorPickerDropdown.vue.d.ts +7 -7
  16. package/dist/components/drag/EditorDragButtonItem.vue.d.ts +8 -0
  17. package/dist/components/drag/EditorDragHandle.vue.d.ts +14 -0
  18. package/dist/components/drag/EditorDragMenu.vue.d.ts +43 -0
  19. package/dist/components/drag/default-drag.d.ts +8 -0
  20. package/dist/components/drag/index.d.ts +4 -0
  21. package/dist/components/index.d.ts +4 -2
  22. package/dist/components/toolbar/ToolbarItem.vue.d.ts +2 -24
  23. package/dist/components/toolbar/ToolbarSubItem.vue.d.ts +2 -20
  24. package/dist/components/toolbox/ToolboxItem.vue.d.ts +2 -21
  25. package/dist/components/upload/EditorLinkObtain.vue.d.ts +52 -0
  26. package/dist/components/upload/ResourceReplaceButton.vue.d.ts +14 -0
  27. package/dist/components/upload/index.d.ts +2 -0
  28. package/dist/composables/use-attachment.d.ts +7 -0
  29. package/dist/extensions/audio/AudioView.vue.d.ts +107 -2
  30. package/dist/extensions/audio/BubbleItemAudioLink.vue.d.ts +2 -29
  31. package/dist/extensions/audio/BubbleItemAudioPosition.vue.d.ts +7 -0
  32. package/dist/extensions/audio/index.d.ts +9 -4
  33. package/dist/extensions/blockquote/index.d.ts +2 -2
  34. package/dist/extensions/bold/index.d.ts +2 -2
  35. package/dist/extensions/bullet-list/index.d.ts +3 -3
  36. package/dist/extensions/character-count/index.d.ts +1 -0
  37. package/dist/extensions/clear-format/index.d.ts +2 -2
  38. package/dist/extensions/code/index.d.ts +2 -2
  39. package/dist/extensions/code-block/CodeBlockSelect.vue.d.ts +7 -5
  40. package/dist/extensions/code-block/code-block.d.ts +7 -5
  41. package/dist/extensions/code-block/index.d.ts +0 -1
  42. package/dist/extensions/color/ColorBubbleItem.vue.d.ts +2 -29
  43. package/dist/extensions/color/ColorToolbarItem.vue.d.ts +2 -24
  44. package/dist/extensions/color/index.d.ts +2 -2
  45. package/dist/extensions/columns/column.d.ts +6 -2
  46. package/dist/extensions/columns/columns.d.ts +11 -4
  47. package/dist/extensions/columns/index.d.ts +2 -2
  48. package/dist/extensions/commands-menu/CommandsView.vue.d.ts +1 -1
  49. package/dist/extensions/commands-menu/commands.d.ts +2 -3
  50. package/dist/extensions/commands-menu/index.d.ts +1 -1
  51. package/dist/extensions/details/index.d.ts +6 -0
  52. package/dist/extensions/document/index.d.ts +2 -0
  53. package/dist/extensions/drop-cursor/index.d.ts +1 -0
  54. package/dist/extensions/extensions-kit.d.ts +91 -0
  55. package/dist/extensions/figure/FigureCaptionView.vue.d.ts +3 -0
  56. package/dist/extensions/figure/figure-caption.d.ts +2 -0
  57. package/dist/extensions/figure/index.d.ts +15 -0
  58. package/dist/extensions/font-size/index.d.ts +4 -14
  59. package/dist/extensions/format-brush/index.d.ts +4 -4
  60. package/dist/extensions/gallery/BubbleItemAddImage.vue.d.ts +7 -0
  61. package/dist/extensions/gallery/BubbleItemGap.vue.d.ts +493 -0
  62. package/dist/extensions/gallery/BubbleItemGroupSize.vue.d.ts +493 -0
  63. package/dist/extensions/gallery/BubbleItemLayout.vue.d.ts +493 -0
  64. package/dist/extensions/gallery/GalleryView.vue.d.ts +3 -0
  65. package/dist/extensions/gallery/gallery-bubble.d.ts +8 -0
  66. package/dist/extensions/gallery/index.d.ts +28 -0
  67. package/dist/extensions/gallery/useGalleryImages.d.ts +7 -0
  68. package/dist/extensions/gap-cursor/index.d.ts +1 -17
  69. package/dist/extensions/hard-break/index.d.ts +1 -0
  70. package/dist/extensions/heading/index.d.ts +2 -2
  71. package/dist/extensions/highlight/HighlightBubbleItem.vue.d.ts +2 -29
  72. package/dist/extensions/highlight/HighlightToolbarItem.vue.d.ts +2 -24
  73. package/dist/extensions/highlight/index.d.ts +2 -2
  74. package/dist/extensions/history/index.d.ts +1 -3
  75. package/dist/extensions/horizontal-rule/index.d.ts +1 -0
  76. package/dist/extensions/iframe/BubbleItemIframeAlign.vue.d.ts +7 -0
  77. package/dist/extensions/iframe/BubbleItemIframeLink.vue.d.ts +2 -29
  78. package/dist/extensions/iframe/BubbleItemIframeSize.vue.d.ts +2 -6
  79. package/dist/extensions/iframe/IframeView.vue.d.ts +54 -1
  80. package/dist/extensions/iframe/index.d.ts +4 -4
  81. package/dist/extensions/image/BubbleItemImageAlt.vue.d.ts +2 -29
  82. package/dist/extensions/image/BubbleItemImageHref.vue.d.ts +2 -29
  83. package/dist/extensions/image/BubbleItemImageLink.vue.d.ts +2 -29
  84. package/dist/extensions/image/BubbleItemImagePosition.vue.d.ts +7 -0
  85. package/dist/extensions/image/BubbleItemImageSize.vue.d.ts +2 -29
  86. package/dist/extensions/image/ImageView.vue.d.ts +109 -2
  87. package/dist/extensions/image/index.d.ts +8 -2
  88. package/dist/extensions/indent/index.d.ts +5 -5
  89. package/dist/extensions/index.d.ts +49 -47
  90. package/dist/extensions/italic/index.d.ts +2 -2
  91. package/dist/extensions/link/LinkBubbleButton.vue.d.ts +2 -29
  92. package/dist/extensions/link/index.d.ts +2 -2
  93. package/dist/extensions/list-extra/index.d.ts +6 -0
  94. package/dist/extensions/list-keymap/index.d.ts +4 -4
  95. package/dist/extensions/node-selected/index.d.ts +3 -4
  96. package/dist/extensions/ordered-list/index.d.ts +3 -3
  97. package/dist/extensions/paragraph/index.d.ts +2 -2
  98. package/dist/extensions/placeholder/index.d.ts +1 -0
  99. package/dist/extensions/range-selection/index.d.ts +2 -2
  100. package/dist/extensions/search-and-replace/IconButton.vue.d.ts +20 -0
  101. package/dist/extensions/search-and-replace/MatchToggleButton.vue.d.ts +20 -0
  102. package/dist/extensions/search-and-replace/SearchAndReplace.vue.d.ts +5 -2
  103. package/dist/extensions/search-and-replace/SearchAndReplacePlugin.d.ts +3 -2
  104. package/dist/extensions/search-and-replace/index.d.ts +2 -3
  105. package/dist/extensions/strike/index.d.ts +2 -2
  106. package/dist/extensions/subscript/index.d.ts +2 -2
  107. package/dist/extensions/superscript/index.d.ts +2 -2
  108. package/dist/extensions/table/index.d.ts +4 -2
  109. package/dist/extensions/table/table-row.d.ts +1 -1
  110. package/dist/extensions/task-list/index.d.ts +3 -3
  111. package/dist/extensions/text/BubbleItemTextType.vue.d.ts +3 -0
  112. package/dist/extensions/text/index.d.ts +4 -2
  113. package/dist/extensions/text-align/index.d.ts +2 -2
  114. package/dist/extensions/text-style/index.d.ts +3 -3
  115. package/dist/extensions/trailing-node/index.d.ts +1 -2
  116. package/dist/extensions/underline/index.d.ts +2 -2
  117. package/dist/extensions/upload/index.d.ts +8 -0
  118. package/dist/extensions/video/BubbleItemVideoLink.vue.d.ts +2 -29
  119. package/dist/extensions/video/BubbleItemVideoPosition.vue.d.ts +7 -0
  120. package/dist/extensions/video/BubbleItemVideoSize.vue.d.ts +2 -29
  121. package/dist/extensions/video/VideoView.vue.d.ts +107 -2
  122. package/dist/extensions/video/index.d.ts +18 -4
  123. package/dist/index.d.ts +1 -4
  124. package/dist/index.es.js +39156 -0
  125. package/dist/index.iife.js +176 -0
  126. package/dist/style.css +2 -1
  127. package/dist/tiptap/index.d.ts +3 -3
  128. package/dist/tiptap/pm/index.d.ts +0 -1
  129. package/dist/types/index.d.ts +115 -59
  130. package/dist/utils/attachment.d.ts +3 -0
  131. package/dist/utils/clipboard.d.ts +9 -0
  132. package/dist/utils/delete-node.d.ts +1 -1
  133. package/dist/utils/filter-duplicate-extensions.d.ts +2 -0
  134. package/dist/utils/index.d.ts +8 -0
  135. package/dist/utils/{isListActive.d.ts → is-list-active.d.ts} +2 -2
  136. package/dist/utils/is-node-empty.d.ts +6 -0
  137. package/dist/utils/keyboard.d.ts +37 -0
  138. package/dist/utils/upload.d.ts +67 -0
  139. package/package.json +46 -58
  140. package/dist/components/block/BlockActionInput.vue.d.ts +0 -15
  141. package/dist/components/block/BlockCard.vue.d.ts +0 -30
  142. package/dist/components/bubble/BubbleMenu.vue.d.ts +0 -84
  143. package/dist/components/bubble/BubbleMenuPlugin.d.ts +0 -52
  144. package/dist/dev/main.d.ts +0 -1
  145. package/dist/extensions/draggable/index.d.ts +0 -13
  146. package/dist/rich-text-editor.es.js +0 -41650
  147. package/dist/rich-text-editor.iife.js +0 -136
  148. package/dist/utils/isNodeEmpty.d.ts +0 -4
  149. /package/dist/components/icon/{MdiDeleteForeverOutline.vue.d.ts → MingcuteDelete2Line.vue.d.ts} +0 -0
package/README.md ADDED
@@ -0,0 +1,61 @@
1
+ # @halo-dev/richtext-editor
2
+
3
+ The default editor for Halo, built with [Tiptap](https://tiptap.dev/) + [ProseMirror](https://prosemirror.net/).
4
+
5
+ > ⚠️ This package is not suitable for general editor use cases, as it is tightly coupled with Halo and uses some of Halo's built-in tools and shared dependencies.
6
+ > However, you can use it in Halo plugins just like you would use it in Halo itself.
7
+
8
+ ## Installation
9
+
10
+ In Halo plugins:
11
+
12
+ ```bash
13
+ pnpm install @halo-dev/richtext-editor
14
+ ```
15
+
16
+ ## Usage
17
+
18
+ ```vue
19
+ <script setup lang="ts">
20
+ import {
21
+ ExtensionsKit,
22
+ RichTextEditor,
23
+ VueEditor,
24
+ } from "@halo-dev/richtext-editor";
25
+ import { onMounted, ref, shallowRef } from "vue";
26
+
27
+ const editor = shallowRef<VueEditor>();
28
+ const content = ref("Hello World");
29
+
30
+ onMounted(() => {
31
+ editor.value = new VueEditor({
32
+ content: content.value,
33
+ extensions: [ExtensionsKit],
34
+ parseOptions: {
35
+ preserveWhitespace: true,
36
+ },
37
+ onUpdate: () => {
38
+ content.value = editor.value?.getHTML() || "";
39
+ },
40
+ });
41
+ });
42
+ </script>
43
+ <template>
44
+ <RichTextEditor v-if="editor" :editor="editor" />
45
+ </template>
46
+ ```
47
+
48
+ ## Requirements
49
+
50
+ - Vue 3.5.x or higher
51
+ - Halo plugin environment
52
+
53
+ ## Links
54
+
55
+ - [Halo](https://github.com/halo-dev/halo)
56
+ - [Documentation](https://docs.halo.run)
57
+ - [Report Issues](https://github.com/halo-dev/halo/issues)
58
+
59
+ ## License
60
+
61
+ GPL-3.0
@@ -1,17 +1,18 @@
1
- import { Editor } from '../tiptap/vue-3';
1
+ import { VueEditor } from '../tiptap';
2
2
  import { CSSProperties, PropType } from 'vue';
3
3
  declare function __VLS_template(): {
4
+ attrs: Partial<{}>;
4
5
  slots: {
5
6
  content?(_: {}): any;
6
7
  extra?(_: {}): any;
7
8
  };
8
9
  refs: {};
9
- attrs: Partial<{}>;
10
+ rootEl: any;
10
11
  };
11
12
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
12
13
  declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
13
14
  editor: {
14
- type: PropType<Editor>;
15
+ type: PropType<VueEditor>;
15
16
  required: true;
16
17
  };
17
18
  contentStyles: {
@@ -26,7 +27,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
26
27
  };
27
28
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
28
29
  editor: {
29
- type: PropType<Editor>;
30
+ type: PropType<VueEditor>;
30
31
  required: true;
31
32
  };
32
33
  contentStyles: {
@@ -1,13 +1,13 @@
1
- import { Editor } from '../tiptap/vue-3';
1
+ import { VueEditor } from '../tiptap';
2
2
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
3
3
  editor: {
4
- type: typeof Editor;
4
+ type: typeof VueEditor;
5
5
  required: true;
6
6
  };
7
7
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
8
8
  editor: {
9
- type: typeof Editor;
9
+ type: typeof VueEditor;
10
10
  required: true;
11
11
  };
12
- }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
12
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
13
13
  export default _default;
@@ -0,0 +1,29 @@
1
+ type __VLS_Props = {
2
+ disabled?: boolean;
3
+ isActive?: boolean;
4
+ };
5
+ declare function __VLS_template(): {
6
+ attrs: Partial<{}>;
7
+ slots: {
8
+ icon?(_: {}): any;
9
+ default?(_: {}): any;
10
+ };
11
+ refs: {};
12
+ rootEl: HTMLDivElement;
13
+ };
14
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
16
+ click: (e: MouseEvent) => any;
17
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
18
+ onClick?: ((e: MouseEvent) => any) | undefined;
19
+ }>, {
20
+ disabled: boolean;
21
+ isActive: boolean;
22
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
23
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
24
+ export default _default;
25
+ type __VLS_WithTemplateSlots<T, S> = T & {
26
+ new (): {
27
+ $slots: S;
28
+ };
29
+ };
@@ -0,0 +1,29 @@
1
+ type __VLS_Props = {
2
+ type?: string;
3
+ label?: string;
4
+ help?: boolean;
5
+ placeholder?: string;
6
+ tooltip?: string;
7
+ autoFocus?: boolean;
8
+ };
9
+ type __VLS_PublicProps = {
10
+ modelValue?: string | number | undefined;
11
+ } & __VLS_Props;
12
+ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
13
+ "update:modelValue": (value: string | number | undefined) => any;
14
+ } & {
15
+ focus: () => any;
16
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
17
+ onFocus?: (() => any) | undefined;
18
+ "onUpdate:modelValue"?: ((value: string | number | undefined) => any) | undefined;
19
+ }>, {
20
+ tooltip: string;
21
+ type: string;
22
+ label: string;
23
+ placeholder: string;
24
+ help: boolean;
25
+ autoFocus: boolean;
26
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
27
+ inputRef: HTMLInputElement;
28
+ }, HTMLDivElement>;
29
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export { default as DropdownItem } from './DropdownItem.vue';
2
+ export { default as BlockActionInput, default as Input } from './Input.vue';
@@ -1,20 +1,25 @@
1
+ type __VLS_Props = {
2
+ tooltip?: string;
3
+ selected?: boolean;
4
+ disabled?: boolean;
5
+ isActive?: boolean;
6
+ visible?: boolean;
7
+ };
1
8
  declare function __VLS_template(): {
9
+ attrs: Partial<{}>;
2
10
  slots: {
3
11
  icon?(_: {}): any;
4
12
  };
5
13
  refs: {};
6
- attrs: Partial<{}>;
14
+ rootEl: any;
7
15
  };
8
16
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
9
- declare const __VLS_component: import('vue').DefineComponent<{
10
- tooltip?: string;
11
- selected?: boolean;
12
- }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
13
- tooltip?: string;
14
- selected?: boolean;
15
- }> & Readonly<{}>, {
17
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
16
18
  tooltip: string;
17
19
  selected: boolean;
20
+ disabled: boolean;
21
+ isActive: boolean;
22
+ visible: boolean;
18
23
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
19
24
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
20
25
  export default _default;
@@ -1,2 +1,2 @@
1
- declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
2
2
  export default _default;
@@ -1,2 +1,3 @@
1
- declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
1
+ import { BubbleItemComponentProps } from '../../types';
2
+ declare const _default: import('vue').DefineComponent<BubbleItemComponentProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<BubbleItemComponentProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
2
3
  export default _default;
@@ -1,4 +1,3 @@
1
1
  export { default as BlockActionButton } from './BlockActionButton.vue';
2
- export { default as BlockActionInput } from './BlockActionInput.vue';
2
+ export { default as BlockActionHorizontalSeparator } from './BlockActionHorizontalSeparator.vue';
3
3
  export { default as BlockActionSeparator } from './BlockActionSeparator.vue';
4
- export { default as BlockCard } from './BlockCard.vue';
@@ -0,0 +1,28 @@
1
+ type __VLS_Props = {
2
+ title?: string;
3
+ text?: string;
4
+ isActive?: boolean;
5
+ showMoreIndicator?: boolean;
6
+ };
7
+ declare function __VLS_template(): {
8
+ attrs: Partial<{}>;
9
+ slots: {
10
+ icon?(_: {}): any;
11
+ };
12
+ refs: {};
13
+ rootEl: HTMLButtonElement;
14
+ };
15
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
16
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
17
+ isActive: boolean;
18
+ title: string;
19
+ text: string;
20
+ showMoreIndicator: boolean;
21
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
22
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
23
+ export default _default;
24
+ type __VLS_WithTemplateSlots<T, S> = T & {
25
+ new (): {
26
+ $slots: S;
27
+ };
28
+ };
@@ -1,45 +1,11 @@
1
- import { Editor } from '../../tiptap/vue-3';
2
- import { Component } from 'vue';
3
- declare const _default: import('vue').DefineComponent<{
4
- editor: Editor;
5
- isActive?: ({ editor }: {
6
- editor: Editor;
7
- }) => boolean;
8
- visible?: ({ editor }: {
9
- editor: Editor;
10
- }) => boolean;
11
- icon?: Component;
12
- iconStyle?: string;
13
- title?: string;
14
- action?: ({ editor }: {
15
- editor: Editor;
16
- }) => Component | void;
17
- }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
18
- editor: Editor;
19
- isActive?: ({ editor }: {
20
- editor: Editor;
21
- }) => boolean;
22
- visible?: ({ editor }: {
23
- editor: Editor;
24
- }) => boolean;
25
- icon?: Component;
26
- iconStyle?: string;
27
- title?: string;
28
- action?: ({ editor }: {
29
- editor: Editor;
30
- }) => Component | void;
31
- }> & Readonly<{}>, {
32
- title: string;
33
- icon: Component;
1
+ import { Editor } from '../../tiptap';
2
+ import { BubbleItemComponentProps } from '../../types';
3
+ declare const _default: import('vue').DefineComponent<BubbleItemComponentProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<BubbleItemComponentProps> & Readonly<{}>, {
34
4
  isActive: ({ editor }: {
35
5
  editor: Editor;
36
6
  }) => boolean;
37
7
  visible: ({ editor }: {
38
8
  editor: Editor;
39
9
  }) => boolean;
40
- iconStyle: string;
41
- action: ({ editor }: {
42
- editor: Editor;
43
- }) => Component | void;
44
10
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
45
11
  export default _default;
@@ -1,13 +1,13 @@
1
- import { Editor } from '../tiptap/vue-3';
1
+ import { VueEditor } from '../../tiptap';
2
2
  import { PropType } from 'vue';
3
3
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
4
4
  editor: {
5
- type: PropType<Editor>;
5
+ type: PropType<VueEditor>;
6
6
  required: true;
7
7
  };
8
8
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
9
9
  editor: {
10
- type: PropType<Editor>;
10
+ type: PropType<VueEditor>;
11
11
  required: true;
12
12
  };
13
13
  }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -1,2 +1,3 @@
1
+ export { default as BubbleButton } from './BubbleButton.vue';
1
2
  export { default as BubbleItem } from './BubbleItem.vue';
2
- export { default as NodeBubbleMenu } from './BubbleMenu.vue';
3
+ export { default as EditorBubbleMenu } from './EditorBubbleMenu.vue';
@@ -1,19 +1,19 @@
1
+ type __VLS_Props = {
2
+ modelValue?: string;
3
+ };
1
4
  declare function __VLS_template(): {
5
+ attrs: Partial<{}>;
2
6
  slots: {
3
7
  default?(_: {}): any;
4
8
  prefix?(_: {}): any;
5
9
  };
6
10
  refs: {};
7
- attrs: Partial<{}>;
11
+ rootEl: any;
8
12
  };
9
13
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
10
- declare const __VLS_component: import('vue').DefineComponent<{
11
- modelValue?: string;
12
- }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
14
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
13
15
  "update:modelValue": (value?: string | undefined) => any;
14
- }, string, import('vue').PublicProps, Readonly<{
15
- modelValue?: string;
16
- }> & Readonly<{
16
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
17
17
  "onUpdate:modelValue"?: ((value?: string | undefined) => any) | undefined;
18
18
  }>, {
19
19
  modelValue: string;
@@ -0,0 +1,8 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {
2
+ triggerClick: () => void;
3
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
4
+ close: () => any;
5
+ }, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
6
+ onClose?: (() => any) | undefined;
7
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
8
+ export default _default;
@@ -0,0 +1,14 @@
1
+ import { VueEditor } from '../../tiptap';
2
+ import { PropType } from 'vue';
3
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
4
+ editor: {
5
+ type: PropType<VueEditor>;
6
+ required: true;
7
+ };
8
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
9
+ editor: {
10
+ type: PropType<VueEditor>;
11
+ required: true;
12
+ };
13
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
14
+ export default _default;
@@ -0,0 +1,43 @@
1
+ import { PMNode, VueEditor } from '../../tiptap';
2
+ import { DragButtonType } from '../../types';
3
+ import { PropType } from 'vue';
4
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
5
+ editor: {
6
+ type: PropType<VueEditor>;
7
+ required: true;
8
+ };
9
+ node: {
10
+ type: PropType<PMNode | null>;
11
+ required: true;
12
+ };
13
+ pos: {
14
+ type: NumberConstructor;
15
+ required: true;
16
+ };
17
+ items: {
18
+ type: PropType<DragButtonType[]>;
19
+ required: true;
20
+ };
21
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
22
+ close: () => any;
23
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
24
+ editor: {
25
+ type: PropType<VueEditor>;
26
+ required: true;
27
+ };
28
+ node: {
29
+ type: PropType<PMNode | null>;
30
+ required: true;
31
+ };
32
+ pos: {
33
+ type: NumberConstructor;
34
+ required: true;
35
+ };
36
+ items: {
37
+ type: PropType<DragButtonType[]>;
38
+ required: true;
39
+ };
40
+ }>> & Readonly<{
41
+ onClose?: (() => any) | undefined;
42
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
43
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import { DragButtonType } from '../../types';
2
+ export declare const CONVERT_TO_KEY = "convert-to";
3
+ export declare const DELETE_KEY = "delete";
4
+ export declare const COPY_KEY = "copy";
5
+ export declare const CUT_KEY = "cut";
6
+ export declare const INSERT_BELOW_KEY = "insert-below";
7
+ declare const defaultDragItems: DragButtonType[];
8
+ export default defaultDragItems;
@@ -0,0 +1,4 @@
1
+ export { CONVERT_TO_KEY, COPY_KEY, CUT_KEY, DELETE_KEY, default as defaultDragItems, } from './default-drag';
2
+ export { default as EditorDragButtonItem } from './EditorDragButtonItem.vue';
3
+ export { default as EditorDragHandle } from './EditorDragHandle.vue';
4
+ export { default as EditorDragMenu } from './EditorDragMenu.vue';
@@ -1,7 +1,9 @@
1
1
  export * from './block';
2
- export * from './bubble';
3
2
  export * from './toolbar';
3
+ export * from './drag';
4
4
  export * from './toolbox';
5
+ export * from './upload';
6
+ export * from './bubble';
7
+ export * from './base';
5
8
  export { default as RichTextEditor } from './Editor.vue';
6
- export { default as EditorBubbleMenu } from './EditorBubbleMenu.vue';
7
9
  export { default as EditorHeader } from './EditorHeader.vue';
@@ -1,25 +1,3 @@
1
- import { ToolbarItemType } from '../../types';
2
- import { Component } from 'vue';
3
- declare const _default: import('vue').DefineComponent<{
4
- isActive?: boolean;
5
- disabled?: boolean;
6
- title?: string;
7
- action?: () => void;
8
- icon?: Component;
9
- children?: ToolbarItemType[];
10
- }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
11
- isActive?: boolean;
12
- disabled?: boolean;
13
- title?: string;
14
- action?: () => void;
15
- icon?: Component;
16
- children?: ToolbarItemType[];
17
- }> & Readonly<{}>, {
18
- title: string;
19
- children: ToolbarItemType[];
20
- icon: Component;
21
- isActive: boolean;
22
- action: () => void;
23
- disabled: boolean;
24
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
1
+ import { ToolbarItemComponentProps } from '../../types';
2
+ declare const _default: import('vue').DefineComponent<ToolbarItemComponentProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ToolbarItemComponentProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
25
3
  export default _default;
@@ -1,21 +1,3 @@
1
- import { Component } from 'vue';
2
- declare const _default: import('vue').DefineComponent<{
3
- isActive?: boolean;
4
- disabled?: boolean;
5
- title?: string;
6
- action?: () => void;
7
- icon?: Component;
8
- }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
9
- isActive?: boolean;
10
- disabled?: boolean;
11
- title?: string;
12
- action?: () => void;
13
- icon?: Component;
14
- }> & Readonly<{}>, {
15
- title: string;
16
- icon: Component;
17
- isActive: boolean;
18
- action: () => void;
19
- disabled: boolean;
20
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
1
+ import { ToolbarItemComponentProps } from '../../types';
2
+ declare const _default: import('vue').DefineComponent<ToolbarItemComponentProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ToolbarItemComponentProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
21
3
  export default _default;
@@ -1,22 +1,3 @@
1
- import { Editor } from '../../tiptap/vue-3';
2
- import { Component } from 'vue';
3
- declare const _default: import('vue').DefineComponent<{
4
- editor?: Editor;
5
- title?: string;
6
- description?: string;
7
- action?: () => void;
8
- icon?: Component;
9
- }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
10
- editor?: Editor;
11
- title?: string;
12
- description?: string;
13
- action?: () => void;
14
- icon?: Component;
15
- }> & Readonly<{}>, {
16
- title: string;
17
- editor: Editor;
18
- icon: Component;
19
- action: () => void;
20
- description: string;
21
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
1
+ import { ToolboxItemComponentProps } from '../../types';
2
+ declare const _default: import('vue').DefineComponent<ToolboxItemComponentProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ToolboxItemComponentProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
22
3
  export default _default;
@@ -0,0 +1,52 @@
1
+ import { Editor } from '../../tiptap';
2
+ import { Attachment } from '@halo-dev/api-client';
3
+ import { AttachmentSimple } from '@halo-dev/ui-shared';
4
+ import { AxiosRequestConfig } from 'axios';
5
+ type __VLS_Props = {
6
+ editor: Editor;
7
+ accept?: string;
8
+ uploadedFile?: File;
9
+ uploadToAttachmentFile: (file: File, options?: AxiosRequestConfig) => Promise<Attachment>;
10
+ };
11
+ declare function __VLS_template(): {
12
+ attrs: Partial<{}>;
13
+ slots: {
14
+ uploading?(_: {
15
+ progress: number | undefined;
16
+ }): any;
17
+ error?(_: {}): any;
18
+ icon?(_: {}): any;
19
+ };
20
+ refs: {};
21
+ rootEl: any;
22
+ };
23
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
24
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
25
+ abort: () => void;
26
+ retry: () => void;
27
+ reset: () => void;
28
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
29
+ setExternalLink: (attachment?: AttachmentSimple | undefined) => any;
30
+ onUploadReady: (file: File) => any;
31
+ onUploadProgress: (progress: number) => any;
32
+ onUploadFinish: () => any;
33
+ onUploadError: (error: Error) => any;
34
+ onUploadAbort: () => any;
35
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
36
+ onSetExternalLink?: ((attachment?: AttachmentSimple | undefined) => any) | undefined;
37
+ onOnUploadReady?: ((file: File) => any) | undefined;
38
+ onOnUploadProgress?: ((progress: number) => any) | undefined;
39
+ onOnUploadFinish?: (() => any) | undefined;
40
+ onOnUploadError?: ((error: Error) => any) | undefined;
41
+ onOnUploadAbort?: (() => any) | undefined;
42
+ }>, {
43
+ accept: string;
44
+ uploadedFile: File;
45
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
46
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
47
+ export default _default;
48
+ type __VLS_WithTemplateSlots<T, S> = T & {
49
+ new (): {
50
+ $slots: S;
51
+ };
52
+ };
@@ -0,0 +1,14 @@
1
+ import { Attachment } from '@halo-dev/api-client';
2
+ import { AttachmentSimple } from '@halo-dev/ui-shared';
3
+ import { AxiosRequestConfig } from 'axios';
4
+ type __VLS_Props = {
5
+ originalLink?: string;
6
+ accept?: string;
7
+ upload: (file: File, options?: AxiosRequestConfig) => Promise<Attachment>;
8
+ };
9
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
10
+ change: (attachment?: AttachmentSimple | undefined) => any;
11
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
12
+ onChange?: ((attachment?: AttachmentSimple | undefined) => any) | undefined;
13
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
14
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export { default as EditorLinkObtain } from './EditorLinkObtain.vue';
2
+ export { default as ResourceReplaceButton } from './ResourceReplaceButton.vue';
@@ -0,0 +1,7 @@
1
+ import { AttachmentSimple } from '@halo-dev/ui-shared';
2
+ import { Ref } from 'vue';
3
+ export declare function useExternalAssetsTransfer(src: Ref<string | undefined>, callback: (attachment: AttachmentSimple) => void): {
4
+ isExternalAsset: import('vue').ComputedRef<boolean>;
5
+ transferring: Ref<boolean, boolean>;
6
+ handleTransfer: () => Promise<void>;
7
+ };