@vuagent/ui 0.3.0 → 0.6.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.
Files changed (51) hide show
  1. package/README.md +22 -3
  2. package/dist/index.js +7326 -6442
  3. package/dist/types/components/agent-plan/VaAgentPlan.vue.d.ts +4 -0
  4. package/dist/types/components/agent-plan/types.d.ts +18 -0
  5. package/dist/types/components/assistant-turn/VaAssistantTurn.vue.d.ts +3 -3
  6. package/dist/types/components/capability-card/VaCapabilityCard.vue.d.ts +1 -1
  7. package/dist/types/components/change-summary/VaChangeSummary.vue.d.ts +1 -1
  8. package/dist/types/components/decision-inbox/types.d.ts +5 -4
  9. package/dist/types/components/empty-hero/VaEmptyHero.vue.d.ts +2 -2
  10. package/dist/types/components/form/VaForm.vue.d.ts +32 -0
  11. package/dist/types/components/form/index.d.ts +2 -0
  12. package/dist/types/components/form/types.d.ts +45 -0
  13. package/dist/types/components/gradient-border/VaGradientBorder.vue.d.ts +21 -0
  14. package/dist/types/components/gradient-border/index.d.ts +2 -0
  15. package/dist/types/components/gradient-border/types.d.ts +13 -0
  16. package/dist/types/components/message-actions/useMessageActions.d.ts +2 -0
  17. package/dist/types/components/otp-input/VaOtpInput.vue.d.ts +3 -1
  18. package/dist/types/components/queue-dock/VaQueueDock.vue.d.ts +1 -1
  19. package/dist/types/components/scrim-edge/VaScrimEdge.vue.d.ts +6 -0
  20. package/dist/types/components/scrim-edge/index.d.ts +2 -0
  21. package/dist/types/components/scrim-edge/types.d.ts +13 -0
  22. package/dist/types/components/smart-recommendation/VaSmartRecommendation.vue.d.ts +1 -1
  23. package/dist/types/components/spotlight-card/VaSpotlightCard.vue.d.ts +22 -0
  24. package/dist/types/components/spotlight-card/index.d.ts +3 -0
  25. package/dist/types/components/spotlight-card/types.d.ts +9 -0
  26. package/dist/types/components/spotlight-card/useSpotlightCard.d.ts +18 -0
  27. package/dist/types/components/stepper-form/VaStepperForm.vue.d.ts +9 -3
  28. package/dist/types/components/trajectory/VaTrajectory.vue.d.ts +3 -1
  29. package/dist/types/components/trajectory/useTrajectoryReveal.d.ts +18 -0
  30. package/dist/types/components/turn-list/VaTurnList.vue.d.ts +2 -2
  31. package/dist/types/components/user-bubble/VaUserBubble.vue.d.ts +2 -2
  32. package/dist/types/composables/useShake.d.ts +4 -0
  33. package/dist/types/composables/useSpotlight.d.ts +43 -0
  34. package/dist/types/composables/useStagger.d.ts +25 -0
  35. package/dist/types/index.d.ts +19 -1
  36. package/dist/types/runtime/actionClient.d.ts +5 -0
  37. package/dist/types/runtime/form-errors.d.ts +18 -0
  38. package/dist/types/runtime/form-result-schema.d.ts +49 -0
  39. package/dist/types/runtime/interaction-validation.d.ts +16 -0
  40. package/dist/types/runtime/plan-steps-mirror.d.ts +15 -0
  41. package/dist/types/runtime/protocol-types.d.ts +88 -2
  42. package/dist/types/runtime/sse.d.ts +79 -0
  43. package/dist/types/runtime/types.d.ts +8 -2
  44. package/dist/types/runtime/useAgentChat.d.ts +4 -2
  45. package/dist/types/runtime/useDeltaBuffer.d.ts +63 -0
  46. package/dist/vuagent-ui.css +1 -1
  47. package/package.json +1 -1
  48. package/src/styles/button.css +8 -1
  49. package/src/styles/motion.css +211 -0
  50. package/src/styles/surface.css +55 -0
  51. package/src/styles/tokens.css +66 -4
@@ -2,9 +2,13 @@ import { AgentPlanProps, PlanStep } from './types';
2
2
  declare const _default: import('vue').DefineComponent<AgentPlanProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
3
3
  retry: (step: PlanStep) => any;
4
4
  "update:steps": (steps: PlanStep[]) => any;
5
+ confirm: () => any;
6
+ cancel: () => any;
5
7
  }, string, import('vue').PublicProps, Readonly<AgentPlanProps> & Readonly<{
6
8
  onRetry?: ((step: PlanStep) => any) | undefined;
7
9
  "onUpdate:steps"?: ((steps: PlanStep[]) => any) | undefined;
10
+ onConfirm?: (() => any) | undefined;
11
+ onCancel?: (() => any) | undefined;
8
12
  }>, {
9
13
  title: string;
10
14
  editable: boolean;
@@ -15,8 +15,26 @@ export interface AgentPlanProps {
15
15
  /** 审阅编辑模式:可重命名 / 排序 / 增删步骤 */
16
16
  editable?: boolean;
17
17
  title?: string;
18
+ /**
19
+ * L3 协作模式(Phase 3,设计文档 §2/§3):模型显式置 true 才进入——
20
+ * 挂起等待用户编辑,底部渲染「确认计划」(confirm,终态)与
21
+ * 「放弃」(cancel,终态)出口;步骤编辑/重试照常经
22
+ * update:steps / retry 事件由注册层转 patch / submit 信封。
23
+ */
24
+ collaborative?: boolean;
25
+ /** 协作出口按钮禁用态(非挂起态时注册层不透传 collaborative,此处为双保险) */
26
+ disabled?: boolean;
27
+ /**
28
+ * L3 patch/submit 被 server 422 拒绝的逐字段错误就地回显
29
+ * (复用 form-errors 响应式通道,设计文档 §4.2 重填闭环——错误不唤醒模型)
30
+ */
31
+ fieldErrors?: Record<string, string>;
18
32
  }
19
33
  export interface AgentPlanEvents {
20
34
  "update:steps": [steps: PlanStep[]];
21
35
  retry: [step: PlanStep];
36
+ /** 确认计划(L3 终态):注册层转 submit 空 values 信封,server 合并此前 patch steps */
37
+ confirm: [];
38
+ /** 放弃计划(L3 终态):注册层转 cancel 信封 */
39
+ cancel: [];
22
40
  }
@@ -24,7 +24,7 @@ declare function __VLS_template(): {
24
24
  }): any;
25
25
  };
26
26
  refs: {};
27
- rootEl: HTMLDivElement;
27
+ rootEl: any;
28
28
  };
29
29
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
30
30
  declare const __VLS_component: import('vue').DefineComponent<AssistantTurnProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
@@ -44,6 +44,7 @@ declare const __VLS_component: import('vue').DefineComponent<AssistantTurnProps,
44
44
  content: string;
45
45
  avatar: string;
46
46
  streaming: boolean;
47
+ aborted: boolean;
47
48
  blocks: TurnBlockItem[];
48
49
  thought: string;
49
50
  toolCount: number;
@@ -51,10 +52,9 @@ declare const __VLS_component: import('vue').DefineComponent<AssistantTurnProps,
51
52
  thoughtDuration: number;
52
53
  processCollapsed: boolean;
53
54
  canCollapseProcess: boolean;
54
- aborted: boolean;
55
55
  abortReason: string;
56
56
  actionsEnabled: boolean;
57
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
57
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
58
58
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
59
59
  export default _default;
60
60
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -10,5 +10,5 @@ declare const _default: import('vue').DefineComponent<CapabilityCardProps, {}, {
10
10
  components: string[];
11
11
  hint: string;
12
12
  dismissible: boolean;
13
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
13
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
14
14
  export default _default;
@@ -5,5 +5,5 @@ declare const _default: import('vue').DefineComponent<ChangeSummaryProps, {}, {}
5
5
  }, string, import('vue').PublicProps, Readonly<ChangeSummaryProps> & Readonly<{
6
6
  onOpenFile?: ((file: import('./types').SummaryFile) => any) | undefined;
7
7
  onToggleAll?: (() => any) | undefined;
8
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
8
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
9
9
  export default _default;
@@ -5,10 +5,11 @@ export interface Decision {
5
5
  title: string;
6
6
  /** 标题下的一句背景说明 */
7
7
  detail?: string;
8
- /** 主答案(墨色实心按钮),如"立即发布" */
9
- primary: string;
10
- /** 次答案(描边按钮),如"再等等" */
11
- secondary: string;
8
+ /** 主答案(墨色实心按钮),如"立即发布";缺省则不渲染该按钮——
9
+ * 用于非决策型挂起(如 L2 表单待填写:回传通道在表单卡本身,收件箱只做提示,TASK-092 尾巴 1) */
10
+ primary?: string;
11
+ /** 次答案(描边按钮),如"再等等";缺省则不渲染 */
12
+ secondary?: string;
12
13
  /** 初始折叠为一行弱化文本,点击展开 */
13
14
  collapsed?: boolean;
14
15
  }
@@ -5,7 +5,7 @@ declare function __VLS_template(): {
5
5
  icon?(_: {}): any;
6
6
  };
7
7
  refs: {};
8
- rootEl: HTMLDivElement;
8
+ rootEl: any;
9
9
  };
10
10
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
11
  declare const __VLS_component: import('vue').DefineComponent<EmptyHeroProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
@@ -19,7 +19,7 @@ declare const __VLS_component: import('vue').DefineComponent<EmptyHeroProps, {},
19
19
  workspaces: import('./types').HeroWorkspace[];
20
20
  creating: boolean;
21
21
  description: string;
22
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
22
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
23
23
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
24
24
  export default _default;
25
25
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -0,0 +1,32 @@
1
+ import { VaFormProps } from './types';
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: {
5
+ 'after-actions'?(_: {}): any;
6
+ };
7
+ refs: {};
8
+ rootEl: HTMLElement;
9
+ };
10
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
+ declare const __VLS_component: import('vue').DefineComponent<VaFormProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
12
+ submit: (values: Record<string, unknown>, editedFields: string[]) => any;
13
+ cancel: () => any;
14
+ }, string, import('vue').PublicProps, Readonly<VaFormProps> & Readonly<{
15
+ onSubmit?: ((values: Record<string, unknown>, editedFields: string[]) => any) | undefined;
16
+ onCancel?: (() => any) | undefined;
17
+ }>, {
18
+ disabled: boolean;
19
+ loading: boolean;
20
+ title: string;
21
+ fieldErrors: Record<string, string>;
22
+ description: string;
23
+ submitLabel: string;
24
+ cancelLabel: string;
25
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
26
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
27
+ export default _default;
28
+ type __VLS_WithTemplateSlots<T, S> = T & {
29
+ new (): {
30
+ $slots: S;
31
+ };
32
+ };
@@ -0,0 +1,2 @@
1
+ export { default as VaForm } from './VaForm.vue';
2
+ export type { FormFieldItem, FormFieldOption, FormFieldType, VaFormEvents, VaFormProps } from './types';
@@ -0,0 +1,45 @@
1
+ /**
2
+ * @vuagent/ui - VaForm 类型定义(TASK-092,设计文档 §7)
3
+ */
4
+ export type FormFieldType = "text" | "textarea" | "number" | "boolean" | "select" | "date";
5
+ export interface FormFieldOption {
6
+ /** 机器值(回传 values 中的取值) */
7
+ value: string;
8
+ /** 人类文案(界面展示与摘要回映) */
9
+ label: string;
10
+ }
11
+ /** 表单字段(与 @vuagent/protocol FormFieldSchema 结构化兼容;args 为不可信输入,渲染前已由 propAdapter 守卫收敛) */
12
+ export interface FormFieldItem {
13
+ key: string;
14
+ label: string;
15
+ type: FormFieldType;
16
+ /** 字段含义说明(摘要词汇表同源) */
17
+ description?: string;
18
+ required?: boolean;
19
+ /** 预填默认值(模型上一轮 values 回显的载体) */
20
+ default?: unknown;
21
+ options?: FormFieldOption[];
22
+ /** 数值单位后缀 */
23
+ unit?: string;
24
+ /** 敏感字段:密码态输入,值走 secret 通道(模型只见 ref/masked 占位) */
25
+ secret?: boolean;
26
+ placeholder?: string;
27
+ }
28
+ export interface VaFormProps {
29
+ title?: string;
30
+ /** 为什么需要这些信息(模型给用户的说明) */
31
+ description?: string;
32
+ fields: FormFieldItem[];
33
+ submitLabel?: string;
34
+ cancelLabel?: string;
35
+ /** 非 executing 态禁用整表(渲染层守卫的双保险视觉位) */
36
+ disabled?: boolean;
37
+ loading?: boolean;
38
+ /** server 422 / 本地预校验回填的逐字段错误(form-errors 通道) */
39
+ fieldErrors?: Record<string, string>;
40
+ }
41
+ export interface VaFormEvents {
42
+ /** 用户提交:values 为类型收敛后的值集合;editedFields 为用户亲自修改过的字段 key(meta.editedFields 同源) */
43
+ (e: "submit", values: Record<string, unknown>, editedFields: string[]): void;
44
+ (e: "cancel"): void;
45
+ }
@@ -0,0 +1,21 @@
1
+ import { GradientBorderProps } from './types';
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: {
5
+ default?(_: {}): any;
6
+ };
7
+ refs: {};
8
+ rootEl: HTMLDivElement;
9
+ };
10
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
+ declare const __VLS_component: import('vue').DefineComponent<GradientBorderProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<GradientBorderProps> & Readonly<{}>, {
12
+ variant: "static" | "running";
13
+ width: number;
14
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
15
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
16
+ export default _default;
17
+ type __VLS_WithTemplateSlots<T, S> = T & {
18
+ new (): {
19
+ $slots: S;
20
+ };
21
+ };
@@ -0,0 +1,2 @@
1
+ export { default as VaGradientBorder } from './VaGradientBorder.vue';
2
+ export type { GradientBorderProps } from './types';
@@ -0,0 +1,13 @@
1
+ /** VaGradientBorder 的类型定义 */
2
+ export interface GradientBorderProps {
3
+ /** "static" 双色渐变描边(默认)| "running" conic 光环慢速旋转(Agent Ops「运行中」语义) */
4
+ variant?: "static" | "running";
5
+ /** 渐变起色(缺省 --va-grad-accent-from) */
6
+ from?: string;
7
+ /** 渐变止色(缺省 --va-grad-accent-to) */
8
+ to?: string;
9
+ /** 边框宽度 px(默认 1) */
10
+ width?: number;
11
+ /** running 光环周期:CSS 时长("2.4s")或毫秒数(1800);缺省 var(--va-dur-loop, 1.8s) */
12
+ speed?: string | number;
13
+ }
@@ -3,6 +3,8 @@ import { FeedbackKind, MessageActionsProps } from './types';
3
3
  /**
4
4
  * VaMessageActions 的状态逻辑:复制 / 再生成 / 反馈(含原因面板)/ 版本切换。
5
5
  * version 由 SFC 的 defineModel 创建后传入(未绑定父层时组件内部自持)。
6
+ * 复制统一走共享 useCopyable(TASK-106:copied 1.5s 置真口径与库内其他组件一致),
7
+ * 图标交叉过渡由模板挂 styles/motion.css 的 .va-copy 结构承接。
6
8
  */
7
9
  export declare function useMessageActions(props: MessageActionsProps, version: Ref<number | undefined>, emit: {
8
10
  copy: (text?: string) => void;
@@ -1,5 +1,7 @@
1
1
  import { OtpInputProps } from './types';
2
- declare const _default: import('vue').DefineComponent<OtpInputProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
2
+ declare const _default: import('vue').DefineComponent<OtpInputProps, {
3
+ shake: () => void;
4
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
3
5
  complete: (v: string) => any;
4
6
  "update:modelValue": (v: string) => any;
5
7
  }, string, import('vue').PublicProps, Readonly<OtpInputProps> & Readonly<{
@@ -11,5 +11,5 @@ declare const _default: import('vue').DefineComponent<QueueDockProps, {}, {}, {}
11
11
  disabled: boolean;
12
12
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
13
13
  input: HTMLInputElement;
14
- }, HTMLDivElement>;
14
+ }, any>;
15
15
  export default _default;
@@ -0,0 +1,6 @@
1
+ import { ScrimEdgeProps } from './types';
2
+ declare const _default: import('vue').DefineComponent<ScrimEdgeProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ScrimEdgeProps> & Readonly<{}>, {
3
+ height: number;
4
+ direction: import('./types').ScrimEdgeDirection;
5
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
6
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export { default as VaScrimEdge } from './VaScrimEdge.vue';
2
+ export type { ScrimEdgeDirection, ScrimEdgeProps } from './types';
@@ -0,0 +1,13 @@
1
+ /** VaScrimEdge 的类型定义 */
2
+ /** 渐变依附边:bottom = 底边向上渐隐,其余三向同理 */
3
+ export type ScrimEdgeDirection = "bottom" | "top" | "left" | "right";
4
+ export interface ScrimEdgeProps {
5
+ /** 渐变依附边(默认 bottom) */
6
+ direction?: ScrimEdgeDirection;
7
+ /** scrim 颜色(CSS 色);缺省取 --va-scrim 遮罩色(亮暗自适应) */
8
+ scrimColor?: string;
9
+ /** 渐变厚度 px(bottom/top 为高、left/right 为宽,默认 72) */
10
+ height?: number;
11
+ /** 全色起点 / 全透明终点(%,默认 [0, 100] 线性渐隐) */
12
+ stops?: [number, number];
13
+ }
@@ -7,5 +7,5 @@ declare const _default: import('vue').DefineComponent<SmartRecommendationProps,
7
7
  onAction?: ((id: string) => any) | undefined;
8
8
  }>, {
9
9
  dismissible: boolean;
10
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
10
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
11
11
  export default _default;
@@ -0,0 +1,22 @@
1
+ import { SpotlightCardProps } from './types';
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: {
5
+ default?(_: {}): any;
6
+ };
7
+ refs: {};
8
+ rootEl: HTMLDivElement;
9
+ };
10
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
+ declare const __VLS_component: import('vue').DefineComponent<SpotlightCardProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<SpotlightCardProps> & Readonly<{}>, {
12
+ elevation: number;
13
+ glow: boolean;
14
+ spot: boolean;
15
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
16
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
17
+ export default _default;
18
+ type __VLS_WithTemplateSlots<T, S> = T & {
19
+ new (): {
20
+ $slots: S;
21
+ };
22
+ };
@@ -0,0 +1,3 @@
1
+ export { default as VaSpotlightCard } from './VaSpotlightCard.vue';
2
+ export { clampElevation, useSpotlightCard } from './useSpotlightCard';
3
+ export type { SpotlightCardProps } from './types';
@@ -0,0 +1,9 @@
1
+ /** VaSpotlightCard 的类型定义 */
2
+ export interface SpotlightCardProps {
3
+ /** accent 发光描边(--va-glow-accent,静态样式非动画,默认开启) */
4
+ glow?: boolean;
5
+ /** 指针光斑(hover 点亮;触屏 / reduced-motion / SSR 自动关闭,默认开启) */
6
+ spot?: boolean;
7
+ /** 投影档位 1-4(--va-shadow-N,默认 4 舞台级深投影) */
8
+ elevation?: number;
9
+ }
@@ -0,0 +1,18 @@
1
+ import { SpotlightCardProps } from './types';
2
+ /**
3
+ * VaSpotlightCard 的组装逻辑(可测):elevation 档位钳制 + 修饰类推导 + 光斑指针桥接。
4
+ * 光斑几何与环境分频复用共享 useSpotlight(rAF 节流写 --va-spot-x/y;
5
+ * hover: none / reduced-motion / SSR 短路),组件 CSS 只负责 radial 绘制与显隐。
6
+ * spot 启用态按范式一次性读取(props.spot === false 关闭),运行时切换不重探环境。
7
+ */
8
+ /** elevation 钳制到 1-4 档(undefined / NaN 回 4 舞台档,越界取最近档) */
9
+ export declare function clampElevation(value: number | undefined): number;
10
+ export declare function useSpotlightCard(props: SpotlightCardProps): {
11
+ classes: import('vue').ComputedRef<string[]>;
12
+ spot: {
13
+ enabled: import('vue').Ref<boolean, boolean>;
14
+ onPointerEnter: (e: PointerEvent | MouseEvent) => void;
15
+ onPointerMove: (e: PointerEvent | MouseEvent) => void;
16
+ onPointerLeave: (e: PointerEvent | MouseEvent) => void;
17
+ };
18
+ };
@@ -4,11 +4,15 @@ declare function __VLS_template(): {
4
4
  slots: Partial<Record<`step-${string}`, (_: {
5
5
  step: number;
6
6
  }) => any>>;
7
- refs: {};
7
+ refs: {
8
+ shake: HTMLDivElement;
9
+ };
8
10
  rootEl: HTMLFormElement;
9
11
  };
10
12
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
- declare const __VLS_component: import('vue').DefineComponent<StepperFormProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
13
+ declare const __VLS_component: import('vue').DefineComponent<StepperFormProps, {
14
+ shake: () => void;
15
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
12
16
  submit: (current: number) => any;
13
17
  "update:step": (index: number) => any;
14
18
  next: (prev: number) => any;
@@ -18,7 +22,9 @@ declare const __VLS_component: import('vue').DefineComponent<StepperFormProps, {
18
22
  "onUpdate:step"?: ((index: number) => any) | undefined;
19
23
  onNext?: ((prev: number) => any) | undefined;
20
24
  onBack?: ((prev: number) => any) | undefined;
21
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLFormElement>;
25
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
26
+ shake: HTMLDivElement;
27
+ }, HTMLFormElement>;
22
28
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
23
29
  export default _default;
24
30
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -50,5 +50,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
50
50
  ledgerMaxHeight: number;
51
51
  bordered: boolean;
52
52
  splitDetail: boolean;
53
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
53
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
54
+ rootEl: HTMLDivElement;
55
+ }, HTMLDivElement>;
54
56
  export default _default;
@@ -0,0 +1,18 @@
1
+ import { Ref } from 'vue';
2
+ import { TrajEvent } from './types';
3
+ /**
4
+ * VaTrajectory 渐进揭示(TASK-107 零动效补齐,克制版 scroll 驱动):
5
+ * IntersectionObserver 进视口逐节点点亮——台账行 opacity/translateY 过渡 +
6
+ * 左侧连接线 scaleY 渐进描线 + 节点 scale 点亮;泳道块随泳道区进入视口一次性浮现。
7
+ * IO 一次性触发(点亮即 unobserve),不监听滚动、不做 scroll-jack,不改变布局
8
+ * (仅 opacity/transform,不引起滚动抖动,stick-to-bottom 契约安全)。
9
+ *
10
+ * 降级:reduced-motion / 无 IntersectionObserver / SSR 时不激活(data-reveal 不挂载,
11
+ * CSS 仅在 [data-reveal="on"] 下生效)——内容直接全显,服务端与客户端首帧输出一致。
12
+ * IO 守卫范式照抄 composables 同族(useNumberTicker/useTextReveal 的 matchMedia 短链)。
13
+ */
14
+ export declare function useTrajectoryReveal(root: Ref<HTMLElement | null>, filtered: Ref<TrajEvent[]>): {
15
+ active: Ref<boolean, boolean>;
16
+ rowVisible: (id: string) => boolean;
17
+ blocksVisible: import('vue').ComputedRef<boolean>;
18
+ };
@@ -18,7 +18,7 @@ declare function __VLS_template(): {
18
18
  }): any;
19
19
  };
20
20
  refs: {};
21
- rootEl: HTMLDivElement;
21
+ rootEl: any;
22
22
  };
23
23
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
24
24
  declare const __VLS_component: import('vue').DefineComponent<TurnListProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
@@ -36,7 +36,7 @@ declare const __VLS_component: import('vue').DefineComponent<TurnListProps, {},
36
36
  }>, {
37
37
  turns: import('./types').TurnItem[];
38
38
  emptyText: string;
39
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
39
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
40
40
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
41
41
  export default _default;
42
42
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -9,7 +9,7 @@ declare function __VLS_template(): {
9
9
  avatar?(_: {}): any;
10
10
  };
11
11
  refs: {};
12
- rootEl: HTMLDivElement;
12
+ rootEl: any;
13
13
  };
14
14
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
15
  declare const __VLS_component: import('vue').DefineComponent<UserBubbleProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<UserBubbleProps> & Readonly<{}>, {
@@ -17,7 +17,7 @@ declare const __VLS_component: import('vue').DefineComponent<UserBubbleProps, {}
17
17
  attachments: import('./types').UserAttachment[];
18
18
  content: string;
19
19
  avatar: string;
20
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
20
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
21
21
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
22
22
  export default _default;
23
23
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -0,0 +1,4 @@
1
+ import { MaybeRefOrGetter } from 'vue';
2
+ export declare function useShake(target?: MaybeRefOrGetter<HTMLElement | null | undefined>): {
3
+ shake: () => void;
4
+ };
@@ -0,0 +1,43 @@
1
+ /**
2
+ * 静态光斑指针追踪(TASK-105「追光」基建,与 styles/motion.css 的 .va-spotlight 联用):
3
+ * pointermove 以 rAF 节流把指针在元素内的百分比坐标写入 --va-spot-x/--va-spot-y
4
+ * 自定义属性(motion.css 的 radial 光斑消费,无 3D 倾斜——glare 数学对齐 VaTiltCard)。
5
+ *
6
+ * 接入(宿主元素挂 .va-spotlight):
7
+ * <div class="va-spotlight"
8
+ * @pointerenter="spot.onPointerEnter"
9
+ * @pointermove="spot.onPointerMove"
10
+ * @pointerleave="spot.onPointerLeave">
11
+ *
12
+ * 环境分频(一次性读取,不监听系统切换,对齐 useStagger 范式):
13
+ * SSR(无 window)/ hover: none(触屏)/ reduced-motion → enabled=false,
14
+ * handler 直接短路(不写变量、不排帧);显隐由 motion.css 媒体块兜底。
15
+ * 光斑尺寸/颜色为 L3 钩子(--va-spot-size/--va-spot-color,见 motion.css),不进 tokens.css。
16
+ */
17
+ /** 参与几何计算的矩形最小面(getBoundingClientRect 的可测子集) */
18
+ export interface SpotRect {
19
+ left: number;
20
+ top: number;
21
+ width: number;
22
+ height: number;
23
+ }
24
+ /** 元素内百分比坐标(保留 1 位小数) */
25
+ export interface SpotPoint {
26
+ x: number;
27
+ y: number;
28
+ }
29
+ export interface UseSpotlightOptions {
30
+ /** 显式关闭(宿主自行控制);默认按环境检测 */
31
+ disabled?: boolean;
32
+ }
33
+ /**
34
+ * 纯几何:指针视口坐标 → 元素内百分比(0..100,越界钳制)。
35
+ * 零宽/高(未布局,如 happy-dom 默认)回退中心 50——防御除零,可单测。
36
+ */
37
+ export declare function spotPercent(clientX: number, clientY: number, rect: SpotRect): SpotPoint;
38
+ export declare function useSpotlight(options?: UseSpotlightOptions): {
39
+ enabled: import('vue').Ref<boolean, boolean>;
40
+ onPointerEnter: (e: PointerEvent | MouseEvent) => void;
41
+ onPointerMove: (e: PointerEvent | MouseEvent) => void;
42
+ onPointerLeave: (e: PointerEvent | MouseEvent) => void;
43
+ };
@@ -0,0 +1,25 @@
1
+ /**
2
+ * 列表子项进出场错峰编排(TASK-102 动效基建):
3
+ * 返回 delayStyle(index) 供 v-for 子项绑定 :style,配合 .va-enter-* 动画类使用
4
+ * (.va-enter-* 全是 CSS animation,延迟轴为 animation-delay——transition-delay
5
+ * 对 animation 零作用;动画 fill-mode both 保首帧,延迟期间不闪跳)。
6
+ * 步长口径对齐 tokens.css 的 --va-stagger(40ms);
7
+ * reduced-motion 下延迟归零(动画降级本身由 motion.css 媒体查询处理)。
8
+ *
9
+ * SSR 安全:无 window/matchMedia 时跳过检测、按正常分支返回——服务端与
10
+ * 非 reduced 客户端的首帧输出一致,避免 hydration 抖动;reduced-motion 客户端
11
+ * 首帧为全 0ms、与服务端错峰值有差异,由 Vue hydration 后补丁收敛(轻微)。
12
+ * reduced-motion 检测照抄现有 composable
13
+ * 范式(window.matchMedia?.() 整链短路),挂载时机一次性读取,不监听系统切换。
14
+ */
15
+ export interface UseStaggerOptions {
16
+ /** 相邻子项延迟步长 ms(默认 40,同 --va-stagger) */
17
+ stepMs?: number;
18
+ /** 错峰档位上限:index 超过后钳制在档顶(默认 8,防长列表末项等待过久) */
19
+ maxItems?: number;
20
+ /** 置真时恒返回 0ms 延迟(宿主自行关闭错峰) */
21
+ disabled?: boolean;
22
+ }
23
+ export declare function useStagger(options?: UseStaggerOptions): {
24
+ delayStyle: (index: number) => Record<string, string>;
25
+ };
@@ -124,12 +124,20 @@ export { VaExperimentCard } from './components/experiment-card';
124
124
  export type { ExperimentCardEvents, ExperimentCardProps, ExperimentStatus, ExperimentVariant, } from './components/experiment-card';
125
125
  export { VaAiAnswer } from './components/ai-answer';
126
126
  export type { AiAnswerEvents, AiAnswerProps, AnswerSource } from './components/ai-answer';
127
+ export { VaForm } from './components/form';
128
+ export type { FormFieldItem, FormFieldOption, FormFieldType, VaFormEvents, VaFormProps } from './components/form';
127
129
  export { VaTiltCard } from './components/tilt-card';
128
130
  export type { TiltCardProps } from './components/tilt-card';
129
131
  export { VaBlurCrossfade } from './components/blur-crossfade';
130
132
  export type { BlurCrossfadeProps } from './components/blur-crossfade';
131
133
  export { VaGradientFloor, VaGradientText } from './components/gradient';
132
134
  export type { GradientFloorProps, GradientTextProps } from './components/gradient';
135
+ export { VaSpotlightCard, clampElevation, useSpotlightCard } from './components/spotlight-card';
136
+ export type { SpotlightCardProps } from './components/spotlight-card';
137
+ export { VaScrimEdge } from './components/scrim-edge';
138
+ export type { ScrimEdgeDirection, ScrimEdgeProps } from './components/scrim-edge';
139
+ export { VaGradientBorder } from './components/gradient-border';
140
+ export type { GradientBorderProps } from './components/gradient-border';
133
141
  export { VaAppShell } from './components/app-shell';
134
142
  export type { AppShellEvents, AppShellProps, NavItem } from './components/app-shell';
135
143
  export { VaAgentChat } from './components/agent-chat';
@@ -152,12 +160,22 @@ export type { DiffPiece, DiffToken, DiffTokenType } from './utils/wordDiff';
152
160
  export { useNow } from './composables/useNow';
153
161
  export { useCountdown } from './composables/useCountdown';
154
162
  export { useCopyable } from './composables/useCopyable';
163
+ export { useStagger } from './composables/useStagger';
164
+ export type { UseStaggerOptions } from './composables/useStagger';
165
+ export { useShake } from './composables/useShake';
166
+ export { useSpotlight, spotPercent } from './composables/useSpotlight';
167
+ export type { SpotRect, SpotPoint, UseSpotlightOptions } from './composables/useSpotlight';
155
168
  export { useStickToBottom, BOTTOM_THRESHOLD_PX } from './composables/useStickToBottom';
156
169
  export type { ScrollToBottomOptions, UseStickToBottomOptions } from './composables/useStickToBottom';
157
170
  export { AgentUIRegistry, CardSkeleton, ChartSkeleton, CodeSkeleton, getAgentComponent, registerAgentComponent, setupDefaultAgentRegistry, unregisterAgentComponent, } from './runtime/registry';
158
171
  export { useAgentChat } from './runtime/useAgentChat';
159
172
  export type { ChatMessage, SendMessageOptions, UseAgentChatOptions } from './runtime/useAgentChat';
160
- export type { AgentComponentBaseProps, AgentComponentStatus, AgentRendererProps, CustomProviderConfig, MessageBlock, RegisteredComponentEntry, UIStreamEvent, } from './runtime/types';
173
+ export { UIActionLocalValidationError } from './runtime/interaction-validation';
174
+ export { consumeSSEStream, parseSSEChunk } from './runtime/sse';
175
+ export type { SSEConsumeOptions, SSEConsumeResult, SSEParseResult } from './runtime/sse';
176
+ export { createDeltaBuffer } from './runtime/useDeltaBuffer';
177
+ export type { DeltaBuffer } from './runtime/useDeltaBuffer';
178
+ export type { ActionMeta, AgentComponentBaseProps, AgentComponentStatus, AgentRendererProps, CustomProviderConfig, MessageBlock, RegisteredComponentEntry, UIActionCancelEnvelope, UIActionEnvelope, UIActionKind, UIActionPatchEnvelope, UIActionSubmitEnvelope, UIComponentInteraction, UIInteractionLevel, UIStreamEvent, } from './runtime/types';
161
179
  export { default as VaAgentRenderer } from './runtime/VaAgentRenderer.vue';
162
180
  export { useCardRegistry, registerCardComponent, unregisterCardComponent, getCardComponent, clearCardComponents, } from './composables/useCardRegistry';
163
181
  export { VaMarkdown } from './components/markdown';
@@ -2,4 +2,9 @@
2
2
  * @vuagent/ui - HITL 动作提交客户端
3
3
  * 供 VaAgentRenderer 提交用户审批/交互决策;HTTP 非 2xx 一律抛错(由调用方转 error 事件)。
4
4
  */
5
+ /**
6
+ * 提交互信封到服务端。apiBaseUrl-only 宿主路径(不经 useAgentChat)下,
7
+ * server 422 + fieldErrors(§4.2 重填闭环)写入 form-errors 响应式通道就地回显
8
+ * ——评审 R3 修复:此前该路径的校验错误被静默丢弃,用户完全看不到失败原因。
9
+ */
5
10
  export declare function postAgentAction(apiBaseUrl: string, toolCallId: string, payload: unknown): Promise<void>;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @vuagent/ui - 表单 fieldErrors 通道(TASK-092,设计文档 §4.2)
3
+ *
4
+ * 校验失败不是终态而是新的输入:本地预校验失败与 server 422(ENVELOPE_VALUES_INVALID
5
+ * 携带 fieldErrors)都不唤醒 agent——错误就地回显在表单卡片上,用户修正后重提。
6
+ *
7
+ * 为什么用模块级 reactive Map 而不是挂到 MessageBlock:MessageBlock 是同步卡口
8
+ * (check-protocol-sync)语料内的契约类型,交互期错误是纯前端瞬时状态,不应进
9
+ * 契约面。propAdapter 在 VaAgentRenderer 的 activeProps computed 内执行,读取本
10
+ * Map 即注册响应依赖——set/clear 自动驱动表单错误回显重渲染。
11
+ *
12
+ * 生命周期:提交前 clear(清上次错误)→ 校验失败 set → 提交成功/取消 clear;
13
+ * clearMessages 整体清空防泄漏。
14
+ */
15
+ export declare const formFieldErrors: import('vue').Reactive<Map<string, Record<string, string>>>;
16
+ export declare function setFormFieldErrors(toolCallId: string, fieldErrors: Record<string, string>): void;
17
+ export declare function clearFormFieldErrors(toolCallId: string): void;
18
+ export declare function clearAllFormFieldErrors(): void;