@meowdown/core 0.65.5 → 0.66.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.
- package/README.md +1 -0
- package/dist/index.d.ts +6 -7
- package/dist/index.js +88 -104
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -60,6 +60,7 @@ the current block to that level (or back to a paragraph).
|
|
|
60
60
|
| `Mod-5` | Heading 5 | `##### heading` |
|
|
61
61
|
| `Mod-6` | Heading 6 | `###### heading` |
|
|
62
62
|
| `Mod-.` | Fold or unfold a bullet | |
|
|
63
|
+
| `Shift-Enter` | Insert a line break | |
|
|
63
64
|
| `Mod-Enter` | Follow the link under the caret, or cycle a checkbox task | `- [ ]` / `- [x]` |
|
|
64
65
|
| `Mod-Shift-Enter` | Cycle a circle checkbox task | `+ [ ]` / `+ [x]` |
|
|
65
66
|
| `Mod-Shift-7` | Ordered list | `1. item` |
|
package/dist/index.d.ts
CHANGED
|
@@ -793,7 +793,11 @@ declare function defineEditorExtensionImpl(options: EditorExtensionOptions): imp
|
|
|
793
793
|
Marks: {
|
|
794
794
|
mdPack: MdPackAttrs;
|
|
795
795
|
};
|
|
796
|
-
}>]>, import("@prosekit/core").PlainExtension, import("@prosekit/core").Extension<import("@prosekit/core").ExtensionTyping<any, any, any>>, import("@prosekit/core").PlainExtension, import("@prosekit/core").PlainExtension, import("@prosekit/core").
|
|
796
|
+
}>]>, import("@prosekit/core").PlainExtension, import("@prosekit/core").Extension<import("@prosekit/core").ExtensionTyping<any, any, any>>, import("@prosekit/core").PlainExtension, import("@prosekit/core").PlainExtension, import("@prosekit/core").Union<readonly [import("@prosekit/core").Extension<{
|
|
797
|
+
Commands: {
|
|
798
|
+
insertSoftBreak: [];
|
|
799
|
+
};
|
|
800
|
+
}>, import("@prosekit/core").PlainExtension]>, import("@prosekit/core").PlainExtension, import("@prosekit/core").PlainExtension, import("@prosekit/core").PlainExtension, import("@prosekit/core").Union<readonly [import("@prosekit/core").Extension<{
|
|
797
801
|
Commands: {
|
|
798
802
|
toggleEm: [];
|
|
799
803
|
toggleStrong: [];
|
|
@@ -1337,6 +1341,7 @@ export declare const EDITOR_KEY_BINDINGS: {
|
|
|
1337
1341
|
readonly 'Mod-5': "Heading 5";
|
|
1338
1342
|
readonly 'Mod-6': "Heading 6";
|
|
1339
1343
|
readonly 'Mod-.': "Fold or unfold a bullet";
|
|
1344
|
+
readonly 'Shift-Enter': "Insert a line break";
|
|
1340
1345
|
readonly 'Mod-Enter': "Follow the link under the caret, or cycle a checkbox task";
|
|
1341
1346
|
readonly 'Mod-Shift-Enter': "Cycle a circle checkbox task";
|
|
1342
1347
|
readonly 'Mod-Shift-7': "Ordered list";
|
|
@@ -1396,12 +1401,6 @@ declare const NODE_NAMES: readonly ["doc", "text", "paragraph", "heading", "bloc
|
|
|
1396
1401
|
type NodeName = (typeof NODE_NAMES)[number];
|
|
1397
1402
|
export declare function isNodeOfType(node: ProseMirrorNode, name: NodeName): boolean;
|
|
1398
1403
|
//#endregion
|
|
1399
|
-
//#region src/extensions/spell-check.d.ts
|
|
1400
|
-
/**
|
|
1401
|
-
* @deprecated This will be removed in future versions.
|
|
1402
|
-
*/
|
|
1403
|
-
export declare function defineSpellCheckPlugin(spellCheck: boolean): PlainExtension;
|
|
1404
|
-
//#endregion
|
|
1405
1404
|
//#region src/extensions/substitution.d.ts
|
|
1406
1405
|
/**
|
|
1407
1406
|
* Apply the editor's automatic plain-text substitutions.
|
package/dist/index.js
CHANGED
|
@@ -32,12 +32,12 @@ import { defineEnterRule, defineTextBlockEnterRule } from "@prosekit/extensions/
|
|
|
32
32
|
import { defineInputRule, defineTextBlockInputRule } from "@prosekit/extensions/input-rule";
|
|
33
33
|
import { triggerAutocomplete } from "@prosekit/extensions/autocomplete";
|
|
34
34
|
import { defineListCommands, defineListDropIndicator, defineListKeymap, defineListSpec, moveList, toggleList, unwrapList, wrapInList } from "@prosekit/extensions/list";
|
|
35
|
-
import { chainCommands, lift } from "@prosekit/pm/commands";
|
|
35
|
+
import { chainCommands, lift, newlineInCode, splitBlock } from "@prosekit/pm/commands";
|
|
36
36
|
import { defineHorizontalRule } from "@prosekit/extensions/horizontal-rule";
|
|
37
|
-
import {
|
|
37
|
+
import { AttrStep, ReplaceStep, Step, StepResult, Transform } from "@prosekit/pm/transform";
|
|
38
38
|
import { decodeString } from "micromark-util-decode-string";
|
|
39
39
|
import { normalizeIdentifier } from "micromark-util-normalize-identifier";
|
|
40
|
-
import { createListRenderingPlugin, createSafariInputMethodWorkaroundPlugin, createToggleCollapsedCommand, defaultAttributesGetter, findCheckboxInListItem, handleListMarkerMouseDown, joinListElements, listToDOM, unwrapListSlice, wrappingListInputRule } from "prosemirror-flat-list";
|
|
40
|
+
import { createListRenderingPlugin, createSafariInputMethodWorkaroundPlugin, createToggleCollapsedCommand, defaultAttributesGetter, enterCommand, findCheckboxInListItem, handleListMarkerMouseDown, joinListElements, listToDOM, unwrapListSlice, wrappingListInputRule } from "prosemirror-flat-list";
|
|
41
41
|
import { defineTableCellSpec, defineTableCommands, defineTableDropIndicator, defineTableEditingPlugin, defineTableHeaderCellSpec, defineTableRowSpec, defineTableSpec, deleteTable, isCellSelection } from "@prosekit/extensions/table";
|
|
42
42
|
import { closeHistory } from "@prosekit/pm/history";
|
|
43
43
|
import { registerResizableHandleElement, registerResizableRootElement } from "@prosekit/web/resizable";
|
|
@@ -2572,6 +2572,15 @@ function defineMeowdownHorizontalRule() {
|
|
|
2572
2572
|
return union(defineHorizontalRule(), defineHorizontalRuleMarkerAttr());
|
|
2573
2573
|
}
|
|
2574
2574
|
|
|
2575
|
+
//#endregion
|
|
2576
|
+
//#region src/utils/non-prose-attrs.ts
|
|
2577
|
+
const NON_PROSE_ATTRS = {
|
|
2578
|
+
spellcheck: "false",
|
|
2579
|
+
autocorrect: "off",
|
|
2580
|
+
autocapitalize: "off",
|
|
2581
|
+
writingsuggestions: "false"
|
|
2582
|
+
};
|
|
2583
|
+
|
|
2575
2584
|
//#endregion
|
|
2576
2585
|
//#region src/extensions/html-comment.ts
|
|
2577
2586
|
/**
|
|
@@ -2602,7 +2611,8 @@ function defineHTMLComment() {
|
|
|
2602
2611
|
attrs: { content: { default: "" } },
|
|
2603
2612
|
toDOM: (node) => ["div", {
|
|
2604
2613
|
"data-html-comment": node.attrs.content,
|
|
2605
|
-
style: "display: none"
|
|
2614
|
+
style: "display: none",
|
|
2615
|
+
...NON_PROSE_ATTRS
|
|
2606
2616
|
}],
|
|
2607
2617
|
parseDOM: [{
|
|
2608
2618
|
tag: "div[data-html-comment]",
|
|
@@ -3928,7 +3938,11 @@ function defineMdStrong() {
|
|
|
3928
3938
|
function defineMdCode() {
|
|
3929
3939
|
return defineMarkSpec({
|
|
3930
3940
|
name: "mdCode",
|
|
3931
|
-
toDOM: () => [
|
|
3941
|
+
toDOM: () => [
|
|
3942
|
+
"code",
|
|
3943
|
+
{ ...NON_PROSE_ATTRS },
|
|
3944
|
+
0
|
|
3945
|
+
],
|
|
3932
3946
|
parseDOM: [{ tag: "code" }]
|
|
3933
3947
|
});
|
|
3934
3948
|
}
|
|
@@ -3959,7 +3973,10 @@ function defineMdLinkUri() {
|
|
|
3959
3973
|
inclusive: false,
|
|
3960
3974
|
toDOM: () => [
|
|
3961
3975
|
"span",
|
|
3962
|
-
{
|
|
3976
|
+
{
|
|
3977
|
+
class: "md-link-uri",
|
|
3978
|
+
...NON_PROSE_ATTRS
|
|
3979
|
+
},
|
|
3963
3980
|
0
|
|
3964
3981
|
],
|
|
3965
3982
|
parseDOM: [{ tag: "span.md-link-uri" }]
|
|
@@ -5097,6 +5114,7 @@ var MathMarkView = class {
|
|
|
5097
5114
|
});
|
|
5098
5115
|
this.#contentDOM = document.createElement("span");
|
|
5099
5116
|
this.#contentDOM.className = "md-math-view-content";
|
|
5117
|
+
for (const [name, value] of Object.entries(NON_PROSE_ATTRS)) this.#contentDOM.setAttribute(name, value);
|
|
5100
5118
|
this.#dom.appendChild(this.#preview);
|
|
5101
5119
|
this.#dom.appendChild(this.#contentDOM);
|
|
5102
5120
|
this.#render();
|
|
@@ -5654,6 +5672,13 @@ function tryCoordsAtPos(view, pos, side) {
|
|
|
5654
5672
|
return isPointRect(coords) ? void 0 : coords;
|
|
5655
5673
|
}
|
|
5656
5674
|
|
|
5675
|
+
//#endregion
|
|
5676
|
+
//#region src/utils/line-break.ts
|
|
5677
|
+
function isAfterLineBreak($pos) {
|
|
5678
|
+
const { parentOffset, parent } = $pos;
|
|
5679
|
+
return parentOffset > 0 && parent.textBetween(parentOffset - 1, parentOffset) === "\n";
|
|
5680
|
+
}
|
|
5681
|
+
|
|
5657
5682
|
//#endregion
|
|
5658
5683
|
//#region src/extensions/caret-rect.ts
|
|
5659
5684
|
function findNativeCaretRect(view) {
|
|
@@ -5673,11 +5698,10 @@ function findNativeCaretRect(view) {
|
|
|
5673
5698
|
}
|
|
5674
5699
|
function findCoordsCaretRect(view) {
|
|
5675
5700
|
const state = view.state;
|
|
5676
|
-
const head = state.selection
|
|
5701
|
+
const { head, $head } = state.selection;
|
|
5677
5702
|
const runBefore = getHiddenRunBefore(state, head);
|
|
5678
5703
|
const runAfter = getHiddenRunAfter(state, head);
|
|
5679
|
-
const
|
|
5680
|
-
const afterLineBreak = $head.parentOffset > 0 && $head.parent.textBetween($head.parentOffset - 1, $head.parentOffset) === "\n";
|
|
5704
|
+
const afterLineBreak = isAfterLineBreak($head);
|
|
5681
5705
|
const preferredBeforeSide = runBefore == null && !afterLineBreak;
|
|
5682
5706
|
const probes = [[head, preferredBeforeSide], [head, !preferredBeforeSide]];
|
|
5683
5707
|
if (runBefore != null) probes.push([runBefore.from, true]);
|
|
@@ -5873,6 +5897,55 @@ function defineSelectDocBoundary() {
|
|
|
5873
5897
|
});
|
|
5874
5898
|
}
|
|
5875
5899
|
|
|
5900
|
+
//#endregion
|
|
5901
|
+
//#region src/extensions/soft-break.ts
|
|
5902
|
+
function canHoldSoftBreak($pos) {
|
|
5903
|
+
if (!isNodeOfType($pos.parent, "paragraph")) return false;
|
|
5904
|
+
const container = $pos.depth > 0 ? $pos.node($pos.depth - 1) : void 0;
|
|
5905
|
+
if (container == null) return true;
|
|
5906
|
+
return !isNodeOfType(container, "tableCell") && !isNodeOfType(container, "tableHeaderCell");
|
|
5907
|
+
}
|
|
5908
|
+
const splitBlockOnEnter = chainCommands(enterCommand, splitBlock);
|
|
5909
|
+
function isBeforeLineBreak($pos) {
|
|
5910
|
+
const { parentOffset, parent } = $pos;
|
|
5911
|
+
return parentOffset < parent.content.size && parent.textBetween(parentOffset, parentOffset + 1) === "\n";
|
|
5912
|
+
}
|
|
5913
|
+
const splitPendingSoftBreak = (state, dispatch, view) => {
|
|
5914
|
+
const { $from, empty } = state.selection;
|
|
5915
|
+
if (!empty || !canHoldSoftBreak($from)) return false;
|
|
5916
|
+
const inFront = isAfterLineBreak($from);
|
|
5917
|
+
if (!inFront && !isBeforeLineBreak($from)) return false;
|
|
5918
|
+
let split;
|
|
5919
|
+
if (!splitBlockOnEnter(state, (candidate) => {
|
|
5920
|
+
split = candidate;
|
|
5921
|
+
}, view) || split == null) return false;
|
|
5922
|
+
if (dispatch == null) return true;
|
|
5923
|
+
const start = inFront ? $from.pos - 1 : $from.pos;
|
|
5924
|
+
const side = inFront ? -1 : 1;
|
|
5925
|
+
const from = split.mapping.map(start, side);
|
|
5926
|
+
const to = split.mapping.map(start + 1, side);
|
|
5927
|
+
dispatch(split.delete(from, to).scrollIntoView());
|
|
5928
|
+
return true;
|
|
5929
|
+
};
|
|
5930
|
+
const insertSoftBreakText = (state, dispatch) => {
|
|
5931
|
+
if (!canHoldSoftBreak(state.selection.$from)) return false;
|
|
5932
|
+
dispatch?.(state.tr.insertText("\n").scrollIntoView());
|
|
5933
|
+
return true;
|
|
5934
|
+
};
|
|
5935
|
+
const softBreakCommand = chainCommands(newlineInCode, splitPendingSoftBreak, insertSoftBreakText);
|
|
5936
|
+
/**
|
|
5937
|
+
* Insert a markdown soft line break at the caret: a literal `\n` in the
|
|
5938
|
+
* paragraph's text. In a code block it writes the newline plain Enter writes
|
|
5939
|
+
* there. On a caret that already sits beside a soft break it splits the block
|
|
5940
|
+
* instead, because a paragraph cannot hold a blank line.
|
|
5941
|
+
*/
|
|
5942
|
+
function insertSoftBreak() {
|
|
5943
|
+
return softBreakCommand;
|
|
5944
|
+
}
|
|
5945
|
+
function defineSoftBreak() {
|
|
5946
|
+
return union(defineCommands({ insertSoftBreak }), defineKeymap({ "Shift-Enter": softBreakCommand }));
|
|
5947
|
+
}
|
|
5948
|
+
|
|
5876
5949
|
//#endregion
|
|
5877
5950
|
//#region src/extensions/system-substitution-guard.ts
|
|
5878
5951
|
const EM_DASH = "—";
|
|
@@ -5914,7 +5987,7 @@ function defineViewAttributes(attributes) {
|
|
|
5914
5987
|
//#endregion
|
|
5915
5988
|
//#region src/extensions/extension.ts
|
|
5916
5989
|
function defineEditorExtensionImpl(options) {
|
|
5917
|
-
return union(defineMeowdownParagraph(), defineDoc(), defineDocFrontmatterAttr(), defineText(), defineBlockquote(), defineMeowdownList(), defineHeading(), defineTable(), defineCodeBlock$1(), defineMeowdownHorizontalRule(), defineHTMLComment(), defineInlineMarks(), defineViewAttributes({ class: "meowdown-content" }), defineCodeBlockSyntaxHighlight(), defineCrossEditorDrag(), defineEscapeCollapse(), defineMoveBlock(), defineSelectDocBoundary(), defineInlineMarkPlugin(options), defineInlineToggle(), defineLinkCommands(), defineWikilink(), defineMath(), defineMarkMode(options.markMode ?? "focus"), defineClipboard(), defineScrollToSelection(), defineHiddenRunCaret(), defineSystemSubstitutionGuard(), defineAtomMarkNavigation({ marks: ATOM_SOURCE_MARK_NAMES.map((name) => ({
|
|
5990
|
+
return union(defineMeowdownParagraph(), defineDoc(), defineDocFrontmatterAttr(), defineText(), defineBlockquote(), defineMeowdownList(), defineHeading(), defineTable(), defineCodeBlock$1(), defineMeowdownHorizontalRule(), defineHTMLComment(), defineInlineMarks(), defineViewAttributes({ class: "meowdown-content" }), defineCodeBlockSyntaxHighlight(), defineCrossEditorDrag(), defineEscapeCollapse(), defineSoftBreak(), defineMoveBlock(), defineSelectDocBoundary(), defineInlineMarkPlugin(options), defineInlineToggle(), defineLinkCommands(), defineWikilink(), defineMath(), defineMarkMode(options.markMode ?? "focus"), defineClipboard(), defineScrollToSelection(), defineHiddenRunCaret(), defineSystemSubstitutionGuard(), defineAtomMarkNavigation({ marks: ATOM_SOURCE_MARK_NAMES.map((name) => ({
|
|
5918
5991
|
name,
|
|
5919
5992
|
modes: [
|
|
5920
5993
|
"hide",
|
|
@@ -7706,6 +7779,8 @@ var ImageMarkView = class {
|
|
|
7706
7779
|
this.#dom.className = "md-image-view md-atom-view";
|
|
7707
7780
|
this.#contentDOM = document.createElement("span");
|
|
7708
7781
|
this.#contentDOM.className = "md-image-view-content md-atom-view-content";
|
|
7782
|
+
this.#contentDOM.dataset.testid = "image-source";
|
|
7783
|
+
for (const [name, value] of Object.entries(NON_PROSE_ATTRS)) this.#contentDOM.setAttribute(name, value);
|
|
7709
7784
|
const preview = this.#renderPreview();
|
|
7710
7785
|
if (preview) {
|
|
7711
7786
|
preview.contentEditable = "false";
|
|
@@ -7865,6 +7940,7 @@ const EDITOR_KEY_BINDINGS = {
|
|
|
7865
7940
|
"Mod-5": "Heading 5",
|
|
7866
7941
|
"Mod-6": "Heading 6",
|
|
7867
7942
|
"Mod-.": "Fold or unfold a bullet",
|
|
7943
|
+
"Shift-Enter": "Insert a line break",
|
|
7868
7944
|
"Mod-Enter": "Follow the link under the caret, or cycle a checkbox task",
|
|
7869
7945
|
"Mod-Shift-Enter": "Cycle a circle checkbox task",
|
|
7870
7946
|
"Mod-Shift-7": "Ordered list",
|
|
@@ -8034,98 +8110,6 @@ function defineLinkPaste() {
|
|
|
8034
8110
|
})), Priority$1.high);
|
|
8035
8111
|
}
|
|
8036
8112
|
|
|
8037
|
-
//#endregion
|
|
8038
|
-
//#region src/utils/is-mark-step.ts
|
|
8039
|
-
function isMarkStep(step) {
|
|
8040
|
-
return step instanceof AddMarkStep || step instanceof AddNodeMarkStep || step instanceof RemoveMarkStep || step instanceof RemoveNodeMarkStep || step instanceof BatchSetMarkStep;
|
|
8041
|
-
}
|
|
8042
|
-
|
|
8043
|
-
//#endregion
|
|
8044
|
-
//#region src/extensions/spell-check.ts
|
|
8045
|
-
const SPELL_CHECK_PAUSE_TIMEOUT = 1200;
|
|
8046
|
-
function hasContentChanged(transactions) {
|
|
8047
|
-
for (const tr of transactions) for (const step of tr.steps) if (!isMarkStep(step)) return true;
|
|
8048
|
-
return false;
|
|
8049
|
-
}
|
|
8050
|
-
/**
|
|
8051
|
-
* Stop macOS from rewriting straight punctuation into "smart" punctuation as
|
|
8052
|
-
* the user types.
|
|
8053
|
-
*
|
|
8054
|
-
* On macOS, WebKit applies the system "smart quotes and dashes" substitution
|
|
8055
|
-
* inside `contenteditable` when `spellcheck` is true. Typing right after the hidden
|
|
8056
|
-
* `<!-- {"width":..,"height":..} -->` sizing comment that backs an image lets
|
|
8057
|
-
* it rewrite the `--` in `-->` into an em dash. which invalidates the comment so
|
|
8058
|
-
* meowdown can no longer parse it and it leaks into the note as literal text.
|
|
8059
|
-
*
|
|
8060
|
-
* We disable the `spellcheck` attribute for a few seconds before any doc
|
|
8061
|
-
* change transaction. This would prevent the smart punctuation substitution from happening.
|
|
8062
|
-
*/
|
|
8063
|
-
function createSpellCheckPluginState(spellCheck) {
|
|
8064
|
-
let view;
|
|
8065
|
-
let timeoutId;
|
|
8066
|
-
let paused = false;
|
|
8067
|
-
let currentValue;
|
|
8068
|
-
const update = () => {
|
|
8069
|
-
const dom = view && !view.isDestroyed && view.dom;
|
|
8070
|
-
if (!dom) return;
|
|
8071
|
-
const newValue = spellCheck && !paused;
|
|
8072
|
-
if (newValue !== currentValue) {
|
|
8073
|
-
currentValue = newValue;
|
|
8074
|
-
dom.spellcheck = newValue;
|
|
8075
|
-
}
|
|
8076
|
-
};
|
|
8077
|
-
const pause = () => {
|
|
8078
|
-
if (timeoutId) clearTimeout(timeoutId);
|
|
8079
|
-
paused = true;
|
|
8080
|
-
update();
|
|
8081
|
-
timeoutId = setTimeout(() => {
|
|
8082
|
-
paused = false;
|
|
8083
|
-
update();
|
|
8084
|
-
}, SPELL_CHECK_PAUSE_TIMEOUT);
|
|
8085
|
-
};
|
|
8086
|
-
return {
|
|
8087
|
-
pause,
|
|
8088
|
-
apply(transactions) {
|
|
8089
|
-
if (hasContentChanged(transactions)) pause();
|
|
8090
|
-
},
|
|
8091
|
-
view(editorView) {
|
|
8092
|
-
view = editorView;
|
|
8093
|
-
return { destroy() {
|
|
8094
|
-
view = void 0;
|
|
8095
|
-
} };
|
|
8096
|
-
}
|
|
8097
|
-
};
|
|
8098
|
-
}
|
|
8099
|
-
function createSpellCheckPlugin(spellCheck) {
|
|
8100
|
-
const spellCheckKey = new PluginKey("spell-check");
|
|
8101
|
-
return new Plugin({
|
|
8102
|
-
key: spellCheckKey,
|
|
8103
|
-
state: {
|
|
8104
|
-
init: () => {
|
|
8105
|
-
return createSpellCheckPluginState(spellCheck);
|
|
8106
|
-
},
|
|
8107
|
-
apply: (tr, pluginState) => {
|
|
8108
|
-
return pluginState;
|
|
8109
|
-
}
|
|
8110
|
-
},
|
|
8111
|
-
view(view) {
|
|
8112
|
-
return spellCheckKey.getState(view.state)?.view(view) || {};
|
|
8113
|
-
},
|
|
8114
|
-
props: { handleDOMEvents: { beforeinput: (view) => {
|
|
8115
|
-
spellCheckKey.getState(view.state)?.pause();
|
|
8116
|
-
} } },
|
|
8117
|
-
appendTransaction(transactions, state) {
|
|
8118
|
-
spellCheckKey.getState(state)?.apply(transactions);
|
|
8119
|
-
}
|
|
8120
|
-
});
|
|
8121
|
-
}
|
|
8122
|
-
/**
|
|
8123
|
-
* @deprecated This will be removed in future versions.
|
|
8124
|
-
*/
|
|
8125
|
-
function defineSpellCheckPlugin(spellCheck) {
|
|
8126
|
-
return definePlugin(createSpellCheckPlugin(spellCheck));
|
|
8127
|
-
}
|
|
8128
|
-
|
|
8129
8113
|
//#endregion
|
|
8130
8114
|
//#region src/extensions/substitution.ts
|
|
8131
8115
|
const SUBSTITUTION_RULES = [
|
|
@@ -8375,7 +8359,7 @@ var VirtualCaretView = class {
|
|
|
8375
8359
|
this.#renderCaret();
|
|
8376
8360
|
return;
|
|
8377
8361
|
}
|
|
8378
|
-
const nativeRect = findNativeCaretRect(view);
|
|
8362
|
+
const nativeRect = isAfterLineBreak(selection.$head) ? void 0 : findNativeCaretRect(view);
|
|
8379
8363
|
if (nativeRect && getIsTouchInput()) {
|
|
8380
8364
|
this.#renderTail();
|
|
8381
8365
|
this.#renderCaret();
|
|
@@ -8627,4 +8611,4 @@ function getVirtualElementFromRange(view, range) {
|
|
|
8627
8611
|
}
|
|
8628
8612
|
|
|
8629
8613
|
//#endregion
|
|
8630
|
-
export { EDITOR_KEY_BINDINGS, Priority, buildFileMarkdown, checkRoundTrip, codeBlockLanguages, collectReferenceDefinitions, defaultResolveImageUrl, defineBulletAfterHeading, defineCodeBlockPreviewPlugin, defineCodeBlockSyntaxHighlight, defineEditorExtension, defineEmbedPaste, defineExitBoundaryHandler, defineFileClickHandler, defineFilePaste, defineFileView, defineFollowLinkHandler, defineHTMLComment, defineImage, defineImageClickHandler, defineLinkClickHandler, defineLinkCommands, defineLinkEditKeymap, defineLinkHoverHandler, defineLinkPaste, defineMath, definePendingReplacementHandler, definePlaceholder, defineReadonly, defineSearchStatusHandler,
|
|
8614
|
+
export { EDITOR_KEY_BINDINGS, Priority, buildFileMarkdown, checkRoundTrip, codeBlockLanguages, collectReferenceDefinitions, defaultResolveImageUrl, defineBulletAfterHeading, defineCodeBlockPreviewPlugin, defineCodeBlockSyntaxHighlight, defineEditorExtension, defineEmbedPaste, defineExitBoundaryHandler, defineFileClickHandler, defineFilePaste, defineFileView, defineFollowLinkHandler, defineHTMLComment, defineImage, defineImageClickHandler, defineLinkClickHandler, defineLinkCommands, defineLinkEditKeymap, defineLinkHoverHandler, defineLinkPaste, defineMath, definePendingReplacementHandler, definePlaceholder, defineReadonly, defineSearchStatusHandler, defineSubstitution, defineTagClickHandler, defineViewAttributes, defineVirtualCaret, defineWikilinkClickHandler, defineWikilinkHoverHandler, defineWikilinkTrigger, docToMarkdown, formatFileSize, formatSizedWikiEmbed, getCodeTokens, getFileKind, getIsComposing, getLinkUnitAt, getMarkBuilders, getPendingReplacement, getSearchStatus, getSelectedText, getTableColumnAlign, getTextblockDisplayText, getVirtualElementFromRange, inlineTextToMarkChunks, inlineTextToMarkChunksWithContext, insertLink, isCodeBlockPreviewHiddenDecoration, isMarkOfType, isModEvent, isNodeOfType, isSelectionInTableCell, listenForTweetHeight, loadKaTeX, markdownToDoc, matchEmbed, parseWikiEmbed, removeLink, renderMathInto, updateLink, wikiEmbedBasename, withPriority };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meowdown/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.66.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"remark-stringify": "^11.0.0",
|
|
44
44
|
"unicode-by-name": "^0.2.0",
|
|
45
45
|
"unified": "^11.0.5",
|
|
46
|
-
"@meowdown/markdown": "^0.
|
|
46
|
+
"@meowdown/markdown": "^0.66.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@ocavue/tsconfig": "^0.7.1",
|