@meowdown/react 0.33.0 → 0.33.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 (2) hide show
  1. package/dist/index.js +6 -4
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -493,11 +493,13 @@ function LinkMenu({ onLinkClick, onLinkCopy }) {
493
493
  let rangeFrom;
494
494
  let rangeTo;
495
495
  if (edit) {
496
- rangeFrom = edit.from;
497
- rangeTo = edit.to;
496
+ const anchorRange = edit.link?.label ?? edit;
497
+ rangeFrom = anchorRange.from;
498
+ rangeTo = anchorRange.to;
498
499
  } else if (hover) {
499
- rangeFrom = hover.unit.from;
500
- rangeTo = hover.unit.to;
500
+ const anchorRange = hover.label ?? hover.unit;
501
+ rangeFrom = anchorRange.from;
502
+ rangeTo = anchorRange.to;
501
503
  }
502
504
  const anchor = useMemo(() => {
503
505
  if (rangeFrom == null || rangeTo == null) return;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@meowdown/react",
3
3
  "type": "module",
4
- "version": "0.33.0",
4
+ "version": "0.33.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -25,7 +25,7 @@
25
25
  "@prosekit/react": "^0.8.0-beta.15",
26
26
  "clsx": "^2.1.1",
27
27
  "lucide-react": "^1.21.0",
28
- "@meowdown/core": "0.33.0"
28
+ "@meowdown/core": "0.33.1"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "react": "^19.0.0",