@meowdown/core 0.78.2 → 0.78.4

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 +7 -4
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -428,7 +428,9 @@ function getMarkRangeStrictlyAround(state, pos, markNames) {
428
428
  //#region src/extensions/atom-mark-navigation.ts
429
429
  function getActiveMarkNames(marks, state) {
430
430
  const mode = getMarkMode(state);
431
- return marks.flatMap((mark) => mark.modes.includes(mode) ? [mark.name] : []);
431
+ const result = [];
432
+ for (const mark of marks) if (mark.modes.includes(mode)) result.push(mark.name);
433
+ return result;
432
434
  }
433
435
  function getSelectedRange(state, markNames) {
434
436
  const { from, to, empty } = state.selection;
@@ -4540,7 +4542,7 @@ function docToParagraphMarkdown(doc) {
4540
4542
  paragraphs.push(node.textContent);
4541
4543
  return false;
4542
4544
  });
4543
- return paragraphs.join("\n").replaceAll(/\r\n?/g, "\n").replaceAll(/\n[ \t]*\n+/g, "\n");
4545
+ return paragraphs.join("\n").replaceAll(/\n[ \t]*\n+/g, "\n");
4544
4546
  }
4545
4547
 
4546
4548
  //#endregion
@@ -7904,13 +7906,14 @@ var VirtualCaretView = class {
7904
7906
  view.dom.removeAttribute(DATA_ATTRIBUTE);
7905
7907
  return;
7906
7908
  }
7907
- if (wasHidden) this.#caret.style.transitionProperty = "none";
7909
+ const skipGlide = wasHidden || getIsPointerSelection();
7910
+ if (skipGlide) this.#caret.style.transitionProperty = "none";
7908
7911
  this.#caret.style.visibility = "";
7909
7912
  this.#caret.style.left = `${rect.left}px`;
7910
7913
  this.#caret.style.top = `${rect.top}px`;
7911
7914
  this.#caret.style.height = `${rect.height}px`;
7912
7915
  view.dom.setAttribute(DATA_ATTRIBUTE, "");
7913
- if (wasHidden) {
7916
+ if (skipGlide) {
7914
7917
  forceReflow(this.#caret);
7915
7918
  this.#caret.style.transitionProperty = "";
7916
7919
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@meowdown/core",
3
3
  "type": "module",
4
- "version": "0.78.2",
4
+ "version": "0.78.4",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -26,7 +26,7 @@
26
26
  "@floating-ui/dom": "^1.8.0",
27
27
  "@lezer/highlight": "^1.2.3",
28
28
  "@meowdown/embed": "0.3.1",
29
- "@meowdown/markdown": "0.75.0",
29
+ "@meowdown/markdown": "0.76.0",
30
30
  "@ocavue/utils": "^1.8.0",
31
31
  "@post-embed/exporter": "^0.5.0",
32
32
  "@post-embed/schema": "^0.5.2",
@@ -36,9 +36,9 @@
36
36
  "@prosekit/pm": "^0.1.20",
37
37
  "@prosekit/web": "^0.9.3",
38
38
  "hast-util-to-mdast": "^10.1.2",
39
- "katex": "^0.18.7",
39
+ "katex": "^0.19.0",
40
40
  "lru.min": "^1.1.5",
41
- "mdast-util-to-markdown": "^2.1.2",
41
+ "mdast-util-to-markdown": "^2.2.0",
42
42
  "micromark-util-decode-string": "^2.0.1",
43
43
  "micromark-util-normalize-identifier": "^2.0.1",
44
44
  "prosemirror-flat-list": "^0.7.1",
@@ -57,11 +57,11 @@
57
57
  "@tsdown/css": "^0.23.0",
58
58
  "@types/hast": "^3.0.5",
59
59
  "@types/mdast": "^4.0.4",
60
- "@vitest/browser-playwright": "^5.0.1",
60
+ "@vitest/browser-playwright": "^5.0.3",
61
61
  "dedent": "^1.7.2",
62
62
  "diffable-html-snapshot": "^0.3.0",
63
63
  "tsdown": "^0.23.0",
64
- "vitest": "^5.0.1"
64
+ "vitest": "^5.0.3"
65
65
  },
66
66
  "publishConfig": {
67
67
  "access": "public"