@yh-ui/components 0.1.56 → 1.0.4
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/affix/index.d.ts +11 -6
- package/dist/affix/src/affix.d.ts +10 -0
- package/dist/affix/src/affix.vue.d.ts +2 -2
- package/dist/ai-action-group/index.d.ts +5 -0
- package/dist/ai-action-group/src/ai-action-group.d.ts +3 -0
- package/dist/ai-agent-card/index.d.ts +7 -0
- package/dist/ai-agent-card/src/ai-agent-card.d.ts +10 -0
- package/dist/ai-artifacts/index.d.ts +8 -0
- package/dist/ai-artifacts/src/ai-artifacts.d.ts +11 -1
- package/dist/ai-attachments/index.d.ts +5 -0
- package/dist/ai-attachments/src/ai-attachments.d.ts +12 -1
- package/dist/ai-bubble/index.d.ts +12 -0
- package/dist/ai-bubble/src/ai-bubble.d.ts +8 -1
- package/dist/ai-bubble/src/ai-bubble.vue +24 -20
- package/dist/ai-bubble-list/index.d.ts +3 -0
- package/dist/ai-bubble-list/src/ai-bubble-list.d.ts +14 -1
- package/dist/ai-chat/index.d.ts +5 -0
- package/dist/ai-chat/src/ai-chat.d.ts +9 -0
- package/dist/ai-code-block/index.d.ts +4 -0
- package/dist/ai-code-block/src/ai-code-block.d.ts +4 -0
- package/dist/ai-code-editor/index.d.ts +5 -0
- package/dist/ai-code-editor/src/ai-code-editor.d.ts +2 -0
- package/dist/ai-code-runner/index.d.ts +5 -0
- package/dist/ai-code-runner/src/ai-code-runner.d.ts +2 -0
- package/dist/ai-conversations/index.d.ts +5 -0
- package/dist/ai-conversations/src/ai-conversations.d.ts +16 -1
- package/dist/ai-editor-sender/index.d.ts +9 -0
- package/dist/ai-editor-sender/src/ai-editor-sender.d.ts +15 -0
- package/dist/ai-file-card/index.d.ts +8 -0
- package/dist/ai-file-card/src/ai-file-card.d.ts +5 -1
- package/dist/ai-mention/index.d.ts +9 -0
- package/dist/ai-mention/src/ai-mention.d.ts +3 -0
- package/dist/ai-mermaid/index.d.ts +5 -0
- package/dist/ai-mermaid/src/ai-mermaid.d.ts +6 -1
- package/dist/ai-mermaid/src/ai-mermaid.vue +6 -1
- package/dist/ai-prompts/index.d.ts +5 -0
- package/dist/ai-prompts/src/ai-prompts.d.ts +10 -0
- package/dist/ai-provider/index.d.ts +10 -0
- package/dist/ai-provider/src/ai-provider.d.ts +28 -0
- package/dist/ai-sender/index.d.ts +6 -0
- package/dist/ai-sender/src/ai-sender.d.ts +11 -1
- package/dist/ai-sources/index.d.ts +6 -0
- package/dist/ai-sources/src/ai-sources.d.ts +5 -1
- package/dist/ai-thinking/index.d.ts +5 -0
- package/dist/ai-thinking/src/ai-thinking.d.ts +3 -0
- package/dist/ai-thought-chain/index.d.ts +6 -0
- package/dist/ai-thought-chain/src/ai-thought-chain.d.ts +3 -0
- package/dist/ai-voice-trigger/index.d.ts +5 -0
- package/dist/ai-voice-trigger/src/ai-voice-trigger.d.ts +4 -0
- package/dist/ai-welcome/index.d.ts +5 -0
- package/dist/ai-welcome/src/ai-welcome.d.ts +6 -0
- package/dist/alert/index.d.ts +6 -0
- package/dist/alert/src/alert.d.ts +7 -0
- package/dist/alert/src/alert.vue +1 -1
- package/dist/autocomplete/index.d.ts +8 -0
- package/dist/avatar/index.cjs +15 -0
- package/dist/avatar/index.d.ts +19 -9
- package/dist/avatar/index.mjs +1 -0
- package/dist/back-top/index.d.ts +4 -0
- package/dist/back-top/src/back-top.d.ts +3 -0
- package/dist/badge/index.d.ts +4 -0
- package/dist/breadcrumb/index.d.ts +6 -0
- package/dist/breadcrumb/src/breadcrumb.d.ts +6 -0
- package/dist/button/index.d.ts +9 -0
- package/dist/calendar/index.d.ts +16 -1230
- package/dist/calendar/src/calendar.d.ts +16 -0
- package/dist/calendar/src/calendar.vue.d.ts +2 -415
- package/dist/card/index.d.ts +4 -0
- package/dist/carousel/index.d.ts +9 -0
- package/dist/carousel/src/carousel-item.d.ts +3 -0
- package/dist/carousel/src/carousel.d.ts +25 -0
- package/dist/cascader/index.d.ts +9 -7
- package/dist/cascader/src/cascader.d.ts +2 -2
- package/dist/cascader/src/cascader.vue +82 -30
- package/dist/cascader/src/cascader.vue.d.ts +1 -1
- package/dist/category-nav/index.d.ts +4 -0
- package/dist/category-nav/src/category-nav.d.ts +15 -0
- package/dist/checkbox/index.d.ts +10 -0
- package/dist/col/index.d.ts +34 -180
- package/dist/col/src/col.d.ts +14 -30
- package/dist/col/src/col.vue.d.ts +15 -90
- package/dist/color-picker/index.d.ts +11 -1
- package/dist/color-picker/src/color-picker.d.ts +8 -0
- package/dist/color-picker/src/color-picker.vue +6 -0
- package/dist/color-picker/src/color-picker.vue.d.ts +6 -1
- package/dist/config-provider/index.d.ts +3 -0
- package/dist/config-provider/src/config-provider.cjs +9 -0
- package/dist/config-provider/src/config-provider.d.ts +3 -0
- package/dist/config-provider/src/config-provider.mjs +9 -0
- package/dist/container/index.d.ts +15 -0
- package/dist/container/src/container.d.ts +12 -0
- package/dist/countdown/index.d.ts +9 -0
- package/dist/coupon-card/index.d.ts +3 -0
- package/dist/coupon-card/src/coupon-card.d.ts +10 -0
- package/dist/date-picker/index.d.ts +8 -0
- package/dist/date-picker/src/date-picker.d.ts +9 -0
- package/dist/descriptions/index.d.ts +6 -0
- package/dist/descriptions/src/descriptions.d.ts +9 -0
- package/dist/dialog/index.d.ts +12 -6
- package/dist/dialog/src/dialog.d.ts +13 -0
- package/dist/dialog/src/dialog.vue.d.ts +2 -2
- package/dist/divider/index.d.ts +2 -0
- package/dist/drawer/index.d.ts +8 -3
- package/dist/drawer/src/drawer.d.ts +11 -0
- package/dist/drawer/src/drawer.vue.d.ts +1 -1
- package/dist/dropdown/index.d.ts +11 -0
- package/dist/dropdown/src/dropdown.d.ts +10 -0
- package/dist/empty/index.cjs +15 -0
- package/dist/empty/index.d.ts +6 -0
- package/dist/empty/index.mjs +1 -0
- package/dist/filter-bar/index.d.ts +9 -0
- package/dist/filter-bar/src/filter-bar.d.ts +12 -0
- package/dist/form/index.d.ts +11 -0
- package/dist/gantt-chart/index.d.ts +8 -6
- package/dist/gantt-chart/src/gantt-chart.d.ts +1 -4
- package/dist/gantt-chart/src/gantt-chart.vue +43 -33
- package/dist/grid/index.d.ts +6 -0
- package/dist/grid/src/grid.d.ts +3 -0
- package/dist/icon/index.d.ts +5 -0
- package/dist/image/index.d.ts +18 -1
- package/dist/image/src/image-viewer.d.ts +11 -0
- package/dist/image/src/image-viewer.vue +56 -9
- package/dist/image/src/image-viewer.vue.d.ts +9 -1
- package/dist/image/src/image.d.ts +4 -0
- package/dist/image/src/image.vue +1 -1
- package/dist/image-magnifier/index.d.ts +6 -0
- package/dist/image-magnifier/src/image-magnifier.d.ts +15 -0
- package/dist/image-magnifier/src/image-magnifier.vue +9 -5
- package/dist/infinite-scroll/index.d.ts +5 -0
- package/dist/infinite-scroll/src/infinite-scroll.d.ts +10 -0
- package/dist/infinite-scroll/src/infinite-scroll.vue +37 -25
- package/dist/infinite-scroll/src/infinite-scroll.vue.d.ts +0 -2
- package/dist/input/index.d.ts +10 -0
- package/dist/input-number/index.d.ts +7 -0
- package/dist/input-tag/index.d.ts +7 -0
- package/dist/loading/index.d.ts +2 -0
- package/dist/loading/src/service.cjs +5 -1
- package/dist/loading/src/service.mjs +3 -1
- package/dist/lucky-draw/index.d.ts +4 -0
- package/dist/lucky-draw/src/lucky-draw.d.ts +6 -0
- package/dist/markdown-it.d.ts +2 -1
- package/dist/marquee/index.d.ts +12 -6
- package/dist/marquee/src/marquee.d.ts +8 -0
- package/dist/marquee/src/marquee.vue +16 -6
- package/dist/marquee/src/marquee.vue.d.ts +2 -5
- package/dist/mention/index.d.ts +9 -0
- package/dist/menu/index.d.ts +14 -0
- package/dist/menu/src/menu.d.ts +9 -0
- package/dist/message/index.d.ts +11 -0
- package/dist/message/src/message.d.ts +40 -32
- package/dist/message/src/message.vue.d.ts +1 -1
- package/dist/message-box/index.d.ts +7 -0
- package/dist/notification/index.d.ts +11 -0
- package/dist/notification/src/notification.d.ts +37 -33
- package/dist/notification/src/notification.vue.d.ts +1 -1
- package/dist/pagination/index.d.ts +6 -0
- package/dist/pagination/src/pagination.d.ts +3 -0
- package/dist/popconfirm/index.d.ts +5 -0
- package/dist/popconfirm/src/popconfirm.d.ts +11 -1
- package/dist/popover/index.d.ts +6 -0
- package/dist/popover/src/popover.d.ts +12 -1
- package/dist/price/index.d.ts +1 -0
- package/dist/price/src/price.d.ts +7 -0
- package/dist/product-card/index.d.ts +7 -3
- package/dist/product-card/src/product-card.cjs +1 -36
- package/dist/product-card/src/product-card.d.ts +5 -35
- package/dist/product-card/src/product-card.mjs +1 -36
- package/dist/product-card/src/product-card.vue +8 -14
- package/dist/product-card/src/product-card.vue.d.ts +1 -1
- package/dist/progress/index.d.ts +5 -0
- package/dist/progress/src/progress.d.ts +5 -0
- package/dist/radio/index.d.ts +14 -0
- package/dist/rate/index.d.ts +11 -6
- package/dist/rate/src/rate.d.ts +10 -1
- package/dist/rate/src/rate.vue.d.ts +3 -3
- package/dist/result/index.d.ts +4 -0
- package/dist/row/index.d.ts +18 -12
- package/dist/row/src/row.d.ts +13 -8
- package/dist/row/src/row.vue.d.ts +6 -6
- package/dist/scrollbar/index.d.ts +10 -20
- package/dist/scrollbar/src/scrollbar.d.ts +16 -4
- package/dist/scrollbar/src/scrollbar.vue.d.ts +2 -8
- package/dist/select/index.d.ts +15 -3
- package/dist/select/src/select.d.ts +4 -1
- package/dist/select/src/select.vue +1 -1
- package/dist/select/src/select.vue.d.ts +1 -1
- package/dist/skeleton/index.d.ts +6 -0
- package/dist/skeleton/src/skeleton.d.ts +4 -0
- package/dist/sku-selector/index.d.ts +5 -0
- package/dist/sku-selector/src/sku-selector.cjs +1 -14
- package/dist/sku-selector/src/sku-selector.d.ts +15 -17
- package/dist/sku-selector/src/sku-selector.mjs +1 -14
- package/dist/sku-selector/src/sku-selector.vue +6 -11
- package/dist/slider/index.d.ts +20 -3
- package/dist/slider/src/slider.d.ts +15 -0
- package/dist/slider/src/slider.vue +5 -0
- package/dist/slider/src/slider.vue.d.ts +5 -1
- package/dist/smart-address/index.d.ts +11 -6
- package/dist/smart-address/src/smart-address.cjs +0 -19
- package/dist/smart-address/src/smart-address.d.ts +13 -20
- package/dist/smart-address/src/smart-address.mjs +0 -19
- package/dist/smart-address/src/smart-address.vue.d.ts +3 -3
- package/dist/space/index.cjs +15 -0
- package/dist/space/index.d.ts +22 -12
- package/dist/space/index.mjs +1 -0
- package/dist/spin/index.d.ts +16 -10
- package/dist/spin/src/spin.cjs +5 -1
- package/dist/spin/src/spin.d.ts +13 -1
- package/dist/spin/src/spin.mjs +4 -0
- package/dist/spin/src/spin.vue +2 -2
- package/dist/spin/src/spin.vue.d.ts +4 -5
- package/dist/steps/index.d.ts +13 -0
- package/dist/steps/src/step.d.ts +6 -0
- package/dist/steps/src/steps.d.ts +3 -0
- package/dist/submit-bar/index.d.ts +3 -0
- package/dist/submit-bar/src/submit-bar.d.ts +7 -0
- package/dist/switch/index.d.ts +5 -0
- package/dist/switch/src/switch.d.ts +11 -1
- package/dist/table/index.d.ts +14 -4
- package/dist/tabs/index.d.ts +11 -0
- package/dist/tabs/src/tab-pane.d.ts +3 -0
- package/dist/tabs/src/tabs.d.ts +12 -0
- package/dist/tag/index.d.ts +7 -0
- package/dist/time-picker/index.d.ts +13 -3
- package/dist/time-picker/src/time-picker.d.ts +2 -2
- package/dist/time-picker/src/time-picker.vue +1 -1
- package/dist/time-picker/src/time-picker.vue.d.ts +1 -1
- package/dist/time-select/index.d.ts +10 -3
- package/dist/time-select/src/time-select.d.ts +2 -2
- package/dist/time-select/src/time-select.vue +79 -35
- package/dist/time-select/src/time-select.vue.d.ts +1 -1
- package/dist/tooltip/index.d.ts +7 -0
- package/dist/tooltip/src/tooltip.d.ts +11 -1
- package/dist/transfer/index.d.ts +6 -4
- package/dist/transfer/src/transfer-panel.vue +78 -27
- package/dist/transfer/src/transfer-panel.vue.d.ts +1 -1
- package/dist/transfer/src/transfer.d.ts +4 -4
- package/dist/transfer/src/transfer.vue +82 -26
- package/dist/transfer/src/transfer.vue.d.ts +2 -2
- package/dist/tree/index.d.ts +7 -0
- package/dist/tree-select/index.d.ts +8 -0
- package/dist/typography/index.d.ts +11 -0
- package/dist/upload/index.d.ts +10 -0
- package/dist/upload/src/upload.d.ts +19 -0
- package/dist/viewerjs.d.ts +2 -1
- package/dist/waterfall/index.d.ts +6 -0
- package/dist/waterfall/src/waterfall.d.ts +25 -7
- package/dist/watermark/index.d.ts +11 -54
- package/dist/watermark/src/watermark.d.ts +16 -9
- package/dist/watermark/src/watermark.vue +27 -5
- package/dist/watermark/src/watermark.vue.d.ts +3 -27
- package/package.json +6 -5
package/dist/affix/index.d.ts
CHANGED
|
@@ -45,8 +45,8 @@ export declare const YhAffix: import("@yh-ui/utils").SFCWithInstall<{
|
|
|
45
45
|
onChange?: ((fixed: boolean) => any) | undefined;
|
|
46
46
|
}>, {
|
|
47
47
|
update: () => void;
|
|
48
|
-
fixed: import("vue").Ref<boolean
|
|
49
|
-
scrollTop: import("vue").Ref<number
|
|
48
|
+
fixed: import("vue").Ref<boolean>;
|
|
49
|
+
scrollTop: import("vue").Ref<number>;
|
|
50
50
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
51
51
|
scroll: (payload: {
|
|
52
52
|
scrollTop: number;
|
|
@@ -115,8 +115,8 @@ export declare const YhAffix: import("@yh-ui/utils").SFCWithInstall<{
|
|
|
115
115
|
onChange?: ((fixed: boolean) => any) | undefined;
|
|
116
116
|
}>, {
|
|
117
117
|
update: () => void;
|
|
118
|
-
fixed: import("vue").Ref<boolean
|
|
119
|
-
scrollTop: import("vue").Ref<number
|
|
118
|
+
fixed: import("vue").Ref<boolean>;
|
|
119
|
+
scrollTop: import("vue").Ref<number>;
|
|
120
120
|
}, {}, {}, {}, {
|
|
121
121
|
readonly disabled: boolean;
|
|
122
122
|
readonly themeOverrides: import("@yh-ui/theme").ComponentThemeVars;
|
|
@@ -176,8 +176,8 @@ export declare const YhAffix: import("@yh-ui/utils").SFCWithInstall<{
|
|
|
176
176
|
onChange?: ((fixed: boolean) => any) | undefined;
|
|
177
177
|
}>, {
|
|
178
178
|
update: () => void;
|
|
179
|
-
fixed: import("vue").Ref<boolean
|
|
180
|
-
scrollTop: import("vue").Ref<number
|
|
179
|
+
fixed: import("vue").Ref<boolean>;
|
|
180
|
+
scrollTop: import("vue").Ref<number>;
|
|
181
181
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
182
182
|
scroll: (payload: {
|
|
183
183
|
scrollTop: number;
|
|
@@ -204,3 +204,8 @@ export declare const YhAffix: import("@yh-ui/utils").SFCWithInstall<{
|
|
|
204
204
|
export default YhAffix;
|
|
205
205
|
export * from './src/affix';
|
|
206
206
|
export type AffixInstance = InstanceType<typeof Affix>;
|
|
207
|
+
export type YhAffixInstance = AffixInstance;
|
|
208
|
+
export type YhAffixProps = import('./src/affix').AffixProps;
|
|
209
|
+
export type YhAffixEmits = import('./src/affix').AffixEmits;
|
|
210
|
+
export type YhAffixSlots = import('./src/affix').AffixSlots;
|
|
211
|
+
export type YhAffixExpose = import('./src/affix').AffixExpose;
|
|
@@ -58,3 +58,13 @@ export declare const affixEmits: {
|
|
|
58
58
|
};
|
|
59
59
|
export type AffixProps = ExtractPropTypes<typeof affixProps>;
|
|
60
60
|
export type AffixEmits = typeof affixEmits;
|
|
61
|
+
export interface AffixSlots {
|
|
62
|
+
default?: (props: {
|
|
63
|
+
fixed: boolean;
|
|
64
|
+
}) => unknown;
|
|
65
|
+
}
|
|
66
|
+
export interface AffixExpose {
|
|
67
|
+
update: () => void;
|
|
68
|
+
fixed: import('vue').Ref<boolean>;
|
|
69
|
+
scrollTop: import('vue').Ref<number>;
|
|
70
|
+
}
|
|
@@ -44,8 +44,8 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
44
44
|
};
|
|
45
45
|
}>, {
|
|
46
46
|
update: () => void;
|
|
47
|
-
fixed: import("vue").Ref<boolean
|
|
48
|
-
scrollTop: import("vue").Ref<number
|
|
47
|
+
fixed: import("vue").Ref<boolean>;
|
|
48
|
+
scrollTop: import("vue").Ref<number>;
|
|
49
49
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
50
50
|
scroll: (payload: {
|
|
51
51
|
scrollTop: number;
|
|
@@ -110,3 +110,8 @@ export declare const YhAiActionGroup: import("@yh-ui/utils").SFCWithInstall<{
|
|
|
110
110
|
export default YhAiActionGroup;
|
|
111
111
|
export * from './src/ai-action-group';
|
|
112
112
|
export type AiActionGroupInstance = InstanceType<typeof AiActionGroup>;
|
|
113
|
+
export type YhAiActionGroupInstance = AiActionGroupInstance;
|
|
114
|
+
export type YhAiActionGroupProps = import('./src/ai-action-group').AiActionGroupProps;
|
|
115
|
+
export type YhAiActionGroupEmits = import('./src/ai-action-group').AiActionGroupEmits;
|
|
116
|
+
export type YhAiActionGroupSlots = import('./src/ai-action-group').AiActionGroupSlots;
|
|
117
|
+
export type YhAiActionItem = import('./src/ai-action-group').ActionItem;
|
|
@@ -176,3 +176,10 @@ export declare const YhAiAgentCard: import("@yh-ui/utils").SFCWithInstall<{
|
|
|
176
176
|
export default YhAiAgentCard;
|
|
177
177
|
export * from './src/ai-agent-card';
|
|
178
178
|
export type AiAgentCardInstance = InstanceType<typeof AiAgentCard>;
|
|
179
|
+
export type YhAiAgentCardInstance = AiAgentCardInstance;
|
|
180
|
+
export type YhAiAgentCardProps = import('./src/ai-agent-card').AiAgentCardProps;
|
|
181
|
+
export type YhAiAgentCardEmits = import('./src/ai-agent-card').AiAgentCardEmits;
|
|
182
|
+
export type YhAiAgentCardSlots = import('./src/ai-agent-card').AiAgentCardSlots;
|
|
183
|
+
export type YhAgentCapability = import('./src/ai-agent-card').AgentCapability;
|
|
184
|
+
export type YhAgentStats = import('./src/ai-agent-card').AgentStats;
|
|
185
|
+
export type YhAgentData = import('./src/ai-agent-card').AgentData;
|
|
@@ -120,3 +120,13 @@ export declare const aiAgentCardEmits: {
|
|
|
120
120
|
share: (data: AgentData) => boolean;
|
|
121
121
|
};
|
|
122
122
|
export type AiAgentCardEmits = typeof aiAgentCardEmits;
|
|
123
|
+
export interface AiAgentCardSlots {
|
|
124
|
+
avatar?: () => unknown;
|
|
125
|
+
actions?: (props: {
|
|
126
|
+
data: AgentData;
|
|
127
|
+
use: () => void;
|
|
128
|
+
}) => unknown;
|
|
129
|
+
default?: (props: {
|
|
130
|
+
data: AgentData;
|
|
131
|
+
}) => unknown;
|
|
132
|
+
}
|
|
@@ -276,3 +276,11 @@ export declare const YhAiArtifacts: import("@yh-ui/utils").SFCWithInstall<{
|
|
|
276
276
|
export default YhAiArtifacts;
|
|
277
277
|
export * from './src/ai-artifacts';
|
|
278
278
|
export type AiArtifactsInstance = InstanceType<typeof AiArtifacts>;
|
|
279
|
+
export type YhAiArtifactsInstance = AiArtifactsInstance;
|
|
280
|
+
export type YhAiArtifactsProps = import('./src/ai-artifacts').AiArtifactsProps;
|
|
281
|
+
export type YhAiArtifactsEmits = import('./src/ai-artifacts').AiArtifactsEmits;
|
|
282
|
+
export type YhAiArtifactsSlots = import('./src/ai-artifacts').AiArtifactsSlots;
|
|
283
|
+
export type YhArtifactType = import('./src/ai-artifacts').ArtifactType;
|
|
284
|
+
export type YhArtifactVersion = import('./src/ai-artifacts').ArtifactVersion;
|
|
285
|
+
export type YhArtifactEChartsOption = import('./src/ai-artifacts').ArtifactEChartsOption;
|
|
286
|
+
export type YhArtifactData = import('./src/ai-artifacts').ArtifactData;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ExtractPropTypes, PropType } from 'vue';
|
|
1
|
+
import type { ExtractPropTypes, PropType, SlotsType } from 'vue';
|
|
2
2
|
import type { ComponentThemeVars } from '@yh-ui/theme';
|
|
3
3
|
export type ArtifactType = 'code' | 'html' | 'markdown' | 'react' | 'vue' | 'diagram' | 'chart' | 'sandbox' | 'canvas'
|
|
4
4
|
/** 交互式图表 - 使用 ECharts */
|
|
@@ -172,3 +172,13 @@ export declare const aiArtifactsEmits: {
|
|
|
172
172
|
close: () => boolean;
|
|
173
173
|
};
|
|
174
174
|
export type AiArtifactsEmits = typeof aiArtifactsEmits;
|
|
175
|
+
export interface AiArtifactsSlots {
|
|
176
|
+
chart?: (props: {
|
|
177
|
+
data: ArtifactVersion | null;
|
|
178
|
+
title: string;
|
|
179
|
+
}) => unknown;
|
|
180
|
+
canvas?: (props: {
|
|
181
|
+
data: ArtifactVersion | null;
|
|
182
|
+
}) => unknown;
|
|
183
|
+
}
|
|
184
|
+
export type AiArtifactsSlotTypes = SlotsType<AiArtifactsSlots>;
|
|
@@ -361,3 +361,8 @@ export * from './src/ai-attachments';
|
|
|
361
361
|
export type AiAttachmentsInstance = InstanceType<typeof AiAttachments>;
|
|
362
362
|
export type YhAiAttachmentsInstance = AiAttachmentsInstance;
|
|
363
363
|
export type YhAiAttachmentsProps = import('./src/ai-attachments').AiAttachmentsProps;
|
|
364
|
+
export type YhAiAttachmentsEmits = import('./src/ai-attachments').AiAttachmentsEmits;
|
|
365
|
+
export type YhAiAttachmentsSlots = import('./src/ai-attachments').AiAttachmentsSlots;
|
|
366
|
+
export type YhOverflowMode = import('./src/ai-attachments').OverflowMode;
|
|
367
|
+
export type YhAttachmentItem = import('./src/ai-attachments').AttachmentItem;
|
|
368
|
+
export type YhPlaceholderType = import('./src/ai-attachments').PlaceholderType;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ExtractPropTypes, PropType } from 'vue';
|
|
1
|
+
import type { ExtractPropTypes, PropType, SlotsType } from 'vue';
|
|
2
2
|
import type { ComponentThemeVars } from '@yh-ui/theme';
|
|
3
3
|
import type { FileCardListItem } from '../../ai-file-card';
|
|
4
4
|
/** 溢出布局模式 */
|
|
@@ -125,3 +125,14 @@ export declare const aiAttachmentsEmits: {
|
|
|
125
125
|
}) => boolean;
|
|
126
126
|
};
|
|
127
127
|
export type AiAttachmentsEmits = typeof aiAttachmentsEmits;
|
|
128
|
+
export interface AiAttachmentsSlots {
|
|
129
|
+
'file-item'?: (props: {
|
|
130
|
+
item: AttachmentItem;
|
|
131
|
+
index: number;
|
|
132
|
+
}) => unknown;
|
|
133
|
+
'upload-button'?: (props: {
|
|
134
|
+
canUpload: boolean;
|
|
135
|
+
}) => unknown;
|
|
136
|
+
'drop-area'?: () => unknown;
|
|
137
|
+
}
|
|
138
|
+
export type AiAttachmentsSlotTypes = SlotsType<AiAttachmentsSlots>;
|
|
@@ -442,3 +442,15 @@ export declare const YhAiBubble: import("@yh-ui/utils").SFCWithInstall<{
|
|
|
442
442
|
export default YhAiBubble;
|
|
443
443
|
export * from './src/ai-bubble';
|
|
444
444
|
export type AiBubbleInstance = InstanceType<typeof AiBubble>;
|
|
445
|
+
export type YhAiBubbleInstance = AiBubbleInstance;
|
|
446
|
+
export type YhAiBubbleProps = import('./src/ai-bubble').AiBubbleProps;
|
|
447
|
+
export type YhAiBubbleSlots = import('./src/ai-bubble').AiBubbleSlots;
|
|
448
|
+
export type YhAiCitation = import('./src/ai-bubble').AiCitation;
|
|
449
|
+
export type YhAiMultimodal = import('./src/ai-bubble').AiMultimodal;
|
|
450
|
+
export type YhAiCodeBlockOptions = import('./src/ai-bubble').AiCodeBlockOptions;
|
|
451
|
+
export type YhAiMermaidConfig = import('./src/ai-bubble').AiMermaidConfig;
|
|
452
|
+
export type YhAiStructuredTableData = import('./src/ai-bubble').AiStructuredTableData;
|
|
453
|
+
export type YhAiLatexOptions = import('./src/ai-bubble').AiLatexOptions;
|
|
454
|
+
export type YhAiFilePreviewOptions = import('./src/ai-bubble').AiFilePreviewOptions;
|
|
455
|
+
export type YhAiStructuredData = import('./src/ai-bubble').AiStructuredData;
|
|
456
|
+
export type YhAiMarkdownOptions = import('./src/ai-bubble').AiMarkdownOptions;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ExtractPropTypes, PropType } from 'vue';
|
|
1
|
+
import type { ExtractPropTypes, PropType, SlotsType } from 'vue';
|
|
2
2
|
export interface AiCitation {
|
|
3
3
|
/**
|
|
4
4
|
* 引用索引,对应文本中的 [1], [2] 等
|
|
@@ -463,3 +463,10 @@ export declare const aiBubbleProps: {
|
|
|
463
463
|
};
|
|
464
464
|
};
|
|
465
465
|
export type AiBubbleProps = ExtractPropTypes<typeof aiBubbleProps>;
|
|
466
|
+
export interface AiBubbleSlots {
|
|
467
|
+
avatar?: () => unknown;
|
|
468
|
+
header?: () => unknown;
|
|
469
|
+
default?: () => unknown;
|
|
470
|
+
footer?: () => unknown;
|
|
471
|
+
}
|
|
472
|
+
export type AiBubbleSlotTypes = SlotsType<AiBubbleSlots>;
|
|
@@ -728,28 +728,32 @@ const getMarkdownInstance = () => {
|
|
|
728
728
|
return wrapperStart + `<pre class="hljs ${lang || ""}"><code>${result}</code></pre>` + wrapperEnd;
|
|
729
729
|
}
|
|
730
730
|
});
|
|
731
|
-
md.block.ruler.before(
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
state.
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
731
|
+
md.block.ruler.before(
|
|
732
|
+
"code",
|
|
733
|
+
"mermaid",
|
|
734
|
+
(state, startLine, _endLine, silent) => {
|
|
735
|
+
const start = state.bMarks[startLine];
|
|
736
|
+
const max = state.eMarks[startLine];
|
|
737
|
+
const line = state.src.slice(start, max);
|
|
738
|
+
if (!line.trim().startsWith("```mermaid")) return false;
|
|
739
|
+
if (!silent) {
|
|
740
|
+
state.line = startLine + 1;
|
|
741
|
+
const lines = [];
|
|
742
|
+
while (state.line < state.lineMax) {
|
|
743
|
+
const lineContent = state.src.slice(state.bMarks[state.line], state.eMarks[state.line]);
|
|
744
|
+
if (lineContent.trim().startsWith("```")) break;
|
|
745
|
+
lines.push(lineContent);
|
|
746
|
+
state.line++;
|
|
747
|
+
}
|
|
748
|
+
let token = state.push("mermaid_open", "div", 1);
|
|
749
|
+
token.attrSet("class", "mermaid-block");
|
|
750
|
+
token = state.push("mermaid_code", "", 0);
|
|
751
|
+
token.content = lines.join("\n");
|
|
752
|
+
token = state.push("mermaid_close", "div", -1);
|
|
744
753
|
}
|
|
745
|
-
|
|
746
|
-
token.attrSet("class", "mermaid-block");
|
|
747
|
-
token = state.push("mermaid_code", "", 0);
|
|
748
|
-
token.content = lines.join("\n");
|
|
749
|
-
token = state.push("mermaid_close", "div", -1);
|
|
754
|
+
return true;
|
|
750
755
|
}
|
|
751
|
-
|
|
752
|
-
});
|
|
756
|
+
);
|
|
753
757
|
md.renderer.rules.mermaid_open = () => '<div class="mermaid-block">';
|
|
754
758
|
md.renderer.rules.mermaid_code = (tokens, idx) => {
|
|
755
759
|
const code = tokens[idx].content;
|
|
@@ -154,3 +154,6 @@ export * from './src/ai-bubble-list';
|
|
|
154
154
|
export type AiBubbleListInstance = InstanceType<typeof AiBubbleList>;
|
|
155
155
|
export type YhAiBubbleListInstance = AiBubbleListInstance;
|
|
156
156
|
export type YhAiBubbleListProps = import('./src/ai-bubble-list').AiBubbleListProps;
|
|
157
|
+
export type YhAiBubbleListSlots = import('./src/ai-bubble-list').AiBubbleListSlots;
|
|
158
|
+
export type YhAiBubbleListExpose = import('./src/ai-bubble-list').AiBubbleListExpose;
|
|
159
|
+
export type YhAiBubbleListItem = import('./src/ai-bubble-list').AiBubbleListItem;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ExtractPropTypes, PropType } from 'vue';
|
|
1
|
+
import type { ExtractPropTypes, PropType, SlotsType, Ref } from 'vue';
|
|
2
2
|
import type { AiBubbleProps } from '../../ai-bubble';
|
|
3
3
|
export interface AiBubbleListItem extends Partial<AiBubbleProps> {
|
|
4
4
|
id?: string | number;
|
|
@@ -56,3 +56,16 @@ export declare const aiBubbleListProps: {
|
|
|
56
56
|
};
|
|
57
57
|
};
|
|
58
58
|
export type AiBubbleListProps = ExtractPropTypes<typeof aiBubbleListProps>;
|
|
59
|
+
export interface AiBubbleListSlots {
|
|
60
|
+
bubble?: (props: {
|
|
61
|
+
item: AiBubbleListItem;
|
|
62
|
+
index: number;
|
|
63
|
+
}) => unknown;
|
|
64
|
+
loading?: () => unknown;
|
|
65
|
+
}
|
|
66
|
+
export type AiBubbleListSlotTypes = SlotsType<AiBubbleListSlots>;
|
|
67
|
+
export interface AiBubbleListExpose {
|
|
68
|
+
scrollToBottom: () => void;
|
|
69
|
+
scrollToIndex: (index: number) => void;
|
|
70
|
+
scrollRef: Ref<HTMLElement | null>;
|
|
71
|
+
}
|
package/dist/ai-chat/index.d.ts
CHANGED
|
@@ -164,3 +164,8 @@ export declare const YhAiChat: import("@yh-ui/utils").SFCWithInstall<{
|
|
|
164
164
|
export default YhAiChat;
|
|
165
165
|
export * from './src/ai-chat';
|
|
166
166
|
export type AiChatInstance = InstanceType<typeof AiChat>;
|
|
167
|
+
export type YhAiChatInstance = AiChatInstance;
|
|
168
|
+
export type YhAiChatProps = import('./src/ai-chat').AiChatProps;
|
|
169
|
+
export type YhAiChatEmits = import('./src/ai-chat').AiChatEmits;
|
|
170
|
+
export type YhAiChatSlots = import('./src/ai-chat').AiChatSlots;
|
|
171
|
+
export type YhAiChatMessage = import('./src/ai-chat').AiChatMessage;
|
|
@@ -76,3 +76,12 @@ export declare const aiChatEmits: {
|
|
|
76
76
|
clear: () => boolean;
|
|
77
77
|
};
|
|
78
78
|
export type AiChatEmits = typeof aiChatEmits;
|
|
79
|
+
export interface AiChatSlots {
|
|
80
|
+
header?: () => unknown;
|
|
81
|
+
message?: (props: {
|
|
82
|
+
message: AiChatMessage;
|
|
83
|
+
index: number;
|
|
84
|
+
}) => unknown;
|
|
85
|
+
loading?: () => unknown;
|
|
86
|
+
sender?: () => unknown;
|
|
87
|
+
}
|
|
@@ -220,3 +220,7 @@ export declare const YhAiCodeBlock: import("@yh-ui/utils").SFCWithInstall<{
|
|
|
220
220
|
export default YhAiCodeBlock;
|
|
221
221
|
export * from './src/ai-code-block';
|
|
222
222
|
export type AiCodeBlockInstance = InstanceType<typeof AiCodeBlock>;
|
|
223
|
+
export type YhAiCodeBlockInstance = AiCodeBlockInstance;
|
|
224
|
+
export type YhAiCodeBlockProps = import('./src/ai-code-block').AiCodeBlockProps;
|
|
225
|
+
export type YhAiCodeBlockEmits = import('./src/ai-code-block').AiCodeBlockEmits;
|
|
226
|
+
export type YhAiCodeBlockSlots = import('./src/ai-code-block').AiCodeBlockSlots;
|
|
@@ -133,3 +133,8 @@ export declare const YhAiCodeEditor: import("@yh-ui/utils").SFCWithInstall<impor
|
|
|
133
133
|
export default YhAiCodeEditor;
|
|
134
134
|
export * from './src/ai-code-editor';
|
|
135
135
|
export type AiCodeEditorInstance = InstanceType<typeof AiCodeEditor>;
|
|
136
|
+
export type YhAiCodeEditorInstance = AiCodeEditorInstance;
|
|
137
|
+
export type YhAiCodeEditorProps = import('./src/ai-code-editor').AiCodeEditorProps;
|
|
138
|
+
export type YhAiCodeEditorEmits = import('./src/ai-code-editor').AiCodeEditorEmits;
|
|
139
|
+
export type YhAiCodeEditorSlots = import('./src/ai-code-editor').AiCodeEditorSlots;
|
|
140
|
+
export type YhAiCodeEditorExpose = import('./src/ai-code-editor').AiCodeEditorExpose;
|
|
@@ -96,6 +96,8 @@ export declare const aiCodeEditorEmits: {
|
|
|
96
96
|
dispose: () => boolean;
|
|
97
97
|
};
|
|
98
98
|
export type AiCodeEditorEmits = typeof aiCodeEditorEmits;
|
|
99
|
+
export interface AiCodeEditorSlots {
|
|
100
|
+
}
|
|
99
101
|
export interface AiCodeEditorExpose {
|
|
100
102
|
getEditor: () => import('monaco-editor').editor.IStandaloneCodeEditor | null;
|
|
101
103
|
focus: () => void;
|
|
@@ -68,3 +68,8 @@ export declare const YhAiCodeRunner: import("@yh-ui/utils").SFCWithInstall<impor
|
|
|
68
68
|
export default YhAiCodeRunner;
|
|
69
69
|
export * from './src/ai-code-runner';
|
|
70
70
|
export type AiCodeRunnerInstance = InstanceType<typeof AiCodeRunner>;
|
|
71
|
+
export type YhAiCodeRunnerInstance = AiCodeRunnerInstance;
|
|
72
|
+
export type YhAiCodeRunnerProps = import('./src/ai-code-runner').AiCodeRunnerProps;
|
|
73
|
+
export type YhAiCodeRunnerEmits = import('./src/ai-code-runner').AiCodeRunnerEmits;
|
|
74
|
+
export type YhAiCodeRunnerSlots = import('./src/ai-code-runner').AiCodeRunnerSlots;
|
|
75
|
+
export type YhAiCodeRunnerExpose = import('./src/ai-code-runner').AiCodeRunnerExpose;
|
|
@@ -47,6 +47,8 @@ export declare const aiCodeRunnerEmits: {
|
|
|
47
47
|
ready: (instance: WebContainer) => boolean;
|
|
48
48
|
};
|
|
49
49
|
export type AiCodeRunnerEmits = typeof aiCodeRunnerEmits;
|
|
50
|
+
export interface AiCodeRunnerSlots {
|
|
51
|
+
}
|
|
50
52
|
export interface AiCodeRunnerExpose {
|
|
51
53
|
run: () => Promise<void>;
|
|
52
54
|
stop: () => void;
|
|
@@ -216,3 +216,8 @@ export declare const YhAiConversations: import("@yh-ui/utils").SFCWithInstall<{
|
|
|
216
216
|
export default YhAiConversations;
|
|
217
217
|
export * from './src/ai-conversations';
|
|
218
218
|
export type AiConversationsInstance = InstanceType<typeof AiConversations>;
|
|
219
|
+
export type YhAiConversationsInstance = AiConversationsInstance;
|
|
220
|
+
export type YhAiConversationsProps = import('./src/ai-conversations').AiConversationsProps;
|
|
221
|
+
export type YhAiConversationsEmits = import('./src/ai-conversations').AiConversationsEmits;
|
|
222
|
+
export type YhAiConversationsSlots = import('./src/ai-conversations').AiConversationsSlots;
|
|
223
|
+
export type YhAiConversationsExpose = import('./src/ai-conversations').AiConversationsExpose;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ExtractPropTypes, PropType } from 'vue';
|
|
1
|
+
import type { ExtractPropTypes, PropType, SlotsType } from 'vue';
|
|
2
2
|
import type { AiConversation } from '@yh-ui/hooks';
|
|
3
3
|
export declare const aiConversationsProps: {
|
|
4
4
|
/**
|
|
@@ -93,3 +93,18 @@ export declare const aiConversationsEmits: {
|
|
|
93
93
|
pin: (conversation: AiConversation, pinned: boolean) => boolean;
|
|
94
94
|
};
|
|
95
95
|
export type AiConversationsEmits = typeof aiConversationsEmits;
|
|
96
|
+
export interface AiConversationsSlots {
|
|
97
|
+
'add-icon'?: () => unknown;
|
|
98
|
+
'add-text'?: () => unknown;
|
|
99
|
+
'group-label'?: (props: {
|
|
100
|
+
label: string;
|
|
101
|
+
}) => unknown;
|
|
102
|
+
'edit-icon'?: () => unknown;
|
|
103
|
+
'delete-icon'?: () => unknown;
|
|
104
|
+
empty?: () => unknown;
|
|
105
|
+
}
|
|
106
|
+
export type AiConversationsSlotTypes = SlotsType<AiConversationsSlots>;
|
|
107
|
+
export interface AiConversationsExpose {
|
|
108
|
+
scrollToItem: (id: string) => void;
|
|
109
|
+
scrollToIndex: (index: number) => void;
|
|
110
|
+
}
|
|
@@ -417,3 +417,12 @@ export declare const YhAiEditorSender: import("@yh-ui/utils").SFCWithInstall<{
|
|
|
417
417
|
export default YhAiEditorSender;
|
|
418
418
|
export * from './src/ai-editor-sender';
|
|
419
419
|
export type AiEditorSenderInstance = InstanceType<typeof AiEditorSender>;
|
|
420
|
+
export type YhAiEditorSenderInstance = AiEditorSenderInstance;
|
|
421
|
+
export type YhAiEditorSenderProps = import('./src/ai-editor-sender').AiEditorSenderProps;
|
|
422
|
+
export type YhAiEditorSenderEmits = import('./src/ai-editor-sender').AiEditorSenderEmits;
|
|
423
|
+
export type YhAiEditorSenderSlots = import('./src/ai-editor-sender').AiEditorSenderSlots;
|
|
424
|
+
export type YhAiEditorSenderExpose = import('./src/ai-editor-sender').AiEditorSenderExpose;
|
|
425
|
+
export type YhAiEditorAttachmentItem = import('./src/ai-editor-sender').AiEditorAttachmentItem;
|
|
426
|
+
export type YhAiCommandItem = import('./src/ai-editor-sender').AiCommandItem;
|
|
427
|
+
export type YhCommandPanelPosition = import('./src/ai-editor-sender').CommandPanelPosition;
|
|
428
|
+
export type YhCommandPanelAlign = import('./src/ai-editor-sender').CommandPanelAlign;
|
|
@@ -183,3 +183,18 @@ export declare const aiEditorSenderEmits: {
|
|
|
183
183
|
'command-cascade': (_command: AiCommandItem, _parentCommand: AiCommandItem) => boolean;
|
|
184
184
|
};
|
|
185
185
|
export type AiEditorSenderEmits = typeof aiEditorSenderEmits;
|
|
186
|
+
export interface AiEditorSenderSlots {
|
|
187
|
+
header?: () => unknown;
|
|
188
|
+
toolbar?: () => unknown;
|
|
189
|
+
actions?: () => unknown;
|
|
190
|
+
submit?: (props: {
|
|
191
|
+
submit: () => void;
|
|
192
|
+
disabled: boolean;
|
|
193
|
+
loading: boolean;
|
|
194
|
+
}) => unknown;
|
|
195
|
+
}
|
|
196
|
+
export interface AiEditorSenderExpose {
|
|
197
|
+
focus: () => void;
|
|
198
|
+
blur: () => void;
|
|
199
|
+
clear: () => void;
|
|
200
|
+
}
|
|
@@ -229,3 +229,11 @@ export * from './src/ai-file-card';
|
|
|
229
229
|
export type AiFileCardInstance = InstanceType<typeof AiFileCard>;
|
|
230
230
|
export type YhAiFileCardInstance = AiFileCardInstance;
|
|
231
231
|
export type YhAiFileCardProps = import('./src/ai-file-card').AiFileCardProps;
|
|
232
|
+
export type YhAiFileCardEmits = import('./src/ai-file-card').AiFileCardEmits;
|
|
233
|
+
export type YhAiFileCardSlots = import('./src/ai-file-card').AiFileCardSlots;
|
|
234
|
+
export type YhPresetFileIcons = import('./src/ai-file-card').PresetFileIcons;
|
|
235
|
+
export type YhFileCardType = import('./src/ai-file-card').FileCardType;
|
|
236
|
+
export type YhFileCardSize = import('./src/ai-file-card').FileCardSize;
|
|
237
|
+
export type YhFileCardProps = import('./src/ai-file-card').FileCardProps;
|
|
238
|
+
export type YhFileCardListItem = import('./src/ai-file-card').FileCardListItem;
|
|
239
|
+
export type YhFileCardListProps = import('./src/ai-file-card').FileCardListProps;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ExtractPropTypes, PropType } from 'vue';
|
|
1
|
+
import type { ExtractPropTypes, PropType, SlotsType } from 'vue';
|
|
2
2
|
/** 预设图标类型 */
|
|
3
3
|
export type PresetFileIcons = 'default' | 'excel' | 'image' | 'markdown' | 'pdf' | 'ppt' | 'word' | 'zip' | 'video' | 'audio' | 'java' | 'javascript' | 'python' | 'txt';
|
|
4
4
|
/** 文件类型 */
|
|
@@ -174,3 +174,7 @@ export declare const aiFileCardEmits: {
|
|
|
174
174
|
click: () => boolean;
|
|
175
175
|
};
|
|
176
176
|
export type AiFileCardEmits = typeof aiFileCardEmits;
|
|
177
|
+
export interface AiFileCardSlots {
|
|
178
|
+
default?: () => unknown;
|
|
179
|
+
}
|
|
180
|
+
export type AiFileCardSlotTypes = SlotsType<AiFileCardSlots>;
|
|
@@ -380,3 +380,12 @@ export declare const YhAiMention: import("@yh-ui/utils").SFCWithInstall<{
|
|
|
380
380
|
export default YhAiMention;
|
|
381
381
|
export * from './src/ai-mention';
|
|
382
382
|
export type AiMentionInstance = InstanceType<typeof AiMention>;
|
|
383
|
+
export type YhAiMentionInstance = AiMentionInstance;
|
|
384
|
+
export type YhAiMentionProps = import('./src/ai-mention').AiMentionProps;
|
|
385
|
+
export type YhAiMentionEmits = import('./src/ai-mention').AiMentionEmits;
|
|
386
|
+
export type YhAiMentionSlots = import('./src/ai-mention').AiMentionSlots;
|
|
387
|
+
export type YhAiMentionExpose = import('./src/ai-mention').AiMentionExpose;
|
|
388
|
+
export type YhAiMentionType = import('./src/ai-mention').AiMentionType;
|
|
389
|
+
export type YhAiMentionOption = import('./src/ai-mention').AiMentionOption;
|
|
390
|
+
export type YhAiMentionFileNode = import('./src/ai-mention').AiMentionFileNode;
|
|
391
|
+
export type YhAiMentionFileLoader = import('./src/ai-mention').AiMentionFileLoader;
|
|
@@ -190,6 +190,9 @@ export declare const aiMentionEmits: {
|
|
|
190
190
|
keydown: (event: KeyboardEvent) => boolean;
|
|
191
191
|
};
|
|
192
192
|
export type AiMentionEmits = typeof aiMentionEmits;
|
|
193
|
+
export interface AiMentionSlots {
|
|
194
|
+
[name: string]: ((props?: Record<string, unknown>) => unknown) | undefined;
|
|
195
|
+
}
|
|
193
196
|
export interface AiMentionExpose {
|
|
194
197
|
focus: () => void;
|
|
195
198
|
blur: () => void;
|
|
@@ -226,3 +226,8 @@ export * from './src/ai-mermaid';
|
|
|
226
226
|
export type AiMermaidInstance = InstanceType<typeof AiMermaid>;
|
|
227
227
|
export type YhAiMermaidInstance = AiMermaidInstance;
|
|
228
228
|
export type YhAiMermaidProps = import('./src/ai-mermaid').AiMermaidProps;
|
|
229
|
+
export type YhAiMermaidEmits = import('./src/ai-mermaid').AiMermaidEmits;
|
|
230
|
+
export type YhAiMermaidSlots = import('./src/ai-mermaid').AiMermaidSlots;
|
|
231
|
+
export type YhMermaidConfig = import('./src/ai-mermaid').MermaidConfig;
|
|
232
|
+
export type YhMermaidActions = import('./src/ai-mermaid').MermaidActions;
|
|
233
|
+
export type YhRenderType = import('./src/ai-mermaid').RenderType;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ExtractPropTypes, PropType } from 'vue';
|
|
1
|
+
import type { ExtractPropTypes, PropType, SlotsType } from 'vue';
|
|
2
2
|
/** Mermaid 配置 */
|
|
3
3
|
export interface MermaidConfig {
|
|
4
4
|
/** 主题 */
|
|
@@ -111,3 +111,8 @@ export declare const aiMermaidEmits: {
|
|
|
111
111
|
ready: () => boolean;
|
|
112
112
|
};
|
|
113
113
|
export type AiMermaidEmits = typeof aiMermaidEmits;
|
|
114
|
+
export interface AiMermaidSlots {
|
|
115
|
+
header?: () => unknown;
|
|
116
|
+
extra?: () => unknown;
|
|
117
|
+
}
|
|
118
|
+
export type AiMermaidSlotTypes = SlotsType<AiMermaidSlots>;
|
|
@@ -157,7 +157,12 @@ const actionButtons = computed(() => {
|
|
|
157
157
|
});
|
|
158
158
|
}
|
|
159
159
|
if (enableCopy) {
|
|
160
|
-
buttons.push({
|
|
160
|
+
buttons.push({
|
|
161
|
+
key: "copy",
|
|
162
|
+
label: t("ai.mermaid.copyCode"),
|
|
163
|
+
icon: "copy",
|
|
164
|
+
onClick: handleCopy
|
|
165
|
+
});
|
|
161
166
|
}
|
|
162
167
|
if (customActions) {
|
|
163
168
|
buttons.push(...customActions);
|
|
@@ -104,3 +104,8 @@ export declare const YhAiPrompts: import("@yh-ui/utils").SFCWithInstall<{
|
|
|
104
104
|
export default YhAiPrompts;
|
|
105
105
|
export * from './src/ai-prompts';
|
|
106
106
|
export type AiPromptsInstance = InstanceType<typeof AiPrompts>;
|
|
107
|
+
export type YhAiPromptsInstance = AiPromptsInstance;
|
|
108
|
+
export type YhAiPromptsProps = import('./src/ai-prompts').AiPromptsProps;
|
|
109
|
+
export type YhAiPromptsEmits = import('./src/ai-prompts').AiPromptsEmits;
|
|
110
|
+
export type YhAiPromptsSlots = import('./src/ai-prompts').AiPromptsSlots;
|
|
111
|
+
export type YhAiPromptItem = import('./src/ai-prompts').AiPromptItem;
|
|
@@ -43,3 +43,13 @@ export declare const aiPromptsEmits: {
|
|
|
43
43
|
click: (item: AiPromptItem | string) => boolean;
|
|
44
44
|
};
|
|
45
45
|
export type AiPromptsEmits = typeof aiPromptsEmits;
|
|
46
|
+
export interface AiPromptsSlots {
|
|
47
|
+
title?: () => unknown;
|
|
48
|
+
item?: (props: {
|
|
49
|
+
item: AiPromptItem | string;
|
|
50
|
+
index: number;
|
|
51
|
+
}) => unknown;
|
|
52
|
+
icon?: (props: {
|
|
53
|
+
icon?: string;
|
|
54
|
+
}) => unknown;
|
|
55
|
+
}
|
|
@@ -140,3 +140,13 @@ export default YhAiProvider;
|
|
|
140
140
|
export * from './src/ai-provider';
|
|
141
141
|
export * from './src/use-ai-provider';
|
|
142
142
|
export type AiProviderInstance = InstanceType<typeof AiProvider>;
|
|
143
|
+
export type YhAiProviderInstance = AiProviderInstance;
|
|
144
|
+
export type YhAiProviderProps = import('./src/ai-provider').AiProviderProps;
|
|
145
|
+
export type YhAiProviderSlots = import('./src/ai-provider').AiProviderSlots;
|
|
146
|
+
export type YhAiProviderExpose = import('./src/ai-provider').AiProviderExpose;
|
|
147
|
+
export type YhAiProviderConfig = import('./src/ai-provider').AiProviderConfig;
|
|
148
|
+
export type YhAiRequestInterceptor = import('./src/ai-provider').AiRequestInterceptor;
|
|
149
|
+
export type YhAiResponseInterceptor = import('./src/ai-provider').AiResponseInterceptor;
|
|
150
|
+
export type YhAiRequestConfig = import('./src/ai-provider').AiRequestConfig;
|
|
151
|
+
export type YhAiResponse<T = unknown> = import('./src/ai-provider').AiResponse<T>;
|
|
152
|
+
export type YhAiInterceptorManager<T> = import('./src/ai-provider').AiInterceptorManager<T>;
|
|
@@ -185,6 +185,34 @@ export interface AiProviderConfig {
|
|
|
185
185
|
*/
|
|
186
186
|
cache?: 'default' | 'no-store' | 'reload' | 'no-cache' | 'force-cache' | 'only-if-cached';
|
|
187
187
|
}
|
|
188
|
+
export interface AiProviderProps {
|
|
189
|
+
baseUrl?: string;
|
|
190
|
+
token?: string;
|
|
191
|
+
headers?: Record<string, string>;
|
|
192
|
+
userAvatar?: string;
|
|
193
|
+
assistantAvatar?: string;
|
|
194
|
+
userName?: string;
|
|
195
|
+
assistantName?: string;
|
|
196
|
+
systemPrompt?: string;
|
|
197
|
+
typewriter?: {
|
|
198
|
+
enabled?: boolean;
|
|
199
|
+
charsPerFrame?: number;
|
|
200
|
+
};
|
|
201
|
+
timeout?: number;
|
|
202
|
+
withCredentials?: boolean;
|
|
203
|
+
mode?: 'cors' | 'no-cors' | 'same-origin';
|
|
204
|
+
cache?: 'default' | 'no-store' | 'reload' | 'no-cache' | 'force-cache' | 'only-if-cached';
|
|
205
|
+
}
|
|
206
|
+
export interface AiProviderSlots {
|
|
207
|
+
default?: () => unknown;
|
|
208
|
+
}
|
|
209
|
+
export interface AiProviderExpose {
|
|
210
|
+
addRequestInterceptor: (interceptor: AiRequestInterceptor) => number;
|
|
211
|
+
addResponseInterceptor: (interceptor: AiResponseInterceptor) => number;
|
|
212
|
+
removeRequestInterceptor: (id: number) => void;
|
|
213
|
+
removeResponseInterceptor: (id: number) => void;
|
|
214
|
+
clearInterceptors: () => void;
|
|
215
|
+
}
|
|
188
216
|
/**
|
|
189
217
|
* 创建拦截器管理器
|
|
190
218
|
*/
|