@meowdown/core 0.81.1 → 0.81.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.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Priority, Priority as Priority$1, createMarkBuilders, createNodeBuilders, defaultBlockAt, defineBaseCommands, defineBaseKeymap, defineClipboardSerializer, defineCommands, defineHistory, defineKeymap, defineMarkSpec, defineMarkView, defineNodeAttr, defineNodeSpec, definePlugin, findMarkRange, getMarkRange, getMarkType, getNodeType, isAllSelection, isApple, isAtBlockStart, isNodeSelection, isTextSelection, setBlockType, toggleNode, union, unsetBlockType, withPriority, withPriority as withPriority$1, withSkipCodeBlock } from "@prosekit/core";
1
+ import { Priority, Priority as Priority$1, canUseRegexLookbehind, createMarkBuilders, createNodeBuilders, defaultBlockAt, defineBaseCommands, defineBaseKeymap, defineClipboardSerializer, defineCommands, defineHistory, defineKeymap, defineMarkSpec, defineMarkView, defineNodeAttr, defineNodeSpec, definePlugin, findMarkRange, getMarkRange, getMarkType, getNodeType, isAllSelection, isApple, isAtBlockStart, isNodeSelection, isTextSelection, setBlockType, toggleNode, union, unsetBlockType, withPriority, withPriority as withPriority$1, withSkipCodeBlock } from "@prosekit/core";
2
2
  import { codeBlockEnterRule, codeBlockInputRule, defineCodeBlockCommands, defineCodeBlockHighlight, defineCodeBlockKeymap, defineCodeBlockPreviewPlugin, defineCodeBlockSpec, isCodeBlockPreviewHiddenDecoration } from "@prosekit/extensions/code-block";
3
3
  import { definePlaceholder, definePlaceholder as definePlaceholder$1 } from "@prosekit/extensions/placeholder";
4
4
  import { defineSearchCommands, defineSearchQuery, defineSearchStatusHandler, getSearchStatus, getSearchStatus as getSearchStatus$1 } from "@prosekit/extensions/search";
@@ -7064,7 +7064,7 @@ function defineSoftBreak() {
7064
7064
  //#region src/extensions/substitution.ts
7065
7065
  const SUBSTITUTION_RULES = [
7066
7066
  [/<-/, "←"],
7067
- [/(?<!-)->/, "→"],
7067
+ [new RegExp((canUseRegexLookbehind() ? "(?<!-)" : "") + "->"), "→"],
7068
7068
  [/\(c\)/, "©"],
7069
7069
  [/\(r\)/, "®"],
7070
7070
  [/1\/2/, "½"],
@@ -7072,7 +7072,7 @@ const SUBSTITUTION_RULES = [
7072
7072
  [/!=/, "≠"],
7073
7073
  [/<</, "«"],
7074
7074
  [/>>/, "»"],
7075
- [/(?<!<!)(?<!^(?:-[ \t]*)+)--/, "—"]
7075
+ [new RegExp((canUseRegexLookbehind() ? String.raw`(?<!<!)(?<!^(?:-[ \t]*)+)` : "") + "--"), "—"]
7076
7076
  ];
7077
7077
  const substitutionUndoKey = new PluginKey("meowdown-substitution-undo");
7078
7078
  function isInlineCode(state, from, to) {
@@ -8127,7 +8127,8 @@ function getVirtualElementFromRange(view, range) {
8127
8127
  };
8128
8128
  return {
8129
8129
  getBoundingClientRect,
8130
- getClientRects: () => [getBoundingClientRect()]
8130
+ getClientRects: () => [getBoundingClientRect()],
8131
+ contextElement: view.dom
8131
8132
  };
8132
8133
  }
8133
8134
 
package/dist/style.css CHANGED
@@ -955,7 +955,7 @@
955
955
  top var(--meowdown-caret-glide) cubic-bezier(.25, 1, .5, 1),
956
956
  height var(--meowdown-caret-glide) cubic-bezier(.25, 1, .5, 1);
957
957
  border-radius: 999px;
958
- margin-left: -1px;
958
+ margin-left: .3px;
959
959
  display: none;
960
960
  position: absolute;
961
961
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@meowdown/core",
3
3
  "type": "module",
4
- "version": "0.81.1",
4
+ "version": "0.81.2",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",