@flogeez/angular-tiptap-editor 3.2.1 → 3.3.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.
@@ -1,4 +1,4 @@
1
- import { AteTranslations } from "../../services/ate-i18n.service";
1
+ import { AteTranslations } from "../../i18n/ateTranslationsModel";
2
2
  import * as i0 from "@angular/core";
3
3
  /**
4
4
  * Edit Toggle Component
@@ -2,7 +2,7 @@ import { ElementRef, OnDestroy, AfterViewInit } from "@angular/core";
2
2
  import { Editor, EditorOptions, Extension, Node, Mark, JSONContent } from "@tiptap/core";
3
3
  import { Node as PMNode } from "@tiptap/pm/model";
4
4
  import { AteCustomSlashCommands } from "../../models/ate-slash-command.model";
5
- import { AteI18nService, SupportedLocale } from "../../services/ate-i18n.service";
5
+ import { AteI18nService } from "../../services/ate-i18n.service";
6
6
  import { AteEditorCommandsService } from "../../services/ate-editor-commands.service";
7
7
  import { AteStateCalculator } from "../../models/ate-editor-state.model";
8
8
  import { AteSlashCommandsConfig } from "../../config/ate-slash-commands.config";
@@ -10,6 +10,7 @@ import { AteToolbarConfig } from "../../models/ate-toolbar.model";
10
10
  import { AteBubbleMenuConfig } from "../../models/ate-bubble-menu.model";
11
11
  import { AteEditorConfig, AteAngularNode, AteBlockControlsMode, AteAutofocusMode } from "../../models/ate-editor-config.model";
12
12
  import { AteImageUploadHandler, AteImageUploadOptions, AteImageUploadResult } from "../../models/ate-image.model";
13
+ import { SupportedLocale } from "../../i18n/ateTranslationsModel";
13
14
  import * as i0 from "@angular/core";
14
15
  import * as i1 from "../../directives/ate-noop-value-accessor.directive";
15
16
  /**
@@ -171,7 +172,7 @@ export declare class AngularTiptapEditorComponent implements AfterViewInit, OnDe
171
172
  handler?: AteImageUploadHandler | undefined;
172
173
  }>;
173
174
  readonly finalImageUploadHandler: import("@angular/core").Signal<AteImageUploadHandler | undefined>;
174
- readonly currentTranslations: import("@angular/core").Signal<import("../../services/ate-i18n.service").AteTranslations>;
175
+ readonly currentTranslations: import("@angular/core").Signal<import("../../i18n/ateTranslationsModel").AteTranslations>;
175
176
  private _destroyRef;
176
177
  private ngControl;
177
178
  readonly i18nService: AteI18nService;
@@ -0,0 +1,189 @@
1
+ export type SupportedLocale = "en" | "fr" | "de" | (string & {});
2
+ export interface AteTranslations {
3
+ toolbar: {
4
+ bold: string;
5
+ italic: string;
6
+ underline: string;
7
+ strike: string;
8
+ code: string;
9
+ codeBlock: string;
10
+ superscript: string;
11
+ subscript: string;
12
+ highlight: string;
13
+ highlightPicker: string;
14
+ heading1: string;
15
+ heading2: string;
16
+ heading3: string;
17
+ bulletList: string;
18
+ orderedList: string;
19
+ blockquote: string;
20
+ alignLeft: string;
21
+ alignCenter: string;
22
+ alignRight: string;
23
+ alignJustify: string;
24
+ link: string;
25
+ image: string;
26
+ horizontalRule: string;
27
+ table: string;
28
+ undo: string;
29
+ redo: string;
30
+ clear: string;
31
+ textColor: string;
32
+ customColor: string;
33
+ presets: string;
34
+ };
35
+ bubbleMenu: {
36
+ bold: string;
37
+ italic: string;
38
+ underline: string;
39
+ strike: string;
40
+ code: string;
41
+ superscript: string;
42
+ subscript: string;
43
+ highlight: string;
44
+ highlightPicker: string;
45
+ textColor: string;
46
+ link: string;
47
+ addLink: string;
48
+ editLink: string;
49
+ removeLink: string;
50
+ linkUrl: string;
51
+ linkText: string;
52
+ openLink: string;
53
+ customColor: string;
54
+ presets: string;
55
+ };
56
+ slashCommands: {
57
+ heading1: {
58
+ title: string;
59
+ description: string;
60
+ keywords: string[];
61
+ };
62
+ heading2: {
63
+ title: string;
64
+ description: string;
65
+ keywords: string[];
66
+ };
67
+ heading3: {
68
+ title: string;
69
+ description: string;
70
+ keywords: string[];
71
+ };
72
+ bulletList: {
73
+ title: string;
74
+ description: string;
75
+ keywords: string[];
76
+ };
77
+ orderedList: {
78
+ title: string;
79
+ description: string;
80
+ keywords: string[];
81
+ };
82
+ blockquote: {
83
+ title: string;
84
+ description: string;
85
+ keywords: string[];
86
+ };
87
+ code: {
88
+ title: string;
89
+ description: string;
90
+ keywords: string[];
91
+ };
92
+ image: {
93
+ title: string;
94
+ description: string;
95
+ keywords: string[];
96
+ };
97
+ horizontalRule: {
98
+ title: string;
99
+ description: string;
100
+ keywords: string[];
101
+ };
102
+ table: {
103
+ title: string;
104
+ description: string;
105
+ keywords: string[];
106
+ };
107
+ };
108
+ table: {
109
+ addRowBefore: string;
110
+ addRowAfter: string;
111
+ deleteRow: string;
112
+ addColumnBefore: string;
113
+ addColumnAfter: string;
114
+ deleteColumn: string;
115
+ deleteTable: string;
116
+ toggleHeaderRow: string;
117
+ toggleHeaderColumn: string;
118
+ mergeCells: string;
119
+ splitCell: string;
120
+ };
121
+ imageUpload: {
122
+ selectImage: string;
123
+ loadError: string;
124
+ uploadingImage: string;
125
+ uploadProgress: string;
126
+ uploadError: string;
127
+ uploadSuccess: string;
128
+ imageTooLarge: string;
129
+ invalidFileType: string;
130
+ dragDropText: string;
131
+ changeImage: string;
132
+ downloadImage: string;
133
+ deleteImage: string;
134
+ resizeSmall: string;
135
+ resizeMedium: string;
136
+ resizeLarge: string;
137
+ resizeOriginal: string;
138
+ alignLeft: string;
139
+ alignCenter: string;
140
+ alignRight: string;
141
+ resizing: string;
142
+ compressing: string;
143
+ compressionError: string;
144
+ validating: string;
145
+ uploadingToServer: string;
146
+ replacingImage: string;
147
+ insertingImage: string;
148
+ noFileSelected: string;
149
+ selectionCancelled: string;
150
+ };
151
+ editor: {
152
+ placeholder: string;
153
+ character: string;
154
+ characterPlural: string;
155
+ word: string;
156
+ wordPlural: string;
157
+ linkPrompt: string;
158
+ linkUrlPrompt: string;
159
+ confirmDelete: string;
160
+ toggleEdit: string;
161
+ viewMode: string;
162
+ blockAdd: string;
163
+ blockDrag: string;
164
+ };
165
+ common: {
166
+ cancel: string;
167
+ confirm: string;
168
+ apply: string;
169
+ delete: string;
170
+ save: string;
171
+ close: string;
172
+ loading: string;
173
+ error: string;
174
+ success: string;
175
+ };
176
+ export: {
177
+ export: string;
178
+ html: string;
179
+ markdown: string;
180
+ text: string;
181
+ copyHtml: string;
182
+ copyMarkdown: string;
183
+ copyText: string;
184
+ downloadHtml: string;
185
+ downloadMarkdown: string;
186
+ downloadText: string;
187
+ copiedSuccess: string;
188
+ };
189
+ }
@@ -0,0 +1,2 @@
1
+ import { AteTranslations } from "./ateTranslationsModel";
2
+ export declare const GERMAN_TRANSLATIONS: AteTranslations;
@@ -0,0 +1,2 @@
1
+ import { AteTranslations } from "./ateTranslationsModel";
2
+ export declare const ENGLISH_TRANSLATIONS: AteTranslations;
@@ -0,0 +1,2 @@
1
+ import { AteTranslations } from "./ateTranslationsModel";
2
+ export declare const FRENCH_TRANSLATIONS: AteTranslations;
@@ -1,191 +1,5 @@
1
+ import { AteTranslations, SupportedLocale } from "../i18n/ateTranslationsModel";
1
2
  import * as i0 from "@angular/core";
2
- export type SupportedLocale = "en" | "fr" | (string & {});
3
- export interface AteTranslations {
4
- toolbar: {
5
- bold: string;
6
- italic: string;
7
- underline: string;
8
- strike: string;
9
- code: string;
10
- codeBlock: string;
11
- superscript: string;
12
- subscript: string;
13
- highlight: string;
14
- highlightPicker: string;
15
- heading1: string;
16
- heading2: string;
17
- heading3: string;
18
- bulletList: string;
19
- orderedList: string;
20
- blockquote: string;
21
- alignLeft: string;
22
- alignCenter: string;
23
- alignRight: string;
24
- alignJustify: string;
25
- link: string;
26
- image: string;
27
- horizontalRule: string;
28
- table: string;
29
- undo: string;
30
- redo: string;
31
- clear: string;
32
- textColor: string;
33
- customColor: string;
34
- presets: string;
35
- };
36
- bubbleMenu: {
37
- bold: string;
38
- italic: string;
39
- underline: string;
40
- strike: string;
41
- code: string;
42
- superscript: string;
43
- subscript: string;
44
- highlight: string;
45
- highlightPicker: string;
46
- textColor: string;
47
- link: string;
48
- addLink: string;
49
- editLink: string;
50
- removeLink: string;
51
- linkUrl: string;
52
- linkText: string;
53
- openLink: string;
54
- customColor: string;
55
- presets: string;
56
- };
57
- slashCommands: {
58
- heading1: {
59
- title: string;
60
- description: string;
61
- keywords: string[];
62
- };
63
- heading2: {
64
- title: string;
65
- description: string;
66
- keywords: string[];
67
- };
68
- heading3: {
69
- title: string;
70
- description: string;
71
- keywords: string[];
72
- };
73
- bulletList: {
74
- title: string;
75
- description: string;
76
- keywords: string[];
77
- };
78
- orderedList: {
79
- title: string;
80
- description: string;
81
- keywords: string[];
82
- };
83
- blockquote: {
84
- title: string;
85
- description: string;
86
- keywords: string[];
87
- };
88
- code: {
89
- title: string;
90
- description: string;
91
- keywords: string[];
92
- };
93
- image: {
94
- title: string;
95
- description: string;
96
- keywords: string[];
97
- };
98
- horizontalRule: {
99
- title: string;
100
- description: string;
101
- keywords: string[];
102
- };
103
- table: {
104
- title: string;
105
- description: string;
106
- keywords: string[];
107
- };
108
- };
109
- table: {
110
- addRowBefore: string;
111
- addRowAfter: string;
112
- deleteRow: string;
113
- addColumnBefore: string;
114
- addColumnAfter: string;
115
- deleteColumn: string;
116
- deleteTable: string;
117
- toggleHeaderRow: string;
118
- toggleHeaderColumn: string;
119
- mergeCells: string;
120
- splitCell: string;
121
- };
122
- imageUpload: {
123
- selectImage: string;
124
- loadError: string;
125
- uploadingImage: string;
126
- uploadProgress: string;
127
- uploadError: string;
128
- uploadSuccess: string;
129
- imageTooLarge: string;
130
- invalidFileType: string;
131
- dragDropText: string;
132
- changeImage: string;
133
- downloadImage: string;
134
- deleteImage: string;
135
- resizeSmall: string;
136
- resizeMedium: string;
137
- resizeLarge: string;
138
- resizeOriginal: string;
139
- alignLeft: string;
140
- alignCenter: string;
141
- alignRight: string;
142
- resizing: string;
143
- compressing: string;
144
- compressionError: string;
145
- validating: string;
146
- uploadingToServer: string;
147
- replacingImage: string;
148
- insertingImage: string;
149
- noFileSelected: string;
150
- selectionCancelled: string;
151
- };
152
- editor: {
153
- placeholder: string;
154
- character: string;
155
- word: string;
156
- linkPrompt: string;
157
- linkUrlPrompt: string;
158
- confirmDelete: string;
159
- toggleEdit: string;
160
- viewMode: string;
161
- blockAdd: string;
162
- blockDrag: string;
163
- };
164
- common: {
165
- cancel: string;
166
- confirm: string;
167
- apply: string;
168
- delete: string;
169
- save: string;
170
- close: string;
171
- loading: string;
172
- error: string;
173
- success: string;
174
- };
175
- export: {
176
- export: string;
177
- html: string;
178
- markdown: string;
179
- text: string;
180
- copyHtml: string;
181
- copyMarkdown: string;
182
- copyText: string;
183
- downloadHtml: string;
184
- downloadMarkdown: string;
185
- downloadText: string;
186
- copiedSuccess: string;
187
- };
188
- }
189
3
  export declare class AteI18nService {
190
4
  private _currentLocale;
191
5
  private _translations;
@@ -217,6 +31,7 @@ export declare class AteI18nService {
217
31
  alignJustify: string;
218
32
  link: string;
219
33
  image: string;
34
+ /** All loaded translations (useful for dynamic key access) */
220
35
  horizontalRule: string;
221
36
  table: string;
222
37
  undo: string;
@@ -345,7 +160,9 @@ export declare class AteI18nService {
345
160
  readonly editor: import("@angular/core").Signal<{
346
161
  placeholder: string;
347
162
  character: string;
163
+ characterPlural: string;
348
164
  word: string;
165
+ wordPlural: string;
349
166
  linkPrompt: string;
350
167
  linkUrlPrompt: string;
351
168
  confirmDelete: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flogeez/angular-tiptap-editor",
3
- "version": "3.2.1",
3
+ "version": "3.3.0",
4
4
  "description": "A modern, customizable rich-text editor for Angular (18+), built with Tiptap and featuring complete internationalization support",
5
5
  "keywords": [
6
6
  "angular",
package/public-api.d.ts CHANGED
@@ -25,7 +25,7 @@ export * from "./lib/models/ate-slash-command.model";
25
25
  export * from "./lib/config/ate-editor.config";
26
26
  export * from "./lib/config/ate-global-config.token";
27
27
  export * from "./lib/config/ate-slash-commands.config";
28
- export type { SupportedLocale } from "./lib/services/ate-i18n.service";
28
+ export type { SupportedLocale } from "./lib/i18n/ateTranslationsModel";
29
29
  export { AteAngularNodeView } from "./lib/node-view/ate-angular-node-view";
30
30
  export { AteNodeViewRenderer } from "./lib/node-view/ate-node-view.renderer";
31
31
  export { createAngularComponentExtension } from "./lib/node-view/ate-node-view.factory";