@flogeez/angular-tiptap-editor 3.8.1 → 3.9.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.
@@ -20,11 +20,20 @@ export declare class AteBlockControlsComponent implements AfterViewInit, OnDestr
20
20
  private lastValidRect;
21
21
  private tippyInstance;
22
22
  private updateTimeout;
23
+ private glideFrame;
23
24
  constructor();
24
25
  ngAfterViewInit(): void;
25
26
  ngOnDestroy(): void;
26
27
  private initTippy;
27
28
  private updateMenu;
29
+ /** While scrolling, the controls follow their block every frame: a glide would make them trail behind it */
30
+ private onScroll;
31
+ /**
32
+ * Moves the controls without gliding until the position settles (two frames after the last call).
33
+ * Tippy only skips the move transition on its very first show: the controls are never unmounted
34
+ * afterwards, so they would otherwise glide in from wherever they were last shown.
35
+ */
36
+ private withoutGlide;
28
37
  private showTippy;
29
38
  private hideTippy;
30
39
  private getSelectionRect;
@@ -1,5 +1,14 @@
1
1
  import { Extension } from "@tiptap/core";
2
+ import { EditorState } from "@tiptap/pm/state";
3
+ import { EditorView } from "@tiptap/pm/view";
2
4
  import { Node } from "@tiptap/pm/model";
5
+ export declare const ATE_BLOCK_DRAG_MIME = "application/x-ate-block-drag";
6
+ interface PosRange {
7
+ from: number;
8
+ to: number;
9
+ }
10
+ export declare function endAteBlockDrag(view: EditorView): void;
11
+ export declare function ateMultiBlockSelection(state: EditorState, blockPos: number): PosRange | null;
3
12
  export interface AteBlockControlsOptions {
4
13
  onHover?: (data: {
5
14
  node: Node;
@@ -8,3 +17,4 @@ export interface AteBlockControlsOptions {
8
17
  } | null) => void;
9
18
  }
10
19
  export declare const AteBlockControlsExtension: Extension<AteBlockControlsOptions, any>;
20
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flogeez/angular-tiptap-editor",
3
- "version": "3.8.1",
3
+ "version": "3.9.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",
@@ -40,3 +40,16 @@
40
40
  .ProseMirror .has-text-align-justify {
41
41
  text-align: justify;
42
42
  }
43
+
44
+ .ate-block-dragging > .prosemirror-dropcursor-block,
45
+ .ate-block-dragging > .prosemirror-dropcursor-inline {
46
+ display: none;
47
+ }
48
+
49
+ .ProseMirror > .ate-block-drop-before {
50
+ box-shadow: 0 -2px 0 0 var(--ate-primary, #2563eb);
51
+ }
52
+
53
+ .ProseMirror > .ate-block-drop-after {
54
+ box-shadow: 0 2px 0 0 var(--ate-primary, #2563eb);
55
+ }
package/styles/index.css CHANGED
@@ -40,3 +40,16 @@
40
40
  .ProseMirror .has-text-align-justify {
41
41
  text-align: justify;
42
42
  }
43
+
44
+ .ate-block-dragging > .prosemirror-dropcursor-block,
45
+ .ate-block-dragging > .prosemirror-dropcursor-inline {
46
+ display: none;
47
+ }
48
+
49
+ .ProseMirror > .ate-block-drop-before {
50
+ box-shadow: 0 -2px 0 0 var(--ate-primary, #2563eb);
51
+ }
52
+
53
+ .ProseMirror > .ate-block-drop-after {
54
+ box-shadow: 0 2px 0 0 var(--ate-primary, #2563eb);
55
+ }