tiptapify 0.1.3 → 0.1.4

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": "tiptapify",
3
3
  "types": "./index.d.ts",
4
- "version": "0.1.3",
4
+ "version": "0.1.4",
5
5
  "description": "Tiptap3 editor with Vuetify3 menu implementation",
6
6
  "exports": {
7
7
  ".": {
@@ -36,8 +36,13 @@ const props = defineProps({
36
36
  rounded: { type: String, default () { return '0' } },
37
37
  customExtensions: { type: Array as PropType<toolbarSections>, default() { return [] } },
38
38
  interactiveStyles: { type: Boolean, default() { return true } },
39
+ loading: { type: Boolean, default() { return false } },
40
+ loadingColor: { type: String, default() { return 'default' } },
41
+ loadingHeight: { type: String, default() { return '1px' } },
39
42
  })
40
43
 
44
+ const loadingProgress = ref(0)
45
+
41
46
  const { t } = useI18n()
42
47
 
43
48
  const appTheme = useTheme()
@@ -77,7 +82,7 @@ onBeforeUnmount(() => {
77
82
 
78
83
  <template>
79
84
  <div :id="`tiptapify-editor-${editor?.instanceId}`">
80
- <div>
85
+ <div :class="`border border-t-0 rounded-t-${rounded} rounded-b-${rounded}`">
81
86
  <template v-if="toolbar">
82
87
  <Toolbar
83
88
  v-if="editor"
@@ -92,17 +97,17 @@ onBeforeUnmount(() => {
92
97
  />
93
98
  </template>
94
99
 
95
- <div :class="`border border-t-0 rounded-b-${rounded}`">
96
- <div class="pa-2 tiptapify-container resizable" :style="`${height > 0 ? `height: ${height}px` : ''}`">
97
- <MenuFloating v-if="floatingMenu" :variant="variantBtn" :theme="currentTheme" />
100
+ <VProgressLinear v-model="loadingProgress" :color="loadingColor" :height="loadingHeight" :indeterminate="loading" />
98
101
 
99
- <MenuBubble v-if="bubbleMenu" :variant="variantBtn" :theme="currentTheme" />
102
+ <div class="pa-2 tiptapify-container resizable" :style="`${height > 0 ? `height: ${height}px` : ''}`">
103
+ <MenuFloating v-if="floatingMenu" :variant="variantBtn" :theme="currentTheme" />
100
104
 
101
- <EditorContent :editor="editor" class="tiptapify-editor" />
102
- </div>
105
+ <MenuBubble v-if="bubbleMenu" :variant="variantBtn" :theme="currentTheme" />
103
106
 
104
- <Footer :show-words-count="showWordsCount" :show-characters-count="showCharactersCount" />
107
+ <EditorContent :editor="editor" class="tiptapify-editor" />
105
108
  </div>
109
+
110
+ <Footer :show-words-count="showWordsCount" :show-characters-count="showCharactersCount" />
106
111
  </div>
107
112
  </div>
108
113
  </template>
@@ -1,22 +1,22 @@
1
1
  <script setup lang="ts">
2
2
 
3
- import defaults from "@tiptapify/constants/defaults";
3
+ import defaults from '@tiptapify/constants/defaults'
4
4
  import { PropType } from 'vue'
5
5
 
6
- import { toolbarSections } from "@tiptapify/types/toolbarTypes";
6
+ import { toolbarSections } from '@tiptapify/types/toolbarTypes'
7
7
 
8
8
  defineProps({
9
- variantBtn: { type: String, default () { return defaults.variantBtn }},
10
- items: { type: Array as PropType<toolbarSections>, default() { return {} }},
9
+ variantBtn: { type: String, default () { return defaults.variantBtn } },
10
+ items: { type: Array as PropType<toolbarSections>, default() { return {} } },
11
11
  })
12
12
 
13
13
  </script>
14
14
 
15
15
  <template>
16
- <VToolbarItems class="py-2">
16
+ <VToolbarItems class="px-2 py-3">
17
17
  <template v-for="item in items" :key="item.section">
18
18
  <template v-if="item.section === '__separator__'">
19
- <div class="menu-divider"></div>
19
+ <div class="menu-divider" />
20
20
  </template>
21
21
  <template v-else>
22
22
  <VBtnGroup v-if="item.group" elevation="4">
@@ -26,13 +26,13 @@ defineProps({
26
26
  </VBtnGroup>
27
27
  <template v-else>
28
28
  <component
29
+ :is="sectionItem.component"
29
30
  v-for="sectionItem in item.components"
30
31
  :key="sectionItem.name"
31
- :is="sectionItem.component"
32
32
  v-bind="{ variantBtn, ...sectionItem.props ?? {} }"
33
33
  />
34
34
  </template>
35
- <div class="menu-divider"></div>
35
+ <div class="menu-divider" />
36
36
  </template>
37
37
  </template>
38
38
  </VToolbarItems>