@halo-dev/richtext-editor 2.23.0 → 2.24.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.
@@ -0,0 +1,19 @@
1
+ import { EditorView } from '../tiptap';
2
+ export type Coords = {
3
+ top: number;
4
+ bottom: number;
5
+ left: number;
6
+ right: number;
7
+ };
8
+ /**
9
+ * Get the actual cursor coordinates.
10
+ *
11
+ * coordsAtPos only knows about ProseMirror's own node tree. When the focused
12
+ * element is inside a NodeView that hosts its own editor (CodeMirror, Monaco,
13
+ * a plain <textarea>, …), coordsAtPos returns the bounding box of the NodeView
14
+ * container, not the real caret position.
15
+ *
16
+ * Detection: if document.activeElement is inside the editor DOM but is NOT
17
+ * ProseMirror's own contenteditable (view.dom), we are in a nested editor.
18
+ */
19
+ export declare const getCursorCoords: (view: EditorView) => Coords | null;
@@ -8,3 +8,4 @@ export * from './is-list-active';
8
8
  export * from './is-node-empty';
9
9
  export * from './keyboard';
10
10
  export * from './upload';
11
+ export * from './get-cursor-coords';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@halo-dev/richtext-editor",
3
- "version": "2.23.0",
3
+ "version": "2.24.0",
4
4
  "description": "Default editor for Halo",
5
5
  "homepage": "https://github.com/halo-dev/halo/tree/main/ui/packages/editor#readme",
6
6
  "bugs": {
@@ -30,44 +30,44 @@
30
30
  "./dist/style.css": "./dist/style.css"
31
31
  },
32
32
  "dependencies": {
33
- "@floating-ui/dom": "^1.7.4",
34
- "@tiptap/core": "^3.17.1",
35
- "@tiptap/extension-blockquote": "^3.17.1",
36
- "@tiptap/extension-bold": "^3.17.1",
37
- "@tiptap/extension-code": "^3.17.1",
38
- "@tiptap/extension-code-block": "^3.17.1",
39
- "@tiptap/extension-color": "^3.17.1",
40
- "@tiptap/extension-details": "^3.17.1",
41
- "@tiptap/extension-document": "^3.17.1",
42
- "@tiptap/extension-drag-handle": "^3.17.1",
43
- "@tiptap/extension-drag-handle-vue-3": "^3.17.1",
44
- "@tiptap/extension-hard-break": "^3.17.1",
45
- "@tiptap/extension-heading": "^3.17.1",
46
- "@tiptap/extension-highlight": "^3.17.1",
47
- "@tiptap/extension-horizontal-rule": "^3.17.1",
48
- "@tiptap/extension-image": "^3.17.1",
49
- "@tiptap/extension-italic": "^3.17.1",
50
- "@tiptap/extension-link": "^3.17.1",
51
- "@tiptap/extension-list": "^3.17.1",
52
- "@tiptap/extension-paragraph": "^3.17.1",
53
- "@tiptap/extension-strike": "^3.17.1",
54
- "@tiptap/extension-subscript": "^3.17.1",
55
- "@tiptap/extension-superscript": "^3.17.1",
56
- "@tiptap/extension-table": "^3.17.1",
57
- "@tiptap/extension-text": "^3.17.1",
58
- "@tiptap/extension-text-align": "^3.17.1",
59
- "@tiptap/extension-text-style": "^3.17.1",
60
- "@tiptap/extension-underline": "^3.17.1",
61
- "@tiptap/extensions": "^3.17.1",
62
- "@tiptap/pm": "^3.17.1",
63
- "@tiptap/suggestion": "^3.17.1",
64
- "@tiptap/vue-3": "^3.17.1",
33
+ "@floating-ui/dom": "^1.7.6",
34
+ "@tiptap/core": "^3.22.2",
35
+ "@tiptap/extension-blockquote": "^3.22.2",
36
+ "@tiptap/extension-bold": "^3.22.2",
37
+ "@tiptap/extension-code": "^3.22.2",
38
+ "@tiptap/extension-code-block": "^3.22.2",
39
+ "@tiptap/extension-color": "^3.22.2",
40
+ "@tiptap/extension-details": "^3.22.2",
41
+ "@tiptap/extension-document": "^3.22.2",
42
+ "@tiptap/extension-drag-handle": "^3.22.2",
43
+ "@tiptap/extension-drag-handle-vue-3": "^3.22.2",
44
+ "@tiptap/extension-hard-break": "^3.22.2",
45
+ "@tiptap/extension-heading": "^3.22.2",
46
+ "@tiptap/extension-highlight": "^3.22.2",
47
+ "@tiptap/extension-horizontal-rule": "^3.22.2",
48
+ "@tiptap/extension-image": "^3.22.2",
49
+ "@tiptap/extension-italic": "^3.22.2",
50
+ "@tiptap/extension-link": "^3.22.2",
51
+ "@tiptap/extension-list": "^3.22.2",
52
+ "@tiptap/extension-paragraph": "^3.22.2",
53
+ "@tiptap/extension-strike": "^3.22.2",
54
+ "@tiptap/extension-subscript": "^3.22.2",
55
+ "@tiptap/extension-superscript": "^3.22.2",
56
+ "@tiptap/extension-table": "^3.22.2",
57
+ "@tiptap/extension-text": "^3.22.2",
58
+ "@tiptap/extension-text-align": "^3.22.2",
59
+ "@tiptap/extension-text-style": "^3.22.2",
60
+ "@tiptap/extension-underline": "^3.22.2",
61
+ "@tiptap/extensions": "^3.22.2",
62
+ "@tiptap/pm": "^3.22.2",
63
+ "@tiptap/suggestion": "^3.22.2",
64
+ "@tiptap/vue-3": "^3.22.2",
65
65
  "github-markdown-css": "^5.2.0",
66
- "linkifyjs": "^4.1.3",
66
+ "linkifyjs": "^4.3.2",
67
67
  "scroll-into-view-if-needed": "^3.1.0",
68
- "@halo-dev/api-client": "2.23.0",
69
- "@halo-dev/components": "2.23.0",
70
- "@halo-dev/ui-shared": "2.23.0"
68
+ "@halo-dev/api-client": "2.24.0",
69
+ "@halo-dev/components": "2.24.0",
70
+ "@halo-dev/ui-shared": "2.24.0"
71
71
  },
72
72
  "devDependencies": {
73
73
  "@types/linkifyjs": "^2.1.7"
@@ -76,8 +76,8 @@
76
76
  "vue": "^3.5.x"
77
77
  },
78
78
  "scripts": {
79
- "build": "vite build",
80
- "dev": "vite build --watch --mode development",
79
+ "build": "vp build",
80
+ "dev": "vp build --watch --mode development",
81
81
  "typecheck": "vue-tsc --noEmit -p tsconfig.app.json --composite false"
82
82
  }
83
83
  }