@vuagent/ui 0.3.0 → 0.7.0-next.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/README.md +22 -3
- package/dist/index.js +7525 -6447
- package/dist/types/components/agent-plan/VaAgentPlan.vue.d.ts +4 -0
- package/dist/types/components/agent-plan/types.d.ts +18 -0
- package/dist/types/components/assistant-turn/VaAssistantTurn.vue.d.ts +3 -3
- package/dist/types/components/capability-card/VaCapabilityCard.vue.d.ts +1 -1
- package/dist/types/components/change-summary/VaChangeSummary.vue.d.ts +1 -1
- package/dist/types/components/decision-inbox/types.d.ts +5 -4
- package/dist/types/components/empty-hero/VaEmptyHero.vue.d.ts +2 -2
- package/dist/types/components/form/VaForm.vue.d.ts +32 -0
- package/dist/types/components/form/index.d.ts +2 -0
- package/dist/types/components/form/types.d.ts +45 -0
- package/dist/types/components/gradient-border/VaGradientBorder.vue.d.ts +21 -0
- package/dist/types/components/gradient-border/index.d.ts +2 -0
- package/dist/types/components/gradient-border/types.d.ts +13 -0
- package/dist/types/components/message-actions/useMessageActions.d.ts +2 -0
- package/dist/types/components/otp-input/VaOtpInput.vue.d.ts +3 -1
- package/dist/types/components/queue-dock/VaQueueDock.vue.d.ts +1 -1
- package/dist/types/components/scrim-edge/VaScrimEdge.vue.d.ts +6 -0
- package/dist/types/components/scrim-edge/index.d.ts +2 -0
- package/dist/types/components/scrim-edge/types.d.ts +13 -0
- package/dist/types/components/smart-recommendation/VaSmartRecommendation.vue.d.ts +1 -1
- package/dist/types/components/spotlight-card/VaSpotlightCard.vue.d.ts +22 -0
- package/dist/types/components/spotlight-card/index.d.ts +3 -0
- package/dist/types/components/spotlight-card/types.d.ts +9 -0
- package/dist/types/components/spotlight-card/useSpotlightCard.d.ts +18 -0
- package/dist/types/components/stepper-form/VaStepperForm.vue.d.ts +9 -3
- package/dist/types/components/trajectory/VaTrajectory.vue.d.ts +3 -1
- package/dist/types/components/trajectory/useTrajectoryReveal.d.ts +18 -0
- package/dist/types/components/turn-list/VaTurnList.vue.d.ts +2 -2
- package/dist/types/components/turn-rail/VaTurnRail.vue.d.ts +30 -0
- package/dist/types/components/turn-rail/index.d.ts +2 -0
- package/dist/types/components/turn-rail/types.d.ts +37 -0
- package/dist/types/components/user-bubble/VaUserBubble.vue.d.ts +2 -2
- package/dist/types/composables/useShake.d.ts +4 -0
- package/dist/types/composables/useSpotlight.d.ts +43 -0
- package/dist/types/composables/useStagger.d.ts +25 -0
- package/dist/types/index.d.ts +21 -1
- package/dist/types/runtime/actionClient.d.ts +5 -0
- package/dist/types/runtime/form-errors.d.ts +18 -0
- package/dist/types/runtime/form-result-schema.d.ts +49 -0
- package/dist/types/runtime/interaction-validation.d.ts +16 -0
- package/dist/types/runtime/plan-steps-mirror.d.ts +15 -0
- package/dist/types/runtime/protocol-types.d.ts +88 -2
- package/dist/types/runtime/sse.d.ts +79 -0
- package/dist/types/runtime/types.d.ts +8 -2
- package/dist/types/runtime/useAgentChat.d.ts +4 -2
- package/dist/types/runtime/useDeltaBuffer.d.ts +63 -0
- package/dist/vuagent-ui.css +1 -1
- package/package.json +1 -1
- package/src/styles/button.css +8 -1
- package/src/styles/motion.css +211 -0
- package/src/styles/surface.css +55 -0
- 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:
|
|
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, {},
|
|
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, {},
|
|
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, {},
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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:
|
|
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, {},
|
|
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,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,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, {
|
|
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
|
-
},
|
|
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,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, {},
|
|
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,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, {
|
|
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, {
|
|
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, {
|
|
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:
|
|
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, {},
|
|
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 & {
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { TurnRailProps, TurnRailItem } from './types';
|
|
2
|
+
declare function measure(): void;
|
|
3
|
+
declare function scrollToAnchor(id: string): void;
|
|
4
|
+
declare const _default: import('vue').DefineComponent<TurnRailProps, {
|
|
5
|
+
/** 手动重算当前轮(宿主内容变化但未触发 scroll/resize 时调用) */
|
|
6
|
+
measure: typeof measure;
|
|
7
|
+
/** 跳到某轮(等价于点击该标记) */
|
|
8
|
+
scrollTo: typeof scrollToAnchor;
|
|
9
|
+
/** 当前轮次 id */
|
|
10
|
+
activeId: import('vue').ComputedRef<string>;
|
|
11
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
12
|
+
select: (id: string, index: number) => any;
|
|
13
|
+
"update:activeId": (id: string) => any;
|
|
14
|
+
}, string, import('vue').PublicProps, Readonly<TurnRailProps> & Readonly<{
|
|
15
|
+
onSelect?: ((id: string, index: number) => any) | undefined;
|
|
16
|
+
"onUpdate:activeId"?: ((id: string) => any) | undefined;
|
|
17
|
+
}>, {
|
|
18
|
+
preview: boolean;
|
|
19
|
+
offset: number;
|
|
20
|
+
items: TurnRailItem[];
|
|
21
|
+
ariaLabel: string;
|
|
22
|
+
activeId: string;
|
|
23
|
+
floating: boolean;
|
|
24
|
+
container: HTMLElement | null;
|
|
25
|
+
anchorAttr: string;
|
|
26
|
+
minItems: number;
|
|
27
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
28
|
+
rootRef: HTMLElement;
|
|
29
|
+
}, any>;
|
|
30
|
+
export default _default;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/** 右侧轮次跳转轨上的一枚标记(一条 = 一个可跳转锚点) */
|
|
2
|
+
export interface TurnRailItem {
|
|
3
|
+
/** 轮次 id,需与滚动容器内锚点元素上的属性(默认 data-turn-id)取值一致 */
|
|
4
|
+
id: string;
|
|
5
|
+
/** 悬停/聚焦时预览卡里的文案(缺省回退为「第 N 轮」) */
|
|
6
|
+
label?: string;
|
|
7
|
+
/** 角色:user 实心点(提问) / assistant 空心点(回复),缺省 user */
|
|
8
|
+
role?: "user" | "assistant";
|
|
9
|
+
/** 状态:streaming 呼吸脉冲;error 危险色;done/缺省为常态 */
|
|
10
|
+
status?: "streaming" | "done" | "error";
|
|
11
|
+
}
|
|
12
|
+
export interface TurnRailProps {
|
|
13
|
+
/** 轮次标记(顺序即对话顺序,与容器内锚点从上到下一致) */
|
|
14
|
+
items: TurnRailItem[];
|
|
15
|
+
/** 滚动容器元素;传入才启用点击跳转与滚动跟随(SSR / 未挂载可省略) */
|
|
16
|
+
container?: HTMLElement | null;
|
|
17
|
+
/** 锚点属性名,默认 data-turn-id(取值须等于 item.id) */
|
|
18
|
+
anchorAttr?: string;
|
|
19
|
+
/** 跳转后锚点距容器顶部的留白(px),默认 16 */
|
|
20
|
+
offset?: number;
|
|
21
|
+
/** 轮次数 ≤ 该值时自动隐藏(0 = 始终显示),默认 1 */
|
|
22
|
+
minItems?: number;
|
|
23
|
+
/** 悬停/聚焦预览卡,默认开启 */
|
|
24
|
+
preview?: boolean;
|
|
25
|
+
/** 悬浮定位(absolute 靠右垂直居中,父级需 position: relative),默认开启 */
|
|
26
|
+
floating?: boolean;
|
|
27
|
+
/** 受控当前轮次 id(不传则由滚动位置自算) */
|
|
28
|
+
activeId?: string;
|
|
29
|
+
/** 无障碍名称 */
|
|
30
|
+
ariaLabel?: string;
|
|
31
|
+
}
|
|
32
|
+
export interface TurnRailEvents {
|
|
33
|
+
/** 点击/键盘选中某轮(父级一般无需处理,滚动定位已由组件完成) */
|
|
34
|
+
(e: "select", id: string, index: number): void;
|
|
35
|
+
/** 当前轮次变化(滚动跟随或点击都会触发) */
|
|
36
|
+
(e: "update:activeId", id: string): void;
|
|
37
|
+
}
|
|
@@ -9,7 +9,7 @@ declare function __VLS_template(): {
|
|
|
9
9
|
avatar?(_: {}): any;
|
|
10
10
|
};
|
|
11
11
|
refs: {};
|
|
12
|
-
rootEl:
|
|
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, {},
|
|
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,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
|
+
};
|