@apform-ui/core 1.10.34 → 1.10.35

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.
@@ -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/index.d.ts CHANGED
@@ -62,6 +62,9 @@ export type { BuiltinPropertyFieldType, FetchRemoteOptionsFn, PropertyArrayEdito
62
62
  export { PROPERTY_CONTROL_SIZE, PROPERTY_FETCH_REMOTE_KEY, evalVisibleOn, filterVisiblePropertyItems, filterVisiblePropertySections, } from './components/PropertyPanel';
63
63
  export { JsonCard } from './components/JsonCard';
64
64
  export { JsonDetailDialog } from './components/JsonDetailDialog';
65
+ export { ScriptTablePreview } from './components/ScriptTablePreview';
66
+ export { StoryboardTablePreview } from './components/StoryboardTablePreview';
67
+ export { StructuredJsonPreview } from './components/StructuredJsonPreview';
65
68
  export { SchemaLitePreview } from './components/SchemaLitePreview';
66
69
  export type { SchemaLiteField } from './components/SchemaLitePreview';
67
70
  export { DocumentPreviewPanel, DocumentPreviewDrawer, } from './components/DocumentPreview';
@@ -170,7 +173,9 @@ export { renderMarkdown, splitTextAndCodeBlocks } from './utils/textParser';
170
173
  export type { TextPart } from './utils/textParser';
171
174
  export { isImage, isPdf, isOffice, isPreviewable, fileKind, formatSize } from './utils/attachmentKind';
172
175
  export { extractDocumentId, detectArtifactKind, normalizeNodeOutput, normalizeAttachments, tryParseJsonText, } from './utils/normalizeArtifact';
176
+ export { detectStructuredJsonKind, extractEmbeddedJson, findEmbeddedJsonSpan, parseStructuredJsonContent, structuredJsonLabel, } from './utils/structuredJson';
177
+ export type { StructuredJsonKind } from './utils/structuredJson';
173
178
  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.1";
179
+ export declare const SCHEMA_UI_VERSION = "1.10.35";
175
180
  export declare const EP_FORK_BASE = "2.14.2";
176
181
  export declare const EP_FORK_DATE = "2026-08-27";
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apform-ui/core",
3
- "version": "1.10.34",
3
+ "version": "1.10.35",
4
4
  "type": "module",
5
5
  "author": "yangdongnan",
6
6
  "license": "MIT",