@apform-ui/core 1.13.0 → 1.14.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/__tests__/resolveResultBlocks.spec.d.ts +1 -0
- package/dist/apform-ui.css +1 -1
- package/dist/apform-ui.js +8782 -8339
- package/dist/apform-ui.umd.cjs +68 -68
- package/dist/components/CodePreviewBlock/CodePreviewBlock.vue.d.ts +12 -0
- package/dist/components/CodePreviewBlock/index.d.ts +1 -0
- package/dist/components/HitlResultPreview/HitlResultPreview.vue.d.ts +8 -0
- package/dist/components/HitlResultPreview/index.d.ts +1 -0
- package/dist/components/JsonDetailDialog/JsonDetailDialog.vue.d.ts +1 -0
- package/dist/components/KeyValuePreview/KeyValuePreview.vue.d.ts +7 -0
- package/dist/components/KeyValuePreview/index.d.ts +1 -0
- package/dist/components/NodeResultPreview/NodeResultPreview.vue.d.ts +22 -0
- package/dist/components/NodeResultPreview/index.d.ts +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/utils/resolveResultBlocks.d.ts +46 -0
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
text: string;
|
|
3
|
+
title?: string;
|
|
4
|
+
language?: string;
|
|
5
|
+
maxHeight?: string;
|
|
6
|
+
};
|
|
7
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
8
|
+
title: string;
|
|
9
|
+
language: string;
|
|
10
|
+
maxHeight: string;
|
|
11
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CodePreviewBlock } from './CodePreviewBlock.vue';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ResultHitlItem } from '../../utils/resolveResultBlocks';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
items: ResultHitlItem[];
|
|
4
|
+
title?: string;
|
|
5
|
+
message?: string;
|
|
6
|
+
};
|
|
7
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as HitlResultPreview } from './HitlResultPreview.vue';
|
|
@@ -3,6 +3,7 @@ type __VLS_Props = {
|
|
|
3
3
|
title?: string;
|
|
4
4
|
data?: unknown;
|
|
5
5
|
content?: string;
|
|
6
|
+
nodeType?: string;
|
|
6
7
|
};
|
|
7
8
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
8
9
|
"update:modelValue": (args_0: boolean) => any;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ResultBlockEntry } from '../../utils/resolveResultBlocks';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
entries: ResultBlockEntry[];
|
|
4
|
+
title?: string;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as KeyValuePreview } from './KeyValuePreview.vue';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ArtifactItem } from '../../types/artifact';
|
|
2
|
+
import { ResultBlock } from '../../utils/resolveResultBlocks';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
/** 已解析块;与 data 二选一 */
|
|
5
|
+
blocks?: ResultBlock[];
|
|
6
|
+
/** 原始 input/output */
|
|
7
|
+
data?: unknown;
|
|
8
|
+
nodeType?: string;
|
|
9
|
+
streamingText?: string;
|
|
10
|
+
streamingReasoning?: string;
|
|
11
|
+
role?: 'input' | 'output';
|
|
12
|
+
/** 思考块默认折叠 */
|
|
13
|
+
thinkingCollapsed?: boolean;
|
|
14
|
+
};
|
|
15
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
16
|
+
preview: (item: ArtifactItem) => any;
|
|
17
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
18
|
+
onPreview?: ((item: ArtifactItem) => any) | undefined;
|
|
19
|
+
}>, {
|
|
20
|
+
thinkingCollapsed: boolean;
|
|
21
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as NodeResultPreview } from './NodeResultPreview.vue';
|
package/dist/index.d.ts
CHANGED
|
@@ -30,6 +30,10 @@ export { MetricChart } from './components/MetricChart';
|
|
|
30
30
|
export type { MetricSeries, MetricThreshold, MetricUnit } from './components/MetricChart';
|
|
31
31
|
export { ChartOptionPreview } from './components/ChartOptionPreview';
|
|
32
32
|
export { BusinessResultTables } from './components/BusinessResultTables';
|
|
33
|
+
export { KeyValuePreview } from './components/KeyValuePreview';
|
|
34
|
+
export { CodePreviewBlock } from './components/CodePreviewBlock';
|
|
35
|
+
export { HitlResultPreview } from './components/HitlResultPreview';
|
|
36
|
+
export { NodeResultPreview } from './components/NodeResultPreview';
|
|
33
37
|
export { StatCard } from './components/StatCard';
|
|
34
38
|
export type { StatTrend } from './components/StatCard';
|
|
35
39
|
export { SeverityBadge } from './components/SeverityBadge';
|
|
@@ -107,6 +111,8 @@ export { detectStructuredJsonKind, extractEmbeddedJson, findEmbeddedJsonSpan, pa
|
|
|
107
111
|
export type { StructuredJsonKind } from './utils/structuredJson';
|
|
108
112
|
export { extractBusinessResultTables, extractChartOption, } from './utils/businessResultTables';
|
|
109
113
|
export type { BusinessResultTable, ChartOptionExtract, } from './utils/businessResultTables';
|
|
114
|
+
export { resolveResultBlocks } from './utils/resolveResultBlocks';
|
|
115
|
+
export type { ResultKind, ResultBlock, ResultBlockEntry, ResultHitlItem, ResolveResultOptions, } from './utils/resolveResultBlocks';
|
|
110
116
|
export { COLORS, CHART_COLORS, TEXT_COLORS, SPACING, BORDER_RADIUS, SHADOWS, DURATION, Z_INDEX, FONT_SIZE, CONTROL_HEIGHT, LAYOUT_HEIGHT, ICON_SIZE, PAGE, FORM, AVATAR_SIZE, } from './tokens';
|
|
111
117
|
export declare const SCHEMA_UI_VERSION = "1.13.0";
|
|
112
118
|
export declare const EP_FORK_BASE = "2.14.2";
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ArtifactItem } from '../types/artifact';
|
|
2
|
+
import { BusinessResultTable } from './businessResultTables';
|
|
3
|
+
/** 人读结果形态 */
|
|
4
|
+
export type ResultKind = 'thinking' | 'markdown' | 'text' | 'media' | 'script' | 'storyboard' | 'table' | 'keyvalue' | 'chart' | 'code' | 'hitl' | 'empty' | 'unresolved';
|
|
5
|
+
/** 键值条目 */
|
|
6
|
+
export interface ResultBlockEntry {
|
|
7
|
+
label: string;
|
|
8
|
+
value: string;
|
|
9
|
+
tone?: string;
|
|
10
|
+
}
|
|
11
|
+
/** HITL 问答 */
|
|
12
|
+
export interface ResultHitlItem {
|
|
13
|
+
question: string;
|
|
14
|
+
answer: string;
|
|
15
|
+
}
|
|
16
|
+
/** 单块人读结果 */
|
|
17
|
+
export interface ResultBlock {
|
|
18
|
+
kind: ResultKind;
|
|
19
|
+
title?: string;
|
|
20
|
+
text?: string;
|
|
21
|
+
table?: BusinessResultTable;
|
|
22
|
+
entries?: ResultBlockEntry[];
|
|
23
|
+
artifacts?: ArtifactItem[];
|
|
24
|
+
chartOption?: Record<string, unknown>;
|
|
25
|
+
chartType?: string;
|
|
26
|
+
language?: string;
|
|
27
|
+
hitlItems?: ResultHitlItem[];
|
|
28
|
+
/** 仅供复制,不渲染为页面主内容 */
|
|
29
|
+
copyPayload?: string;
|
|
30
|
+
message?: string;
|
|
31
|
+
/** script / storyboard 原始对象 */
|
|
32
|
+
data?: unknown;
|
|
33
|
+
}
|
|
34
|
+
/** 解析选项 */
|
|
35
|
+
export interface ResolveResultOptions {
|
|
36
|
+
nodeType?: string;
|
|
37
|
+
streamingText?: string;
|
|
38
|
+
streamingReasoning?: string;
|
|
39
|
+
role?: 'input' | 'output';
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* 解析人读结果块
|
|
43
|
+
* @param data 节点 input/output 或消息载荷
|
|
44
|
+
* @param options 解析选项
|
|
45
|
+
*/
|
|
46
|
+
export declare function resolveResultBlocks(data: unknown, options?: ResolveResultOptions): ResultBlock[];
|