@meowdown/react 0.67.1 → 0.67.2

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 +31 -21
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -815,16 +815,20 @@ function LinkMenu({ onLinkClick, onLinkCopy, resolveLinkPreview, readOnly = fals
815
815
  const [link, setLink] = useState();
816
816
  const [edit, setEdit] = useState();
817
817
  const isPointerOverPopupRef = useRef(false);
818
- const linkHoverExtension = useMemo(() => defineLinkHoverHandler((nextHit) => {
819
- setInfoOpen(nextHit != null);
820
- if (nextHit) setLink(nextHit.payload);
821
- }, { canLeave: () => !isPointerOverPopupRef.current }), []);
818
+ const linkHoverExtension = useMemo(() => {
819
+ return defineLinkHoverHandler((nextHit) => {
820
+ setInfoOpen(nextHit != null);
821
+ if (nextHit) setLink(nextHit.payload);
822
+ }, { canLeave: () => !isPointerOverPopupRef.current });
823
+ }, []);
822
824
  useExtension$1(linkHoverExtension);
823
- const linkEditExtension = useMemo(() => readOnly ? null : defineLinkEditKeymap((options) => {
824
- setEdit(options);
825
- setEditOpen(true);
826
- setInfoOpen(false);
827
- }), [readOnly]);
825
+ const linkEditExtension = useMemo(() => {
826
+ return readOnly ? null : defineLinkEditKeymap((options) => {
827
+ setEdit(options);
828
+ setEditOpen(true);
829
+ setInfoOpen(false);
830
+ });
831
+ }, [readOnly]);
828
832
  useExtension$1(linkEditExtension);
829
833
  const handlePointerHover = useCallback((over) => {
830
834
  isPointerOverPopupRef.current = over;
@@ -1546,7 +1550,9 @@ function getTableHandleState(editor) {
1546
1550
  columnAlign,
1547
1551
  setTableColumnAlign: {
1548
1552
  canExec: commands.setTableColumnAlign.canExec("left"),
1549
- command: (align) => commands.setTableColumnAlign(columnAlign === align ? null : align)
1553
+ command: (align) => {
1554
+ return commands.setTableColumnAlign(columnAlign === align ? null : align);
1555
+ }
1550
1556
  },
1551
1557
  addTableColumnBefore: {
1552
1558
  canExec: commands.addTableColumnBefore.canExec(),
@@ -2387,11 +2393,13 @@ function WikilinkChip(props) {
2387
2393
  className: "md-wikilink-view-preview md-atom-view-preview",
2388
2394
  "data-testid": "wikilink",
2389
2395
  contentEditable: false,
2390
- onClick: onWikilinkClick ? (event) => onWikilinkClick({
2391
- target,
2392
- event: event.nativeEvent,
2393
- mod: isModEvent(event)
2394
- }) : void 0,
2396
+ onClick: onWikilinkClick ? (event) => {
2397
+ return onWikilinkClick({
2398
+ target,
2399
+ event: event.nativeEvent,
2400
+ mod: isModEvent(event)
2401
+ });
2402
+ } : void 0,
2395
2403
  children: /* @__PURE__ */ jsx("span", {
2396
2404
  className: "md-wikilink-view-label",
2397
2405
  contentEditable: false,
@@ -2451,12 +2459,14 @@ function ImagePreview(props) {
2451
2459
  src: url,
2452
2460
  alt,
2453
2461
  draggable: false,
2454
- onClick: onImageClick ? (event) => onImageClick({
2455
- src,
2456
- alt,
2457
- event: event.nativeEvent,
2458
- mod: isModEvent(event)
2459
- }) : void 0,
2462
+ onClick: onImageClick ? (event) => {
2463
+ return onImageClick({
2464
+ src,
2465
+ alt,
2466
+ event: event.nativeEvent,
2467
+ mod: isModEvent(event)
2468
+ });
2469
+ } : void 0,
2460
2470
  style: width == null ? void 0 : { width: `${width}px` }
2461
2471
  })
2462
2472
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@meowdown/react",
3
3
  "type": "module",
4
- "version": "0.67.1",
4
+ "version": "0.67.2",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -31,7 +31,7 @@
31
31
  "github-slugger": "^2.0.0",
32
32
  "lucide-react": "^1.28.0",
33
33
  "react-property": "^2.0.2",
34
- "@meowdown/core": "0.67.1"
34
+ "@meowdown/core": "0.67.2"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "react": "^19.0.0",
@@ -57,7 +57,7 @@
57
57
  "react-dom": "^19.2.8",
58
58
  "tsdown": "^0.23.0-beta.2",
59
59
  "vitest": "^4.1.11",
60
- "vitest-browser-commands": "^0.2.1",
60
+ "vitest-browser-commands": "^0.4.1",
61
61
  "vitest-browser-react": "^2.2.0",
62
62
  "@meowdown/vitest": "0.0.0"
63
63
  },