@baishuyun/ui-base 6.16.1 → 6.18.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.
Files changed (147) hide show
  1. package/dist/Amap/Amap-CNsoge6e.js +826 -0
  2. package/dist/Amap/index.js +3 -10
  3. package/dist/Calendar/Calendar-Dk6FVbJ2.js +1608 -0
  4. package/dist/Calendar/index.js +10 -20
  5. package/dist/Card/index.js +2 -2
  6. package/dist/CheckBox/{CheckBox-B92dxWNo.js → CheckBox-CM24-quL.js} +1 -1
  7. package/dist/CheckBox/index.js +3 -3
  8. package/dist/ColorPicker/{ColorPicker-CPr5j6ZN.js → ColorPicker-B_wLqurt.js} +5 -5
  9. package/dist/ColorPicker/index.js +5 -5
  10. package/dist/ConfigProvider/index.js +1 -1
  11. package/dist/DatePicker/DatePicker-CItkTpdZ.js +111 -0
  12. package/dist/DatePicker/{DatePickerPanel-CtLwYPmz.js → DatePickerPanel-DJXmFihs.js} +3 -4
  13. package/dist/DatePicker/index.js +6 -8
  14. package/dist/DatePicker/pickerLocale-Brf7_Tnd.js +30 -0
  15. package/dist/DropDown/{DropDown-Bi0TsCc_.js → DropDown-B_szM67V.js} +86 -82
  16. package/dist/DropDown/index.js +8 -9
  17. package/dist/Editor/index.js +2934 -961
  18. package/dist/Gantt/index.js +3055 -197
  19. package/dist/Icon/index.js +1 -1
  20. package/dist/InputTag/{InputTag-BfZycXw4.js → InputTag-C_5nm0eo.js} +2 -2
  21. package/dist/InputTag/index.js +4 -4
  22. package/dist/Loading/{Loading-DpbJSRYf.js → Loading-Cherk9Ax.js} +1 -1
  23. package/dist/Loading/index.js +3 -3
  24. package/dist/Modal/index.js +2 -2
  25. package/dist/NotFoundContent/index.js +2 -2
  26. package/dist/Overlay/index.js +1 -1
  27. package/dist/Radio/index.js +2 -2
  28. package/dist/ScrollBar/{ScrollBar-N2pOLv-8.js → ScrollBar-IMTuAOF5.js} +1 -1
  29. package/dist/ScrollBar/index.js +2 -2
  30. package/dist/Segmented/{Segmented-BCQRrc65.js → Segmented-DpmwFerw.js} +1 -1
  31. package/dist/Segmented/index.js +2 -2
  32. package/dist/Select/{Select-CB5FqBui.js → Select-VIy6OKEj.js} +257 -253
  33. package/dist/Select/{SelectInputSearch-DUAv2vE4.js → SelectInputSearch-MApQHnU9.js} +1 -1
  34. package/dist/Select/index.js +12 -13
  35. package/dist/Table/Table-8ac6xLZv.js +808 -0
  36. package/dist/Table/index.js +4 -8
  37. package/dist/Tabs/{Tabs-B9uCGlxM.js → Tabs-DnoZ8BO0.js} +3 -3
  38. package/dist/Tabs/index.js +4 -4
  39. package/dist/Tooltip/{Tooltip-nJU13gX4.js → Tooltip-DBrt3t2r.js} +3 -3
  40. package/dist/Tooltip/index.js +3 -3
  41. package/dist/Tree/index.js +4 -4
  42. package/dist/components/Editor/EditorHtmlPreview.d.ts +3 -0
  43. package/dist/components/Editor/Preview/EditorPreview.d.ts +1 -1
  44. package/dist/components/Editor/Preview/HtmlPreview.d.ts +2 -3
  45. package/dist/components/Editor/Preview/PolishModal.d.ts +0 -1
  46. package/dist/components/Editor/Preview/TypesetModal.d.ts +0 -1
  47. package/dist/components/Editor/Preview/useAiPreviewHtml.d.ts +8 -0
  48. package/dist/components/Editor/__tests__/createTestEditor.d.ts +1 -0
  49. package/dist/components/Editor/commands/ImageCommands.d.ts +1 -0
  50. package/dist/components/Editor/constants/portableEditorStyles.d.ts +2 -0
  51. package/dist/components/Editor/context/EditorContainerContext.d.ts +3 -2
  52. package/dist/components/Editor/hooks/useEditorFocus.d.ts +1 -0
  53. package/dist/components/Editor/hooks/useTextFormatsState.d.ts +1 -2
  54. package/dist/components/Editor/index.d.ts +1 -0
  55. package/dist/components/Editor/nodes/ExtendedLinkNode.d.ts +9 -0
  56. package/dist/components/Editor/nodes/ImageComponent.d.ts +1 -0
  57. package/dist/components/Editor/nodes/ImageNode.d.ts +5 -2
  58. package/dist/components/Editor/utils/getToolbarItems.d.ts +14 -0
  59. package/dist/components/Editor/utils/placeProgrammaticCaret.d.ts +5 -0
  60. package/dist/components/Editor/utils/readTextFormats.d.ts +6 -0
  61. package/dist/components/Editor/utils/retainCodeSelection.d.ts +3 -0
  62. package/dist/index.js +28 -50
  63. package/dist/style.css +1 -1
  64. package/dist/vendors/Tree-D0Q1IZ2D.js +267 -0
  65. package/dist/vendors/{version-Dzs4mguZ.js → version-BucxnUKs.js} +1 -1
  66. package/package.json +1 -1
  67. package/dist/Amap/Amap-BLSziesG.js +0 -77
  68. package/dist/Amap/AmapCircle/index.js +0 -5
  69. package/dist/Amap/AmapCircle-2qupysHe.js +0 -55
  70. package/dist/Amap/AmapContext-CJBe6lld.js +0 -11
  71. package/dist/Amap/AmapMarker/index.js +0 -6
  72. package/dist/Amap/AmapMarker-xEqoVnFR.js +0 -153
  73. package/dist/Amap/AmapMarkerCluster/index.js +0 -6
  74. package/dist/Amap/AmapMarkerCluster-CvEQa3o9.js +0 -240
  75. package/dist/Amap/AmapProvider/index.js +0 -7
  76. package/dist/Amap/AmapProvider-B-R2DrkJ.js +0 -107
  77. package/dist/Amap/hooks/index.js +0 -4
  78. package/dist/Amap/hooks-BTcFpdd0.js +0 -121
  79. package/dist/Amap/useMarkerInfoWindowController-Cjx0xQXw.js +0 -94
  80. package/dist/Calendar/AllDaySection-pO7suGJM.js +0 -53
  81. package/dist/Calendar/Calendar-Cjagi7mU.js +0 -795
  82. package/dist/Calendar/CurrentTimeIndicator-BF3_INSL.js +0 -65
  83. package/dist/Calendar/EventCard-DKEZQRTp.js +0 -155
  84. package/dist/Calendar/TimeAxis-DUc6EL-j.js +0 -13
  85. package/dist/Calendar/TimeGrid-BV8x9VnF.js +0 -47
  86. package/dist/Calendar/colorUtils-BbeSMnOs.js +0 -55
  87. package/dist/Calendar/context/index.js +0 -3
  88. package/dist/Calendar/context-CamSpkj3.js +0 -21
  89. package/dist/Calendar/layout-CpOabFQ2.js +0 -300
  90. package/dist/Calendar/subcomponents/AllDaySection/index.js +0 -11
  91. package/dist/Calendar/subcomponents/CurrentTimeIndicator/index.js +0 -8
  92. package/dist/Calendar/subcomponents/EventCard/index.js +0 -9
  93. package/dist/Calendar/subcomponents/TimeAxis/index.js +0 -5
  94. package/dist/Calendar/subcomponents/TimeGrid/index.js +0 -7
  95. package/dist/Calendar/theme-Dc8hjcdo.js +0 -71
  96. package/dist/Calendar/utils/index.js +0 -111
  97. package/dist/Calendar/utils/layout/index.js +0 -4
  98. package/dist/Calendar/utils/theme/index.js +0 -3
  99. package/dist/DatePicker/DatePicker-neAwNSsc.js +0 -101
  100. package/dist/DatePicker/ensureDayjsPlugins-CSqhjLS7.js +0 -15
  101. package/dist/DatePicker/pickerLocale-CcPLUbZO.js +0 -15
  102. package/dist/DatePicker/style/index.js +0 -3
  103. package/dist/DatePicker/style-W7f5wyUb.js +0 -15
  104. package/dist/DropDown/style/index.js +0 -3
  105. package/dist/DropDown/style-DZpkarne.js +0 -9
  106. package/dist/Editor/Buttons-OwLs5bxR.js +0 -1841
  107. package/dist/Editor/ToolbarPlugin/Buttons/index.js +0 -21
  108. package/dist/Editor/constants/index.js +0 -61
  109. package/dist/Gantt/GanttChart/index.js +0 -21
  110. package/dist/Gantt/GanttChart-CDnF5qcc.js +0 -2292
  111. package/dist/Gantt/GanttHighlightContext-dtyoq-oj.js +0 -12
  112. package/dist/Gantt/GanttTable/index.js +0 -13
  113. package/dist/Gantt/GanttTable-fOv1Zn2-.js +0 -84
  114. package/dist/Gantt/GanttToolBar/index.js +0 -17
  115. package/dist/Gantt/GanttToolBar-BAoiWAHI.js +0 -120
  116. package/dist/Gantt/collapseKeys-BV_8sIA-.js +0 -160
  117. package/dist/Gantt/columnResize-Bkenlbab.js +0 -46
  118. package/dist/Gantt/constants-mEGQ1U1Q.js +0 -39
  119. package/dist/Gantt/highlightTarget-D3Nf9_7S.js +0 -25
  120. package/dist/Gantt/theme-B7Iap-tZ.js +0 -31
  121. package/dist/Gantt/timelineViewConfig-DNt7yi83.js +0 -118
  122. package/dist/Gantt/utils/index.js +0 -7
  123. package/dist/Gantt/utils/theme/index.js +0 -3
  124. package/dist/Select/style/index.js +0 -3
  125. package/dist/Select/style-C4A8kUd1.js +0 -9
  126. package/dist/Table/Table-3LSO0xSH.js +0 -545
  127. package/dist/Table/constants-D7wLH8Qy.js +0 -25
  128. package/dist/Table/hooks/index.js +0 -3
  129. package/dist/Table/hooks-DSBl2e4O.js +0 -108
  130. package/dist/Table/processRowspan-B6HMqw0Q.js +0 -144
  131. package/dist/Table/style/index.js +0 -3
  132. package/dist/Table/style-B8Cw8HJe.js +0 -9
  133. package/dist/Table/utils/index.js +0 -3
  134. package/dist/Tree/utils/index.js +0 -26
  135. package/dist/vendors/Tree-DSl4lDjx.js +0 -248
  136. /package/dist/Card/{Card-rJeWgxu5.js → Card-DAz0dvA3.js} +0 -0
  137. /package/dist/CheckBox/{CheckBox-DOK5N7z6.js → CheckBox-CcHskTz_.js} +0 -0
  138. /package/dist/Modal/{Modal-CRKitOOj.js → Modal-eZijJ7CB.js} +0 -0
  139. /package/dist/NotFoundContent/{NotFoundContent-BLmzWNBi.js → NotFoundContent-DJUQ0_2D.js} +0 -0
  140. /package/dist/Radio/{Radio-CX9cUqb7.js → Radio-D9jhW7K6.js} +0 -0
  141. /package/dist/vendors/{animations-Dn_5xJ7B.js → animations-ISccYUE3.js} +0 -0
  142. /package/dist/vendors/{cssVars-l4-kP_14.js → cssVars-UpriQzph.js} +0 -0
  143. /package/dist/vendors/{mergeRefs-TiJ0xjUN.js → mergeRefs-mEH9TBYV.js} +0 -0
  144. /package/dist/vendors/{useFloatingOverlay-B3M9k8nj.js → useFloatingOverlay-B66lOL8v.js} +0 -0
  145. /package/dist/vendors/{useFloatingPortal-VpzL-EPh.js → useFloatingPortal-DJ1iKmW-.js} +0 -0
  146. /package/dist/vendors/{useLatchedPopupPortalRoot-4fVhqVT4.js → useLatchedPopupPortalRoot-CC6af8t-.js} +0 -0
  147. /package/dist/vendors/{useLocale-D31qCCff.js → useLocale-Be4e7Xfn.js} +0 -0
@@ -1,10 +1,6 @@
1
- import "../vendors/version-Dzs4mguZ.js";
1
+ import "../vendors/version-BucxnUKs.js";
2
2
  import "../ScrollBar/style-D26azwz6.js";
3
3
  import "../vendors/LocaleContext-DXQoOKM2.js";
4
- import "../vendors/useLocale-D31qCCff.js";
5
- import { a as e, n as t, t as n } from "./constants-D7wLH8Qy.js";
6
- import { a as r, c as i, d as a, f as o, n as s, o as c, r as l, t as u, u as d } from "./processRowspan-B6HMqw0Q.js";
7
- import { n as f, t as p } from "./Table-3LSO0xSH.js";
8
- import { n as m, t as h } from "./hooks-DSBl2e4O.js";
9
- import { t as g } from "./style-B8Cw8HJe.js";
10
- export { n as COLUMN_DEFAULTS, t as DEFAULT_CONFIG, e as TABLE_DOM, p as Table, p as default, f as TableBody, r as calculateFixedOffset, c as expandLeafColumns, u as getCellRowspan, i as getColumnsWidth, d as getRowKey, s as processRowspan, g as resolveTableThemeVars, l as shouldRenderCell, a as sortData, o as splitFixedColumns, h as useColumnResize, m as useTableVirtual };
4
+ import "../vendors/useLocale-Be4e7Xfn.js";
5
+ import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g } from "./Table-8ac6xLZv.js";
6
+ export { o as COLUMN_DEFAULTS, a as DEFAULT_CONFIG, e as TABLE_DOM, h as Table, h as default, t as TableBody, c as calculateFixedOffset, g as expandLeafColumns, d as getCellRowspan, r as getColumnsWidth, i as getRowKey, m as processRowspan, u as resolveTableThemeVars, n as shouldRenderCell, f as sortData, l as splitFixedColumns, p as useColumnResize, s as useTableVirtual };
@@ -1,8 +1,8 @@
1
1
  import { t as e } from "../Icon/Icon-DrdQOEJE.js";
2
2
  import { a as t, i as n } from "../Overlay/OverlayContext-CVSFoyqN.js";
3
- import { t as r } from "../vendors/useLocale-D31qCCff.js";
4
- import { r as i } from "../vendors/animations-Dn_5xJ7B.js";
5
- import { t as a } from "../vendors/useFloatingPortal-VpzL-EPh.js";
3
+ import { t as r } from "../vendors/useLocale-Be4e7Xfn.js";
4
+ import { r as i } from "../vendors/animations-ISccYUE3.js";
5
+ import { t as a } from "../vendors/useFloatingPortal-DJ1iKmW-.js";
6
6
  import { isString as o } from "lodash-es";
7
7
  import { jsx as s, jsxs as c } from "react/jsx-runtime";
8
8
  import { createContext as l, useCallback as u, useContext as d, useLayoutEffect as f, useMemo as p, useRef as m, useState as h } from "react";
@@ -1,8 +1,8 @@
1
- import "../vendors/version-Dzs4mguZ.js";
1
+ import "../vendors/version-BucxnUKs.js";
2
2
  import "../Icon/Icon-DrdQOEJE.js";
3
3
  import "../vendors/LocaleContext-DXQoOKM2.js";
4
4
  import "../Overlay/OverlayContext-CVSFoyqN.js";
5
- import "../vendors/useLocale-D31qCCff.js";
6
- import "../vendors/useFloatingPortal-VpzL-EPh.js";
7
- import { i as e, n as t, r as n, t as r } from "./Tabs-B9uCGlxM.js";
5
+ import "../vendors/useLocale-Be4e7Xfn.js";
6
+ import "../vendors/useFloatingPortal-DJ1iKmW-.js";
7
+ import { i as e, n as t, r as n, t as r } from "./Tabs-DnoZ8BO0.js";
8
8
  export { e as TABS_TYPE, n as TabPanel, r as TabSelect, t as default };
@@ -1,7 +1,7 @@
1
1
  import { a as e, i as t } from "../Overlay/OverlayContext-CVSFoyqN.js";
2
- import { t as n } from "../vendors/animations-Dn_5xJ7B.js";
3
- import { t as r } from "../vendors/useLatchedPopupPortalRoot-4fVhqVT4.js";
4
- import { n as i } from "../vendors/mergeRefs-TiJ0xjUN.js";
2
+ import { t as n } from "../vendors/animations-ISccYUE3.js";
3
+ import { t as r } from "../vendors/useLatchedPopupPortalRoot-CC6af8t-.js";
4
+ import { n as i } from "../vendors/mergeRefs-mEH9TBYV.js";
5
5
  import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
6
6
  import { Fragment as c, cloneElement as l, createContext as u, isValidElement as d, useCallback as f, useEffect as ee, useMemo as p, useRef as te, useState as ne } from "react";
7
7
  import { useControllableValue as re } from "ahooks";
@@ -1,5 +1,5 @@
1
- import "../vendors/version-Dzs4mguZ.js";
1
+ import "../vendors/version-BucxnUKs.js";
2
2
  import "../Overlay/OverlayContext-CVSFoyqN.js";
3
- import "../vendors/useLatchedPopupPortalRoot-4fVhqVT4.js";
4
- import { n as e, t } from "./Tooltip-nJU13gX4.js";
3
+ import "../vendors/useLatchedPopupPortalRoot-CC6af8t-.js";
4
+ import { n as e, t } from "./Tooltip-DBrt3t2r.js";
5
5
  export { e as TooltipFloatingContext, t as default };
@@ -1,6 +1,6 @@
1
- import "../vendors/version-Dzs4mguZ.js";
1
+ import "../vendors/version-BucxnUKs.js";
2
2
  import "../Icon/Icon-DrdQOEJE.js";
3
- import { t as e } from "../vendors/Tree-DSl4lDjx.js";
4
- import "../CheckBox/CheckBox-DOK5N7z6.js";
5
- import "../Radio/Radio-CX9cUqb7.js";
3
+ import { t as e } from "../vendors/Tree-D0Q1IZ2D.js";
4
+ import "../CheckBox/CheckBox-CcHskTz_.js";
5
+ import "../Radio/Radio-D9jhW7K6.js";
6
6
  export { e as Tree };
@@ -0,0 +1,3 @@
1
+ export declare const EditorHtmlPreview: ({ html }: {
2
+ html: string;
3
+ }) => import("react").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { EditorAiStatus } from '../interface';
2
- /** loading 时把 LCS 预览合到下一帧;ready/error 立刻算,避免应用按钮闪一下。 */
2
+ /** loading 时把预览合到下一帧;ready/error 立刻算,避免应用按钮闪一下。 */
3
3
  export declare function usePolishProposedHtml(enabled: boolean, originalHtml: string, text: string, status: EditorAiStatus | undefined): string;
4
4
  type EditorPreviewProps = {
5
5
  maxLength?: number;
@@ -1,5 +1,4 @@
1
- type HtmlPreviewProps = {
1
+ declare const HtmlPreview: ({ html }: {
2
2
  html: string;
3
- };
4
- declare const HtmlPreview: React.FC<HtmlPreviewProps>;
3
+ }) => import("react").JSX.Element | null;
5
4
  export default HtmlPreview;
@@ -1,7 +1,6 @@
1
1
  import { EditorAiPreset, EditorAiStatus } from '../interface';
2
2
  type PolishModalProps = {
3
3
  status: EditorAiStatus;
4
- reasoning?: string;
5
4
  errorMessage?: string;
6
5
  originalHtml: string;
7
6
  proposedHtml: string;
@@ -1,7 +1,6 @@
1
1
  import { EditorAiStatus } from '../interface';
2
2
  type TypesetModalProps = {
3
3
  status: EditorAiStatus;
4
- reasoning?: string;
5
4
  errorMessage?: string;
6
5
  originalHtml: string;
7
6
  proposedHtml: string;
@@ -0,0 +1,8 @@
1
+ import { EditorAiStatus } from '../interface';
2
+ export declare const toPreviewHtml: (html: string, status?: EditorAiStatus) => string;
3
+ export declare const useAiPreviewHtml: ({ enabled, status, revision, compute, }: {
4
+ enabled: boolean;
5
+ status: EditorAiStatus | undefined;
6
+ revision: string;
7
+ compute: () => string;
8
+ }) => string;
@@ -0,0 +1 @@
1
+ export declare const createTestEditor: () => import('lexical').LexicalEditor;
@@ -5,5 +5,6 @@ export interface InsertImagePayload {
5
5
  width?: number;
6
6
  height?: number;
7
7
  dataId?: string;
8
+ dataSrc?: string;
8
9
  }
9
10
  export declare const INSERT_INLINE_IMAGE_COMMAND: LexicalCommand<InsertImagePayload>;
@@ -9,3 +9,5 @@ export declare const PORTABLE_CODE_STYLES: Record<string, string>;
9
9
  export declare const PORTABLE_TABLE_STYLES: Record<string, string>;
10
10
  export declare const PORTABLE_CELL_STYLES: Record<string, string>;
11
11
  export declare const PORTABLE_HEADER_CELL_STYLES: Record<string, string>;
12
+ /** 抵消 normalize 的 line-height:0 / relative,避免大字号画进上一块。 */
13
+ export declare const PORTABLE_SUP_SUB_STYLES: Record<string, string>;
@@ -22,13 +22,14 @@ interface EditorContainerContextType {
22
22
  }
23
23
  export type EditorAiStream = {
24
24
  text: string;
25
- reasoning?: string;
26
25
  status?: EditorAiStatus;
27
26
  errorMessage?: string;
28
27
  };
29
28
  declare const EditorContainerContext: import('react').Context<EditorContainerContextType | null>;
30
29
  declare const EditorAiStreamContext: import('react').Context<EditorAiStream>;
30
+ declare const EditorAiReasoningContext: import('react').Context<string | undefined>;
31
31
  export declare const useEditorContainer: () => EditorContainerContextType;
32
32
  export declare const useEditorAiStream: () => EditorAiStream;
33
- export { EditorAiStreamContext };
33
+ export declare const useEditorAiReasoning: () => string | undefined;
34
+ export { EditorAiStreamContext, EditorAiReasoningContext };
34
35
  export default EditorContainerContext;
@@ -0,0 +1 @@
1
+ export declare const useEditorFocus: () => boolean;
@@ -1,2 +1 @@
1
- import { TextFormatsState } from '../ToolbarPlugin/context/TextFormatsContext';
2
- export declare function useTextFormatsState(): TextFormatsState;
1
+ export declare const useTextFormatsState: () => import('../ToolbarPlugin/context/TextFormatsContext').TextFormatsState;
@@ -1,4 +1,5 @@
1
1
  export { Editor as default } from './Editor';
2
+ export { EditorHtmlPreview } from './EditorHtmlPreview';
2
3
  export type { EditorUpload, EditorUploadContext, EditorUploadResult, EditorAi, EditorAiMode, EditorAiPreset, EditorAiStatus, EditorProps, EditorTheme, EditorContainerTheme, EditorToolbarFloating, EditorToolbarMode, EditorToolbarOffset, EditorToolbarPlacement, EditorToolbarProps, EditorToolbarSize, EditorToolbarTheme, } from './interface';
3
4
  export { registerToolbarButton, unregisterToolbarButton, listRegisteredToolbarButtons, } from './ToolbarPlugin/Buttons';
4
5
  export type { IconToolbarButtonName, TextToolbarButtonName, ToolbarButtonName, RegisteredToolbarButtonProps, } from './ToolbarPlugin/Buttons';
@@ -0,0 +1,9 @@
1
+ import { LinkNode, LinkAttributes, SerializedLinkNode } from '@lexical/link';
2
+ import { NodeKey } from 'lexical';
3
+ export declare class ExtendedLinkNode extends LinkNode {
4
+ constructor(url?: string, attributes?: LinkAttributes, key?: NodeKey);
5
+ static getType(): string;
6
+ static clone(node: ExtendedLinkNode): ExtendedLinkNode;
7
+ static importJSON(serializedNode: SerializedLinkNode): ExtendedLinkNode;
8
+ sanitizeUrl(url: string): string;
9
+ }
@@ -6,6 +6,7 @@ interface ImageComponentProps {
6
6
  width?: number;
7
7
  height?: number;
8
8
  dataId?: string;
9
+ dataSrc?: string;
9
10
  nodeKey: NodeKey;
10
11
  }
11
12
  declare const ImageComponent: React.FC<ImageComponentProps>;
@@ -6,6 +6,7 @@ export interface ImagePayload {
6
6
  width?: number;
7
7
  height?: number;
8
8
  dataId?: string;
9
+ dataSrc?: string;
9
10
  key?: NodeKey;
10
11
  }
11
12
  export type SerializedImageNode = Spread<{
@@ -14,6 +15,7 @@ export type SerializedImageNode = Spread<{
14
15
  width?: number;
15
16
  height?: number;
16
17
  dataId?: string;
18
+ dataSrc?: string;
17
19
  }, SerializedLexicalNode>;
18
20
  export declare class ImageNode extends DecoratorNode<ReactNode> {
19
21
  __src: string;
@@ -21,9 +23,10 @@ export declare class ImageNode extends DecoratorNode<ReactNode> {
21
23
  __width?: number;
22
24
  __height?: number;
23
25
  __dataId?: string;
26
+ __dataSrc?: string;
24
27
  static getType(): string;
25
28
  static clone(node: ImageNode): ImageNode;
26
- constructor(src: string, altText?: string, width?: number, height?: number, key?: NodeKey, dataId?: string);
29
+ constructor(src: string, altText?: string, width?: number, height?: number, key?: NodeKey, dataId?: string, dataSrc?: string);
27
30
  createDOM(): HTMLElement;
28
31
  updateDOM(): false;
29
32
  exportDOM(): {
@@ -48,7 +51,7 @@ export declare class ImageNode extends DecoratorNode<ReactNode> {
48
51
  exportJSON(): SerializedImageNode;
49
52
  isInline(): boolean;
50
53
  }
51
- export declare function $createImageNode({ src, altText, width, height, dataId, key, }: ImagePayload): ImageNode;
54
+ export declare function $createImageNode({ src, altText, width, height, dataId, dataSrc, key, }: ImagePayload): ImageNode;
52
55
  export declare function $isImageNode(node: LexicalNode | null | undefined): node is ImageNode;
53
56
  declare function convertImageElement(domNode: Node): null | DOMConversionOutput;
54
57
  export {};
@@ -0,0 +1,14 @@
1
+ import { EditorToolbarProps } from '../interface';
2
+ export type ToolbarItem = {
3
+ kind: 'button';
4
+ key: string;
5
+ name: string;
6
+ props?: Record<string, any>;
7
+ } | {
8
+ kind: 'divider';
9
+ key: string;
10
+ } | {
11
+ kind: 'language';
12
+ key: 'code-language';
13
+ };
14
+ export declare const getToolbarItems: (config: NonNullable<EditorToolbarProps["config"]>, inCodeBlock: boolean, inSourceMode: boolean) => ToolbarItem[];
@@ -0,0 +1,5 @@
1
+ import { LexicalEditor } from 'lexical';
2
+ export declare const $placeProgrammaticCaret: (focused: boolean) => void;
3
+ export declare const $placeCaretIfFocused: (editor: LexicalEditor) => void;
4
+ export declare const $ensureRangeSelection: () => void;
5
+ export declare const ensureEditableRangeSelection: (editor: LexicalEditor) => void;
@@ -0,0 +1,6 @@
1
+ import { LexicalEditor } from 'lexical';
2
+ import { TextFormatsState } from '../ToolbarPlugin/context/TextFormatsContext';
3
+ export declare const IDLE_TEXT_FORMATS: TextFormatsState;
4
+ export declare const $readTextFormats: (isFocused: boolean) => TextFormatsState;
5
+ export declare const applyWithLiveFormats: (editor: LexicalEditor, apply: (formats: TextFormatsState) => void) => void;
6
+ export declare const ensureEditableLiveFormats: (editor: LexicalEditor) => TextFormatsState;
@@ -0,0 +1,3 @@
1
+ import { NodeKey } from 'lexical';
2
+ /** Restore caret only when it already lives in this CodeNode. Highlight must not steal it. */
3
+ export declare const $updateAndRetainSelection: (nodeKey: NodeKey, updateFn: () => boolean) => void;
package/dist/index.js CHANGED
@@ -1,59 +1,37 @@
1
- import "./vendors/version-Dzs4mguZ.js";
1
+ import "./vendors/version-BucxnUKs.js";
2
2
  import "./ScrollBar/style-D26azwz6.js";
3
3
  import { t as e } from "./Icon/Icon-DrdQOEJE.js";
4
4
  import "./vendors/LocaleContext-DXQoOKM2.js";
5
5
  import { r as t, t as n } from "./vendors/ConfigProvider-gZYvcwIQ.js";
6
6
  import { a as r, i, n as a, t as o } from "./Overlay/OverlayContext-CVSFoyqN.js";
7
- import "./Amap/AmapContext-CJBe6lld.js";
8
- import { t as s } from "./Amap/AmapProvider-B-R2DrkJ.js";
9
- import { t as c } from "./Amap/Amap-BLSziesG.js";
10
- import { n as l, t as u } from "./Amap/hooks-BTcFpdd0.js";
11
- import { t as d } from "./Amap/AmapCircle-2qupysHe.js";
12
- import "./Amap/useMarkerInfoWindowController-Cjx0xQXw.js";
13
- import { t as f } from "./Amap/AmapMarker-xEqoVnFR.js";
14
- import { t as p } from "./Amap/AmapMarkerCluster-CvEQa3o9.js";
7
+ import { a as s, i as c, n as l, o as u, r as d, s as f, t as p } from "./Amap/Amap-CNsoge6e.js";
15
8
  import "./Overlay/index.js";
16
- import { t as m } from "./Card/Card-rJeWgxu5.js";
17
- import { t as h } from "./Modal/Modal-CRKitOOj.js";
18
- import { t as g } from "./ColorPicker/ColorPicker-CPr5j6ZN.js";
19
- import "./vendors/useFloatingOverlay-B3M9k8nj.js";
20
- import "./vendors/useLocale-D31qCCff.js";
21
- import "./vendors/useLatchedPopupPortalRoot-4fVhqVT4.js";
22
- import { t as _ } from "./Segmented/Segmented-BCQRrc65.js";
23
- import { n as v, t as y } from "./Tooltip/Tooltip-nJU13gX4.js";
24
- import { t as b } from "./Select/Select-CB5FqBui.js";
25
- import "./Select/SelectInputSearch-DUAv2vE4.js";
26
- import { t as x } from "./vendors/Tree-DSl4lDjx.js";
27
- import "./CheckBox/CheckBox-DOK5N7z6.js";
28
- import { t as S } from "./CheckBox/CheckBox-B92dxWNo.js";
29
- import { t as C } from "./Radio/Radio-CX9cUqb7.js";
30
- import { t as w } from "./NotFoundContent/NotFoundContent-BLmzWNBi.js";
31
- import { t as T } from "./ScrollBar/ScrollBar-N2pOLv-8.js";
32
- import "./vendors/useFloatingPortal-VpzL-EPh.js";
33
- import "./Select/style-C4A8kUd1.js";
9
+ import { t as m } from "./Card/Card-DAz0dvA3.js";
10
+ import { t as h } from "./Modal/Modal-eZijJ7CB.js";
11
+ import { t as g } from "./ColorPicker/ColorPicker-B_wLqurt.js";
12
+ import "./vendors/useFloatingOverlay-B66lOL8v.js";
13
+ import "./vendors/useLocale-Be4e7Xfn.js";
14
+ import "./vendors/useLatchedPopupPortalRoot-CC6af8t-.js";
15
+ import { t as _ } from "./Segmented/Segmented-DpmwFerw.js";
16
+ import { n as v, t as y } from "./Tooltip/Tooltip-DBrt3t2r.js";
17
+ import { t as b } from "./Select/Select-VIy6OKEj.js";
18
+ import "./Select/SelectInputSearch-MApQHnU9.js";
19
+ import { t as x } from "./vendors/Tree-D0Q1IZ2D.js";
20
+ import "./CheckBox/CheckBox-CcHskTz_.js";
21
+ import { t as S } from "./CheckBox/CheckBox-CM24-quL.js";
22
+ import { t as C } from "./Radio/Radio-D9jhW7K6.js";
23
+ import { t as w } from "./NotFoundContent/NotFoundContent-DJUQ0_2D.js";
24
+ import { t as T } from "./ScrollBar/ScrollBar-IMTuAOF5.js";
25
+ import "./vendors/useFloatingPortal-DJ1iKmW-.js";
34
26
  import "./Tree/index.js";
35
- import { n as E, t as D } from "./Tabs/Tabs-B9uCGlxM.js";
36
- import { t as O } from "./DropDown/DropDown-Bi0TsCc_.js";
37
- import "./DropDown/style-DZpkarne.js";
38
- import { t as k } from "./Loading/Loading-DpbJSRYf.js";
27
+ import { n as E, t as D } from "./Tabs/Tabs-DnoZ8BO0.js";
28
+ import { t as O } from "./DropDown/DropDown-B_szM67V.js";
29
+ import { t as k } from "./Loading/Loading-Cherk9Ax.js";
39
30
  import "./NotFoundContent/index.js";
40
- import { t as A } from "./InputTag/InputTag-BfZycXw4.js";
41
- import "./Calendar/context-CamSpkj3.js";
42
- import { t as j } from "./Calendar/Calendar-Cjagi7mU.js";
43
- import { t as M } from "./DatePicker/DatePicker-neAwNSsc.js";
44
- import "./DatePicker/ensureDayjsPlugins-CSqhjLS7.js";
45
- import "./DatePicker/pickerLocale-CcPLUbZO.js";
46
- import "./DatePicker/style-W7f5wyUb.js";
47
- import "./Calendar/layout-CpOabFQ2.js";
48
- import "./Calendar/TimeAxis-DUc6EL-j.js";
49
- import "./Calendar/TimeGrid-BV8x9VnF.js";
50
- import "./Calendar/CurrentTimeIndicator-BF3_INSL.js";
51
- import "./Calendar/EventCard-DKEZQRTp.js";
52
- import "./Calendar/AllDaySection-pO7suGJM.js";
53
- import "./Calendar/theme-Dc8hjcdo.js";
54
- import { a as N, c as P, d as F, f as I, n as L, o as R, r as z, t as B, u as V } from "./Table/processRowspan-B6HMqw0Q.js";
55
- import { t as H } from "./Table/Table-3LSO0xSH.js";
56
- import { n as U, t as W } from "./Table/hooks-DSBl2e4O.js";
57
- import { t as G } from "./Table/style-B8Cw8HJe.js";
31
+ import { t as A } from "./InputTag/InputTag-C_5nm0eo.js";
32
+ import { t as j } from "./Calendar/Calendar-Dk6FVbJ2.js";
33
+ import { t as M } from "./DatePicker/DatePicker-CItkTpdZ.js";
34
+ import "./DatePicker/pickerLocale-Brf7_Tnd.js";
35
+ import { c as N, d as P, f as F, i as I, l as L, m as R, n as z, o as B, p as V, r as H, s as U, t as W, u as G } from "./Table/Table-8ac6xLZv.js";
58
36
  import "overlayscrollbars/overlayscrollbars.css";
59
- export { c as Amap, d as AmapCircle, f as AmapMarker, p as AmapMarkerCluster, s as AmapProvider, j as Calendar, m as Card, S as Checkbox, g as ColorPicker, n as ConfigProvider, M as DatePicker, O as DropDown, e as Icon, A as InputTag, k as Loading, t as LocalTheme, h as Modal, w as NotFoundContent, o as OVERLAY_Z_BASE, a as OVERLAY_Z_STEP, i as OverlayProvider, C as Radio, C as Ratio, T as ScrollBar, _ as Segmented, b as Select, D as TabSelect, H as Table, E as Tabs, y as Tooltip, v as TooltipFloatingContext, x as Tree, N as calculateFixedOffset, R as expandLeafColumns, B as getCellRowspan, P as getColumnsWidth, V as getRowKey, L as processRowspan, G as resolveTableThemeVars, z as shouldRenderCell, F as sortData, I as splitFixedColumns, l as useAmap, W as useColumnResize, u as useCurrentLocation, r as useOverlayZIndex, U as useTableVirtual };
37
+ export { u as Amap, d as AmapCircle, l as AmapMarker, p as AmapMarkerCluster, f as AmapProvider, j as Calendar, m as Card, S as Checkbox, g as ColorPicker, n as ConfigProvider, M as DatePicker, O as DropDown, e as Icon, A as InputTag, k as Loading, t as LocalTheme, h as Modal, w as NotFoundContent, o as OVERLAY_Z_BASE, a as OVERLAY_Z_STEP, i as OverlayProvider, C as Radio, C as Ratio, T as ScrollBar, _ as Segmented, b as Select, D as TabSelect, W as Table, E as Tabs, y as Tooltip, v as TooltipFloatingContext, x as Tree, L as calculateFixedOffset, G as expandLeafColumns, B as getCellRowspan, P as getColumnsWidth, F as getRowKey, U as processRowspan, z as resolveTableThemeVars, N as shouldRenderCell, V as sortData, R as splitFixedColumns, s as useAmap, H as useColumnResize, c as useCurrentLocation, r as useOverlayZIndex, I as useTableVirtual };