@apform-ui/core 1.4.2 → 1.6.1

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.
@@ -0,0 +1,19 @@
1
+ /**
2
+ * BreadcrumbNav — 面包屑导航(props 驱动,无 vue-router 硬编码)
3
+ */
4
+ export interface BreadcrumbNavItem {
5
+ /** 展示文案 */
6
+ label: string;
7
+ /** 可点击路径;末项通常省略 */
8
+ to?: string;
9
+ }
10
+ type __VLS_Props = {
11
+ items: BreadcrumbNavItem[];
12
+ };
13
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
14
+ navigate: (to: string) => any;
15
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
16
+ onNavigate?: ((to: string) => any) | undefined;
17
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export { default as BreadcrumbNav } from './BreadcrumbNav.vue';
2
+ export type { BreadcrumbNavItem } from './BreadcrumbNav.vue';
@@ -1,3 +1,6 @@
1
+ /**
2
+ * ConversationHeader — 对话顶栏(纯 props)
3
+ */
1
4
  type __VLS_Props = {
2
5
  /** 主标题(智能体/模型名) */
3
6
  title?: string;
@@ -1,4 +1,4 @@
1
- import { Session } from '../../types';
1
+ import { Session } from '../../../types';
2
2
  type __VLS_Props = {
3
3
  sessions: Session[];
4
4
  activeId?: string | null;
@@ -0,0 +1,37 @@
1
+ /**
2
+ * ExcelPreviewCard — Excel 表格预览(props 驱动,无 xlsx 解析)
3
+ *
4
+ * 父组件负责 fetch + 解析,本组件只渲染 sheet tabs 与表格。
5
+ */
6
+ type __VLS_Props = {
7
+ /** 工作表名称列表 */
8
+ sheetNames?: string[];
9
+ /** 当前 sheet */
10
+ modelValue?: string;
11
+ /** 表头 */
12
+ headers?: string[];
13
+ /** 数据行 */
14
+ rows?: string[][];
15
+ /** 总行数(含表头) */
16
+ totalRows?: number;
17
+ /** 最大预览行数说明 */
18
+ maxPreviewRows?: number;
19
+ loading?: boolean;
20
+ error?: string | null;
21
+ };
22
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
23
+ "update:modelValue": (value: string) => any;
24
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
25
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
26
+ }>, {
27
+ error: string | null;
28
+ modelValue: string;
29
+ loading: boolean;
30
+ rows: string[][];
31
+ sheetNames: string[];
32
+ headers: string[];
33
+ totalRows: number;
34
+ maxPreviewRows: number;
35
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
36
+ declare const _default: typeof __VLS_export;
37
+ export default _default;
@@ -0,0 +1 @@
1
+ export { default as ExcelPreviewCard } from './ExcelPreviewCard.vue';
@@ -0,0 +1,37 @@
1
+ /**
2
+ * PdfPreviewCard — PDF 预览卡片(iframe 展示,无 pdfjs 依赖)
3
+ *
4
+ * 复杂解析场景请使用默认 slot 注入自定义渲染器。
5
+ */
6
+ type __VLS_Props = {
7
+ /** PDF 可访问 URL */
8
+ url: string;
9
+ /** iframe title */
10
+ title?: string;
11
+ /** 加载中 */
12
+ loading?: boolean;
13
+ /** 错误信息 */
14
+ error?: string | null;
15
+ /** 预览区最小高度 */
16
+ minHeight?: string;
17
+ };
18
+ declare var __VLS_1: {
19
+ url: string;
20
+ };
21
+ type __VLS_Slots = {} & {
22
+ default?: (props: typeof __VLS_1) => any;
23
+ };
24
+ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
25
+ error: string | null;
26
+ title: string;
27
+ loading: boolean;
28
+ minHeight: string;
29
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
30
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
31
+ declare const _default: typeof __VLS_export;
32
+ export default _default;
33
+ type __VLS_WithSlots<T, S> = T & {
34
+ new (): {
35
+ $slots: S;
36
+ };
37
+ };
@@ -0,0 +1 @@
1
+ export { default as PdfPreviewCard } from './PdfPreviewCard.vue';
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @apform-ui/core — Composables 导出
3
+ */
1
4
  export { useToast, provideToast } from './useToast';
2
5
  export { useConfirm } from './useConfirm';
3
6
  export type { ConfirmOptions } from './useConfirm';
@@ -7,3 +10,5 @@ export { useDebounceFn } from './useDebounceFn';
7
10
  export { useClientPagination } from './useClientPagination';
8
11
  export { useDataLoading } from './useDataLoading';
9
12
  export type { UseDataLoadingOptions, UseDataLoadingReturn } from './useDataLoading';
13
+ export { useChatScroll } from './useChatScroll';
14
+ export type { UseChatScrollOptions, UseChatScrollReturn } from './useChatScroll';
@@ -0,0 +1,28 @@
1
+ import { Ref } from 'vue';
2
+ export interface UseChatScrollOptions {
3
+ /** 滚动容器的 ref */
4
+ containerRef: Ref<HTMLElement | null>;
5
+ /** 是否在新消息时自动滚动到底部 */
6
+ autoScroll?: boolean;
7
+ /** 滚动行为 */
8
+ behavior?: ScrollBehavior;
9
+ /** 滚动偏移量(像素) */
10
+ offset?: number;
11
+ }
12
+ export interface UseChatScrollReturn {
13
+ /** 滚动到底部;force 为 true 时忽略 autoScroll 开关 */
14
+ scrollToBottom: (force?: boolean) => Promise<void>;
15
+ /** 滚动到指定位置 */
16
+ scrollTo: (position: number) => void;
17
+ /** 是否在底部 */
18
+ isAtBottom: Ref<boolean>;
19
+ /** 是否启用自动滚动 */
20
+ autoScrollEnabled: Ref<boolean>;
21
+ /** 检查是否在底部 */
22
+ checkIfAtBottom: () => boolean;
23
+ /** 启用自动滚动 */
24
+ enableAutoScroll: () => void;
25
+ /** 禁用自动滚动 */
26
+ disableAutoScroll: () => void;
27
+ }
28
+ export declare function useChatScroll(options: UseChatScrollOptions): UseChatScrollReturn;
@@ -2,7 +2,7 @@ export interface ConfirmOptions {
2
2
  /** 标题(默认 '确认操作') */
3
3
  title?: string;
4
4
  /** 类型(默认 'warning') */
5
- type?: 'info' | 'warning' | 'danger' | 'success';
5
+ type?: 'info' | 'warning' | 'success';
6
6
  /** 确认按钮文案(默认 '确定') */
7
7
  confirmButtonText?: string;
8
8
  /** 取消按钮文案(默认 '取消') */
package/dist/index.d.ts CHANGED
@@ -22,6 +22,8 @@ export { CardGridSkeleton } from './components/CardGridSkeleton';
22
22
  export { UserAvatar } from './components/UserAvatar';
23
23
  export { PageShell } from './components/PageShell';
24
24
  export { PageHeader } from './components/PageHeader';
25
+ export { BreadcrumbNav } from './components/BreadcrumbNav';
26
+ export type { BreadcrumbNavItem } from './components/BreadcrumbNav';
25
27
  export { ContentPanel } from './components/ContentPanel';
26
28
  export { FilterBar } from './components/FilterBar';
27
29
  export { CardTable } from './components/CardTable';
@@ -39,6 +41,8 @@ export { JsonDetailDialog } from './components/JsonDetailDialog';
39
41
  export { SchemaLitePreview } from './components/SchemaLitePreview';
40
42
  export type { SchemaLiteField } from './components/SchemaLitePreview';
41
43
  export { DocumentPreviewPanel, DocumentPreviewDrawer, } from './components/DocumentPreview';
44
+ export { PdfPreviewCard } from './components/PdfPreviewCard';
45
+ export { ExcelPreviewCard } from './components/ExcelPreviewCard';
42
46
  export type { DocumentPreviewChunk, DocumentPreviewPanelProps, } from './components/DocumentPreview';
43
47
  export { MessageBubble } from './components/Chat/MessageBubble';
44
48
  export { MessageList } from './components/Chat/MessageList';
@@ -62,6 +66,8 @@ export { useDebounceFn } from './composables';
62
66
  export { useClientPagination } from './composables';
63
67
  export { useDataLoading } from './composables';
64
68
  export type { UseDataLoadingOptions, UseDataLoadingReturn } from './composables';
69
+ export { useChatScroll } from './composables';
70
+ export type { UseChatScrollOptions, UseChatScrollReturn } from './composables';
65
71
  export { ICON_MAP, APP_ICON_NAMES, isRegisteredAppIcon } from './utils';
66
72
  export type { AppIconName } from './utils';
67
73
  export { DEFAULT_PAGE_SIZE, PAGE_SIZE_OPTIONS, PAGINATION_LAYOUT } from './utils';
@@ -72,6 +78,6 @@ export { renderMarkdown, splitTextAndCodeBlocks } from './utils/textParser';
72
78
  export type { TextPart } from './utils/textParser';
73
79
  export { isImage, isPdf, isOffice, isPreviewable, fileKind, formatSize } from './utils/attachmentKind';
74
80
  export { COLORS, TEXT_COLORS, SPACING, BORDER_RADIUS, SHADOWS, DURATION, Z_INDEX, FONT_SIZE, CONTROL_HEIGHT, LAYOUT_HEIGHT, ICON_SIZE, PAGE, FORM, AVATAR_SIZE, } from './tokens';
75
- export declare const SCHEMA_UI_VERSION = "1.4.2";
81
+ export declare const SCHEMA_UI_VERSION = "1.6.1";
76
82
  export declare const EP_FORK_BASE = "2.14.2";
77
83
  export declare const EP_FORK_DATE = "2026-08-27";
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/vue3';
1
+ import { Meta, StoryObj } from '@storybook/vue3-vite';
2
2
  import { default as AppDialog } from '../components/AppDialog/AppDialog.vue';
3
3
  declare const meta: Meta<typeof AppDialog>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/vue3';
1
+ import { Meta, StoryObj } from '@storybook/vue3-vite';
2
2
  import { default as AppIcon } from '../components/AppIcon/AppIcon.vue';
3
3
  declare const meta: Meta<typeof AppIcon>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/vue3';
1
+ import { Meta, StoryObj } from '@storybook/vue3-vite';
2
2
  import { default as ApprovalCard } from '../components/Chat/ApprovalCard/ApprovalCard.vue';
3
3
  declare const meta: Meta<typeof ApprovalCard>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/vue3';
1
+ import { Meta, StoryObj } from '@storybook/vue3-vite';
2
2
  import { default as Composer } from '../components/Chat/Composer/Composer.vue';
3
3
  declare const meta: Meta<typeof Composer>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/vue3';
1
+ import { Meta, StoryObj } from '@storybook/vue3-vite';
2
2
  import { default as MessageBubble } from '../components/Chat/MessageBubble/MessageBubble.vue';
3
3
  declare const meta: Meta<typeof MessageBubble>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/vue3';
1
+ import { Meta, StoryObj } from '@storybook/vue3-vite';
2
2
  import { default as RunStatusBar } from '../components/Chat/RunStatusBar/RunStatusBar.vue';
3
3
  declare const meta: Meta<typeof RunStatusBar>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/vue3';
1
+ import { Meta, StoryObj } from '@storybook/vue3-vite';
2
2
  import { default as StatusTag } from '../components/StatusTag/StatusTag.vue';
3
3
  declare const meta: Meta<typeof StatusTag>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/vue3';
1
+ import { Meta, StoryObj } from '@storybook/vue3-vite';
2
2
  declare const meta: Meta;
3
3
  export default meta;
4
4
  type Story = StoryObj;
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/vue3';
1
+ import { Meta, StoryObj } from '@storybook/vue3-vite';
2
2
  declare const meta: Meta;
3
3
  export default meta;
4
4
  type Story = StoryObj;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apform-ui/core",
3
- "version": "1.4.2",
3
+ "version": "1.6.1",
4
4
  "type": "module",
5
5
  "author": "yangdongnan",
6
6
  "license": "MIT",