@flogeez/angular-tiptap-editor 3.1.3 → 3.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/CHANGELOG.md +18 -0
- package/README.md +2 -2
- package/esm2022/flogeez-angular-tiptap-editor.mjs +5 -0
- package/esm2022/lib/ate-editor.provider.mjs +38 -0
- package/esm2022/lib/components/bubble-menus/base/ate-base-bubble-menu.mjs +207 -0
- package/esm2022/lib/components/bubble-menus/base/ate-base-sub-bubble-menu.mjs +137 -0
- package/esm2022/lib/components/bubble-menus/color/ate-color-bubble-menu.component.mjs +365 -0
- package/esm2022/lib/components/bubble-menus/image/ate-image-bubble-menu.component.mjs +309 -0
- package/esm2022/lib/components/bubble-menus/link/ate-link-bubble-menu.component.mjs +247 -0
- package/esm2022/lib/components/bubble-menus/table/ate-cell-bubble-menu.component.mjs +126 -0
- package/esm2022/lib/components/bubble-menus/table/ate-table-bubble-menu.component.mjs +271 -0
- package/esm2022/lib/components/bubble-menus/text/ate-bubble-menu.component.mjs +272 -0
- package/esm2022/lib/components/color-picker/ate-color-picker.component.mjs +123 -0
- package/esm2022/lib/components/edit-toggle/ate-edit-toggle.component.mjs +42 -0
- package/esm2022/lib/components/editor/angular-tiptap-editor.component.mjs +1031 -0
- package/esm2022/lib/components/editor/ate-block-controls.component.mjs +256 -0
- package/esm2022/lib/components/slash-commands/ate-slash-commands.component.mjs +328 -0
- package/esm2022/lib/components/toolbar/ate-toolbar.component.mjs +531 -0
- package/esm2022/lib/components/ui/ate-button.component.mjs +91 -0
- package/esm2022/lib/components/ui/ate-separator.component.mjs +11 -0
- package/esm2022/lib/config/ate-editor.config.mjs +133 -0
- package/esm2022/lib/config/ate-global-config.token.mjs +6 -0
- package/esm2022/lib/config/ate-slash-commands.config.mjs +130 -0
- package/esm2022/lib/directives/ate-noop-value-accessor.directive.mjs +40 -0
- package/esm2022/lib/directives/ate-tooltip.directive.mjs +138 -0
- package/esm2022/lib/extensions/ate-block-controls.extension.mjs +156 -0
- package/esm2022/lib/extensions/ate-link-click-behavior.extension.mjs +32 -0
- package/esm2022/lib/extensions/ate-resizable-image.extension.mjs +277 -0
- package/esm2022/lib/extensions/ate-table.extension.mjs +27 -0
- package/esm2022/lib/extensions/ate-tiptap-state.extension.mjs +85 -0
- package/esm2022/lib/extensions/ate-upload-progress.extension.mjs +195 -0
- package/esm2022/lib/extensions/calculators/ate-discovery.calculator.mjs +62 -0
- package/esm2022/lib/extensions/calculators/ate-image.calculator.mjs +8 -0
- package/esm2022/lib/extensions/calculators/ate-marks.calculator.mjs +75 -0
- package/esm2022/lib/extensions/calculators/ate-selection.calculator.mjs +35 -0
- package/esm2022/lib/extensions/calculators/ate-structure.calculator.mjs +34 -0
- package/esm2022/lib/extensions/calculators/ate-table.calculator.mjs +38 -0
- package/esm2022/lib/models/ate-bubble-menu.model.mjs +53 -0
- package/esm2022/lib/models/ate-editor-config.model.mjs +2 -0
- package/esm2022/lib/models/ate-editor-state.model.mjs +90 -0
- package/esm2022/lib/models/ate-image.model.mjs +2 -0
- package/esm2022/lib/models/ate-slash-command.model.mjs +2 -0
- package/esm2022/lib/models/ate-toolbar.model.mjs +35 -0
- package/esm2022/lib/node-view/ate-angular-node-view.mjs +97 -0
- package/esm2022/lib/node-view/ate-injector.registry.mjs +16 -0
- package/esm2022/lib/node-view/ate-node-view.factory.mjs +125 -0
- package/esm2022/lib/node-view/ate-node-view.models.mjs +2 -0
- package/esm2022/lib/node-view/ate-node-view.renderer.mjs +154 -0
- package/esm2022/lib/node-view/ate-register-angular-component.mjs +49 -0
- package/esm2022/lib/services/ate-color-picker.service.mjs +194 -0
- package/esm2022/lib/services/ate-editor-commands.service.mjs +474 -0
- package/esm2022/lib/services/ate-i18n.service.mjs +422 -0
- package/esm2022/lib/services/ate-image.service.mjs +459 -0
- package/esm2022/lib/services/ate-link.service.mjs +99 -0
- package/esm2022/lib/utils/ate-color.utils.mjs +60 -0
- package/esm2022/public-api.mjs +40 -0
- package/fesm2022/flogeez-angular-tiptap-editor.mjs +319 -352
- package/fesm2022/flogeez-angular-tiptap-editor.mjs.map +1 -1
- package/index.d.ts +3 -1734
- package/lib/ate-editor.provider.d.ts +21 -0
- package/lib/components/bubble-menus/base/ate-base-bubble-menu.d.ts +71 -0
- package/lib/components/bubble-menus/base/ate-base-sub-bubble-menu.d.ts +60 -0
- package/lib/components/bubble-menus/color/ate-color-bubble-menu.component.d.ts +77 -0
- package/lib/components/bubble-menus/image/ate-image-bubble-menu.component.d.ts +49 -0
- package/lib/components/bubble-menus/link/ate-link-bubble-menu.component.d.ts +55 -0
- package/lib/components/bubble-menus/table/ate-cell-bubble-menu.component.d.ts +16 -0
- package/lib/components/bubble-menus/table/ate-table-bubble-menu.component.d.ts +25 -0
- package/lib/components/bubble-menus/text/ate-bubble-menu.component.d.ts +53 -0
- package/lib/components/color-picker/ate-color-picker.component.d.ts +54 -0
- package/lib/components/edit-toggle/ate-edit-toggle.component.d.ts +13 -0
- package/lib/components/editor/angular-tiptap-editor.component.d.ts +242 -0
- package/lib/components/editor/ate-block-controls.component.d.ts +44 -0
- package/lib/components/slash-commands/ate-slash-commands.component.d.ts +34 -0
- package/lib/components/toolbar/ate-toolbar.component.d.ts +47 -0
- package/lib/components/ui/ate-button.component.d.ts +25 -0
- package/lib/components/ui/ate-separator.component.d.ts +5 -0
- package/lib/config/ate-editor.config.d.ts +19 -0
- package/lib/config/ate-global-config.token.d.ts +6 -0
- package/lib/config/ate-slash-commands.config.d.ts +41 -0
- package/lib/directives/ate-noop-value-accessor.directive.d.ts +13 -0
- package/lib/directives/ate-tooltip.directive.d.ts +30 -0
- package/lib/extensions/ate-block-controls.extension.d.ts +10 -0
- package/lib/extensions/ate-link-click-behavior.extension.d.ts +2 -0
- package/lib/extensions/ate-resizable-image.extension.d.ts +27 -0
- package/lib/extensions/ate-table.extension.d.ts +2 -0
- package/lib/extensions/ate-tiptap-state.extension.d.ts +7 -0
- package/lib/extensions/ate-upload-progress.extension.d.ts +7 -0
- package/lib/extensions/calculators/ate-discovery.calculator.d.ts +7 -0
- package/lib/extensions/calculators/ate-image.calculator.d.ts +2 -0
- package/lib/extensions/calculators/ate-marks.calculator.d.ts +2 -0
- package/lib/extensions/calculators/ate-selection.calculator.d.ts +2 -0
- package/lib/extensions/calculators/ate-structure.calculator.d.ts +2 -0
- package/lib/extensions/calculators/ate-table.calculator.d.ts +2 -0
- package/lib/models/ate-bubble-menu.model.d.ts +33 -0
- package/lib/models/ate-editor-config.model.d.ts +113 -0
- package/lib/models/ate-editor-state.model.d.ts +109 -0
- package/lib/models/ate-image.model.d.ts +104 -0
- package/lib/models/ate-slash-command.model.d.ts +17 -0
- package/lib/models/ate-toolbar.model.d.ts +18 -0
- package/lib/node-view/ate-angular-node-view.d.ts +115 -0
- package/lib/node-view/ate-injector.registry.d.ts +3 -0
- package/lib/node-view/ate-node-view.factory.d.ts +10 -0
- package/lib/node-view/ate-node-view.models.d.ts +138 -0
- package/lib/node-view/ate-node-view.renderer.d.ts +23 -0
- package/lib/node-view/ate-register-angular-component.d.ts +35 -0
- package/lib/services/ate-color-picker.service.d.ts +65 -0
- package/lib/services/ate-editor-commands.service.d.ts +75 -0
- package/lib/services/ate-i18n.service.d.ts +406 -0
- package/lib/services/ate-image.service.d.ts +82 -0
- package/lib/services/ate-link.service.d.ts +42 -0
- package/lib/utils/ate-color.utils.d.ts +12 -0
- package/package.json +3 -1
- package/public-api.d.ts +31 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { Editor } from "@tiptap/core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class AteLinkService {
|
|
4
|
+
/** Whether link edit mode is active */
|
|
5
|
+
readonly editMode: import("@angular/core").WritableSignal<boolean>;
|
|
6
|
+
/** Reference to the element that triggered the menu (for anchoring) */
|
|
7
|
+
readonly menuTrigger: import("@angular/core").WritableSignal<HTMLElement | null>;
|
|
8
|
+
/** Whether the user is currently interacting with the link UI (input focus) */
|
|
9
|
+
readonly isInteracting: import("@angular/core").WritableSignal<boolean>;
|
|
10
|
+
/**
|
|
11
|
+
* Open the link edit menu.
|
|
12
|
+
*/
|
|
13
|
+
open(trigger?: HTMLElement): void;
|
|
14
|
+
/**
|
|
15
|
+
* Close the link edit menu.
|
|
16
|
+
*/
|
|
17
|
+
close(): void;
|
|
18
|
+
/**
|
|
19
|
+
* Final cleanup (called after UI is hidden)
|
|
20
|
+
*/
|
|
21
|
+
done(): void;
|
|
22
|
+
/**
|
|
23
|
+
* Set interaction state
|
|
24
|
+
*/
|
|
25
|
+
setInteracting(value: boolean): void;
|
|
26
|
+
/**
|
|
27
|
+
* Toggle link mode from UI.
|
|
28
|
+
* If a URL string is provided, applies the link and closes.
|
|
29
|
+
* If an Event is provided, extracts the trigger for anchoring.
|
|
30
|
+
*/
|
|
31
|
+
toggle(editor: Editor, urlOrEvent?: string | Event): void;
|
|
32
|
+
/**
|
|
33
|
+
* Apply a link to the current selection.
|
|
34
|
+
*/
|
|
35
|
+
setLink(editor: Editor, url: string): void;
|
|
36
|
+
/**
|
|
37
|
+
* Remove link from the current selection.
|
|
38
|
+
*/
|
|
39
|
+
unsetLink(editor: Editor): void;
|
|
40
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AteLinkService, never>;
|
|
41
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AteLinkService>;
|
|
42
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Normalizes color values (rgb/rgba to hex).
|
|
3
|
+
*/
|
|
4
|
+
export declare function normalizeColor(color: string | null | undefined): string | null;
|
|
5
|
+
/**
|
|
6
|
+
* Calculate luminance (0-255).
|
|
7
|
+
*/
|
|
8
|
+
export declare function getLuminance(color: string | null | undefined): number;
|
|
9
|
+
/**
|
|
10
|
+
* Returns contrast color for readability.
|
|
11
|
+
*/
|
|
12
|
+
export declare function getContrastColor(color: string): "black" | "white";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flogeez/angular-tiptap-editor",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.4",
|
|
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",
|
|
@@ -53,6 +53,8 @@
|
|
|
53
53
|
},
|
|
54
54
|
".": {
|
|
55
55
|
"types": "./index.d.ts",
|
|
56
|
+
"esm2022": "./esm2022/flogeez-angular-tiptap-editor.mjs",
|
|
57
|
+
"esm": "./esm2022/flogeez-angular-tiptap-editor.mjs",
|
|
56
58
|
"default": "./fesm2022/flogeez-angular-tiptap-editor.mjs"
|
|
57
59
|
}
|
|
58
60
|
}
|
package/public-api.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export * from "./lib/components/editor/angular-tiptap-editor.component";
|
|
2
|
+
export * from "./lib/ate-editor.provider";
|
|
3
|
+
export * from "./lib/directives/ate-noop-value-accessor.directive";
|
|
4
|
+
export * from "./lib/directives/ate-tooltip.directive";
|
|
5
|
+
export * from "./lib/services/ate-i18n.service";
|
|
6
|
+
export * from "./lib/services/ate-editor-commands.service";
|
|
7
|
+
export * from "./lib/services/ate-image.service";
|
|
8
|
+
export * from "./lib/services/ate-color-picker.service";
|
|
9
|
+
export * from "./lib/services/ate-link.service";
|
|
10
|
+
export * from "./lib/models/ate-editor-state.model";
|
|
11
|
+
export * from "./lib/extensions/calculators/ate-discovery.calculator";
|
|
12
|
+
export * from "./lib/extensions/calculators/ate-image.calculator";
|
|
13
|
+
export * from "./lib/extensions/calculators/ate-marks.calculator";
|
|
14
|
+
export * from "./lib/extensions/calculators/ate-selection.calculator";
|
|
15
|
+
export * from "./lib/extensions/calculators/ate-structure.calculator";
|
|
16
|
+
export * from "./lib/extensions/calculators/ate-table.calculator";
|
|
17
|
+
export * from "./lib/models/ate-toolbar.model";
|
|
18
|
+
export * from "./lib/models/ate-image.model";
|
|
19
|
+
export * from "./lib/models/ate-bubble-menu.model";
|
|
20
|
+
export * from "./lib/models/ate-editor-config.model";
|
|
21
|
+
export * from "./lib/models/ate-slash-command.model";
|
|
22
|
+
export * from "./lib/config/ate-editor.config";
|
|
23
|
+
export * from "./lib/config/ate-global-config.token";
|
|
24
|
+
export * from "./lib/config/ate-slash-commands.config";
|
|
25
|
+
export type { SupportedLocale } from "./lib/services/ate-i18n.service";
|
|
26
|
+
export { AteAngularNodeView } from "./lib/node-view/ate-angular-node-view";
|
|
27
|
+
export { AteNodeViewRenderer } from "./lib/node-view/ate-node-view.renderer";
|
|
28
|
+
export { createAngularComponentExtension } from "./lib/node-view/ate-node-view.factory";
|
|
29
|
+
export { registerAngularComponent } from "./lib/node-view/ate-register-angular-component";
|
|
30
|
+
export type { AteAngularNode } from "./lib/models/ate-editor-config.model";
|
|
31
|
+
export type { RegisterAngularComponentOptions, AteComponentRenderOptions, } from "./lib/node-view/ate-node-view.models";
|