@flogeez/angular-tiptap-editor 2.3.0 → 2.4.1

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 (105) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +132 -93
  3. package/esm2022/flogeez-angular-tiptap-editor.mjs +5 -0
  4. package/esm2022/lib/ate-editor.provider.mjs +38 -0
  5. package/esm2022/lib/components/bubble-menus/base/ate-base-bubble-menu.mjs +207 -0
  6. package/esm2022/lib/components/bubble-menus/base/ate-base-sub-bubble-menu.mjs +133 -0
  7. package/esm2022/lib/components/bubble-menus/color/ate-color-bubble-menu.component.mjs +365 -0
  8. package/esm2022/lib/components/bubble-menus/image/ate-image-bubble-menu.component.mjs +226 -0
  9. package/esm2022/lib/components/bubble-menus/link/ate-link-bubble-menu.component.mjs +247 -0
  10. package/esm2022/lib/components/bubble-menus/table/ate-cell-bubble-menu.component.mjs +121 -0
  11. package/esm2022/lib/components/bubble-menus/table/ate-table-bubble-menu.component.mjs +266 -0
  12. package/esm2022/lib/components/bubble-menus/text/ate-bubble-menu.component.mjs +294 -0
  13. package/esm2022/lib/components/color-picker/ate-color-picker.component.mjs +122 -0
  14. package/esm2022/lib/components/edit-toggle/ate-edit-toggle.component.mjs +42 -0
  15. package/esm2022/lib/components/editor/angular-tiptap-editor.component.mjs +953 -0
  16. package/esm2022/lib/components/slash-commands/ate-slash-commands.component.mjs +329 -0
  17. package/esm2022/lib/components/toolbar/ate-toolbar.component.mjs +531 -0
  18. package/esm2022/lib/components/ui/ate-button.component.mjs +90 -0
  19. package/esm2022/lib/components/ui/ate-separator.component.mjs +31 -0
  20. package/esm2022/lib/config/ate-editor.config.mjs +76 -0
  21. package/esm2022/lib/config/ate-global-config.token.mjs +6 -0
  22. package/esm2022/lib/config/ate-slash-commands.config.mjs +130 -0
  23. package/esm2022/lib/directives/ate-noop-value-accessor.directive.mjs +40 -0
  24. package/esm2022/lib/extensions/ate-link-click-behavior.extension.mjs +32 -0
  25. package/esm2022/lib/extensions/ate-resizable-image.extension.mjs +270 -0
  26. package/esm2022/lib/extensions/ate-table.extension.mjs +29 -0
  27. package/esm2022/lib/extensions/ate-tiptap-state.extension.mjs +85 -0
  28. package/esm2022/lib/extensions/ate-upload-progress.extension.mjs +195 -0
  29. package/esm2022/lib/extensions/calculators/ate-discovery.calculator.mjs +62 -0
  30. package/esm2022/lib/extensions/calculators/ate-image.calculator.mjs +8 -0
  31. package/esm2022/lib/extensions/calculators/ate-marks.calculator.mjs +75 -0
  32. package/esm2022/lib/extensions/calculators/ate-selection.calculator.mjs +35 -0
  33. package/esm2022/lib/extensions/calculators/ate-structure.calculator.mjs +34 -0
  34. package/esm2022/lib/extensions/calculators/ate-table.calculator.mjs +38 -0
  35. package/esm2022/lib/models/ate-bubble-menu.model.mjs +49 -0
  36. package/esm2022/lib/models/ate-editor-config.model.mjs +2 -0
  37. package/esm2022/lib/models/ate-editor-state.model.mjs +90 -0
  38. package/esm2022/lib/models/ate-image.model.mjs +2 -0
  39. package/esm2022/lib/models/ate-toolbar.model.mjs +35 -0
  40. package/esm2022/lib/node-view/ate-angular-node-view.mjs +97 -0
  41. package/esm2022/lib/node-view/ate-injector.registry.mjs +16 -0
  42. package/esm2022/lib/node-view/ate-node-view.factory.mjs +125 -0
  43. package/esm2022/lib/node-view/ate-node-view.models.mjs +2 -0
  44. package/esm2022/lib/node-view/ate-node-view.renderer.mjs +154 -0
  45. package/esm2022/lib/node-view/ate-register-angular-component.mjs +49 -0
  46. package/esm2022/lib/services/ate-color-picker.service.mjs +193 -0
  47. package/esm2022/lib/services/ate-editor-commands.service.mjs +465 -0
  48. package/esm2022/lib/services/ate-i18n.service.mjs +410 -0
  49. package/esm2022/lib/services/ate-image.service.mjs +368 -0
  50. package/esm2022/lib/services/ate-link.service.mjs +97 -0
  51. package/esm2022/lib/utils/ate-color.utils.mjs +60 -0
  52. package/esm2022/public-api.mjs +93 -0
  53. package/fesm2022/flogeez-angular-tiptap-editor.mjs +1178 -1100
  54. package/fesm2022/flogeez-angular-tiptap-editor.mjs.map +1 -1
  55. package/index.d.ts +3 -1562
  56. package/lib/ate-editor.provider.d.ts +21 -0
  57. package/lib/components/bubble-menus/base/ate-base-bubble-menu.d.ts +71 -0
  58. package/lib/components/bubble-menus/base/ate-base-sub-bubble-menu.d.ts +60 -0
  59. package/lib/components/bubble-menus/color/ate-color-bubble-menu.component.d.ts +77 -0
  60. package/lib/components/bubble-menus/image/ate-image-bubble-menu.component.d.ts +52 -0
  61. package/lib/components/bubble-menus/link/ate-link-bubble-menu.component.d.ts +55 -0
  62. package/lib/components/bubble-menus/table/ate-cell-bubble-menu.component.d.ts +12 -0
  63. package/lib/components/bubble-menus/table/ate-table-bubble-menu.component.d.ts +24 -0
  64. package/lib/components/bubble-menus/text/ate-bubble-menu.component.d.ts +53 -0
  65. package/lib/components/color-picker/ate-color-picker.component.d.ts +54 -0
  66. package/lib/components/edit-toggle/ate-edit-toggle.component.d.ts +13 -0
  67. package/lib/components/editor/angular-tiptap-editor.component.d.ts +235 -0
  68. package/lib/components/slash-commands/ate-slash-commands.component.d.ts +43 -0
  69. package/lib/components/toolbar/ate-toolbar.component.d.ts +47 -0
  70. package/lib/components/ui/ate-button.component.d.ts +25 -0
  71. package/lib/components/ui/ate-separator.component.d.ts +7 -0
  72. package/lib/config/ate-editor.config.d.ts +7 -0
  73. package/lib/config/ate-global-config.token.d.ts +6 -0
  74. package/lib/config/ate-slash-commands.config.d.ts +41 -0
  75. package/lib/directives/ate-noop-value-accessor.directive.d.ts +13 -0
  76. package/lib/extensions/ate-link-click-behavior.extension.d.ts +2 -0
  77. package/lib/extensions/ate-resizable-image.extension.d.ts +27 -0
  78. package/lib/extensions/ate-table.extension.d.ts +2 -0
  79. package/lib/extensions/ate-tiptap-state.extension.d.ts +7 -0
  80. package/lib/extensions/ate-upload-progress.extension.d.ts +7 -0
  81. package/lib/extensions/calculators/ate-discovery.calculator.d.ts +7 -0
  82. package/lib/extensions/calculators/ate-image.calculator.d.ts +2 -0
  83. package/lib/extensions/calculators/ate-marks.calculator.d.ts +2 -0
  84. package/lib/extensions/calculators/ate-selection.calculator.d.ts +2 -0
  85. package/lib/extensions/calculators/ate-structure.calculator.d.ts +2 -0
  86. package/lib/extensions/calculators/ate-table.calculator.d.ts +2 -0
  87. package/lib/models/ate-bubble-menu.model.d.ts +33 -0
  88. package/lib/models/ate-editor-config.model.d.ts +100 -0
  89. package/lib/models/ate-editor-state.model.d.ts +109 -0
  90. package/lib/models/ate-image.model.d.ts +104 -0
  91. package/lib/models/ate-toolbar.model.d.ts +18 -0
  92. package/lib/node-view/ate-angular-node-view.d.ts +115 -0
  93. package/lib/node-view/ate-injector.registry.d.ts +3 -0
  94. package/lib/node-view/ate-node-view.factory.d.ts +10 -0
  95. package/lib/node-view/ate-node-view.models.d.ts +138 -0
  96. package/lib/node-view/ate-node-view.renderer.d.ts +23 -0
  97. package/lib/node-view/ate-register-angular-component.d.ts +35 -0
  98. package/lib/services/ate-color-picker.service.d.ts +65 -0
  99. package/lib/services/ate-editor-commands.service.d.ts +72 -0
  100. package/lib/services/ate-i18n.service.d.ts +394 -0
  101. package/lib/services/ate-image.service.d.ts +71 -0
  102. package/lib/services/ate-link.service.d.ts +42 -0
  103. package/lib/utils/ate-color.utils.d.ts +12 -0
  104. package/package.json +3 -1
  105. package/public-api.d.ts +112 -0
@@ -0,0 +1,21 @@
1
+ import { EnvironmentProviders } from "@angular/core";
2
+ import { AteEditorConfig } from "./models/ate-editor-config.model";
3
+ /**
4
+ * Provides the necessary configuration and initialization for the Angular TipTap Editor.
5
+ * This should be called in your app.config.ts (for standalone) or main.ts.
6
+ *
7
+ * This provider is essential for 'Angular Nodes' to work correctly, as it captures the
8
+ * root Injector required to instantiate custom Angular components within the editor.
9
+ * @example
10
+ * ```ts
11
+ * bootstrapApplication(AppComponent, {
12
+ * providers: [
13
+ * provideAteEditor({
14
+ * theme: 'dark',
15
+ * mode: 'seamless'
16
+ * })
17
+ * ]
18
+ * });
19
+ * ```
20
+ */
21
+ export declare function provideAteEditor(config?: AteEditorConfig): EnvironmentProviders;
@@ -0,0 +1,71 @@
1
+ import { ElementRef, OnInit, OnDestroy } from "@angular/core";
2
+ import { Instance as TippyInstance } from "tippy.js";
3
+ import { Editor } from "@tiptap/core";
4
+ import { AteEditorCommandsService } from "../../../services/ate-editor-commands.service";
5
+ import { AteI18nService } from "../../../services/ate-i18n.service";
6
+ import * as i0 from "@angular/core";
7
+ /**
8
+ * Base abstract class for all Bubble Menus (Text, Image, Table, Cell).
9
+ * Handles common logic for Tippy.js initialization, positioning, and visibility.
10
+ */
11
+ export declare abstract class AteBaseBubbleMenu implements OnInit, OnDestroy {
12
+ protected readonly i18nService: AteI18nService;
13
+ protected readonly editorCommands: AteEditorCommandsService;
14
+ editor: import("@angular/core").InputSignal<Editor>;
15
+ menuRef: import("@angular/core").Signal<ElementRef<HTMLDivElement>>;
16
+ protected tippyInstance: TippyInstance | null;
17
+ protected updateTimeout: number | null;
18
+ protected readonly isToolbarInteracting: import("@angular/core").Signal<boolean>;
19
+ readonly state: import("@angular/core").Signal<import("@flogeez/angular-tiptap-editor").EditorStateSnapshot>;
20
+ constructor();
21
+ ngOnInit(): void;
22
+ ngOnDestroy(): void;
23
+ /**
24
+ * Initializes the Tippy instance.
25
+ * Can be overridden for specific Tippy configurations.
26
+ */
27
+ protected initTippy(): void;
28
+ /**
29
+ * Core logic to decide whether to show or hide the menu.
30
+ */
31
+ updateMenu: () => void;
32
+ /**
33
+ * Helper to show the Tippy instance with updated positioning.
34
+ */
35
+ showTippy(): void;
36
+ /**
37
+ * Helper to hide the Tippy instance.
38
+ */
39
+ hideTippy(): void;
40
+ /**
41
+ * Common command handler for buttons in the menu.
42
+ */
43
+ onCommand(command: string, event?: Event): void;
44
+ /**
45
+ * Shared helper to get the bounding rect of the current selection.
46
+ * Uses a combination of native selection and ProseMirror coordinates.
47
+ */
48
+ protected getRectForSelection(ed: Editor): DOMRect;
49
+ /**
50
+ * Returns the Rect representing the target for positioning the menu.
51
+ */
52
+ abstract getSelectionRect(): DOMRect;
53
+ /**
54
+ * Returns whether the menu should be displayed based on current state.
55
+ */
56
+ abstract shouldShow(): boolean;
57
+ /**
58
+ * Executes the given command on the editor.
59
+ */
60
+ protected abstract executeCommand(editor: Editor, command: string, ...args: unknown[]): void;
61
+ /**
62
+ * Optional hook called when Tippy is about to be shown.
63
+ */
64
+ protected onTippyShow(_instance: TippyInstance): void;
65
+ /**
66
+ * Optional hook called when Tippy is about to be hidden.
67
+ */
68
+ protected onTippyHide(_instance: TippyInstance): void;
69
+ static ɵfac: i0.ɵɵFactoryDeclaration<AteBaseBubbleMenu, never>;
70
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AteBaseBubbleMenu, never, never, { "editor": { "alias": "editor"; "required": true; "isSignal": true; }; }, {}, never, never, false, never>;
71
+ }
@@ -0,0 +1,60 @@
1
+ import { ElementRef, OnInit, OnDestroy } from "@angular/core";
2
+ import { Instance as TippyInstance } from "tippy.js";
3
+ import { Editor } from "@tiptap/core";
4
+ import { AteEditorCommandsService } from "../../../services/ate-editor-commands.service";
5
+ import { AteI18nService } from "../../../services/ate-i18n.service";
6
+ import * as i0 from "@angular/core";
7
+ /**
8
+ * Base abstract class for Sub-Bubble Menus (Link, Color).
9
+ * These menus are "sub-menus" of the main bubble menu or triggered/anchored by specific UI elements.
10
+ */
11
+ export declare abstract class AteBaseSubBubbleMenu implements OnInit, OnDestroy {
12
+ protected readonly i18nService: AteI18nService;
13
+ protected readonly editorCommands: AteEditorCommandsService;
14
+ editor: import("@angular/core").InputSignal<Editor>;
15
+ menuRef: import("@angular/core").Signal<ElementRef<HTMLDivElement>>;
16
+ protected tippyInstance: TippyInstance | null;
17
+ protected updateTimeout: number | null;
18
+ readonly state: import("@angular/core").Signal<import("@flogeez/angular-tiptap-editor").EditorStateSnapshot>;
19
+ constructor();
20
+ ngOnInit(): void;
21
+ ngOnDestroy(): void;
22
+ /**
23
+ * Initializes the Tippy instance with sub-menu defaults.
24
+ */
25
+ protected initTippy(): void;
26
+ /**
27
+ * Core logic to decide whether to show or hide the menu.
28
+ */
29
+ updateMenu: () => void;
30
+ /**
31
+ * Helper to show the Tippy instance with updated positioning.
32
+ */
33
+ protected showTippy(): void;
34
+ /**
35
+ * Helper to hide the Tippy instance.
36
+ */
37
+ protected hideTippy(): void;
38
+ /**
39
+ * Returns the Rect representing the target for positioning the menu.
40
+ */
41
+ abstract getSelectionRect(): DOMRect;
42
+ /**
43
+ * Returns whether the menu should be displayed based on current state.
44
+ */
45
+ abstract shouldShow(): boolean;
46
+ /**
47
+ * Hook to add reactive dependencies to the update cycle.
48
+ */
49
+ protected abstract onStateChange(): void;
50
+ /**
51
+ * Optional hook called when Tippy is about to be shown.
52
+ */
53
+ protected onTippyShow(_instance: TippyInstance): void;
54
+ /**
55
+ * Optional hook called when Tippy is about to be hidden.
56
+ */
57
+ protected onTippyHide(_instance: TippyInstance): void;
58
+ static ɵfac: i0.ɵɵFactoryDeclaration<AteBaseSubBubbleMenu, never>;
59
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AteBaseSubBubbleMenu, never, never, { "editor": { "alias": "editor"; "required": true; "isSignal": true; }; }, {}, never, never, false, never>;
60
+ }
@@ -0,0 +1,77 @@
1
+ import { Instance as TippyInstance } from "tippy.js";
2
+ import { AteBaseSubBubbleMenu } from "../base/ate-base-sub-bubble-menu";
3
+ import * as i0 from "@angular/core";
4
+ export declare class AteColorBubbleMenuComponent extends AteBaseSubBubbleMenu {
5
+ private readonly colorPickerSvc;
6
+ readonly t: import("@angular/core").Signal<{
7
+ bold: string;
8
+ italic: string;
9
+ underline: string;
10
+ strike: string;
11
+ code: string;
12
+ codeBlock: string;
13
+ superscript: string;
14
+ subscript: string;
15
+ highlight: string;
16
+ highlightPicker: string;
17
+ heading1: string;
18
+ heading2: string;
19
+ heading3: string;
20
+ bulletList: string;
21
+ orderedList: string;
22
+ blockquote: string;
23
+ alignLeft: string;
24
+ alignCenter: string;
25
+ alignRight: string;
26
+ alignJustify: string;
27
+ link: string;
28
+ image: string;
29
+ horizontalRule: string;
30
+ table: string;
31
+ undo: string;
32
+ redo: string;
33
+ clear: string;
34
+ textColor: string;
35
+ customColor: string;
36
+ presets: string;
37
+ }>;
38
+ readonly common: import("@angular/core").Signal<{
39
+ cancel: string;
40
+ confirm: string;
41
+ apply: string;
42
+ delete: string;
43
+ save: string;
44
+ close: string;
45
+ loading: string;
46
+ error: string;
47
+ success: string;
48
+ }>;
49
+ readonly presets: string[];
50
+ private colorInputRef;
51
+ /**
52
+ * LOCAL MODE: We lock the mode when the menu is shown to avoid race conditions
53
+ * where the parent (bubble menu) clears the global signal before we apply the color.
54
+ */
55
+ activeMode: import("@angular/core").WritableSignal<"highlight" | "text">;
56
+ protected onStateChange(): void;
57
+ shouldShow(): boolean;
58
+ getSelectionRect(): DOMRect;
59
+ protected onTippyShow(_instance: TippyInstance): void;
60
+ protected onTippyHide(_instance: TippyInstance): void;
61
+ readonly currentColor: import("@angular/core").Signal<string>;
62
+ readonly hexValue: import("@angular/core").Signal<string>;
63
+ isColorActive(color: string): boolean;
64
+ applyColor(color: string, addToHistory?: boolean, event?: Event): void;
65
+ onApply(event?: Event): void;
66
+ onHexInput(event: Event): void;
67
+ onHexChange(event: Event): void;
68
+ triggerNativePicker(event?: Event): void;
69
+ onNativeInput(event: Event): void;
70
+ onNativeChange(event: Event): void;
71
+ onClearColor(event?: Event): void;
72
+ onMouseDown(event: MouseEvent): void;
73
+ onFocus(): void;
74
+ onBlur(): void;
75
+ static ɵfac: i0.ɵɵFactoryDeclaration<AteColorBubbleMenuComponent, never>;
76
+ static ɵcmp: i0.ɵɵComponentDeclaration<AteColorBubbleMenuComponent, "ate-color-bubble-menu", never, {}, {}, never, never, true, never>;
77
+ }
@@ -0,0 +1,52 @@
1
+ import { type Editor } from "@tiptap/core";
2
+ import { AteBaseBubbleMenu } from "../base/ate-base-bubble-menu";
3
+ import { AteImageUploadOptions } from "../../../models/ate-image.model";
4
+ import * as i0 from "@angular/core";
5
+ export declare class AteImageBubbleMenuComponent extends AteBaseBubbleMenu {
6
+ readonly t: import("@angular/core").Signal<{
7
+ selectImage: string;
8
+ loadError: string;
9
+ uploadingImage: string;
10
+ uploadProgress: string;
11
+ uploadError: string;
12
+ uploadSuccess: string;
13
+ imageTooLarge: string;
14
+ invalidFileType: string;
15
+ dragDropText: string;
16
+ changeImage: string;
17
+ deleteImage: string;
18
+ resizeSmall: string;
19
+ resizeMedium: string;
20
+ resizeLarge: string;
21
+ resizeOriginal: string;
22
+ resizing: string;
23
+ compressing: string;
24
+ compressionError: string;
25
+ validating: string;
26
+ uploadingToServer: string;
27
+ replacingImage: string;
28
+ insertingImage: string;
29
+ noFileSelected: string;
30
+ selectionCancelled: string;
31
+ }>;
32
+ private readonly imageService;
33
+ config: import("@angular/core").InputSignal<Partial<Record<"separator" | "changeImage" | "resizeSmall" | "resizeMedium" | "resizeLarge" | "resizeOriginal" | "deleteImage", boolean>>>;
34
+ imageUpload: import("@angular/core").InputSignal<AteImageUploadOptions>;
35
+ imageBubbleMenuConfig: import("@angular/core").Signal<{
36
+ changeImage: boolean;
37
+ resizeSmall: boolean;
38
+ resizeMedium: boolean;
39
+ resizeLarge: boolean;
40
+ resizeOriginal: boolean;
41
+ deleteImage: boolean;
42
+ separator: boolean;
43
+ }>;
44
+ hasResizeButtons: import("@angular/core").Signal<boolean>;
45
+ shouldShow(): boolean;
46
+ getSelectionRect(): DOMRect;
47
+ protected executeCommand(editor: Editor, command: string, ..._args: unknown[]): void;
48
+ private changeImage;
49
+ private deleteImage;
50
+ static ɵfac: i0.ɵɵFactoryDeclaration<AteImageBubbleMenuComponent, never>;
51
+ static ɵcmp: i0.ɵɵComponentDeclaration<AteImageBubbleMenuComponent, "ate-image-bubble-menu", never, { "config": { "alias": "config"; "required": false; "isSignal": true; }; "imageUpload": { "alias": "imageUpload"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
52
+ }
@@ -0,0 +1,55 @@
1
+ import { ElementRef } from "@angular/core";
2
+ import { AteBaseSubBubbleMenu } from "../base/ate-base-sub-bubble-menu";
3
+ import * as i0 from "@angular/core";
4
+ export declare class AteLinkBubbleMenuComponent extends AteBaseSubBubbleMenu {
5
+ private readonly linkSvc;
6
+ readonly t: import("@angular/core").Signal<{
7
+ bold: string;
8
+ italic: string;
9
+ underline: string;
10
+ strike: string;
11
+ code: string;
12
+ superscript: string;
13
+ subscript: string;
14
+ highlight: string;
15
+ highlightPicker: string;
16
+ textColor: string;
17
+ link: string;
18
+ addLink: string;
19
+ editLink: string;
20
+ removeLink: string;
21
+ linkUrl: string;
22
+ linkText: string;
23
+ openLink: string;
24
+ customColor: string;
25
+ presets: string;
26
+ }>;
27
+ readonly common: import("@angular/core").Signal<{
28
+ cancel: string;
29
+ confirm: string;
30
+ apply: string;
31
+ delete: string;
32
+ save: string;
33
+ close: string;
34
+ loading: string;
35
+ error: string;
36
+ success: string;
37
+ }>;
38
+ linkInput: import("@angular/core").Signal<ElementRef<HTMLInputElement> | undefined>;
39
+ editUrl: import("@angular/core").WritableSignal<string>;
40
+ constructor();
41
+ protected onStateChange(): void;
42
+ shouldShow(): boolean;
43
+ getSelectionRect(): DOMRect;
44
+ protected onTippyHide(): void;
45
+ currentUrl(): string;
46
+ onMouseDown(event: MouseEvent): void;
47
+ onFocus(): void;
48
+ onBlur(): void;
49
+ onOpenLink(event: Event): void;
50
+ onRemove(event: Event): void;
51
+ onApply(event: Event): void;
52
+ onCancel(event: Event): void;
53
+ static ɵfac: i0.ɵɵFactoryDeclaration<AteLinkBubbleMenuComponent, never>;
54
+ static ɵcmp: i0.ɵɵComponentDeclaration<AteLinkBubbleMenuComponent, "ate-link-bubble-menu", never, {}, {}, never, never, true, never>;
55
+ }
@@ -0,0 +1,12 @@
1
+ import { type Editor } from "@tiptap/core";
2
+ import { AteBaseBubbleMenu } from "../base/ate-base-bubble-menu";
3
+ import * as i0 from "@angular/core";
4
+ export declare class AteCellBubbleMenuComponent extends AteBaseBubbleMenu {
5
+ config: import("@angular/core").InputSignal<Partial<Record<"mergeCells" | "splitCell", boolean>>>;
6
+ readonly i18n: () => import("@flogeez/angular-tiptap-editor").TiptapI18nService;
7
+ shouldShow(): boolean;
8
+ getSelectionRect(): DOMRect;
9
+ protected executeCommand(editor: Editor, command: string, ...args: unknown[]): void;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<AteCellBubbleMenuComponent, never>;
11
+ static ɵcmp: i0.ɵɵComponentDeclaration<AteCellBubbleMenuComponent, "ate-cell-bubble-menu", never, { "config": { "alias": "config"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
12
+ }
@@ -0,0 +1,24 @@
1
+ import { type Editor } from "@tiptap/core";
2
+ import { AteBaseBubbleMenu } from "../base/ate-base-bubble-menu";
3
+ import * as i0 from "@angular/core";
4
+ export declare class AteTableBubbleMenuComponent extends AteBaseBubbleMenu {
5
+ readonly t: import("@angular/core").Signal<{
6
+ addRowBefore: string;
7
+ addRowAfter: string;
8
+ deleteRow: string;
9
+ addColumnBefore: string;
10
+ addColumnAfter: string;
11
+ deleteColumn: string;
12
+ deleteTable: string;
13
+ toggleHeaderRow: string;
14
+ toggleHeaderColumn: string;
15
+ mergeCells: string;
16
+ splitCell: string;
17
+ }>;
18
+ config: import("@angular/core").InputSignal<Partial<Record<"addColumnBefore" | "addColumnAfter" | "deleteColumn" | "addRowBefore" | "addRowAfter" | "deleteRow" | "deleteTable" | "toggleHeaderColumn" | "toggleHeaderRow" | "separator", boolean>>>;
19
+ shouldShow(): boolean;
20
+ getSelectionRect(): DOMRect;
21
+ protected executeCommand(editor: Editor, command: string, ...args: unknown[]): void;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<AteTableBubbleMenuComponent, never>;
23
+ static ɵcmp: i0.ɵɵComponentDeclaration<AteTableBubbleMenuComponent, "ate-table-bubble-menu", never, { "config": { "alias": "config"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
24
+ }
@@ -0,0 +1,53 @@
1
+ import { OnInit, OnDestroy } from "@angular/core";
2
+ import { type Editor } from "@tiptap/core";
3
+ import { AteBubbleMenuConfig } from "../../../models/ate-bubble-menu.model";
4
+ import { AteBaseBubbleMenu } from "../base/ate-base-bubble-menu";
5
+ import * as i0 from "@angular/core";
6
+ export declare class AteBubbleMenuComponent extends AteBaseBubbleMenu implements OnInit, OnDestroy {
7
+ readonly t: import("@angular/core").Signal<{
8
+ bold: string;
9
+ italic: string;
10
+ underline: string;
11
+ strike: string;
12
+ code: string;
13
+ superscript: string;
14
+ subscript: string;
15
+ highlight: string;
16
+ highlightPicker: string;
17
+ textColor: string;
18
+ link: string;
19
+ addLink: string;
20
+ editLink: string;
21
+ removeLink: string;
22
+ linkUrl: string;
23
+ linkText: string;
24
+ openLink: string;
25
+ customColor: string;
26
+ presets: string;
27
+ }>;
28
+ ngOnInit(): void;
29
+ ngOnDestroy(): void;
30
+ private onMouseDown;
31
+ config: import("@angular/core").InputSignal<AteBubbleMenuConfig>;
32
+ bubbleMenuConfig: import("@angular/core").Signal<{
33
+ custom?: import("../../../models/ate-bubble-menu.model").AteCustomBubbleMenuItem[] | undefined;
34
+ code: boolean;
35
+ bold: boolean;
36
+ link: boolean;
37
+ strike: boolean;
38
+ italic: boolean;
39
+ underline: boolean;
40
+ superscript: boolean;
41
+ subscript: boolean;
42
+ highlight: boolean;
43
+ separator: boolean;
44
+ highlightPicker?: boolean | undefined;
45
+ textColor: boolean;
46
+ }>;
47
+ shouldShow(): boolean;
48
+ getSelectionRect(): DOMRect;
49
+ protected executeCommand(editor: Editor, command: string, ...args: unknown[]): void;
50
+ protected onTippyHide(): void;
51
+ static ɵfac: i0.ɵɵFactoryDeclaration<AteBubbleMenuComponent, never>;
52
+ static ɵcmp: i0.ɵɵComponentDeclaration<AteBubbleMenuComponent, "ate-bubble-menu", never, { "config": { "alias": "config"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
53
+ }
@@ -0,0 +1,54 @@
1
+ import type { Editor } from "@tiptap/core";
2
+ import * as i0 from "@angular/core";
3
+ export type ColorPickerMode = "text" | "highlight";
4
+ export declare class AteColorPickerComponent {
5
+ editor: import("@angular/core").InputSignal<Editor>;
6
+ mode: import("@angular/core").InputSignal<ColorPickerMode>;
7
+ disabled: import("@angular/core").InputSignal<boolean>;
8
+ anchorToText: import("@angular/core").InputSignal<boolean>;
9
+ private colorPickerSvc;
10
+ private i18nService;
11
+ private editorCommands;
12
+ readonly t: import("@angular/core").Signal<{
13
+ bold: string;
14
+ italic: string;
15
+ underline: string;
16
+ strike: string;
17
+ code: string;
18
+ codeBlock: string;
19
+ superscript: string;
20
+ subscript: string;
21
+ highlight: string;
22
+ highlightPicker: string;
23
+ heading1: string;
24
+ heading2: string;
25
+ heading3: string;
26
+ bulletList: string;
27
+ orderedList: string;
28
+ blockquote: string;
29
+ alignLeft: string;
30
+ alignCenter: string;
31
+ alignRight: string;
32
+ alignJustify: string;
33
+ link: string;
34
+ image: string;
35
+ horizontalRule: string;
36
+ table: string;
37
+ undo: string;
38
+ redo: string;
39
+ clear: string;
40
+ textColor: string;
41
+ customColor: string;
42
+ presets: string;
43
+ }>;
44
+ readonly state: import("@angular/core").Signal<import("@flogeez/angular-tiptap-editor").EditorStateSnapshot>;
45
+ readonly currentColor: import("@angular/core").Signal<string>;
46
+ readonly hasColorApplied: import("@angular/core").Signal<boolean>;
47
+ readonly buttonIcon: import("@angular/core").Signal<"format_color_text" | "format_color_fill">;
48
+ readonly buttonBgColor: import("@angular/core").Signal<string>;
49
+ readonly buttonTextColor: import("@angular/core").Signal<string>;
50
+ onToggle(event: Event): void;
51
+ onClear(event: MouseEvent): void;
52
+ static ɵfac: i0.ɵɵFactoryDeclaration<AteColorPickerComponent, never>;
53
+ static ɵcmp: i0.ɵɵComponentDeclaration<AteColorPickerComponent, "ate-color-picker", never, { "editor": { "alias": "editor"; "required": true; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "anchorToText": { "alias": "anchorToText"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
54
+ }
@@ -0,0 +1,13 @@
1
+ import { AteTranslations } from "../../services/ate-i18n.service";
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * Edit Toggle Component
5
+ * Allows switching between editable and readonly modes
6
+ */
7
+ export declare class AteEditToggleComponent {
8
+ editable: import("@angular/core").InputSignal<boolean>;
9
+ translations: import("@angular/core").InputSignal<AteTranslations>;
10
+ editToggle: import("@angular/core").OutputEmitterRef<Event>;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<AteEditToggleComponent, never>;
12
+ static ɵcmp: i0.ɵɵComponentDeclaration<AteEditToggleComponent, "ate-edit-toggle", never, { "editable": { "alias": "editable"; "required": true; "isSignal": true; }; "translations": { "alias": "translations"; "required": true; "isSignal": true; }; }, { "editToggle": "editToggle"; }, never, never, true, never>;
13
+ }