@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.
@@ -1,20 +1,21 @@
1
- import { A as $createCodeMirrorNode, At as createDebugLogger, B as Editor, C as $createCodeNode$1, D as getCodeInlineNode, Ft as init_debug, Gt as INodeHelper, H as DataSource, Ht as exportNodeToJSON$1, Jt as __exportAll, K as $closest, Kt as init_helper, L as CursorNode, Lt as $canShowPlaceholderCurry, N as $createCursorNode, O as styles$2, Ot as init_hotkey, R as cursorNodeSerialized, Rt as $isCursorInQuote, Tt as HotkeyEnum, Ut as init_utils$1, Vt as createBlockNode, Wt as sampleReader, Xt as __toESM, Y as $getNodeFromDOMNode, d as $isLinkHighlightNode, i as MentionNode, it as genServiceId, k as themeStyles, mt as noop, n as $createMentionNode, p as getLinkHighlightNode, q as $closestNodeType, qt as __commonJSMin, 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, zt as $isCursorInTable } from "./style-DjwW7ClE.js";
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 }) {