@meowdown/react 0.78.0 → 0.79.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/dist/index.js +4 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { clsx } from "clsx/lite";
|
|
2
2
|
import { Fragment, ViewTransition, cloneElement, createElement, memo, startTransition, useCallback, useDeferredValue, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useReducer, useRef, useState } from "react";
|
|
3
|
-
import { buildFileMarkdown, codeBlockLanguages, collectReferenceDefinitions, defaultResolveImageUrl, defaultResolveXPost, defaultResolveYouTubeVideo, defineCodeBlockPreviewPlugin, defineEditorExtension, defineLinkEditKeymap, defineLinkHoverHandler, definePendingReplacementHandler, defineSearchStatusHandler,
|
|
3
|
+
import { buildFileMarkdown, codeBlockLanguages, collectReferenceDefinitions, defaultResolveImageUrl, defaultResolveXPost, defaultResolveYouTubeVideo, defineCodeBlockPreviewPlugin, defineEditorExtension, defineLinkEditKeymap, defineLinkHoverHandler, definePendingReplacementHandler, defineSearchStatusHandler, defineVirtualCaret, defineWikilinkHoverHandler, dismissLinkHover, docToMarkdown, docToParagraphMarkdown, formatFileSize, getCodeTokens, getFileKind, getLinkText, getMarkBuilders, getPendingReplacement, getSearchStatus, getSelectedText, getTableColumnAlign, getTextblockDisplayText, getVirtualElementFromRange, inlineTextToMarkChunksWithContext, isCodeBlockPreviewHiddenDecoration, isLinkTextForHref, isModEvent, isNodeOfType, isReferenceDefinitionNode, isSelectionInTableCell, loadKaTeX, markdownToDoc, normalizeHref, paragraphMarkdownToDoc, parsePostEmbedSnapshot, renderMathInto, updateEditorConfig } from "@meowdown/core";
|
|
4
4
|
import { clamp } from "@ocavue/utils";
|
|
5
5
|
import { canUseRegexLookbehind, createEditor, defineDocChangeHandler, defineUpdateHandler, isTextSelection, union } from "@prosekit/core";
|
|
6
6
|
import { Selection, TextSelection } from "@prosekit/pm/state";
|
|
@@ -1919,6 +1919,7 @@ function ProseKitEditor({ markMode = "focus", initialMarkdown, singleParagraph =
|
|
|
1919
1919
|
bulletAfterHeading,
|
|
1920
1920
|
backspaceDeletesEmptyFirstBlock,
|
|
1921
1921
|
substitution,
|
|
1922
|
+
singleParagraph,
|
|
1922
1923
|
placeholder,
|
|
1923
1924
|
readOnly,
|
|
1924
1925
|
spellCheck,
|
|
@@ -1950,6 +1951,7 @@ function ProseKitEditor({ markMode = "focus", initialMarkdown, singleParagraph =
|
|
|
1950
1951
|
bulletAfterHeading,
|
|
1951
1952
|
backspaceDeletesEmptyFirstBlock,
|
|
1952
1953
|
substitution,
|
|
1954
|
+
singleParagraph,
|
|
1953
1955
|
placeholder,
|
|
1954
1956
|
readOnly,
|
|
1955
1957
|
spellCheck,
|
|
@@ -1958,7 +1960,7 @@ function ProseKitEditor({ markMode = "focus", initialMarkdown, singleParagraph =
|
|
|
1958
1960
|
referenceDefinitions
|
|
1959
1961
|
]);
|
|
1960
1962
|
const [editor] = useState(() => {
|
|
1961
|
-
const baseExtension =
|
|
1963
|
+
const baseExtension = defineEditorExtension(config);
|
|
1962
1964
|
const extension = CodeBlockView === false ? baseExtension : union(baseExtension, defineCodeBlockView(CodeBlockView));
|
|
1963
1965
|
const editor = createEditor({ extension });
|
|
1964
1966
|
if (initialMarkdown || singleParagraph) editor.setContent(singleParagraph ? paragraphMarkdownToDoc(initialMarkdown ?? "", editor.nodes) : markdownToDoc(initialMarkdown ?? "", {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meowdown/react",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.79.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@base-ui/react": "^1.8.0",
|
|
25
|
-
"@meowdown/core": "0.
|
|
25
|
+
"@meowdown/core": "0.80.0",
|
|
26
26
|
"@meowdown/embed": "0.3.1",
|
|
27
27
|
"@meowdown/markdown": "0.76.0",
|
|
28
28
|
"@ocavue/utils": "^1.8.0",
|