@haklex/rich-plugin-block-handle 0.25.0 → 0.26.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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockHandlePlugin.d.ts","sourceRoot":"","sources":["../src/BlockHandlePlugin.tsx"],"names":[],"mappings":"AAoDA,OAAO,KAAK,EAAgD,YAAY,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"BlockHandlePlugin.d.ts","sourceRoot":"","sources":["../src/BlockHandlePlugin.tsx"],"names":[],"mappings":"AAoDA,OAAO,KAAK,EAAgD,YAAY,EAAE,MAAM,OAAO,CAAC;AAyyBxF,wBAAgB,iBAAiB,IAAI,YAAY,CAGhD"}
|
package/dist/index.mjs
CHANGED
|
@@ -1238,6 +1238,9 @@ function BlockHandleInner({ editor }) {
|
|
|
1238
1238
|
if (event.button !== 0) return;
|
|
1239
1239
|
const target = event.target;
|
|
1240
1240
|
if (rootElement.contains(target)) return;
|
|
1241
|
+
if (target.closest("button, input, textarea, select, [role=\"toolbar\"], [role=\"menu\"]")) return;
|
|
1242
|
+
const rootRect = rootElement.getBoundingClientRect();
|
|
1243
|
+
if (event.clientY < rootRect.top || event.clientY > rootRect.bottom) return;
|
|
1241
1244
|
const nodeKey = getBlockKeyAtY(event.clientY);
|
|
1242
1245
|
if (!nodeKey) return;
|
|
1243
1246
|
event.preventDefault();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haklex/rich-plugin-block-handle",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"description": "Block handle plugin with add button and context menu",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"lucide-react": "^1.0.0",
|
|
52
52
|
"react": ">=19",
|
|
53
53
|
"react-dom": ">=19",
|
|
54
|
-
"@haklex/rich-editor-ui": "0.
|
|
55
|
-
"@haklex/rich-style-token": "0.
|
|
54
|
+
"@haklex/rich-editor-ui": "0.26.0",
|
|
55
|
+
"@haklex/rich-style-token": "0.26.0"
|
|
56
56
|
},
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"access": "public"
|