@lobehub/editor 4.14.0 → 4.15.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/es/{ReactSlashPlugin-DDlIT9Qd.js → ReactSlashPlugin-BiVy_Iwf.js} +7 -6
- package/es/codemirror-3POv7f__.js +923 -0
- package/es/codemirror.d.ts +264 -0
- package/es/codemirror.js +2 -0
- package/es/debug-CIvbNHJu.js +270 -0
- package/es/headless.d.ts +0 -1
- package/es/headless.js +0 -1
- package/es/{index-DJq7pYS0.d.ts → index-DHGp94p0.d.ts} +3 -4
- package/es/index.d.ts +3 -3
- package/es/index.js +96 -1011
- package/es/react.d.ts +3 -3
- package/es/react.js +8 -8
- package/es/renderer.d.ts +2 -2
- package/es/renderer.js +6 -6
- package/es/{style-DjwW7ClE.js → style-DADgHVA1.js} +3 -272
- package/es/{style-DejqW6OX.js → style-DMdPzCo-.js} +2 -2
- package/package.json +5 -1
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as __exportAll, l as __commonJSMin, n as createDebugLogger, p as __toESM, s as init_debug } from "./debug-CIvbNHJu.js";
|
|
2
|
+
import { A as $createCodeMirrorNode, At as $isCursorInQuote, B as Editor, C as $createCodeNode$1, D as getCodeInlineNode, Ft as init_utils$1, H as DataSource, It as sampleReader, K as $closest, L as CursorNode, Lt as INodeHelper, N as $createCursorNode, Nt as createBlockNode, O as styles$2, Ot as init_hotkey, Pt as exportNodeToJSON$1, R as cursorNodeSerialized, Rt as init_helper, Tt as HotkeyEnum, Y as $getNodeFromDOMNode, d as $isLinkHighlightNode, i as MentionNode, it as genServiceId, jt as $isCursorInTable, k as themeStyles, kt as $canShowPlaceholderCurry, mt as noop, n as $createMentionNode, p as getLinkHighlightNode, q as $closestNodeType, r as $isMentionNode, t as styles$3, tt as assert, u as $createLinkHighlightNode, ut as init_utils, vt as KernelPlugin, w as $isCodeInlineNode, yt as init_plugin, z as registerCursorNode } from "./style-DADgHVA1.js";
|
|
3
|
+
import { Menu, ShikiLobeTheme, toast } from "@lobehub/ui";
|
|
4
|
+
import { Children, Suspense, createContext, memo, use, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { createStaticStyles, cx } from "antd-style";
|
|
2
7
|
import { registerHistory } from "@lexical/history";
|
|
3
8
|
import { $isTableSelection } from "@lexical/table";
|
|
4
9
|
import { $caretFromPoint, $createLineBreakNode, $createNodeSelection, $createParagraphNode, $createPoint, $createRangeSelection, $createTabNode, $createTextNode, $getCaretRange, $getCaretRangeInDirection, $getCharacterOffsets, $getChildCaret, $getNearestNodeFromDOMNode, $getNodeByKey, $getRoot, $getSelection, $getSiblingCaret, $getTextPointCaret, $insertNodes, $isBlockElementNode, $isDecoratorNode, $isElementNode, $isLineBreakNode, $isNodeSelection, $isRangeSelection, $isRootOrShadowRoot, $isTabNode, $isTextNode, $isTextPointCaret, $normalizeCaret, $parseSerializedNode, $setSelection, $setSelectionFromCaretRange, CLICK_COMMAND, COLLABORATION_TAG, COMMAND_PRIORITY_CRITICAL, COMMAND_PRIORITY_EDITOR, COMMAND_PRIORITY_HIGH, COMMAND_PRIORITY_LOW, COMMAND_PRIORITY_NORMAL, CONTROLLED_TEXT_INSERTION_COMMAND, COPY_COMMAND, FORMAT_TEXT_COMMAND, HISTORIC_TAG, HISTORY_PUSH_TAG, INDENT_CONTENT_COMMAND, INSERT_LINE_BREAK_COMMAND, INSERT_PARAGRAPH_COMMAND, INSERT_TAB_COMMAND, IS_BOLD, IS_CODE, IS_ITALIC, IS_STRIKETHROUGH, IS_SUBSCRIPT, IS_SUPERSCRIPT, IS_UNDERLINE, KEY_ARROW_DOWN_COMMAND, KEY_ARROW_LEFT_COMMAND, KEY_ARROW_RIGHT_COMMAND, KEY_ARROW_UP_COMMAND, KEY_BACKSPACE_COMMAND, KEY_DOWN_COMMAND, KEY_ENTER_COMMAND, KEY_ESCAPE_COMMAND, KEY_TAB_COMMAND, MOVE_TO_END, MOVE_TO_START, OUTDENT_CONTENT_COMMAND, PASTE_COMMAND, ParagraphNode, REDO_COMMAND, SELECTION_CHANGE_COMMAND, SELECTION_INSERT_CLIPBOARD_NODES_COMMAND, TEXT_TYPE_TO_FORMAT, TabNode, TextNode, UNDO_COMMAND, createCommand, getDOMSelection, getNearestEditorFromDOMNode, resetRandomKey } from "lexical";
|
|
5
10
|
import { $createHeadingNode, $createQuoteNode, $isHeadingNode, $isQuoteNode, HeadingNode, QuoteNode, registerRichText } from "@lexical/rich-text";
|
|
6
11
|
import { $findMatchingParent, $wrapNodeInElement, CAN_USE_DOM, calculateZoomLevel, isHTMLElement as isHTMLElement$1, mergeRegister } from "@lexical/utils";
|
|
7
12
|
import { ErrorBoundary } from "react-error-boundary";
|
|
8
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
import { Children, Suspense, createContext, memo, use, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
10
13
|
import { $isAtNodeEnd, $setBlocksType } from "@lexical/selection";
|
|
11
14
|
import { registerDragonSupport } from "@lexical/dragon";
|
|
12
15
|
import { $createListItemNode, $insertList, $isListItemNode, $isListNode } from "@lexical/list";
|
|
13
16
|
import remarkCjkFriendly from "remark-cjk-friendly";
|
|
14
17
|
import { $getClipboardDataFromSelection, setLexicalClipboardDataTransfer } from "@lexical/clipboard";
|
|
15
18
|
import { $createCodeHighlightNode, $createCodeNode, $getEndOfCodeInLine, $getFirstCodeNodeOfLine, $getLastCodeNodeOfLine, $getStartOfCodeInLine, $isCodeHighlightNode, $isCodeNode, CodeHighlightNode, CodeNode, DEFAULT_CODE_LANGUAGE } from "@lexical/code-core";
|
|
16
|
-
import { Menu, ShikiLobeTheme, toast } from "@lobehub/ui";
|
|
17
|
-
import { createStaticStyles, cx } from "antd-style";
|
|
18
19
|
import { createPortal, flushSync } from "react-dom";
|
|
19
20
|
import { bundledLanguagesInfo, bundledLanguagesInfo as bundledLanguagesInfo$1, bundledThemesInfo } from "shiki";
|
|
20
21
|
import { createHighlighterCoreSync, isSpecialLang, isSpecialTheme, stringifyTokenStyle } from "@shikijs/core";
|
|
@@ -22,8 +23,8 @@ import { createJavaScriptRegexEngine } from "@shikijs/engine-javascript";
|
|
|
22
23
|
import Fuse from "fuse.js";
|
|
23
24
|
import { flip, offset, shift, useFloating } from "@floating-ui/react";
|
|
24
25
|
//#region src/editor-kernel/react/LexicalErrorBoundary.tsx
|
|
25
|
-
init_helper();
|
|
26
26
|
init_debug();
|
|
27
|
+
init_helper();
|
|
27
28
|
init_plugin();
|
|
28
29
|
init_utils();
|
|
29
30
|
function LexicalErrorBoundary({ children, onError }) {
|