@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
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ActionGroupProps, ActionGroupSlots } from './index.type';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: Readonly<ActionGroupSlots> & ActionGroupSlots;
|
|
5
|
+
refs: {
|
|
6
|
+
moreBtnRef: HTMLSpanElement;
|
|
7
|
+
dropDownRef: HTMLUListElement;
|
|
8
|
+
};
|
|
9
|
+
rootEl: HTMLDivElement;
|
|
10
|
+
};
|
|
11
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
12
|
+
declare const __VLS_component: import('vue').DefineComponent<ActionGroupProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
13
|
+
"item-click": (name: string) => any;
|
|
14
|
+
}, string, import('vue').PublicProps, Readonly<ActionGroupProps> & Readonly<{
|
|
15
|
+
"onItem-click"?: ((name: string) => any) | undefined;
|
|
16
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
17
|
+
moreBtnRef: HTMLSpanElement;
|
|
18
|
+
dropDownRef: HTMLUListElement;
|
|
19
|
+
}, HTMLDivElement>;
|
|
20
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
23
|
+
new (): {
|
|
24
|
+
$slots: S;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ActionGroupItemProps } from './index.type';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: {
|
|
5
|
+
default?(_: {}): any;
|
|
6
|
+
};
|
|
7
|
+
refs: {};
|
|
8
|
+
rootEl: any;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
11
|
+
declare const __VLS_component: import('vue').DefineComponent<ActionGroupItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ActionGroupItemProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import { default as ActionGroup } from './ActionGroup.vue';
|
|
3
|
+
import { default as ActionGroupItemComp } from './ActionGroupItem.vue';
|
|
4
|
+
declare const install: <T>(app: App<T>) => void;
|
|
5
|
+
declare const _default: typeof ActionGroup & {
|
|
6
|
+
install: typeof install;
|
|
7
|
+
};
|
|
8
|
+
export default _default;
|
|
9
|
+
declare const installActionGroupItem: <T>(app: App<T>) => void;
|
|
10
|
+
export declare const ActionGroupItem: typeof ActionGroupItemComp & {
|
|
11
|
+
install: typeof installActionGroupItem;
|
|
12
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { VNode } from 'vue';
|
|
2
|
+
export interface ActionGroupProps {
|
|
3
|
+
maxNum?: number;
|
|
4
|
+
showTooltip?: boolean;
|
|
5
|
+
dropDownShowLabelOnly?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface ActionGroupEvents {
|
|
8
|
+
(e: 'item-click', name: string): void;
|
|
9
|
+
}
|
|
10
|
+
export interface ActionGroupSlots {
|
|
11
|
+
default: () => VNode | VNode[];
|
|
12
|
+
moreBtn: () => VNode;
|
|
13
|
+
}
|
|
14
|
+
export interface ActionGroupItemProps {
|
|
15
|
+
name: string;
|
|
16
|
+
label: string;
|
|
17
|
+
}
|
package/dist/bubble/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { App } from 'vue';
|
|
2
|
-
import { default as BubbleComp } from './
|
|
3
|
-
import { default as BubbleListComp } from './
|
|
2
|
+
import { default as BubbleComp } from './Bubble.vue';
|
|
3
|
+
import { default as BubbleListComp } from './BubbleList.vue';
|
|
4
4
|
declare const bubbleInstall: (app: App) => void;
|
|
5
5
|
export declare const Bubble: typeof BubbleComp & {
|
|
6
6
|
install: typeof bubbleInstall;
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import { Options as MarkdownItOptions } from 'markdown-it';
|
|
2
|
-
import {
|
|
3
|
-
export interface BubbleActionOptions {
|
|
4
|
-
name: 'copy' | 'refresh' | string;
|
|
5
|
-
vnode?: VNode | Component;
|
|
6
|
-
show?: boolean | ((props: BubbleProps) => boolean);
|
|
7
|
-
}
|
|
8
|
-
export type BubbleAction = 'copy' | 'refresh' | BubbleActionOptions;
|
|
2
|
+
import { CSSProperties, VNode } from 'vue';
|
|
9
3
|
export type BubblePalcement = 'start' | 'end';
|
|
10
4
|
export interface BubbleProps {
|
|
11
5
|
/**
|
|
@@ -29,22 +23,26 @@ export interface BubbleProps {
|
|
|
29
23
|
* type 为 'markdown' 时,markdown 的配置项
|
|
30
24
|
*/
|
|
31
25
|
mdConfig?: MarkdownItOptions;
|
|
32
|
-
actions?: BubbleAction[];
|
|
33
26
|
maxWidth?: CSSProperties['maxWidth'];
|
|
34
27
|
}
|
|
35
28
|
export interface BubbleSlots {
|
|
36
|
-
default
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
(
|
|
43
|
-
|
|
29
|
+
default?: (slotProps: {
|
|
30
|
+
bubbleProps: BubbleProps;
|
|
31
|
+
}) => unknown;
|
|
32
|
+
footer?: (slotProps: {
|
|
33
|
+
bubbleProps: BubbleProps;
|
|
34
|
+
}) => unknown;
|
|
35
|
+
loading?: (slotProps: {
|
|
36
|
+
bubbleProps: BubbleProps;
|
|
37
|
+
}) => unknown;
|
|
44
38
|
}
|
|
45
|
-
export type BubbleRoleConfig = Pick<BubbleProps, 'placement' | 'avatar' | 'type' | 'mdConfig' | '
|
|
39
|
+
export type BubbleRoleConfig = Pick<BubbleProps, 'placement' | 'avatar' | 'type' | 'mdConfig' | 'maxWidth'> & {
|
|
40
|
+
slots?: BubbleSlots;
|
|
41
|
+
};
|
|
46
42
|
export interface BubbleListProps {
|
|
47
|
-
items: BubbleProps
|
|
43
|
+
items: (BubbleProps & {
|
|
44
|
+
slots?: BubbleSlots;
|
|
45
|
+
})[];
|
|
48
46
|
/**
|
|
49
47
|
* 每个角色的默认配置项
|
|
50
48
|
*/
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
sources: {
|
|
3
|
+
label: string;
|
|
4
|
+
link: string;
|
|
5
|
+
}[];
|
|
6
|
+
linesLimit?: number;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
9
|
+
linesLimit: number;
|
|
10
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as SourceList } from './SourceList.vue';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Component, VNode } from 'vue';
|
|
2
|
+
export interface FeedbackProps {
|
|
3
|
+
operations?: {
|
|
4
|
+
name: string;
|
|
5
|
+
label: string;
|
|
6
|
+
onClick?: () => void;
|
|
7
|
+
}[];
|
|
8
|
+
operationsLimit?: number;
|
|
9
|
+
actions?: {
|
|
10
|
+
name: string;
|
|
11
|
+
label: string;
|
|
12
|
+
icon?: 'copy' | 'refresh' | 'like' | 'dislike' | VNode | Component;
|
|
13
|
+
onClick?: () => void;
|
|
14
|
+
}[];
|
|
15
|
+
actionsLimit?: number;
|
|
16
|
+
sources?: {
|
|
17
|
+
label: string;
|
|
18
|
+
link: string;
|
|
19
|
+
}[];
|
|
20
|
+
sourcesLinesLimit?: number;
|
|
21
|
+
}
|
|
22
|
+
export interface FeedbackEvents {
|
|
23
|
+
(e: 'operation', name: string): void;
|
|
24
|
+
(e: 'action', name: string): void;
|
|
25
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FeedbackProps } from './index.type';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<FeedbackProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
3
|
+
operation: (name: string) => any;
|
|
4
|
+
action: (name: string) => any;
|
|
5
|
+
}, string, import('vue').PublicProps, Readonly<FeedbackProps> & Readonly<{
|
|
6
|
+
onOperation?: ((name: string) => any) | undefined;
|
|
7
|
+
onAction?: ((name: string) => any) | undefined;
|
|
8
|
+
}>, {
|
|
9
|
+
operationsLimit: number;
|
|
10
|
+
actionsLimit: number;
|
|
11
|
+
sourcesLinesLimit: number;
|
|
12
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { HistoryItemTagProps } from '../index.type';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<HistoryItemTagProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<HistoryItemTagProps> & Readonly<{}>, {
|
|
3
|
+
type: "success" | "warning" | "error" | "info" | "default";
|
|
4
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
text: string;
|
|
3
|
+
};
|
|
4
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
5
|
+
text: string;
|
|
6
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useEditItemTitle';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComponentPublicInstance } from 'vue';
|
|
2
|
+
import { HistoryEvents, HistoryItem } from '../index.type';
|
|
3
|
+
export declare const useEditItemTitle: (emit: HistoryEvents) => {
|
|
4
|
+
editingItem: import('vue').Ref<(Pick<HistoryItem<Record<string, unknown>>, "id" | "title"> & {
|
|
5
|
+
rawData: HistoryItem;
|
|
6
|
+
}) | undefined, (Pick<HistoryItem<Record<string, unknown>>, "id" | "title"> & {
|
|
7
|
+
rawData: HistoryItem;
|
|
8
|
+
}) | undefined>;
|
|
9
|
+
handleEdit: (item: HistoryItem) => void;
|
|
10
|
+
handleEditorInputRef: (el: Element | ComponentPublicInstance | null) => void;
|
|
11
|
+
handleKeyDown: (e: KeyboardEvent) => void;
|
|
12
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { CSSProperties } from 'vue';
|
|
2
|
+
interface BaseHistoryProps {
|
|
3
|
+
activeTab?: string;
|
|
4
|
+
searchBar?: boolean;
|
|
5
|
+
searchQuery?: string;
|
|
6
|
+
searchPlaceholder?: string;
|
|
7
|
+
searchFn?: (query: string, item: HistoryItem) => boolean;
|
|
8
|
+
selected?: string;
|
|
9
|
+
}
|
|
10
|
+
export type SingleTabHistoryProps = {
|
|
11
|
+
tabTitle: string;
|
|
12
|
+
data: HistoryGroup[];
|
|
13
|
+
} & BaseHistoryProps;
|
|
14
|
+
export type MultiTabHistoryProps = {
|
|
15
|
+
tabs: {
|
|
16
|
+
title: string;
|
|
17
|
+
id: string;
|
|
18
|
+
}[];
|
|
19
|
+
data: Record<string, HistoryGroup[]>;
|
|
20
|
+
} & BaseHistoryProps;
|
|
21
|
+
export type HistoryProps = SingleTabHistoryProps | MultiTabHistoryProps;
|
|
22
|
+
export interface HistoryGroup<T = Record<string, unknown>> {
|
|
23
|
+
date: string;
|
|
24
|
+
items: HistoryItem<T>[];
|
|
25
|
+
}
|
|
26
|
+
export interface HistoryItemTagProps {
|
|
27
|
+
text: string;
|
|
28
|
+
type?: 'success' | 'warning' | 'error' | 'info' | 'default';
|
|
29
|
+
style?: CSSProperties;
|
|
30
|
+
}
|
|
31
|
+
export interface HistoryItem<T = Record<string, unknown>> {
|
|
32
|
+
id: string;
|
|
33
|
+
title: string;
|
|
34
|
+
tag?: HistoryItemTagProps;
|
|
35
|
+
data?: T;
|
|
36
|
+
}
|
|
37
|
+
export interface HistoryEvents {
|
|
38
|
+
(e: 'close'): void;
|
|
39
|
+
(e: 'item-click', item: HistoryItem): void;
|
|
40
|
+
(e: 'item-title-change', newTitle: string, rawData: HistoryItem): void;
|
|
41
|
+
(e: 'item-delete', item: HistoryItem): void;
|
|
42
|
+
}
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IconButtonProps } from './index.type';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<IconButtonProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<IconButtonProps> & Readonly<{}>, {
|
|
3
|
+
size: string | number;
|
|
4
|
+
svgSize: string | number;
|
|
5
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
|
|
6
|
+
export default _default;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,16 +2,25 @@ import { App } from 'vue';
|
|
|
2
2
|
import { Bubble, BubbleList } from './bubble';
|
|
3
3
|
import { default as Container } from './container';
|
|
4
4
|
import { default as Conversations } from './conversations';
|
|
5
|
+
import { default as Feedback } from './feedback';
|
|
6
|
+
import { default as History } from './history';
|
|
7
|
+
import { default as IconButton } from './icon-button';
|
|
5
8
|
import { Prompt, Prompts } from './prompts';
|
|
6
9
|
import { default as Question } from './question';
|
|
7
10
|
import { default as Sender } from './sender';
|
|
8
11
|
import { default as Welcome } from './welcome';
|
|
12
|
+
import { default as Suggestion } from './suggestion';
|
|
9
13
|
export * from './bubble/index.type';
|
|
14
|
+
export * from './container/index.type';
|
|
15
|
+
export * from './feedback/index.type';
|
|
16
|
+
export * from './history/index.type';
|
|
17
|
+
export * from './icon-button/index.type';
|
|
10
18
|
export * from './prompts/index.type';
|
|
11
19
|
export * from './sender/index.type';
|
|
12
20
|
export * from './welcome/index.type';
|
|
21
|
+
export * from './suggestion/index.type';
|
|
13
22
|
declare const _default: {
|
|
14
23
|
install<T>(app: App<T>): void;
|
|
15
24
|
};
|
|
16
25
|
export default _default;
|
|
17
|
-
export { Bubble, Bubble as TrBubble, BubbleList, BubbleList as TrBubbleList, Container, Container as TrContainer, Conversations, Conversations as TrConversations, Prompt, Prompt as TrPrompt, Prompts, Prompts as TrPrompts, Sender, Sender as TrSender, Welcome, Welcome as TrWelcome, Question, };
|
|
26
|
+
export { Bubble, Bubble as TrBubble, BubbleList, BubbleList as TrBubbleList, Container, Container as TrContainer, Conversations, Conversations as TrConversations, Feedback, Feedback as TrFeedback, History, History as TrHistory, IconButton, IconButton as TrIconButton, Prompt, Prompt as TrPrompt, Prompts, Prompts as TrPrompts, Sender, Sender as TrSender, Welcome, Welcome as TrWelcome, Suggestion, Suggestion as TrSuggestion, Question, Question as TrQuestion, };
|
package/dist/index.js
CHANGED
|
@@ -1,40 +1,70 @@
|
|
|
1
|
-
import { Bubble as
|
|
1
|
+
import { Bubble as m, BubbleList as s } from "./packages/components/src/bubble/index.js";
|
|
2
2
|
import "./packages/components/src/container/index.js";
|
|
3
3
|
import "./packages/components/src/conversations/index.js";
|
|
4
|
-
import
|
|
4
|
+
import "./packages/components/src/feedback/index.js";
|
|
5
|
+
import i from "./packages/components/src/history/index.js";
|
|
6
|
+
import "./packages/components/src/icon-button/index.js";
|
|
7
|
+
import { Prompt as e, Prompts as a } from "./packages/components/src/prompts/index.js";
|
|
5
8
|
import "./packages/components/src/question/index.js";
|
|
6
9
|
import "./packages/components/src/sender/index.js";
|
|
7
10
|
import "./packages/components/src/welcome/index.js";
|
|
8
|
-
import
|
|
9
|
-
import n from "./packages/components/src/
|
|
10
|
-
import p from "./packages/components/src/
|
|
11
|
-
import c from "./packages/components/src/
|
|
12
|
-
import f from "./packages/components/src/
|
|
13
|
-
|
|
11
|
+
import "./packages/components/src/suggestion/index.js";
|
|
12
|
+
import n from "./packages/components/src/container/index.vue.js";
|
|
13
|
+
import p from "./packages/components/src/conversations/index.vue.js";
|
|
14
|
+
import c from "./packages/components/src/feedback/index.vue.js";
|
|
15
|
+
import f from "./packages/components/src/icon-button/index.vue.js";
|
|
16
|
+
import T from "./packages/components/src/question/index.vue.js";
|
|
17
|
+
import l from "./packages/components/src/sender/index.vue.js";
|
|
18
|
+
import u from "./packages/components/src/welcome/index.vue.js";
|
|
19
|
+
import b from "./packages/components/src/suggestion/index.vue.js";
|
|
20
|
+
const d = [
|
|
21
|
+
m,
|
|
22
|
+
s,
|
|
23
|
+
n,
|
|
24
|
+
p,
|
|
25
|
+
c,
|
|
26
|
+
i,
|
|
27
|
+
f,
|
|
28
|
+
e,
|
|
29
|
+
a,
|
|
30
|
+
T,
|
|
31
|
+
l,
|
|
32
|
+
u,
|
|
33
|
+
b
|
|
34
|
+
], j = {
|
|
14
35
|
install(o) {
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
o.component(`Tr${
|
|
36
|
+
d.forEach((r) => {
|
|
37
|
+
const t = r.name.replace(/^Tiny/, "").replace(/^Tr/, "");
|
|
38
|
+
o.component(`Tr${t}`, r);
|
|
18
39
|
});
|
|
19
40
|
}
|
|
20
41
|
};
|
|
21
42
|
export {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
43
|
+
m as Bubble,
|
|
44
|
+
s as BubbleList,
|
|
45
|
+
n as Container,
|
|
46
|
+
p as Conversations,
|
|
47
|
+
c as Feedback,
|
|
48
|
+
i as History,
|
|
49
|
+
f as IconButton,
|
|
50
|
+
e as Prompt,
|
|
27
51
|
a as Prompts,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
n as
|
|
34
|
-
|
|
52
|
+
T as Question,
|
|
53
|
+
l as Sender,
|
|
54
|
+
b as Suggestion,
|
|
55
|
+
m as TrBubble,
|
|
56
|
+
s as TrBubbleList,
|
|
57
|
+
n as TrContainer,
|
|
58
|
+
p as TrConversations,
|
|
59
|
+
c as TrFeedback,
|
|
60
|
+
i as TrHistory,
|
|
61
|
+
f as TrIconButton,
|
|
62
|
+
e as TrPrompt,
|
|
35
63
|
a as TrPrompts,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
64
|
+
T as TrQuestion,
|
|
65
|
+
l as TrSender,
|
|
66
|
+
b as TrSuggestion,
|
|
67
|
+
u as TrWelcome,
|
|
68
|
+
u as Welcome,
|
|
69
|
+
j as default
|
|
40
70
|
};
|