@lobehub/editor 4.29.2 → 5.0.0-beta.1

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.
Files changed (105) hide show
  1. package/es/codemirror/components/CopyButton.js +1 -1
  2. package/es/codemirror/components/LanguageSelect.js +1 -3
  3. package/es/codemirror/components/MoreOptions.js +1 -2
  4. package/es/codemirror/components/Toolbar.js +1 -2
  5. package/es/codemirror/components/style.js +1 -1
  6. package/es/codemirror/style.js +1 -1
  7. package/es/codemirror/theme.js +1 -1
  8. package/es/editor-kernel/react/useAnchor.js +1 -1
  9. package/es/plugins/auto-complete/react/ReactAutoCompletePlugin.js +1 -1
  10. package/es/plugins/auto-complete/react/style.js +1 -1
  11. package/es/plugins/block/react/ReactBlockPlugin.js +2 -4
  12. package/es/plugins/block/react/style.js +1 -1
  13. package/es/plugins/code/react/CodeReactPlugin.js +1 -1
  14. package/es/plugins/code/react/style.js +1 -1
  15. package/es/plugins/codeblock/react/ReactCodeblockPlugin.js +1 -1
  16. package/es/plugins/codeblock/react/style.js +1 -1
  17. package/es/plugins/codemirror-block/react/CodemirrorNode.js +1 -3
  18. package/es/plugins/codemirror-block/react/MermaidPreview.js +1 -2
  19. package/es/plugins/collapsible/react/ReactCollapsiblePlugin.js +1 -1
  20. package/es/plugins/collapsible/react/style.js +74 -64
  21. package/es/plugins/common/react/Placeholder/style.js +1 -1
  22. package/es/plugins/common/react/ReactPlainText.js +1 -1
  23. package/es/plugins/common/react/style.js +1 -1
  24. package/es/plugins/file/react/components/ReactFile.js +1 -1
  25. package/es/plugins/file/react/style.js +1 -1
  26. package/es/plugins/hr/react/components/HRNode.js +1 -1
  27. package/es/plugins/hr/react/style.js +1 -1
  28. package/es/plugins/image/react/components/Image.js +1 -3
  29. package/es/plugins/image/react/components/ImageEditPopover.js +1 -3
  30. package/es/plugins/image/react/components/LazyImage.js +1 -1
  31. package/es/plugins/image/react/components/ResizeHandle.js +1 -1
  32. package/es/plugins/image/react/components/style.js +1 -1
  33. package/es/plugins/image/react/style.js +1 -1
  34. package/es/plugins/link/react/ReactLinkPlugin.js +1 -1
  35. package/es/plugins/link/react/components/LinkEdit.js +1 -3
  36. package/es/plugins/link/react/components/LinkToolbar.js +1 -1
  37. package/es/plugins/link/react/style.js +1 -1
  38. package/es/plugins/link-highlight/react/ReactLinkHighlightPlugin.js +1 -1
  39. package/es/plugins/link-highlight/react/style.js +1 -1
  40. package/es/plugins/list/react/style.js +1 -1
  41. package/es/plugins/litexml/react/DiffNodeToolbar/index.js +1 -3
  42. package/es/plugins/litexml/react/DiffNodeToolbar/style.js +1 -1
  43. package/es/plugins/litexml/react/TableRowDiffToolbar.js +1 -3
  44. package/es/plugins/litexml/react/style.js +1 -1
  45. package/es/plugins/markdown/react/index.js +1 -1
  46. package/es/plugins/math/react/components/MathEditorContainer.js +1 -1
  47. package/es/plugins/math/react/components/MathEditorContent.js +1 -2
  48. package/es/plugins/math/react/components/Placeholder.js +1 -3
  49. package/es/plugins/math/react/style.js +1 -1
  50. package/es/plugins/mention/react/components/Mention.js +1 -1
  51. package/es/plugins/mention/react/style.js +1 -1
  52. package/es/plugins/slash/react/components/DefaultSlashMenu.js +1 -2
  53. package/es/plugins/slash/service/i-slash-service.d.ts +1 -1
  54. package/es/plugins/table/react/TableActionMenu/ActionMenu.js +1 -1
  55. package/es/plugins/table/react/TableActionMenu/index.js +1 -1
  56. package/es/plugins/table/react/TableActionMenu/style.js +1 -1
  57. package/es/plugins/table/react/TableColController.js +1 -1
  58. package/es/plugins/table/react/TableController/style.js +1 -1
  59. package/es/plugins/table/react/TableControllerButton.js +2 -2
  60. package/es/plugins/table/react/TableControllerMenu.js +2 -2
  61. package/es/plugins/table/react/TableHoverActions/index.js +1 -2
  62. package/es/plugins/table/react/TableHoverActions/style.js +1 -1
  63. package/es/plugins/table/react/TableResize/index.js +2 -2
  64. package/es/plugins/table/react/TableResize/style.js +1 -1
  65. package/es/plugins/table/react/TableRowController.js +1 -1
  66. package/es/plugins/table/react/index.js +1 -1
  67. package/es/plugins/table/react/style.js +1 -1
  68. package/es/plugins/toolbar/react/index.js +1 -2
  69. package/es/plugins/toolbar/react/style.js +1 -1
  70. package/es/react/ChatInput/ChatInput.js +1 -2
  71. package/es/react/ChatInput/style.js +1 -1
  72. package/es/react/ChatInput/type.d.ts +1 -1
  73. package/es/react/ChatInputActionBar/ChatInputActionBar.js +1 -2
  74. package/es/react/ChatInputActionBar/style.js +1 -1
  75. package/es/react/ChatInputActionBar/type.d.ts +1 -1
  76. package/es/react/ChatInputActions/ChatInputActions.js +1 -2
  77. package/es/react/ChatInputActions/components/ActionItem.js +1 -1
  78. package/es/react/ChatInputActions/components/ActionRender.js +1 -1
  79. package/es/react/ChatInputActions/components/CollapsedActions.js +1 -2
  80. package/es/react/ChatInputActions/style.js +1 -1
  81. package/es/react/ChatInputActions/type.d.ts +4 -4
  82. package/es/react/CodeLanguageSelect/CodeLanguageSelect.js +1 -3
  83. package/es/react/CodeLanguageSelect/style.js +1 -1
  84. package/es/react/CodeLanguageSelect/type.d.ts +1 -1
  85. package/es/react/FloatActions/FloatActions.js +1 -2
  86. package/es/react/FloatActions/components/ActionItem.js +1 -1
  87. package/es/react/FloatActions/components/ActionRender.js +1 -1
  88. package/es/react/FloatActions/components/CollapsedActions.js +1 -2
  89. package/es/react/FloatActions/style.js +1 -1
  90. package/es/react/FloatActions/type.d.ts +4 -4
  91. package/es/react/SendButton/SendButton.js +1 -2
  92. package/es/react/SendButton/components/SendIcon.js +1 -1
  93. package/es/react/SendButton/components/StopIcon.js +1 -1
  94. package/es/react/SendButton/style.js +1 -1
  95. package/es/react/SendButton/type.d.ts +1 -1
  96. package/es/renderer/LexicalDiff.js +1 -1
  97. package/es/renderer/LexicalRenderer.js +1 -1
  98. package/es/renderer/diff/compute.js +2 -2
  99. package/es/renderer/diff/style.js +1 -1
  100. package/es/renderer/engine/render-builtin-node.js +2 -2
  101. package/es/renderer/renderers/codeblock.js +1 -1
  102. package/es/renderer/renderers/horizontalrule.js +1 -1
  103. package/es/renderer/renderers/mermaid.js +1 -1
  104. package/es/renderer/style.js +1 -1
  105. package/package.json +3 -5
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { ActionIcon } from "@lobehub/ui/base-ui";
2
+ import { ActionIcon } from "@lobehub/ui";
3
3
  import { Check, CopyIcon } from "lucide-react";
4
4
  import { useState } from "react";
5
5
  import { jsx } from "react/jsx-runtime";
@@ -1,11 +1,9 @@
1
1
  "use client";
2
2
  import { LANGUAGES } from "../constants.js";
3
3
  import { styles } from "./style.js";
4
- import { Select, Text } from "@lobehub/ui/base-ui";
4
+ import { Flexbox, MaterialFileTypeIcon, Select, Text, cx } from "@lobehub/ui";
5
5
  import { useMemo } from "react";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
- import { Flexbox, MaterialFileTypeIcon } from "@lobehub/ui";
8
- import { cx } from "antd-style";
9
7
  //#region src/codemirror/components/LanguageSelect.tsx
10
8
  const LanguageSelect = ({ selectedLang, onLanguageChange, options, labels, className }) => {
11
9
  const modes = options ?? LANGUAGES;
@@ -1,9 +1,8 @@
1
1
  "use client";
2
- import { ActionIcon, InputNumber, Switch, Text } from "@lobehub/ui/base-ui";
2
+ import { ActionIcon, Flexbox, InputNumber, Popover, Switch, Text } from "@lobehub/ui";
3
3
  import { MoreHorizontalIcon } from "lucide-react";
4
4
  import { useCallback } from "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
- import { Flexbox, Popover } from "@lobehub/ui";
7
6
  //#region src/codemirror/components/MoreOptions.tsx
8
7
  const MoreOptions = ({ tabSize, onTabSizeChange, useTabs, onUseTabsChange, showLineNumbers, onShowLineNumbersChange, labels }) => {
9
8
  const handleTabSizeChange = useCallback((value = 2) => {
@@ -2,10 +2,9 @@
2
2
  import { CopyButton } from "./CopyButton.js";
3
3
  import { LanguageSelect } from "./LanguageSelect.js";
4
4
  import { MoreOptions } from "./MoreOptions.js";
5
- import { ActionIcon } from "@lobehub/ui/base-ui";
5
+ import { ActionIcon, Flexbox } from "@lobehub/ui";
6
6
  import { ChevronDown, ChevronRight } from "lucide-react";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
- import { Flexbox } from "@lobehub/ui";
9
8
  //#region src/codemirror/components/Toolbar.tsx
10
9
  const Toolbar = ({ selectedLang, onLanguageChange, onCopy, tabSize, onTabSizeChange, useTabs, onUseTabsChange, showLineNumbers, onShowLineNumbersChange, onClick, expand, toggleExpand, labels, languageOptions, extra }) => {
11
10
  return /* @__PURE__ */ jsxs(Flexbox, {
@@ -1,4 +1,4 @@
1
- import { createStaticStyles } from "antd-style";
1
+ import { createStaticStyles } from "@lobehub/ui";
2
2
  //#region src/codemirror/components/style.ts
3
3
  const styles = createStaticStyles(({ css }) => ({ container: css`
4
4
  min-width: 160px;
@@ -1,4 +1,4 @@
1
- import { createStaticStyles } from "antd-style";
1
+ import { createStaticStyles } from "@lobehub/ui";
2
2
  //#region src/codemirror/style.ts
3
3
  const styles = createStaticStyles(({ css, cssVar }) => css`
4
4
  cursor: pointer;
@@ -1,4 +1,4 @@
1
- import { cssVar } from "antd-style";
1
+ import { cssVar } from "@lobehub/ui";
2
2
  //#region src/codemirror/theme.ts
3
3
  const lobeTheme = {
4
4
  "&": {
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { useLexicalComposerContext } from "./react-context.js";
3
- import { useMemo } from "react";
4
3
  import { LOBE_THEME_APP_ID } from "@lobehub/ui";
4
+ import { useMemo } from "react";
5
5
  //#region src/editor-kernel/react/useAnchor.ts
6
6
  const useAnchor = () => {
7
7
  const [editor] = useLexicalComposerContext();
@@ -3,8 +3,8 @@ import { createDebugLogger, init_debug } from "../../../utils/debug.js";
3
3
  import { useLexicalComposerContext } from "../../../editor-kernel/react/react-context.js";
4
4
  import { AutoCompletePlugin } from "../plugin/index.js";
5
5
  import { styles } from "./style.js";
6
+ import { cx } from "@lobehub/ui";
6
7
  import { useLayoutEffect, useRef } from "react";
7
- import { cx } from "antd-style";
8
8
  //#region src/plugins/auto-complete/react/ReactAutoCompletePlugin.tsx
9
9
  init_debug();
10
10
  const logger = createDebugLogger("react-plugin", "auto-complete");
@@ -1,4 +1,4 @@
1
- import { createStaticStyles } from "antd-style";
1
+ import { createStaticStyles } from "@lobehub/ui";
2
2
  //#region src/plugins/auto-complete/react/style.ts
3
3
  const styles = createStaticStyles(({ css }) => ({
4
4
  placeholderBlock: css`
@@ -10,12 +10,10 @@ import { createRuntimeContext } from "./core/runtime-context.js";
10
10
  import { collectDragBlocks, getBlockMeasureRect, getTableBlockRect, isTableBlockElement } from "./drag/drag-utils.js";
11
11
  import { startBlockDragSession } from "./drag/drag-session.js";
12
12
  import { ANCHOR_PADDING_CSS_VAR, styles } from "./style.js";
13
- import { Button } from "@lobehub/ui/base-ui";
13
+ import { Button, DropdownMenu, Icon, cx, useAppElement } from "@lobehub/ui";
14
14
  import { GripVerticalIcon, PlusIcon } from "lucide-react";
15
15
  import { useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
16
16
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
17
- import { DropdownMenu as DropdownMenu$1, Icon, useAppElement } from "@lobehub/ui";
18
- import { cx } from "antd-style";
19
17
  import { $findTableNode, $isTableSelection } from "@lexical/table";
20
18
  import { $getNodeByKey, $getSelection, $isRangeSelection } from "lexical";
21
19
  import { createPortal } from "react-dom";
@@ -634,7 +632,7 @@ const ReactBlockPlugin = (props) => {
634
632
  title,
635
633
  type: "text"
636
634
  }, item.key);
637
- }), /* @__PURE__ */ jsx(DropdownMenu$1, {
635
+ }), /* @__PURE__ */ jsx(DropdownMenu, {
638
636
  items: dropdownItems,
639
637
  onOpenChange: handleOperationMenuOpenChange,
640
638
  open: operationMenuOpen && operationMenuContext?.blockId === menuContext.blockId,
@@ -1,4 +1,4 @@
1
- import { createStaticStyles } from "antd-style";
1
+ import { createStaticStyles } from "@lobehub/ui";
2
2
  //#region src/plugins/block/react/style.ts
3
3
  const ANCHOR_PADDING_CSS_VAR = "--lobe-block-anchor-padding";
4
4
  /**
@@ -3,8 +3,8 @@ import { useLexicalComposerContext } from "../../../editor-kernel/react/react-co
3
3
  import { MarkdownPlugin } from "../../markdown/plugin/index.js";
4
4
  import { CodePlugin } from "../plugin/index.js";
5
5
  import { styles } from "./style.js";
6
+ import { cx } from "@lobehub/ui";
6
7
  import { useLayoutEffect } from "react";
7
- import { cx } from "antd-style";
8
8
  //#region src/plugins/code/react/CodeReactPlugin.tsx
9
9
  const ReactCodePlugin = ({ className, enableHotkey = true }) => {
10
10
  const [editor] = useLexicalComposerContext();
@@ -1,4 +1,4 @@
1
- import { createStaticStyles } from "antd-style";
1
+ import { createStaticStyles } from "@lobehub/ui";
2
2
  //#region src/plugins/code/react/style.ts
3
3
  const styles = createStaticStyles(({ css, cssVar }) => ({ codeInline: css`
4
4
  display: inline;
@@ -3,8 +3,8 @@ import { useLexicalComposerContext } from "../../../editor-kernel/react/react-co
3
3
  import { MarkdownPlugin } from "../../markdown/plugin/index.js";
4
4
  import { CodeblockPlugin } from "../plugin/index.js";
5
5
  import { styles } from "./style.js";
6
+ import { cx } from "@lobehub/ui";
6
7
  import { useLayoutEffect } from "react";
7
- import { cx } from "antd-style";
8
8
  //#region src/plugins/codeblock/react/ReactCodeblockPlugin.tsx
9
9
  const ReactCodeblockPlugin = ({ theme, shikiTheme }) => {
10
10
  const [editor] = useLexicalComposerContext();
@@ -1,4 +1,4 @@
1
- import { createStaticStyles } from "antd-style";
1
+ import { createStaticStyles } from "@lobehub/ui";
2
2
  //#region src/plugins/codeblock/react/style.ts
3
3
  const styles = createStaticStyles(({ css, cssVar }) => ({
4
4
  code: css`
@@ -8,12 +8,10 @@ import { SELECT_AFTER_CODEMIRROR_COMMAND, SELECT_BEFORE_CODEMIRROR_COMMAND } fro
8
8
  import { useLexicalNodeSelection } from "../../../editor-kernel/react/useLexicalNodeSelection.js";
9
9
  import MermaidPreview from "./MermaidPreview.js";
10
10
  import { useCodemirrorEditLock } from "./useCodemirrorEditLock.js";
11
- import { ActionIcon } from "@lobehub/ui/base-ui";
11
+ import { ActionIcon, Block, cx } from "@lobehub/ui";
12
12
  import { CodeXml, Eye } from "lucide-react";
13
13
  import { useCallback, useEffect, useMemo, useRef, useState } from "react";
14
14
  import { jsx, jsxs } from "react/jsx-runtime";
15
- import { Block } from "@lobehub/ui";
16
- import { cx } from "antd-style";
17
15
  import { debounce } from "es-toolkit/compat";
18
16
  import { $getSelection, $setSelection, COMMAND_PRIORITY_CRITICAL, KEY_DOWN_COMMAND } from "lexical";
19
17
  import { mergeRegister } from "@lexical/utils";
@@ -1,8 +1,7 @@
1
1
  "use client";
2
+ import { Mermaid, cssVar } from "@lobehub/ui";
2
3
  import { useEffect, useState } from "react";
3
4
  import { jsx } from "react/jsx-runtime";
4
- import { Mermaid } from "@lobehub/ui";
5
- import { cssVar } from "antd-style";
6
5
  //#region src/plugins/codemirror-block/react/MermaidPreview.tsx
7
6
  const MermaidPreview = ({ code }) => {
8
7
  const [error, setError] = useState(null);
@@ -3,8 +3,8 @@ import { useLexicalComposerContext } from "../../../editor-kernel/react/react-co
3
3
  import { MarkdownPlugin } from "../../markdown/plugin/index.js";
4
4
  import { CollapsiblePlugin } from "../plugin/index.js";
5
5
  import { styles } from "./style.js";
6
+ import { cx } from "@lobehub/ui";
6
7
  import { useLayoutEffect } from "react";
7
- import { cx } from "antd-style";
8
8
  //#region src/plugins/collapsible/react/ReactCollapsiblePlugin.tsx
9
9
  const ReactCollapsiblePlugin = ({ className }) => {
10
10
  const [editor] = useLexicalComposerContext();
@@ -1,67 +1,77 @@
1
- import { css } from "antd-style";
1
+ import { createStaticStyles } from "@lobehub/ui";
2
2
  //#region src/plugins/collapsible/react/style.ts
3
- const styles = css`
4
- position: relative;
5
- margin: 12px 0;
6
- padding: 14px 16px 14px 42px;
7
- border: 1px solid rgba(51, 103, 153, 0.72);
8
- border-radius: 8px;
9
-
10
- &[data-collapsible-collapsed='true'] {
11
- padding-block: 10px;
12
- }
13
-
14
- [data-collapsible-toggle='true'] {
15
- cursor: pointer;
16
- position: absolute;
17
- inset-block-start: 20px;
18
- inset-inline-start: 16px;
19
- width: 14px;
20
- height: 14px;
21
- padding: 0;
22
- border: 0;
23
- color: currentColor;
24
- background: transparent;
25
- }
26
-
27
- &[data-collapsible-collapsed='true'] > [data-collapsible-toggle='true'] {
28
- inset-block-start: 15px;
29
- }
30
-
31
- [data-collapsible-toggle='true']::before {
32
- content: '';
33
- display: block;
34
- width: 0;
35
- height: 0;
36
- margin: 3px 0 0 2px;
37
- border-style: solid;
38
- }
39
-
40
- &[data-collapsible-collapsed='false'] > [data-collapsible-toggle='true']::before {
41
- border-width: 7px 5px 0 5px;
42
- border-color: currentColor transparent transparent transparent;
43
- }
44
-
45
- &[data-collapsible-collapsed='true'] > [data-collapsible-toggle='true']::before {
46
- border-width: 5px 0 5px 7px;
47
- border-color: transparent transparent transparent currentColor;
48
- }
49
-
50
- [data-collapsible-content='true'] > *:first-child {
51
- margin-block-start: 0;
52
- }
53
-
54
- [data-collapsible-content='true'] > *:last-child {
55
- margin-block-end: 0;
56
- }
57
-
58
- &[data-collapsible-collapsed='true'] > [data-collapsible-content='true'] > *:first-child {
59
- margin-block-end: 0;
60
- }
61
-
62
- &[data-collapsible-collapsed='true'] > [data-collapsible-content='true'] > *:not(:first-child) {
63
- display: none !important;
64
- }
65
- `;
3
+ const styles = createStaticStyles(({ css }) => css`
4
+ position: relative;
5
+
6
+ margin-block: 12px;
7
+ margin-inline: 0;
8
+ padding-block: 14px;
9
+ padding-inline: 42px 16px;
10
+ border: 1px solid rgb(51 103 153 / 72%);
11
+ border-radius: 8px;
12
+
13
+ &[data-collapsible-collapsed='true'] {
14
+ padding-block: 10px;
15
+ }
16
+
17
+ [data-collapsible-toggle='true'] {
18
+ cursor: pointer;
19
+
20
+ position: absolute;
21
+ inset-block-start: 20px;
22
+ inset-inline-start: 16px;
23
+
24
+ width: 14px;
25
+ height: 14px;
26
+ padding: 0;
27
+ border: 0;
28
+
29
+ color: currentcolor;
30
+
31
+ background: transparent;
32
+ }
33
+
34
+ &[data-collapsible-collapsed='true'] > [data-collapsible-toggle='true'] {
35
+ inset-block-start: 15px;
36
+ }
37
+
38
+ [data-collapsible-toggle='true']::before {
39
+ content: '';
40
+
41
+ display: block;
42
+
43
+ width: 0;
44
+ height: 0;
45
+ margin-block: 3px 0;
46
+ margin-inline: 2px 0;
47
+ border-style: solid;
48
+ }
49
+
50
+ &[data-collapsible-collapsed='false'] > [data-collapsible-toggle='true']::before {
51
+ border-color: currentcolor transparent transparent;
52
+ border-width: 7px 5px 0;
53
+ }
54
+
55
+ &[data-collapsible-collapsed='true'] > [data-collapsible-toggle='true']::before {
56
+ border-color: transparent transparent transparent currentcolor;
57
+ border-width: 5px 0 5px 7px;
58
+ }
59
+
60
+ [data-collapsible-content='true'] > *:first-child {
61
+ margin-block-start: 0;
62
+ }
63
+
64
+ [data-collapsible-content='true'] > *:last-child {
65
+ margin-block-end: 0;
66
+ }
67
+
68
+ &[data-collapsible-collapsed='true'] > [data-collapsible-content='true'] > *:first-child {
69
+ margin-block-end: 0;
70
+ }
71
+
72
+ &[data-collapsible-collapsed='true'] > [data-collapsible-content='true'] > *:not(:first-child) {
73
+ display: none !important;
74
+ }
75
+ `);
66
76
  //#endregion
67
77
  export { styles };
@@ -1,4 +1,4 @@
1
- import { createStaticStyles } from "antd-style";
1
+ import { createStaticStyles } from "@lobehub/ui";
2
2
  //#region src/plugins/common/react/Placeholder/style.ts
3
3
  const styles = createStaticStyles(({ css, cssVar }) => ({
4
4
  placeholder: css`
@@ -6,9 +6,9 @@ import { CommonPlugin } from "../plugin/index.js";
6
6
  import { useDecorators } from "../../../editor-kernel/react/useDecorators.js";
7
7
  import Placeholder from "./Placeholder/index.js";
8
8
  import { styles, themeStyles } from "./style.js";
9
+ import { cx } from "@lobehub/ui";
9
10
  import { Children, memo, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
10
11
  import { jsx, jsxs } from "react/jsx-runtime";
11
- import { cx } from "antd-style";
12
12
  import { COMMAND_PRIORITY_EDITOR, KEY_DOWN_COMMAND } from "lexical";
13
13
  //#region src/plugins/common/react/ReactPlainText.tsx
14
14
  const ReactPlainText = memo(({ style, children, theme = {}, onChange, editable, className, variant, enableHotkey = true, enablePasteMarkdown = true, autoFormatMarkdown = true, markdownOption = true, pasteAsPlainText = false, pasteMarkdownAutoConvertThreshold, pasteVSCodeAsCodeBlock = true, onKeyDown, onFocus, onBlur, autoFocus, onPressEnter, onCompositionStart, onCompositionEnd, onContextMenu, onTextChange }) => {
@@ -1,4 +1,4 @@
1
- import { createStaticStyles, cx, keyframes } from "antd-style";
1
+ import { createStaticStyles, cx, keyframes } from "@lobehub/ui";
2
2
  //#region src/plugins/common/react/style.ts
3
3
  const cursorBlink = keyframes`
4
4
  to {
@@ -1,8 +1,8 @@
1
1
  import { useTranslation } from "../../../../editor-kernel/react/useTranslation.js";
2
2
  import { useLexicalNodeSelection } from "../../../../editor-kernel/react/useLexicalNodeSelection.js";
3
+ import { Center, MaterialFileTypeIcon } from "@lobehub/ui";
3
4
  import { useCallback, useEffect, useRef } from "react";
4
5
  import { jsx, jsxs } from "react/jsx-runtime";
5
- import { Center, MaterialFileTypeIcon } from "@lobehub/ui";
6
6
  import { CLICK_COMMAND, COMMAND_PRIORITY_LOW } from "lexical";
7
7
  //#region src/plugins/file/react/components/ReactFile.tsx
8
8
  const ReactFile = ({ className, editor, node }) => {
@@ -1,4 +1,4 @@
1
- import { createStaticStyles } from "antd-style";
1
+ import { createStaticStyles } from "@lobehub/ui";
2
2
  //#region src/plugins/file/react/style.ts
3
3
  const styles = createStaticStyles(({ css, cssVar }) => ({ file: css`
4
4
  user-select: none;
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import { useLexicalNodeSelection } from "../../../../editor-kernel/react/useLexicalNodeSelection.js";
3
3
  import { styles } from "../style.js";
4
+ import { cx } from "@lobehub/ui";
4
5
  import { useEffect } from "react";
5
6
  import { jsx } from "react/jsx-runtime";
6
- import { cx } from "antd-style";
7
7
  import { CLICK_COMMAND, COMMAND_PRIORITY_LOW } from "lexical";
8
8
  import { mergeRegister } from "@lexical/utils";
9
9
  //#region src/plugins/hr/react/components/HRNode.tsx
@@ -1,4 +1,4 @@
1
- import { createStaticStyles } from "antd-style";
1
+ import { createStaticStyles } from "@lobehub/ui";
2
2
  //#region src/plugins/hr/react/style.ts
3
3
  const styles = createStaticStyles(({ css, cssVar }) => css`
4
4
  cursor: pointer;
@@ -7,12 +7,10 @@ import BrokenImage from "./BrokenImage.js";
7
7
  import ImageEditPopover from "./ImageEditPopover.js";
8
8
  import LazyImage from "./LazyImage.js";
9
9
  import { ResizeHandle } from "./ResizeHandle.js";
10
- import { ActionIcon } from "@lobehub/ui/base-ui";
10
+ import { ActionIcon, Icon, cx, useImagePreview } from "@lobehub/ui";
11
11
  import { LoaderCircleIcon, ZoomInIcon } from "lucide-react";
12
12
  import { Suspense, memo, useCallback, useMemo, useRef, useState } from "react";
13
13
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
14
- import { Icon, useImagePreview } from "@lobehub/ui";
15
- import { cx } from "antd-style";
16
14
  import { COMMAND_PRIORITY_LOW, SELECTION_CHANGE_COMMAND } from "lexical";
17
15
  //#region src/plugins/image/react/components/Image.tsx
18
16
  function getResizedImageWidth(startWidth, deltaX, maxWidth) {
@@ -1,12 +1,10 @@
1
1
  import { useLexicalEditor } from "../../../../editor-kernel/react/useLexicalEditor.js";
2
2
  import { useTranslation } from "../../../../editor-kernel/react/useTranslation.js";
3
3
  import { useEditable } from "../../../../editor-kernel/react/useEditable.js";
4
- import { Button, Input } from "@lobehub/ui/base-ui";
4
+ import { Button, Flexbox, Icon, Input, Popover, cssVar } from "@lobehub/ui";
5
5
  import { LinkIcon, UploadIcon } from "lucide-react";
6
6
  import { memo, useCallback, useRef, useState } from "react";
7
7
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
- import { Flexbox, Icon, Popover } from "@lobehub/ui";
9
- import { cssVar } from "antd-style";
10
8
  //#region src/plugins/image/react/components/ImageEditPopover.tsx
11
9
  const ImageEditPopover = memo(({ children, node, handleUpload, onPickFile }) => {
12
10
  const [open, setOpen] = useState(false);
@@ -1,9 +1,9 @@
1
1
  import { styles } from "./style.js";
2
2
  import BrokenImage from "./BrokenImage.js";
3
3
  import { useSuspenseImage } from "./useSupenseImage.js";
4
+ import { cx } from "@lobehub/ui";
4
5
  import { useEffect, useState } from "react";
5
6
  import { jsx } from "react/jsx-runtime";
6
- import { cx } from "antd-style";
7
7
  //#region src/plugins/image/react/components/LazyImage.tsx
8
8
  function isSVG(src) {
9
9
  return src.toLowerCase().endsWith(".svg");
@@ -1,7 +1,7 @@
1
1
  import { styles } from "./style.js";
2
+ import { cx } from "@lobehub/ui";
2
3
  import { useCallback, useRef } from "react";
3
4
  import { jsx } from "react/jsx-runtime";
4
- import { cx } from "antd-style";
5
5
  //#region src/plugins/image/react/components/ResizeHandle.tsx
6
6
  const ResizeHandle = ({ imageRef, isBlock, onResize, onResizeEnd, onResizeStart, position }) => {
7
7
  const startWidthRef = useRef(0);
@@ -1,4 +1,4 @@
1
- import { createStaticStyles } from "antd-style";
1
+ import { createStaticStyles } from "@lobehub/ui";
2
2
  //#region src/plugins/image/react/components/style.ts
3
3
  const styles = createStaticStyles(({ css, cssVar }) => ({
4
4
  brokenImage: css`
@@ -1,4 +1,4 @@
1
- import { createStaticStyles } from "antd-style";
1
+ import { createStaticStyles } from "@lobehub/ui";
2
2
  //#region src/plugins/image/react/style.ts
3
3
  const styles = createStaticStyles(({ css, cssVar }) => ({
4
4
  image: css`
@@ -15,7 +15,7 @@ import LinkIframe from "./components/LinkIframe.js";
15
15
  import LinkToolbar from "./components/LinkToolbar.js";
16
16
  import SchemaLink from "./components/SchemaLink.js";
17
17
  import { LinkReactRendererRegistry, splitReactSchemaRules } from "./renderer-registry.js";
18
- import { toast } from "@lobehub/ui/base-ui";
18
+ import { toast } from "@lobehub/ui";
19
19
  import { useLayoutEffect, useMemo, useRef, useState } from "react";
20
20
  import { jsx, jsxs } from "react/jsx-runtime";
21
21
  //#region src/plugins/link/react/ReactLinkPlugin.tsx
@@ -4,12 +4,10 @@ import { UPDATE_LINK_TEXT_COMMAND } from "../../command/index.js";
4
4
  import { EDIT_LINK_CARD_COMMAND } from "../../node/LinkCardNode.js";
5
5
  import { cleanPosition, updatePosition } from "../../../../utils/updatePosition.js";
6
6
  import { styles } from "../style.js";
7
- import { Button, Input, Text } from "@lobehub/ui/base-ui";
7
+ import { Block, Button, Flexbox, Hotkey, Icon, Input, Text, cssVar } from "@lobehub/ui";
8
8
  import { BaselineIcon, LinkIcon } from "lucide-react";
9
9
  import { useCallback, useEffect, useRef, useState } from "react";
10
10
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
11
- import { Block, Flexbox, Hotkey, Icon } from "@lobehub/ui";
12
- import { cssVar } from "antd-style";
13
11
  import { COMMAND_PRIORITY_EDITOR, COMMAND_PRIORITY_NORMAL, KEY_ESCAPE_COMMAND, KEY_TAB_COMMAND, createCommand } from "lexical";
14
12
  import { mergeRegister } from "@lexical/utils";
15
13
  //#region src/plugins/link/react/components/LinkEdit.tsx
@@ -8,10 +8,10 @@ import { useEditable } from "../../../../editor-kernel/react/useEditable.js";
8
8
  import { cleanPosition, updatePosition } from "../../../../utils/updatePosition.js";
9
9
  import { styles } from "../style.js";
10
10
  import { $isLinkToolbarNode, convertLinkNodeByKeyToSchema, convertLinkToolbarNodeByKeyToLink, getLinkToolbarCapabilities, replaceNodeByKeyWithBlockCardNode, replaceNodeByKeyWithCardNode, replaceNodeByKeyWithIframeNode } from "../../conversion/index.js";
11
+ import { Flexbox, Icon } from "@lobehub/ui";
11
12
  import { CopyIcon, EditIcon, ExternalLinkIcon, GalleryHorizontalEndIcon, LinkIcon, PanelTopOpenIcon, PanelsTopLeftIcon, UnlinkIcon } from "lucide-react";
12
13
  import { memo, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
13
14
  import { jsx } from "react/jsx-runtime";
14
- import { Flexbox, Icon } from "@lobehub/ui";
15
15
  import { $getNodeByKey, $getSelection, $isRangeSelection, COMMAND_PRIORITY_NORMAL } from "lexical";
16
16
  import { mergeRegister } from "@lexical/utils";
17
17
  //#region src/plugins/link/react/components/LinkToolbar.tsx
@@ -1,4 +1,4 @@
1
- import { createStaticStyles, cx } from "antd-style";
1
+ import { createStaticStyles, cx } from "@lobehub/ui";
2
2
  //#region src/plugins/link/react/style.ts
3
3
  const styles = createStaticStyles(({ css, cssVar }) => {
4
4
  const position = css`
@@ -2,8 +2,8 @@ import { useLexicalComposerContext } from "../../../editor-kernel/react/react-co
2
2
  import { MarkdownPlugin } from "../../markdown/plugin/index.js";
3
3
  import { LinkHighlightPlugin } from "../plugin/index.js";
4
4
  import { styles } from "./style.js";
5
+ import { cx } from "@lobehub/ui";
5
6
  import { useLayoutEffect } from "react";
6
- import { cx } from "antd-style";
7
7
  //#region src/plugins/link-highlight/react/ReactLinkHighlightPlugin.tsx
8
8
  const ReactLinkHighlightPlugin = ({ className, enableHotkey = true, enablePasteAutoHighlight = true }) => {
9
9
  const [editor] = useLexicalComposerContext();
@@ -1,4 +1,4 @@
1
- import { createStaticStyles } from "antd-style";
1
+ import { createStaticStyles } from "@lobehub/ui";
2
2
  //#region src/plugins/link-highlight/react/style.ts
3
3
  const styles = createStaticStyles(({ css }) => {
4
4
  return { linkHighlight: css`
@@ -1,4 +1,4 @@
1
- import { createStaticStyles } from "antd-style";
1
+ import { createStaticStyles } from "@lobehub/ui";
2
2
  //#region src/plugins/list/react/style.ts
3
3
  const styles = createStaticStyles(({ css, cssVar }) => css`
4
4
  .editor_listUnordered&,
@@ -2,11 +2,9 @@ import { LexicalPortalContainer } from "../../../../editor-kernel/react/PortalCo
2
2
  import { LITEXML_DIFFNODE_COMMAND } from "../../command/symbols.js";
3
3
  import { useTranslation } from "../../../../editor-kernel/react/useTranslation.js";
4
4
  import { styles } from "./style.js";
5
- import { ActionIcon } from "@lobehub/ui/base-ui";
5
+ import { ActionIcon, Block, useThemeMode } from "@lobehub/ui";
6
6
  import { Check, X } from "lucide-react";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
- import { Block } from "@lobehub/ui";
9
- import { useThemeMode } from "antd-style";
10
8
  //#region src/plugins/litexml/react/DiffNodeToolbar/index.tsx
11
9
  const ReactDiffNodeToolbar = ({ editor, node }) => {
12
10
  const t = useTranslation();
@@ -1,4 +1,4 @@
1
- import { createStaticStyles } from "antd-style";
1
+ import { createStaticStyles } from "@lobehub/ui";
2
2
  //#region src/plugins/litexml/react/DiffNodeToolbar/style.ts
3
3
  const styles = createStaticStyles(({ css, cssVar }) => ({
4
4
  accept: css`
@@ -2,12 +2,10 @@ import { $isTableRowDiffNode } from "../node/TableRowDiffNode.js";
2
2
  import { LITEXML_DIFFNODE_COMMAND } from "../command/symbols.js";
3
3
  import { useTranslation } from "../../../editor-kernel/react/useTranslation.js";
4
4
  import { styles } from "./DiffNodeToolbar/style.js";
5
- import { ActionIcon } from "@lobehub/ui/base-ui";
5
+ import { ActionIcon, Block, useThemeMode } from "@lobehub/ui";
6
6
  import { Check, X } from "lucide-react";
7
7
  import { useCallback, useEffect, useRef, useState } from "react";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
- import { Block } from "@lobehub/ui";
10
- import { useThemeMode } from "antd-style";
11
9
  import { $getNearestNodeFromDOMNode } from "lexical";
12
10
  import { createPortal } from "react-dom";
13
11
  //#region src/plugins/litexml/react/TableRowDiffToolbar.tsx
@@ -1,4 +1,4 @@
1
- import { createStaticStyles } from "antd-style";
1
+ import { createStaticStyles } from "@lobehub/ui";
2
2
  //#region src/plugins/litexml/react/style.ts
3
3
  const styles = createStaticStyles(({ css, cssVar }) => css`
4
4
  position: relative;
@@ -3,8 +3,8 @@ import { useLexicalComposerContext } from "../../../editor-kernel/react/react-co
3
3
  import { INodePlugin } from "../../inode/plugin/index.js";
4
4
  import { MarkdownPlugin } from "../plugin/index.js";
5
5
  import { useTranslation } from "../../../editor-kernel/react/useTranslation.js";
6
- import { useLayoutEffect } from "react";
7
6
  import { toast } from "@lobehub/ui";
7
+ import { useLayoutEffect } from "react";
8
8
  //#region src/plugins/markdown/react/index.tsx
9
9
  const ReactMarkdownPlugin = () => {
10
10
  const [editor] = useLexicalComposerContext();
@@ -1,8 +1,8 @@
1
1
  import { cleanPosition, updatePosition } from "../../../../utils/updatePosition.js";
2
2
  import { styles } from "../style.js";
3
+ import { Flexbox, Popover } from "@lobehub/ui";
3
4
  import { memo, useCallback, useEffect, useRef, useState } from "react";
4
5
  import { jsx } from "react/jsx-runtime";
5
- import { Flexbox, Popover } from "@lobehub/ui";
6
6
  //#region src/plugins/math/react/components/MathEditorContainer.tsx
7
7
  const MathEditorContainer = memo(({ children, isBlockMode, mathDOM, onFocus, prev }) => {
8
8
  const anchorRef = useRef(null);