tiptapify 0.0.5 → 0.0.7

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 (43) hide show
  1. package/README.md +7 -1
  2. package/dist/tiptapify.css +1 -1
  3. package/dist/{tiptapify.es.js → tiptapify.mjs} +52867 -51790
  4. package/dist/tiptapify.umd.js +41 -43
  5. package/package.json +8 -8
  6. package/src/components/Footer.vue +5 -6
  7. package/src/components/MenuBubble.vue +61 -47
  8. package/src/components/MenuFloating.vue +38 -34
  9. package/src/components/Tiptapify.vue +139 -23
  10. package/src/components/Toolbar/Group.vue +43 -0
  11. package/src/components/Toolbar/GroupDropdown.vue +85 -0
  12. package/src/components/Toolbar/Index.vue +51 -79
  13. package/src/components/Toolbar/Toggle.vue +33 -0
  14. package/src/components/Toolbar/items/actions.ts +32 -0
  15. package/src/components/Toolbar/items/alignment.ts +60 -0
  16. package/src/components/Toolbar/items/format.ts +73 -0
  17. package/src/components/Toolbar/items/formatExtra.ts +73 -0
  18. package/src/components/Toolbar/items/list.ts +70 -0
  19. package/src/components/Toolbar/items/media.ts +202 -0
  20. package/src/components/Toolbar/items/misc.ts +59 -0
  21. package/src/components/Toolbar/items/style.ts +146 -0
  22. package/src/components/Toolbar/items.ts +73 -545
  23. package/src/components/editorExtensions.ts +6 -4
  24. package/src/components/index.ts +13 -0
  25. package/src/{components/extensions → extensions}/components/LinkDialog.vue +11 -8
  26. package/src/extensions/components/PreviewDialog.vue +45 -0
  27. package/src/{components/extensions/components/ShowSource.vue → extensions/components/ShowSourceDialog.vue} +11 -7
  28. package/src/extensions/components/TableBuilder.vue +138 -0
  29. package/src/extensions/preview.ts +53 -0
  30. package/src/{components/extensions → extensions}/view-source.ts +1 -3
  31. package/src/i18n/locales/de.json +64 -45
  32. package/src/i18n/locales/en.json +21 -2
  33. package/src/i18n/locales/es.json +27 -8
  34. package/src/i18n/locales/fr.json +26 -7
  35. package/src/i18n/locales/it.json +36 -17
  36. package/src/i18n/locales/pl.json +28 -9
  37. package/src/i18n/locales/ru.json +21 -2
  38. package/src/i18n/locales/ua.json +21 -2
  39. package/src/utils/helpers.ts +17 -0
  40. package/src/composable/useEditor.ts +0 -35
  41. /package/src/{components/extensions → extensions}/components/slashCommands/CommandsList.vue +0 -0
  42. /package/src/{components/extensions → extensions}/components/slashCommands/suggestion.ts +0 -0
  43. /package/src/{components/extensions → extensions}/slash-commands.ts +0 -0
@@ -10,9 +10,9 @@
10
10
  "h5": "intestazione livello 5",
11
11
  "h6": "intestazione livello 6"
12
12
  },
13
- "fontFamily": "famiglia del carattere",
14
- "fontSize": "dimensione del carattere",
15
- "lineHeight": "interlinea"
13
+ "fontFamily": "famiglia di caratteri",
14
+ "fontSize": "dimensione carattere",
15
+ "lineHeight": "altezza di riga"
16
16
  },
17
17
  "format": {
18
18
  "bold": "grassetto",
@@ -22,46 +22,65 @@
22
22
  "sup": "apice",
23
23
  "sub": "pedice",
24
24
  "break": "interruzione di riga",
25
- "highlight": "evidenziato",
25
+ "highlight": "evidenzia",
26
26
  "line": "linea orizzontale",
27
27
  "blockquote": "citazione",
28
28
  "code": "codice",
29
29
  "codeblock": "blocco di codice",
30
- "link": "link esterno",
31
- "formatClear": "cancella formattazione"
30
+ "link": "collegamento esterno",
31
+ "formatClear": "cancella formato",
32
+ "tables": {
33
+ "table": "tabella",
34
+ "insertTable": "inserisci tabella",
35
+ "deleteTable": "elimina tabella",
36
+ "insertWithHeaderRow": "inserisci tabella con riga di intestazione",
37
+ "rows": "righe",
38
+ "row": "riga",
39
+ "insertRowBefore": "inserisci riga prima",
40
+ "insertRowAfter": "inserisci riga dopo",
41
+ "deleteRow": "elimina riga",
42
+ "cols": "colonne",
43
+ "col": "colonna",
44
+ "insertColBefore": "inserisci colonna prima",
45
+ "insertColAfter": "inserisci colonna dopo",
46
+ "deleteCol": "elimina colonna",
47
+ "mergeCells": "unisci celle",
48
+ "splitCell": "dividi cella"
49
+ }
32
50
  },
33
51
  "action": {
34
52
  "undo": "annulla",
35
- "redo": "ripeti"
53
+ "redo": "ripristina"
36
54
  },
37
55
  "alignment": "allineamento",
38
56
  "alignments": {
39
57
  "left": "allinea a sinistra",
40
- "center": "allinea al centro",
58
+ "center": "centra",
41
59
  "right": "allinea a destra",
42
60
  "justify": "giustifica"
43
61
  },
44
- "list": "lista",
62
+ "list": "elenco",
45
63
  "lists": {
46
- "bullet": "lista puntata",
47
- "numbered": "lista numerata",
48
- "task": "lista di attività",
49
- "indent": "aumenta rientro",
64
+ "bullet": "elenco puntato",
65
+ "numbered": "elenco numerato",
66
+ "task": "elenco attività",
67
+ "indent": "rientro elemento",
50
68
  "outdent": "riduci rientro"
51
69
  },
52
70
  "dialog": {
53
71
  "close": "chiudi",
54
72
  "apply": "applica",
55
73
  "link": {
56
- "title": "aggiungi/modifica link",
57
- "placeholder": "indirizzo del link"
74
+ "title": "aggiungi/modifica collegamento",
75
+ "placeholder": "indirizzo del collegamento"
58
76
  },
59
77
  "source": {
60
78
  "title": "visualizza codice sorgente",
61
- "prettify": "prettify"
79
+ "prettify": "abbellisci"
62
80
  }
63
81
  },
64
82
  "misc": {
65
- "source": "visualizza codice sorgente"
83
+ "source": "visualizza codice sorgente",
84
+ "preview": "anteprima"
66
85
  }
67
86
  }
@@ -21,18 +21,36 @@
21
21
  "underline": "podkreślenie",
22
22
  "sup": "indeks górny",
23
23
  "sub": "indeks dolny",
24
- "break": "twarda spacja",
25
- "highlight": "wyróżnienie",
24
+ "break": "łamanie linii",
25
+ "highlight": "podświetlenie",
26
26
  "line": "linia pozioma",
27
27
  "blockquote": "cytat",
28
28
  "code": "kod",
29
29
  "codeblock": "blok kodu",
30
30
  "link": "link zewnętrzny",
31
- "formatClear": "wyczyść formatowanie"
31
+ "formatClear": "wyczyść formatowanie",
32
+ "tables": {
33
+ "table": "tabela",
34
+ "insertTable": "wstaw tabelę",
35
+ "deleteTable": "usuń tabelę",
36
+ "insertWithHeaderRow": "wstaw tabelę z wierszem nagłówka",
37
+ "rows": "wiersze",
38
+ "row": "wiersz",
39
+ "insertRowBefore": "wstaw wiersz przed",
40
+ "insertRowAfter": "wstaw wiersz po",
41
+ "deleteRow": "usuń wiersz",
42
+ "cols": "kolumny",
43
+ "col": "kolumna",
44
+ "insertColBefore": "wstaw kolumnę przed",
45
+ "insertColAfter": "wstaw kolumnę po",
46
+ "deleteCol": "usuń kolumnę",
47
+ "mergeCells": "połącz komórki",
48
+ "splitCell": "podziel komórkę"
49
+ }
32
50
  },
33
51
  "action": {
34
52
  "undo": "cofnij",
35
- "redo": "przywróć"
53
+ "redo": "ponów"
36
54
  },
37
55
  "alignment": "wyrównanie",
38
56
  "alignments": {
@@ -43,10 +61,10 @@
43
61
  },
44
62
  "list": "lista",
45
63
  "lists": {
46
- "bullet": "lista wypunktowana",
64
+ "bullet": "lista punktowana",
47
65
  "numbered": "lista numerowana",
48
66
  "task": "lista zadań",
49
- "indent": "zwiększ wcięcie",
67
+ "indent": "wcięcie elementu",
50
68
  "outdent": "zmniejsz wcięcie"
51
69
  },
52
70
  "dialog": {
@@ -57,11 +75,12 @@
57
75
  "placeholder": "adres linku"
58
76
  },
59
77
  "source": {
60
- "title": "pokaż kod źródłowy",
61
- "prettify": "prettify"
78
+ "title": "wyświetl kod źródłowy",
79
+ "prettify": "sformatuj"
62
80
  }
63
81
  },
64
82
  "misc": {
65
- "source": "pokaż kod źródłowy"
83
+ "source": "wyświetl kod źródłowy",
84
+ "preview": "podgląd"
66
85
  }
67
86
  }
@@ -28,7 +28,25 @@
28
28
  "code": "код",
29
29
  "codeblock": "блок кода",
30
30
  "link": "внешняя ссылка",
31
- "formatClear": "очистить форматирование"
31
+ "formatClear": "очистить форматирование",
32
+ "tables": {
33
+ "table": "таблица",
34
+ "insertTable": "вставить таблицу",
35
+ "deleteTable": "удалить таблицу",
36
+ "insertWithHeaderRow": "вставить таблицу с заголовком",
37
+ "rows": "строки",
38
+ "row": "строка",
39
+ "insertRowBefore": "вставить строку перед",
40
+ "insertRowAfter": "вставить строку после",
41
+ "deleteRow": "удалить строку",
42
+ "cols": "столбцы",
43
+ "col": "столбец",
44
+ "insertColBefore": "вставить колонку перед",
45
+ "insertColAfter": "вставить колонку после",
46
+ "deleteCol": "удалить колонку",
47
+ "mergeCells": "объединить ячейки",
48
+ "splitCell": "разделить ячейку"
49
+ }
32
50
  },
33
51
  "action": {
34
52
  "undo": "отмена",
@@ -62,6 +80,7 @@
62
80
  }
63
81
  },
64
82
  "misc": {
65
- "source": "просмотр исходного кода"
83
+ "source": "просмотр исходного кода",
84
+ "preview": "предпросмотр"
66
85
  }
67
86
  }
@@ -28,7 +28,25 @@
28
28
  "code": "код",
29
29
  "codeblock": "блок коду",
30
30
  "link": "зовнішнє посилання",
31
- "formatClear": "очистити форматування"
31
+ "formatClear": "очистити форматування",
32
+ "tables": {
33
+ "table": "таблиця",
34
+ "insertTable": "вставити таблицю",
35
+ "deleteTable": "видалити таблицю",
36
+ "insertWithHeaderRow": "вставити таблицю із заголовком",
37
+ "rows": "строки",
38
+ "row": "строка",
39
+ "insertRowBefore": "вставити строку перед",
40
+ "insertRowAfter": "вставити строку після",
41
+ "deleteRow": "видалити строку",
42
+ "cols": "стовпчики",
43
+ "col": "стовпчик",
44
+ "insertColBefore": "вставити колонку перед",
45
+ "insertColAfter": "вставити колонку після",
46
+ "deleteCol": "видалити колонку",
47
+ "mergeCells": "об'єднати клітинки",
48
+ "splitCell": "розділити клітинки"
49
+ }
32
50
  },
33
51
  "action": {
34
52
  "undo": "відміна",
@@ -62,6 +80,7 @@
62
80
  }
63
81
  },
64
82
  "misc": {
65
- "source": "перегляд вихідного коду"
83
+ "source": "перегляд вихідного коду",
84
+ "preview": "попередній перегляд"
66
85
  }
67
86
  }
@@ -0,0 +1,17 @@
1
+ export default {
2
+ ucFirst: (string: String, snakeCaseToWords: Boolean = false, kebabCaseToWords: Boolean = false): String|any => {
3
+ if (!string) {
4
+ return string
5
+ }
6
+
7
+ if (snakeCaseToWords) {
8
+ string = string.replaceAll('_', ' ')
9
+ }
10
+
11
+ if (kebabCaseToWords) {
12
+ string = string.replaceAll('-', ' ')
13
+ }
14
+
15
+ return string[0].toUpperCase() + string.slice(1)
16
+ }
17
+ }
@@ -1,35 +0,0 @@
1
- import { useEditor as useEditorOriginal } from '@tiptap/vue-3'
2
-
3
- import { editorExtensions } from '@tiptapify/components/editorExtensions'
4
-
5
- let editorInstance: any = null
6
-
7
- export function useEditor(content: any = '', placeholder: string = '', slashCommands: boolean = true) {
8
- class TiptapifyEditor {
9
- private editor
10
-
11
- constructor() {
12
- const extensions = editorExtensions(placeholder, slashCommands)
13
- this.editor = useEditorOriginal({
14
- content,
15
- extensions,
16
- })
17
- }
18
-
19
- getInstance() {
20
- return this.editor
21
- }
22
-
23
- destroy() {
24
- this.editor.value.destroy()
25
- }
26
- }
27
-
28
- if (!editorInstance) {
29
- editorInstance = new TiptapifyEditor()
30
- }
31
-
32
- return {
33
- editor: editorInstance
34
- }
35
- }