@baishuyun/ui-base 6.21.1 → 6.22.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/Amap/index.js +1 -1
- package/dist/Calendar/{Calendar-BaIHL7cB.js → Calendar-C9LHoXQc.js} +1 -1
- package/dist/Calendar/index.js +3 -3
- package/dist/Card/index.js +1 -1
- package/dist/CheckBox/index.js +1 -1
- package/dist/ColorPicker/index.js +1 -1
- package/dist/ConfigProvider/index.js +1 -1
- package/dist/DatePicker/{DatePicker-CbfmdBaK.js → DatePicker-ByZiiZPq.js} +1 -1
- package/dist/DatePicker/{DatePickerPanel-BDJYZs1q.js → DatePickerPanel-DiOVoMv4.js} +1 -1
- package/dist/DatePicker/index.js +2 -2
- package/dist/DropDown/index.js +1 -1
- package/dist/Editor/index.js +1063 -950
- package/dist/Gantt/index.js +1 -1
- package/dist/Icon/index.js +1 -1
- package/dist/InputTag/index.js +1 -1
- package/dist/Loading/index.js +1 -1
- package/dist/Modal/index.js +1 -1
- package/dist/NotFoundContent/index.js +1 -1
- package/dist/Overlay/index.js +1 -1
- package/dist/Radio/index.js +1 -1
- package/dist/ScrollBar/index.js +1 -1
- package/dist/Segmented/index.js +1 -1
- package/dist/Select/index.js +1 -1
- package/dist/Table/index.js +1 -1
- package/dist/Tabs/index.js +1 -1
- package/dist/Tooltip/index.js +1 -1
- package/dist/Tree/index.js +1 -1
- package/dist/components/Editor/context/EditorContainerContext.d.ts +2 -1
- package/dist/components/Editor/index.d.ts +1 -1
- package/dist/components/Editor/interface.d.ts +15 -0
- package/dist/components/Editor/plugins/DefaultTextStylePlugin.d.ts +1 -0
- package/dist/components/Editor/plugins/ImePendingFormatPlugin.d.ts +1 -0
- package/dist/components/Editor/utils/applyDefaultTextStyle.d.ts +2 -0
- package/dist/components/Editor/utils/imePendingFormat.d.ts +8 -0
- package/dist/components/Editor/utils/readTextFormats.d.ts +3 -1
- package/dist/components/Editor/utils/stripInlineStyleProperty.d.ts +1 -0
- package/dist/index.js +3 -3
- package/dist/style.css +1 -1
- package/dist/vendors/{version-CyVENVWD.js → version-DH5GPcND.js} +1 -1
- package/package.json +1 -1
package/dist/Gantt/index.js
CHANGED
package/dist/Icon/index.js
CHANGED
package/dist/InputTag/index.js
CHANGED
package/dist/Loading/index.js
CHANGED
package/dist/Modal/index.js
CHANGED
package/dist/Overlay/index.js
CHANGED
package/dist/Radio/index.js
CHANGED
package/dist/ScrollBar/index.js
CHANGED
package/dist/Segmented/index.js
CHANGED
package/dist/Select/index.js
CHANGED
package/dist/Table/index.js
CHANGED
package/dist/Tabs/index.js
CHANGED
package/dist/Tooltip/index.js
CHANGED
package/dist/Tree/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Dispatch, MutableRefObject, RefObject, SetStateAction } from 'react';
|
|
2
|
-
import { EditorAi, EditorAiMode, EditorAiPreset, EditorAiStatus, EditorUpload } from '../interface';
|
|
2
|
+
import { EditorAi, EditorAiMode, EditorAiPreset, EditorAiStatus, EditorDefaultTextStyle, EditorUpload } from '../interface';
|
|
3
3
|
export type EditorAiSession = {
|
|
4
4
|
originalHtml: string;
|
|
5
5
|
originalText?: string;
|
|
@@ -9,6 +9,7 @@ export type EditorAiSession = {
|
|
|
9
9
|
interface EditorContainerContextType {
|
|
10
10
|
containerRef: RefObject<HTMLDivElement | null>;
|
|
11
11
|
toolbarRef: RefObject<HTMLDivElement>;
|
|
12
|
+
defaultTextStyle: EditorDefaultTextStyle;
|
|
12
13
|
upload?: EditorUpload;
|
|
13
14
|
aiOpen: EditorAiMode | null;
|
|
14
15
|
setAiOpen: Dispatch<SetStateAction<EditorAiMode | null>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { Editor as default } from './Editor';
|
|
2
2
|
export { EditorHtmlPreview } from './EditorHtmlPreview';
|
|
3
|
-
export type { EditorUpload, EditorUploadContext, EditorUploadResult, EditorAi, EditorAiMode, EditorAiPreset, EditorAiStatus, EditorProps, EditorTheme, EditorContainerTheme, EditorToolbarFloating, EditorToolbarMode, EditorToolbarOffset, EditorToolbarPlacement, EditorToolbarProps, EditorToolbarSize, EditorToolbarTheme, } from './interface';
|
|
3
|
+
export type { EditorUpload, EditorUploadContext, EditorUploadResult, EditorAi, EditorAiMode, EditorAiPreset, EditorAiStatus, EditorProps, EditorTheme, EditorContainerTheme, EditorDefaultTextStyle, EditorToolbarFloating, EditorToolbarMode, EditorToolbarOffset, EditorToolbarPlacement, EditorToolbarProps, EditorToolbarSize, EditorToolbarTheme, } from './interface';
|
|
4
4
|
export { registerToolbarButton, unregisterToolbarButton, listRegisteredToolbarButtons, } from './ToolbarPlugin/Buttons';
|
|
5
5
|
export type { IconToolbarButtonName, TextToolbarButtonName, ToolbarButtonName, RegisteredToolbarButtonProps, } from './ToolbarPlugin/Buttons';
|
|
6
6
|
export type { ToolbarConfigButton } from './ToolbarPlugin/interface.d';
|
|
@@ -49,8 +49,18 @@ export interface EditorContainerTheme {
|
|
|
49
49
|
borderWidth?: string | number;
|
|
50
50
|
/** 根节点圆角 @default 4px */
|
|
51
51
|
borderRadius?: string | number;
|
|
52
|
+
/** 输入容器背景色;未传保持透明 */
|
|
53
|
+
bgColor?: string;
|
|
52
54
|
}
|
|
53
55
|
|
|
56
|
+
/** 实例级默认字符样式;只影响新输入与工具栏回落,不改写已有 HTML */
|
|
57
|
+
export type EditorDefaultTextStyle = {
|
|
58
|
+
color?: string;
|
|
59
|
+
/** `32` 与 `'32px'` 等价 */
|
|
60
|
+
fontSize?: string | number;
|
|
61
|
+
backgroundColor?: string;
|
|
62
|
+
};
|
|
63
|
+
|
|
54
64
|
export interface EditorTheme {
|
|
55
65
|
toolbar?: EditorToolbarTheme;
|
|
56
66
|
container?: EditorContainerTheme;
|
|
@@ -120,6 +130,11 @@ export type EditorProps = {
|
|
|
120
130
|
|
|
121
131
|
toolbar?: EditorToolbarProps;
|
|
122
132
|
|
|
133
|
+
/**
|
|
134
|
+
* 空稿输入与工具栏未着色时的字符样式,不改写已回填 HTML。
|
|
135
|
+
*/
|
|
136
|
+
defaultTextStyle?: EditorDefaultTextStyle;
|
|
137
|
+
|
|
123
138
|
/**
|
|
124
139
|
* 编辑器受控内容
|
|
125
140
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function DefaultTextStylePlugin(): null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ImePendingFormatPlugin(): null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type ImePendingFormat = {
|
|
2
|
+
format: number;
|
|
3
|
+
style: string;
|
|
4
|
+
offset: number;
|
|
5
|
+
key: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function $deferPendingFormatForIme(): ImePendingFormat | null;
|
|
8
|
+
export declare function $applyPendingFormatAfterIme(pending: ImePendingFormat): void;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { LexicalEditor } from 'lexical';
|
|
2
2
|
import { TextFormatsState } from '../ToolbarPlugin/context/TextFormatsContext';
|
|
3
|
+
import { EditorDefaultTextStyle } from '../interface';
|
|
4
|
+
export declare const createIdleTextFormats: (defaults?: EditorDefaultTextStyle) => TextFormatsState;
|
|
3
5
|
export declare const IDLE_TEXT_FORMATS: TextFormatsState;
|
|
4
|
-
export declare const $readTextFormats: (isFocused: boolean) => TextFormatsState;
|
|
6
|
+
export declare const $readTextFormats: (isFocused: boolean, defaults?: EditorDefaultTextStyle) => TextFormatsState;
|
|
5
7
|
export declare const applyWithLiveFormats: (editor: LexicalEditor, apply: (formats: TextFormatsState) => void) => void;
|
|
6
8
|
export declare const ensureEditableLiveFormats: (editor: LexicalEditor) => TextFormatsState;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./vendors/version-
|
|
1
|
+
import "./vendors/version-DH5GPcND.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";
|
|
@@ -29,8 +29,8 @@ import { t as O } from "./DropDown/DropDown-B_szM67V.js";
|
|
|
29
29
|
import { t as k } from "./Loading/Loading-Cherk9Ax.js";
|
|
30
30
|
import "./NotFoundContent/index.js";
|
|
31
31
|
import { t as A } from "./InputTag/InputTag-C_5nm0eo.js";
|
|
32
|
-
import { t as j } from "./Calendar/Calendar-
|
|
33
|
-
import { t as M } from "./DatePicker/DatePicker-
|
|
32
|
+
import { t as j } from "./Calendar/Calendar-C9LHoXQc.js";
|
|
33
|
+
import { t as M } from "./DatePicker/DatePicker-ByZiiZPq.js";
|
|
34
34
|
import "./DatePicker/pickerLocale-Brf7_Tnd.js";
|
|
35
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";
|
|
36
36
|
import "overlayscrollbars/overlayscrollbars.css";
|