@opentiny/tiny-robot 0.2.0-alpha.0 → 0.2.0-alpha.2
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/action-group/ActionGroup.vue.d.ts +26 -0
- package/dist/action-group/ActionGroupItem.vue.d.ts +18 -0
- package/dist/action-group/index.d.ts +12 -0
- package/dist/action-group/index.type.d.ts +17 -0
- package/dist/bubble/index.d.ts +2 -2
- package/dist/bubble/index.type.d.ts +16 -18
- package/dist/feedback/components/SourceList.vue.d.ts +11 -0
- package/dist/feedback/components/index.d.ts +1 -0
- package/dist/feedback/index.d.ts +7 -0
- package/dist/feedback/index.type.d.ts +25 -0
- package/dist/feedback/index.vue.d.ts +13 -0
- package/dist/history/components/index.d.ts +2 -0
- package/dist/history/components/item-tag.vue.d.ts +5 -0
- package/dist/history/components/search-empty.vue.d.ts +7 -0
- package/dist/history/composables/index.d.ts +1 -0
- package/dist/history/composables/useEditItemTitle.d.ts +12 -0
- package/dist/history/index.d.ts +6 -0
- package/dist/history/index.type.d.ts +43 -0
- package/dist/history/index.vue.d.ts +2 -0
- package/dist/icon-button/index.d.ts +7 -0
- package/dist/icon-button/index.type.d.ts +6 -0
- package/dist/icon-button/index.vue.d.ts +6 -0
- package/dist/index.d.ts +10 -1
- package/dist/index.js +57 -27
- package/dist/node_modules/.pnpm/@opentiny_utils@3.22.0/node_modules/@opentiny/utils/dist/index.es.js +1335 -884
- package/dist/node_modules/.pnpm/@opentiny_vue-common@3.22.0/node_modules/@opentiny/vue-common/lib/index.js +660 -144
- package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/vue-popper.js +85 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-locale@3.22.0/node_modules/@opentiny/vue-locale/lib/index.js +1783 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/tooltip/index.js +77 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/tooltip/vue.js +90 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-tooltip@3.22.0/node_modules/@opentiny/vue-tooltip/lib/index.js +176 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-tooltip@3.22.0/node_modules/@opentiny/vue-tooltip/lib/pc.js +248 -0
- package/dist/node_modules/.pnpm/@vueuse_core@13.1.0_vue@3.5.13/node_modules/@vueuse/core/index.js +310 -0
- package/dist/node_modules/.pnpm/@vueuse_shared@13.1.0_vue@3.5.13/node_modules/@vueuse/shared/index.js +110 -0
- package/dist/packages/components/src/action-group/ActionGroup.vue.js +7 -0
- package/dist/packages/components/src/action-group/ActionGroup.vue2.js +121 -0
- package/dist/packages/components/src/action-group/ActionGroupItem.vue.js +14 -0
- package/dist/packages/components/src/action-group/ActionGroupItem.vue2.js +4 -0
- package/dist/packages/components/src/action-group/index.js +17 -0
- package/dist/packages/components/src/bubble/Bubble.vue.js +7 -0
- package/dist/packages/components/src/bubble/Bubble.vue2.js +76 -0
- package/dist/packages/components/src/bubble/BubbleList.vue.js +7 -0
- package/dist/packages/components/src/bubble/BubbleList.vue2.js +50 -0
- package/dist/packages/components/src/bubble/index.js +2 -2
- package/dist/packages/components/src/container/index.vue.js +2 -2
- package/dist/packages/components/src/container/index.vue2.js +36 -36
- package/dist/packages/components/src/feedback/components/SourceList.vue.js +7 -0
- package/dist/packages/components/src/feedback/components/SourceList.vue2.js +52 -0
- package/dist/packages/components/src/feedback/index.js +9 -0
- package/dist/packages/components/src/feedback/index.vue.js +7 -0
- package/dist/packages/components/src/feedback/index.vue2.js +143 -0
- package/dist/packages/components/src/history/components/item-tag.vue.js +7 -0
- package/dist/packages/components/src/history/components/item-tag.vue2.js +21 -0
- package/dist/packages/components/src/history/components/search-empty.vue.js +7 -0
- package/dist/packages/components/src/history/components/search-empty.vue2.js +20 -0
- package/dist/packages/components/src/history/composables/useEditItemTitle.js +43 -0
- package/dist/packages/components/src/history/index.js +11 -0
- package/dist/packages/components/src/history/index.vue.js +7 -0
- package/dist/packages/components/src/history/index.vue2.js +130 -0
- package/dist/packages/components/src/icon-button/index.js +9 -0
- package/dist/packages/components/src/icon-button/index.vue.js +7 -0
- package/dist/packages/components/src/icon-button/index.vue2.js +22 -0
- package/dist/packages/components/src/prompts/prompt.vue.js +2 -2
- package/dist/packages/components/src/prompts/prompt.vue2.js +17 -15
- package/dist/packages/components/src/question/components/HotQuestions.vue.js +23 -23
- package/dist/packages/components/src/question/index.vue.js +18 -18
- package/dist/packages/components/src/sender/components/TemplateEditor.vue.js +7 -0
- package/dist/packages/components/src/sender/components/TemplateEditor.vue2.js +175 -0
- package/dist/packages/components/src/sender/index.vue.js +149 -128
- package/dist/packages/components/src/suggestion/components/CategoryNav.vue.js +38 -0
- package/dist/packages/components/src/suggestion/components/CategoryNav.vue2.js +4 -0
- package/dist/packages/components/src/suggestion/components/SuggestionCapsule.vue.js +107 -0
- package/dist/packages/components/src/suggestion/components/SuggestionCapsule.vue2.js +4 -0
- package/dist/packages/components/src/suggestion/components/SuggestionPanel.vue.js +123 -0
- package/dist/packages/components/src/suggestion/components/SuggestionPanel.vue2.js +4 -0
- package/dist/packages/components/src/suggestion/composables/useKeyboardNavigation.js +45 -0
- package/dist/packages/components/src/suggestion/composables/useTriggerDetection.js +17 -0
- package/dist/packages/components/src/suggestion/index.js +9 -0
- package/dist/packages/components/src/suggestion/index.vue.js +179 -0
- package/dist/packages/components/src/suggestion/index.vue2.js +4 -0
- package/dist/packages/components/src/suggestion/utils/dom.js +18 -0
- package/dist/packages/svgs/dist/tiny-robot-svgs.js +306 -90
- package/dist/question/components/HotQuestions.vue.d.ts +2 -2
- package/dist/sender/components/TemplateEditor.vue.d.ts +18 -0
- package/dist/sender/index.type.d.ts +47 -0
- package/dist/sender/index.vue.d.ts +70 -5
- package/dist/style.css +1 -1
- package/dist/suggestion/components/CategoryNav.vue.d.ts +45 -0
- package/dist/suggestion/components/SuggestionCapsule.vue.d.ts +32 -0
- package/dist/suggestion/components/SuggestionPanel.vue.d.ts +84 -0
- package/dist/suggestion/composables/useKeyboardNavigation.d.ts +18 -0
- package/dist/suggestion/composables/useSuggestionFilter.d.ts +10 -0
- package/dist/suggestion/composables/useTriggerDetection.d.ts +11 -0
- package/dist/suggestion/index.d.ts +7 -0
- package/dist/suggestion/index.type.d.ts +94 -0
- package/dist/suggestion/index.vue.d.ts +343 -0
- package/dist/suggestion/utils/dom.d.ts +20 -0
- package/package.json +4 -3
- package/src/action-group/ActionGroup.vue +247 -0
- package/src/action-group/ActionGroupItem.vue +9 -0
- package/src/action-group/index.ts +25 -0
- package/src/action-group/index.type.ts +21 -0
- package/src/bubble/Bubble.vue +153 -0
- package/src/bubble/BubbleList.vue +55 -0
- package/src/bubble/index.ts +2 -2
- package/src/bubble/index.type.ts +7 -21
- package/src/container/index.vue +10 -36
- package/src/feedback/components/SourceList.vue +112 -0
- package/src/feedback/components/index.ts +1 -0
- package/src/feedback/index.ts +12 -0
- package/src/feedback/index.type.ts +27 -0
- package/src/feedback/index.vue +166 -0
- package/src/history/components/index.ts +2 -0
- package/src/history/components/item-tag.vue +49 -0
- package/src/history/components/search-empty.vue +38 -0
- package/src/history/composables/index.ts +1 -0
- package/src/history/composables/useEditItemTitle.ts +75 -0
- package/src/history/index.ts +12 -0
- package/src/history/index.type.ts +50 -0
- package/src/history/index.vue +292 -0
- package/src/icon-button/index.ts +12 -0
- package/src/icon-button/index.type.ts +7 -0
- package/src/icon-button/index.vue +58 -0
- package/src/index.ts +33 -1
- package/src/prompts/prompt.vue +7 -21
- package/src/question/components/HotQuestions.vue +1 -1
- package/src/question/index.less +9 -10
- package/src/sender/components/TemplateEditor.vue +465 -0
- package/src/sender/index.less +17 -7
- package/src/sender/index.type.ts +51 -0
- package/src/sender/index.vue +56 -8
- package/src/sender/vars.less +3 -3
- package/src/suggestion/components/CategoryNav.vue +38 -0
- package/src/suggestion/components/SuggestionCapsule.vue +183 -0
- package/src/suggestion/components/SuggestionPanel.vue +147 -0
- package/src/suggestion/composables/useKeyboardNavigation.ts +101 -0
- package/src/suggestion/composables/useSuggestionFilter.ts +34 -0
- package/src/suggestion/composables/useTriggerDetection.ts +46 -0
- package/src/suggestion/index.less +497 -0
- package/src/suggestion/index.ts +12 -0
- package/src/suggestion/index.type.ts +101 -0
- package/src/suggestion/index.vue +338 -0
- package/src/suggestion/utils/dom.ts +66 -0
- package/src/suggestion/vars.less +141 -0
- package/dist/bubble/components/actions/copy.vue.d.ts +0 -10
- package/dist/bubble/components/actions/index.d.ts +0 -2
- package/dist/bubble/components/actions/refresh.vue.d.ts +0 -2
- package/dist/bubble/useScroll.d.ts +0 -4
- package/dist/packages/components/src/bubble/bubble-list.vue.js +0 -7
- package/dist/packages/components/src/bubble/bubble-list.vue2.js +0 -37
- package/dist/packages/components/src/bubble/bubble.vue.js +0 -7
- package/dist/packages/components/src/bubble/bubble.vue2.js +0 -118
- package/dist/packages/components/src/bubble/components/actions/copy.vue.js +0 -7
- package/dist/packages/components/src/bubble/components/actions/copy.vue2.js +0 -35
- package/dist/packages/components/src/bubble/components/actions/refresh.vue.js +0 -7
- package/dist/packages/components/src/bubble/components/actions/refresh.vue2.js +0 -16
- package/dist/packages/components/src/bubble/useScroll.js +0 -13
- package/src/bubble/bubble-list.vue +0 -42
- package/src/bubble/bubble.vue +0 -247
- package/src/bubble/components/actions/copy.vue +0 -54
- package/src/bubble/components/actions/index.ts +0 -2
- package/src/bubble/components/actions/refresh.vue +0 -31
- package/src/bubble/useScroll.ts +0 -14
- /package/dist/bubble/{bubble-list.vue.d.ts → BubbleList.vue.d.ts} +0 -0
|
@@ -33,6 +33,8 @@ export interface SenderProps {
|
|
|
33
33
|
showWordLimit?: boolean;
|
|
34
34
|
suggestions?: string[];
|
|
35
35
|
theme?: ThemeType;
|
|
36
|
+
template?: string;
|
|
37
|
+
hasContent?: boolean;
|
|
36
38
|
}
|
|
37
39
|
export interface ActionButtonsProps {
|
|
38
40
|
loading?: boolean;
|
|
@@ -61,6 +63,7 @@ export type SenderEmits = {
|
|
|
61
63
|
(e: 'blur', event: FocusEvent): void;
|
|
62
64
|
(e: 'escape-press'): void;
|
|
63
65
|
(e: 'cancel'): void;
|
|
66
|
+
(e: 'reset-template'): void;
|
|
64
67
|
};
|
|
65
68
|
export interface SpeechState {
|
|
66
69
|
isRecording: boolean;
|
|
@@ -88,3 +91,47 @@ export interface SpeechHandler {
|
|
|
88
91
|
start: () => void;
|
|
89
92
|
stop: () => void;
|
|
90
93
|
}
|
|
94
|
+
/**
|
|
95
|
+
* 模板部分定义
|
|
96
|
+
*/
|
|
97
|
+
export interface TemplatePart {
|
|
98
|
+
/** 内容文本 */
|
|
99
|
+
content: string;
|
|
100
|
+
/** 是否为可编辑字段 */
|
|
101
|
+
isField: boolean;
|
|
102
|
+
/** 占位符文本 (当字段为空时显示) */
|
|
103
|
+
placeholder?: string;
|
|
104
|
+
/** 字段索引 (用于标识可编辑字段) */
|
|
105
|
+
fieldIndex?: number;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* 模板编辑器属性
|
|
109
|
+
*/
|
|
110
|
+
export interface TemplateEditorProps {
|
|
111
|
+
/** 模板字符串,格式为普通文本与 [占位符] 的组合 */
|
|
112
|
+
template: string;
|
|
113
|
+
/** 当前值 */
|
|
114
|
+
value?: string;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* 模板编辑器事件
|
|
118
|
+
*/
|
|
119
|
+
export interface TemplateEditorEmits {
|
|
120
|
+
/** 更新值 */
|
|
121
|
+
(e: 'update:value', value: string): void;
|
|
122
|
+
/** 输入事件 */
|
|
123
|
+
(e: 'input', value: string): void;
|
|
124
|
+
/** 内容变更状态 - 通知父组件是否有内容 */
|
|
125
|
+
(e: 'content-status', hasContent: boolean): void;
|
|
126
|
+
/** 字段激活状态变更 */
|
|
127
|
+
(e: 'field-active', isActive: boolean, index: number): void;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* 模板编辑器暴露的方法
|
|
131
|
+
*/
|
|
132
|
+
export interface TemplateEditorExpose {
|
|
133
|
+
/** 激活第一个可编辑字段 */
|
|
134
|
+
activateFirstField: () => void;
|
|
135
|
+
/** 重置所有字段 */
|
|
136
|
+
resetFields: () => void;
|
|
137
|
+
}
|
|
@@ -8,6 +8,37 @@ declare function __VLS_template(): {
|
|
|
8
8
|
footer?(_: {}): any;
|
|
9
9
|
};
|
|
10
10
|
refs: {
|
|
11
|
+
templateEditorRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./index.type').TemplateEditorProps> & Readonly<{
|
|
12
|
+
onInput?: ((value: string) => any) | undefined;
|
|
13
|
+
"onUpdate:value"?: ((value: string) => any) | undefined;
|
|
14
|
+
"onContent-status"?: ((hasContent: boolean) => any) | undefined;
|
|
15
|
+
"onField-active"?: ((isActive: boolean, index: number) => any) | undefined;
|
|
16
|
+
}>, {
|
|
17
|
+
activateFirstField: () => void;
|
|
18
|
+
resetFields: () => void;
|
|
19
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
20
|
+
input: (value: string) => any;
|
|
21
|
+
"update:value": (value: string) => any;
|
|
22
|
+
"content-status": (hasContent: boolean) => any;
|
|
23
|
+
"field-active": (isActive: boolean, index: number) => any;
|
|
24
|
+
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
25
|
+
editorRef: HTMLDivElement;
|
|
26
|
+
}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
27
|
+
P: {};
|
|
28
|
+
B: {};
|
|
29
|
+
D: {};
|
|
30
|
+
C: {};
|
|
31
|
+
M: {};
|
|
32
|
+
Defaults: {};
|
|
33
|
+
}, Readonly<import('./index.type').TemplateEditorProps> & Readonly<{
|
|
34
|
+
onInput?: ((value: string) => any) | undefined;
|
|
35
|
+
"onUpdate:value"?: ((value: string) => any) | undefined;
|
|
36
|
+
"onContent-status"?: ((hasContent: boolean) => any) | undefined;
|
|
37
|
+
"onField-active"?: ((isActive: boolean, index: number) => any) | undefined;
|
|
38
|
+
}>, {
|
|
39
|
+
activateFirstField: () => void;
|
|
40
|
+
resetFields: () => void;
|
|
41
|
+
}, {}, {}, {}, {}> | null;
|
|
11
42
|
inputRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
12
43
|
_constants: {
|
|
13
44
|
type: ObjectConstructor;
|
|
@@ -467,6 +498,7 @@ declare const __VLS_component: import('vue').DefineComponent<SenderProps, {
|
|
|
467
498
|
submit: () => void;
|
|
468
499
|
startSpeech: () => void;
|
|
469
500
|
stopSpeech: () => void;
|
|
501
|
+
activateTemplateFirstField: () => void;
|
|
470
502
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
471
503
|
[x: string]: any;
|
|
472
504
|
} & {
|
|
@@ -475,20 +507,53 @@ declare const __VLS_component: import('vue').DefineComponent<SenderProps, {
|
|
|
475
507
|
[x: `on${Capitalize<any>}`]: ((...args: any) => any) | undefined;
|
|
476
508
|
}>, {
|
|
477
509
|
loading: boolean;
|
|
478
|
-
|
|
510
|
+
template: string;
|
|
479
511
|
disabled: boolean;
|
|
512
|
+
modelValue: string;
|
|
513
|
+
mode: import('./index.type').InputMode;
|
|
480
514
|
autofocus: boolean;
|
|
515
|
+
clearable: boolean;
|
|
516
|
+
showWordLimit: boolean;
|
|
481
517
|
theme: import('./index.type').ThemeType;
|
|
518
|
+
hasContent: boolean;
|
|
482
519
|
allowSpeech: boolean;
|
|
483
520
|
allowFiles: boolean;
|
|
484
521
|
submitType: import('./index.type').SubmitTrigger;
|
|
522
|
+
placeholder: string;
|
|
485
523
|
autoSize: import('./index.type').AutoSize;
|
|
486
|
-
clearable: boolean;
|
|
487
|
-
modelValue: string;
|
|
488
524
|
maxLength: number;
|
|
489
|
-
placeholder: string;
|
|
490
|
-
showWordLimit: boolean;
|
|
491
525
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
526
|
+
templateEditorRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./index.type').TemplateEditorProps> & Readonly<{
|
|
527
|
+
onInput?: ((value: string) => any) | undefined;
|
|
528
|
+
"onUpdate:value"?: ((value: string) => any) | undefined;
|
|
529
|
+
"onContent-status"?: ((hasContent: boolean) => any) | undefined;
|
|
530
|
+
"onField-active"?: ((isActive: boolean, index: number) => any) | undefined;
|
|
531
|
+
}>, {
|
|
532
|
+
activateFirstField: () => void;
|
|
533
|
+
resetFields: () => void;
|
|
534
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
535
|
+
input: (value: string) => any;
|
|
536
|
+
"update:value": (value: string) => any;
|
|
537
|
+
"content-status": (hasContent: boolean) => any;
|
|
538
|
+
"field-active": (isActive: boolean, index: number) => any;
|
|
539
|
+
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
540
|
+
editorRef: HTMLDivElement;
|
|
541
|
+
}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
542
|
+
P: {};
|
|
543
|
+
B: {};
|
|
544
|
+
D: {};
|
|
545
|
+
C: {};
|
|
546
|
+
M: {};
|
|
547
|
+
Defaults: {};
|
|
548
|
+
}, Readonly<import('./index.type').TemplateEditorProps> & Readonly<{
|
|
549
|
+
onInput?: ((value: string) => any) | undefined;
|
|
550
|
+
"onUpdate:value"?: ((value: string) => any) | undefined;
|
|
551
|
+
"onContent-status"?: ((hasContent: boolean) => any) | undefined;
|
|
552
|
+
"onField-active"?: ((isActive: boolean, index: number) => any) | undefined;
|
|
553
|
+
}>, {
|
|
554
|
+
activateFirstField: () => void;
|
|
555
|
+
resetFields: () => void;
|
|
556
|
+
}, {}, {}, {}, {}> | null;
|
|
492
557
|
inputRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
493
558
|
_constants: {
|
|
494
559
|
type: ObjectConstructor;
|