@baishuyun/ui-base 6.17.0 → 6.19.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-BlsUX2vX.js → Calendar-DEr4d6DN.js} +2 -2
- package/dist/Calendar/index.js +4 -4
- 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-BRwPZeui.js → DatePicker-Bzvz3bI6.js} +1 -1
- package/dist/DatePicker/{DatePickerPanel-UwjSXS-U.js → DatePickerPanel-CaAOuWM_.js} +1 -1
- package/dist/DatePicker/index.js +2 -2
- package/dist/DropDown/index.js +1 -1
- package/dist/Editor/index.js +1217 -1121
- 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/{Segmented-DpmwFerw.js → Segmented-BkTy5v9V.js} +7 -3
- package/dist/Segmented/index.js +2 -2
- 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/Preview/EditorPreview.d.ts +0 -3
- package/dist/components/Editor/Preview/PolishModal.d.ts +0 -1
- package/dist/components/Editor/Preview/Thinking.d.ts +2 -5
- package/dist/components/Editor/Preview/TypesetModal.d.ts +0 -1
- package/dist/components/Editor/Preview/useAiPreviewHtml.d.ts +8 -0
- package/dist/components/Editor/Preview/useAutoScroll.d.ts +9 -0
- package/dist/components/Editor/commands/ImageCommands.d.ts +1 -0
- package/dist/components/Editor/constants/ai.d.ts +0 -2
- package/dist/components/Editor/context/EditorContainerContext.d.ts +3 -2
- package/dist/components/Editor/interface.d.ts +4 -4
- package/dist/components/Editor/nodes/ImageComponent.d.ts +1 -0
- package/dist/components/Editor/nodes/ImageNode.d.ts +5 -2
- package/dist/components/Editor/utils/applyAiPolish.d.ts +0 -1
- package/dist/components/Editor/utils/prepareTypesetProposed.d.ts +1 -2
- package/dist/index.js +4 -4
- package/dist/vendors/{version-CfjNx5v2.js → version-Dt7Pnhic.js} +1 -1
- package/package.json +3 -2
- package/dist/components/Editor/utils/extractCodePlaceholders.d.ts +0 -6
- package/dist/components/Editor/utils/stitchCodePlaceholders.d.ts +0 -6
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
|
@@ -15,9 +15,13 @@ var d = {
|
|
|
15
15
|
"bsy-segmented__item--inactive": "_bsy-segmented__item--inactive_1yc4d_48",
|
|
16
16
|
"bsy-segmented__slider": "_bsy-segmented__slider_1yc4d_56"
|
|
17
17
|
}, f = {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
duration: .32,
|
|
19
|
+
ease: [
|
|
20
|
+
.34,
|
|
21
|
+
1.2,
|
|
22
|
+
.64,
|
|
23
|
+
1
|
|
24
|
+
]
|
|
21
25
|
}, p = { duration: 0 }, m = "#fff", h = (h) => {
|
|
22
26
|
let { options: g, block: _ = !1, disabled: v = !1, enableAnimation: y = !1, theme: b } = h, [x, S] = l(h), [C, w] = s({
|
|
23
27
|
width: 0,
|
package/dist/Segmented/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../vendors/version-
|
|
2
|
-
import { t as e } from "./Segmented-
|
|
1
|
+
import "../vendors/version-Dt7Pnhic.js";
|
|
2
|
+
import { t as e } from "./Segmented-BkTy5v9V.js";
|
|
3
3
|
export { e as default };
|
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,6 +1,3 @@
|
|
|
1
|
-
import { EditorAiStatus } from '../interface';
|
|
2
|
-
/** loading 时把 LCS 预览合到下一帧;ready/error 立刻算,避免应用按钮闪一下。 */
|
|
3
|
-
export declare function usePolishProposedHtml(enabled: boolean, originalHtml: string, text: string, status: EditorAiStatus | undefined): string;
|
|
4
1
|
type EditorPreviewProps = {
|
|
5
2
|
maxLength?: number;
|
|
6
3
|
onMaxLengthExceed?: () => void;
|
|
@@ -6,14 +6,11 @@ type ThinkingModel = {
|
|
|
6
6
|
label: string;
|
|
7
7
|
reasoning: string;
|
|
8
8
|
toggle: () => void;
|
|
9
|
-
onViewportScroll: () => void;
|
|
10
9
|
};
|
|
11
|
-
export declare
|
|
10
|
+
export declare const useThinking: (source: {
|
|
12
11
|
status: EditorAiStatus;
|
|
13
12
|
reasoning?: string;
|
|
14
|
-
}, hasAnswer: boolean
|
|
15
|
-
readonly current: HTMLElement | null;
|
|
16
|
-
}): ThinkingModel;
|
|
13
|
+
}, hasAnswer: boolean) => ThinkingModel;
|
|
17
14
|
export declare const ThinkingHead: React.FC<{
|
|
18
15
|
model: ThinkingModel;
|
|
19
16
|
}>;
|
|
@@ -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;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { EditorAiPreset } from '../interface';
|
|
2
|
-
export declare const EDITOR_AI_CODE_PLACEHOLDER: (index: number) => string;
|
|
3
|
-
export declare const EDITOR_AI_CODE_PLACEHOLDER_RE: RegExp;
|
|
4
2
|
export declare const EDITOR_AI_PRESETS: EditorAiPreset[];
|
|
5
3
|
export declare const EDITOR_AI_PRESET_I18N: {
|
|
6
4
|
readonly quick: "editor.aiPresetQuick";
|
|
@@ -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
|
|
33
|
+
export declare const useEditorAiReasoning: () => string | undefined;
|
|
34
|
+
export { EditorAiStreamContext, EditorAiReasoningContext };
|
|
34
35
|
export default EditorContainerContext;
|
|
@@ -177,10 +177,10 @@ export type EditorAiMode = 'typeset' | 'polish';
|
|
|
177
177
|
export type EditorAiStatus = 'idle' | 'loading' | 'ready' | 'error';
|
|
178
178
|
|
|
179
179
|
export type EditorAi = {
|
|
180
|
-
/** 点「智能排版」;`html`
|
|
181
|
-
typeset?: (input: { text: string; html: string }) => void;
|
|
182
|
-
/** 点润色预设;弹窗内切换预设会再调一次。`text`
|
|
183
|
-
polish?: (input: { text: string; preset: EditorAiPreset }) => void;
|
|
180
|
+
/** 点「智能排版」;`html` 已抽掉代码块为占位注释;`prompt` 为组件内置系统提示 */
|
|
181
|
+
typeset?: (input: { text: string; html: string; prompt: string }) => void;
|
|
182
|
+
/** 点润色预设;弹窗内切换预设会再调一次。`text` 为按块分隔的可润色纯文本(不含代码块);`prompt` 为组件内置系统提示 */
|
|
183
|
+
polish?: (input: { text: string; preset: EditorAiPreset; prompt: string }) => void;
|
|
184
184
|
/** 放弃或应用后中止请求 */
|
|
185
185
|
stop?: () => void;
|
|
186
186
|
/** 流式正文:排版为 HTML,润色为纯文本 */
|
|
@@ -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 {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { LexicalEditor } from 'lexical';
|
|
2
|
-
export declare const POLISH_BLOCK_MARKER = "<!--bsy-block-->";
|
|
3
2
|
export declare function joinPolishBlocks(blocks: string[]): string;
|
|
4
3
|
export declare function hasPolishContent(text: string): boolean;
|
|
5
4
|
export declare function collectPolishHtmlBlocks(html: string): string[];
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
export declare function prepareTypesetProposed(raw: string, blocks: string[]): string;
|
|
1
|
+
export declare const prepareTypesetProposed: (raw: string, blocks: string[]) => string;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./vendors/version-
|
|
1
|
+
import "./vendors/version-Dt7Pnhic.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";
|
|
@@ -12,7 +12,7 @@ import { t as g } from "./ColorPicker/ColorPicker-B_wLqurt.js";
|
|
|
12
12
|
import "./vendors/useFloatingOverlay-B66lOL8v.js";
|
|
13
13
|
import "./vendors/useLocale-Be4e7Xfn.js";
|
|
14
14
|
import "./vendors/useLatchedPopupPortalRoot-CC6af8t-.js";
|
|
15
|
-
import { t as _ } from "./Segmented/Segmented-
|
|
15
|
+
import { t as _ } from "./Segmented/Segmented-BkTy5v9V.js";
|
|
16
16
|
import { n as v, t as y } from "./Tooltip/Tooltip-DBrt3t2r.js";
|
|
17
17
|
import { t as b } from "./Select/Select-VIy6OKEj.js";
|
|
18
18
|
import "./Select/SelectInputSearch-MApQHnU9.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-DEr4d6DN.js";
|
|
33
|
+
import { t as M } from "./DatePicker/DatePicker-Bzvz3bI6.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";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@baishuyun/ui-base",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.19.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "百数云低代码平台通用组件库",
|
|
6
6
|
"author": "bsy-fe team",
|
|
@@ -94,7 +94,8 @@
|
|
|
94
94
|
"tailwindcss": "^3.0.0",
|
|
95
95
|
"vite": "^8.0.0",
|
|
96
96
|
"vite-plugin-dts": "^4.5.3",
|
|
97
|
-
"zustand": "4.5.6"
|
|
97
|
+
"zustand": "4.5.6",
|
|
98
|
+
"@baishuyun/shared": "0.0.0"
|
|
98
99
|
},
|
|
99
100
|
"project": {
|
|
100
101
|
"iconfont": {
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/** 包自定义元素再 parse,避免文首 `<!-- -->` 落在 Document 上而进不了 innerHTML。 */
|
|
2
|
-
export declare function parseHtmlFragment(html: string): HTMLElement | null;
|
|
3
|
-
/** 按占位把原 `<pre>` 缝回;缺失的占位把剩余块追加到末尾。 */
|
|
4
|
-
export declare function stitchCodePlaceholders(html: string, blocks: string[]): string;
|
|
5
|
-
export declare function stitchTypesetProposed(html: string, blocks: string[]): string;
|
|
6
|
-
export declare function stripModelCodeBlocks(html: string): string;
|