@apform-ui/core 1.10.34 → 1.10.36
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__/businessResultTables.spec.d.ts +1 -0
- package/dist/__tests__/structuredJson.spec.d.ts +1 -0
- package/dist/apform-ui.css +1 -1
- package/dist/apform-ui.js +6886 -6029
- package/dist/apform-ui.umd.cjs +58 -58
- package/dist/components/BusinessResultTables/BusinessResultTables.vue.d.ts +6 -0
- package/dist/components/BusinessResultTables/doc.d.ts +3 -0
- package/dist/components/BusinessResultTables/index.d.ts +1 -0
- package/dist/components/ChartOptionPreview/ChartOptionPreview.vue.d.ts +9 -0
- package/dist/components/ChartOptionPreview/doc.d.ts +3 -0
- package/dist/components/ChartOptionPreview/index.d.ts +1 -0
- package/dist/components/DocumentPreview/DocumentPreviewDrawer.vue.d.ts +7 -0
- package/dist/components/DocumentPreview/DocumentPreviewPanel.vue.d.ts +9 -0
- package/dist/components/ScriptTablePreview/ScriptTablePreview.vue.d.ts +16 -0
- package/dist/components/ScriptTablePreview/index.d.ts +1 -0
- package/dist/components/StoryboardTablePreview/StoryboardTablePreview.vue.d.ts +16 -0
- package/dist/components/StoryboardTablePreview/index.d.ts +1 -0
- package/dist/components/StructuredJsonPreview/StructuredJsonPreview.vue.d.ts +16 -0
- package/dist/components/StructuredJsonPreview/index.d.ts +1 -0
- package/dist/docs/index.d.ts +2 -0
- package/dist/index.d.ts +10 -1
- package/dist/utils/businessResultTables.d.ts +34 -0
- package/dist/utils/normalizeArtifact.d.ts +3 -1
- package/dist/utils/structuredJson.d.ts +43 -0
- package/package.json +1 -1
- package/src/docs/index.ts +6 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BusinessResultTable } from '../../utils/businessResultTables';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
tables: BusinessResultTable[];
|
|
4
|
+
};
|
|
5
|
+
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>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as BusinessResultTables } from './BusinessResultTables.vue';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
option: Record<string, unknown>;
|
|
3
|
+
chartType?: string;
|
|
4
|
+
height?: number;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
7
|
+
height: number;
|
|
8
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ChartOptionPreview } from './ChartOptionPreview.vue';
|
|
@@ -18,6 +18,8 @@ type __VLS_Props = {
|
|
|
18
18
|
pdfUrl?: string;
|
|
19
19
|
/** Excel 预览 URL */
|
|
20
20
|
excelUrl?: string;
|
|
21
|
+
/** 图片 / 视频预览 URL(宿主鉴权解析后的 blob/公开地址) */
|
|
22
|
+
mediaUrl?: string;
|
|
21
23
|
/** 透传给 PdfPreviewCard 的鉴权 headers */
|
|
22
24
|
pdfHttpHeaders?: Record<string, string>;
|
|
23
25
|
/** 透传给 ExcelPreviewCard 的 fetch headers */
|
|
@@ -33,11 +35,16 @@ declare var __VLS_19: {
|
|
|
33
35
|
url: string | undefined;
|
|
34
36
|
}, __VLS_21: {
|
|
35
37
|
url: string | undefined;
|
|
38
|
+
}, __VLS_23: {
|
|
39
|
+
url: string | undefined;
|
|
40
|
+
mimetype: string | undefined;
|
|
36
41
|
};
|
|
37
42
|
type __VLS_Slots = {} & {
|
|
38
43
|
pdf?: (props: typeof __VLS_19) => any;
|
|
39
44
|
} & {
|
|
40
45
|
excel?: (props: typeof __VLS_21) => any;
|
|
46
|
+
} & {
|
|
47
|
+
media?: (props: typeof __VLS_23) => any;
|
|
41
48
|
};
|
|
42
49
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
43
50
|
"update:modelValue": (value: boolean) => any;
|
|
@@ -16,6 +16,10 @@ type __VLS_Props = {
|
|
|
16
16
|
pdfUrl?: string;
|
|
17
17
|
/** Excel 预览 URL */
|
|
18
18
|
excelUrl?: string;
|
|
19
|
+
/**
|
|
20
|
+
* 图片 / 视频可直接预览的 blob 或公开 URL(由宿主鉴权解析后传入)
|
|
21
|
+
*/
|
|
22
|
+
mediaUrl?: string;
|
|
19
23
|
/** 透传给 PdfPreviewCard 的鉴权 headers */
|
|
20
24
|
pdfHttpHeaders?: Record<string, string>;
|
|
21
25
|
/** 透传给 ExcelPreviewCard 的 fetch headers */
|
|
@@ -29,11 +33,16 @@ declare var __VLS_9: {
|
|
|
29
33
|
url: string | undefined;
|
|
30
34
|
}, __VLS_14: {
|
|
31
35
|
url: string | undefined;
|
|
36
|
+
}, __VLS_19: {
|
|
37
|
+
url: string | undefined;
|
|
38
|
+
mimetype: string | undefined;
|
|
32
39
|
};
|
|
33
40
|
type __VLS_Slots = {} & {
|
|
34
41
|
pdf?: (props: typeof __VLS_9) => any;
|
|
35
42
|
} & {
|
|
36
43
|
excel?: (props: typeof __VLS_14) => any;
|
|
44
|
+
} & {
|
|
45
|
+
media?: (props: typeof __VLS_19) => any;
|
|
37
46
|
};
|
|
38
47
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
39
48
|
close: () => any;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** JSON 字符串或混排文本 */
|
|
3
|
+
content?: string;
|
|
4
|
+
/** 已解析对象 */
|
|
5
|
+
data?: unknown;
|
|
6
|
+
/** 是否显示复制/原始 JSON 操作 */
|
|
7
|
+
showActions?: boolean;
|
|
8
|
+
};
|
|
9
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
10
|
+
copy: (content: string) => any;
|
|
11
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
|
+
onCopy?: ((content: string) => any) | undefined;
|
|
13
|
+
}>, {
|
|
14
|
+
showActions: boolean;
|
|
15
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ScriptTablePreview } from './ScriptTablePreview.vue';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** JSON 字符串或混排文本 */
|
|
3
|
+
content?: string;
|
|
4
|
+
/** 已解析对象 */
|
|
5
|
+
data?: unknown;
|
|
6
|
+
/** 是否显示复制操作 */
|
|
7
|
+
showActions?: boolean;
|
|
8
|
+
};
|
|
9
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
10
|
+
copy: (content: string) => any;
|
|
11
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
|
+
onCopy?: ((content: string) => any) | undefined;
|
|
13
|
+
}>, {
|
|
14
|
+
showActions: boolean;
|
|
15
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as StoryboardTablePreview } from './StoryboardTablePreview.vue';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { StructuredJsonKind } from '../../utils/structuredJson';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
content?: string;
|
|
4
|
+
data?: unknown;
|
|
5
|
+
showActions?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
8
|
+
kind: import('vue').ComputedRef<StructuredJsonKind | null>;
|
|
9
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
10
|
+
copy: (content: string) => any;
|
|
11
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
|
+
onCopy?: ((content: string) => any) | undefined;
|
|
13
|
+
}>, {
|
|
14
|
+
showActions: boolean;
|
|
15
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as StructuredJsonPreview } from './StructuredJsonPreview.vue';
|
package/dist/docs/index.d.ts
CHANGED
|
@@ -81,6 +81,8 @@ export { TruncatedTooltipTextDoc } from '../components/TruncatedTooltipText/doc'
|
|
|
81
81
|
export { UserAvatarDoc } from '../components/UserAvatar/doc';
|
|
82
82
|
export { TimeRangePickerDoc } from '../components/TimeRangePicker/doc';
|
|
83
83
|
export { MetricChartDoc } from '../components/MetricChart/doc';
|
|
84
|
+
export { ChartOptionPreviewDoc } from '../components/ChartOptionPreview/doc';
|
|
85
|
+
export { BusinessResultTablesDoc } from '../components/BusinessResultTables/doc';
|
|
84
86
|
export { StatCardDoc } from '../components/StatCard/doc';
|
|
85
87
|
export { SeverityBadgeDoc } from '../components/SeverityBadge/doc';
|
|
86
88
|
export { ServiceGridDoc } from '../components/ServiceGrid/doc';
|
package/dist/index.d.ts
CHANGED
|
@@ -28,6 +28,8 @@ export { TimeRangePicker } from './components/TimeRangePicker';
|
|
|
28
28
|
export type { TimeRange, TimeRangePreset } from './components/TimeRangePicker';
|
|
29
29
|
export { MetricChart } from './components/MetricChart';
|
|
30
30
|
export type { MetricSeries, MetricThreshold, MetricUnit } from './components/MetricChart';
|
|
31
|
+
export { ChartOptionPreview } from './components/ChartOptionPreview';
|
|
32
|
+
export { BusinessResultTables } from './components/BusinessResultTables';
|
|
31
33
|
export { StatCard } from './components/StatCard';
|
|
32
34
|
export type { StatTrend } from './components/StatCard';
|
|
33
35
|
export { SeverityBadge } from './components/SeverityBadge';
|
|
@@ -62,6 +64,9 @@ export type { BuiltinPropertyFieldType, FetchRemoteOptionsFn, PropertyArrayEdito
|
|
|
62
64
|
export { PROPERTY_CONTROL_SIZE, PROPERTY_FETCH_REMOTE_KEY, evalVisibleOn, filterVisiblePropertyItems, filterVisiblePropertySections, } from './components/PropertyPanel';
|
|
63
65
|
export { JsonCard } from './components/JsonCard';
|
|
64
66
|
export { JsonDetailDialog } from './components/JsonDetailDialog';
|
|
67
|
+
export { ScriptTablePreview } from './components/ScriptTablePreview';
|
|
68
|
+
export { StoryboardTablePreview } from './components/StoryboardTablePreview';
|
|
69
|
+
export { StructuredJsonPreview } from './components/StructuredJsonPreview';
|
|
65
70
|
export { SchemaLitePreview } from './components/SchemaLitePreview';
|
|
66
71
|
export type { SchemaLiteField } from './components/SchemaLitePreview';
|
|
67
72
|
export { DocumentPreviewPanel, DocumentPreviewDrawer, } from './components/DocumentPreview';
|
|
@@ -170,7 +175,11 @@ export { renderMarkdown, splitTextAndCodeBlocks } from './utils/textParser';
|
|
|
170
175
|
export type { TextPart } from './utils/textParser';
|
|
171
176
|
export { isImage, isPdf, isOffice, isPreviewable, fileKind, formatSize } from './utils/attachmentKind';
|
|
172
177
|
export { extractDocumentId, detectArtifactKind, normalizeNodeOutput, normalizeAttachments, tryParseJsonText, } from './utils/normalizeArtifact';
|
|
178
|
+
export { detectStructuredJsonKind, extractEmbeddedJson, findEmbeddedJsonSpan, parseStructuredJsonContent, structuredJsonLabel, } from './utils/structuredJson';
|
|
179
|
+
export type { StructuredJsonKind } from './utils/structuredJson';
|
|
180
|
+
export { extractBusinessResultTables, extractChartOption, } from './utils/businessResultTables';
|
|
181
|
+
export type { BusinessResultTable, ChartOptionExtract, } from './utils/businessResultTables';
|
|
173
182
|
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';
|
|
174
|
-
export declare const SCHEMA_UI_VERSION = "1.10.
|
|
183
|
+
export declare const SCHEMA_UI_VERSION = "1.10.36";
|
|
175
184
|
export declare const EP_FORK_BASE = "2.14.2";
|
|
176
185
|
export declare const EP_FORK_DATE = "2026-08-27";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 业务节点 / Chat 产物 → 表格与图表 option 提取
|
|
3
|
+
*/
|
|
4
|
+
/** 单张业务结果表 */
|
|
5
|
+
export interface BusinessResultTable {
|
|
6
|
+
/** 稳定 key */
|
|
7
|
+
key: string;
|
|
8
|
+
/** 标题 */
|
|
9
|
+
title: string;
|
|
10
|
+
/** 列:prop → 表头 */
|
|
11
|
+
columns: Array<{
|
|
12
|
+
prop: string;
|
|
13
|
+
label: string;
|
|
14
|
+
}>;
|
|
15
|
+
/** 行 */
|
|
16
|
+
rows: Record<string, unknown>[];
|
|
17
|
+
}
|
|
18
|
+
/** 可预览的 ECharts option */
|
|
19
|
+
export interface ChartOptionExtract {
|
|
20
|
+
chartType: string;
|
|
21
|
+
option: Record<string, unknown>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* 从节点 / 消息 output 提取业务表格
|
|
25
|
+
* @param nodeType 节点类型(可选;缺省时按字段形态推断)
|
|
26
|
+
* @param output 节点或消息输出
|
|
27
|
+
*/
|
|
28
|
+
export declare function extractBusinessResultTables(nodeType: string | undefined, output: unknown): BusinessResultTable[];
|
|
29
|
+
/**
|
|
30
|
+
* 提取可渲染的 ECharts option(非 table)
|
|
31
|
+
* @param nodeType 节点类型;缺省时按 chartType+option 形态识别(供 Chat 消息流)
|
|
32
|
+
* @param output 输出
|
|
33
|
+
*/
|
|
34
|
+
export declare function extractChartOption(nodeType: string | undefined, output: unknown): ChartOptionExtract | null;
|
|
@@ -15,12 +15,14 @@ export declare function detectArtifactKind(opts: {
|
|
|
15
15
|
hint?: string;
|
|
16
16
|
}): ArtifactKind;
|
|
17
17
|
/**
|
|
18
|
-
* 尝试把字符串识别为 JSON 产物(剧本 /
|
|
18
|
+
* 尝试把字符串识别为 JSON 产物(剧本 / 分镜等;支持混排文案内嵌 JSON)
|
|
19
19
|
* @param raw 原始文本
|
|
20
20
|
*/
|
|
21
21
|
export declare function tryParseJsonText(raw: string): {
|
|
22
22
|
kind: 'json';
|
|
23
23
|
text: string;
|
|
24
|
+
label?: string;
|
|
25
|
+
prose?: string;
|
|
24
26
|
} | null;
|
|
25
27
|
/**
|
|
26
28
|
* 从工作流节点 output 抽取产物
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 剧本 / 分镜等结构化 JSON 识别与嵌入抽取
|
|
3
|
+
*/
|
|
4
|
+
/** 结构化预览类型 */
|
|
5
|
+
export type StructuredJsonKind = 'script' | 'storyboard';
|
|
6
|
+
/**
|
|
7
|
+
* 识别剧本 / 分镜 JSON
|
|
8
|
+
* @param data 已解析对象
|
|
9
|
+
*/
|
|
10
|
+
export declare function detectStructuredJsonKind(data: unknown): StructuredJsonKind | null;
|
|
11
|
+
/**
|
|
12
|
+
* 结构化类型对应中文标签
|
|
13
|
+
* @param kind 结构化类型
|
|
14
|
+
*/
|
|
15
|
+
export declare function structuredJsonLabel(kind: StructuredJsonKind): string;
|
|
16
|
+
/**
|
|
17
|
+
* 在混排文案中定位首个可解析的 JSON 对象/数组(支持字符串内括号)
|
|
18
|
+
* @param raw 原始文本
|
|
19
|
+
*/
|
|
20
|
+
export declare function findEmbeddedJsonSpan(raw: string): {
|
|
21
|
+
start: number;
|
|
22
|
+
end: number;
|
|
23
|
+
text: string;
|
|
24
|
+
} | null;
|
|
25
|
+
/**
|
|
26
|
+
* 从纯 JSON / fence / 混排文案中抽取 JSON
|
|
27
|
+
* @param raw 原始文本
|
|
28
|
+
*/
|
|
29
|
+
export declare function extractEmbeddedJson(raw: string): {
|
|
30
|
+
prose: string;
|
|
31
|
+
jsonText: string;
|
|
32
|
+
data: unknown;
|
|
33
|
+
} | null;
|
|
34
|
+
/**
|
|
35
|
+
* 从任意文本内容解析结构化 JSON(剧本 / 分镜)
|
|
36
|
+
* @param content JSON 或混排文本
|
|
37
|
+
*/
|
|
38
|
+
export declare function parseStructuredJsonContent(content: string): {
|
|
39
|
+
kind: StructuredJsonKind;
|
|
40
|
+
data: Record<string, unknown>;
|
|
41
|
+
jsonText: string;
|
|
42
|
+
prose: string;
|
|
43
|
+
} | null;
|
package/package.json
CHANGED
package/src/docs/index.ts
CHANGED
|
@@ -81,6 +81,8 @@ export { TruncatedTooltipTextDoc } from '../components/TruncatedTooltipText/doc'
|
|
|
81
81
|
export { UserAvatarDoc } from '../components/UserAvatar/doc'
|
|
82
82
|
export { TimeRangePickerDoc } from '../components/TimeRangePicker/doc'
|
|
83
83
|
export { MetricChartDoc } from '../components/MetricChart/doc'
|
|
84
|
+
export { ChartOptionPreviewDoc } from '../components/ChartOptionPreview/doc'
|
|
85
|
+
export { BusinessResultTablesDoc } from '../components/BusinessResultTables/doc'
|
|
84
86
|
export { StatCardDoc } from '../components/StatCard/doc'
|
|
85
87
|
export { SeverityBadgeDoc } from '../components/SeverityBadge/doc'
|
|
86
88
|
export { ServiceGridDoc } from '../components/ServiceGrid/doc'
|
|
@@ -174,6 +176,8 @@ import { TruncatedTooltipTextDoc } from '../components/TruncatedTooltipText/doc'
|
|
|
174
176
|
import { UserAvatarDoc } from '../components/UserAvatar/doc'
|
|
175
177
|
import { TimeRangePickerDoc } from '../components/TimeRangePicker/doc'
|
|
176
178
|
import { MetricChartDoc } from '../components/MetricChart/doc'
|
|
179
|
+
import { ChartOptionPreviewDoc } from '../components/ChartOptionPreview/doc'
|
|
180
|
+
import { BusinessResultTablesDoc } from '../components/BusinessResultTables/doc'
|
|
177
181
|
import { StatCardDoc } from '../components/StatCard/doc'
|
|
178
182
|
import { SeverityBadgeDoc } from '../components/SeverityBadge/doc'
|
|
179
183
|
import { ServiceGridDoc } from '../components/ServiceGrid/doc'
|
|
@@ -256,6 +260,8 @@ export const componentDocs: Record<string, ComponentDoc> = {
|
|
|
256
260
|
LoadingDots: LoadingDotsDoc,
|
|
257
261
|
LogStream: LogStreamDoc,
|
|
258
262
|
MetricChart: MetricChartDoc,
|
|
263
|
+
ChartOptionPreview: ChartOptionPreviewDoc,
|
|
264
|
+
BusinessResultTables: BusinessResultTablesDoc,
|
|
259
265
|
PageHeader: PageHeaderDoc,
|
|
260
266
|
PageShell: PageShellDoc,
|
|
261
267
|
PdfPreviewCard: PdfPreviewCardDoc,
|