@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.
Files changed (164) hide show
  1. package/dist/action-group/ActionGroup.vue.d.ts +26 -0
  2. package/dist/action-group/ActionGroupItem.vue.d.ts +18 -0
  3. package/dist/action-group/index.d.ts +12 -0
  4. package/dist/action-group/index.type.d.ts +17 -0
  5. package/dist/bubble/index.d.ts +2 -2
  6. package/dist/bubble/index.type.d.ts +16 -18
  7. package/dist/feedback/components/SourceList.vue.d.ts +11 -0
  8. package/dist/feedback/components/index.d.ts +1 -0
  9. package/dist/feedback/index.d.ts +7 -0
  10. package/dist/feedback/index.type.d.ts +25 -0
  11. package/dist/feedback/index.vue.d.ts +13 -0
  12. package/dist/history/components/index.d.ts +2 -0
  13. package/dist/history/components/item-tag.vue.d.ts +5 -0
  14. package/dist/history/components/search-empty.vue.d.ts +7 -0
  15. package/dist/history/composables/index.d.ts +1 -0
  16. package/dist/history/composables/useEditItemTitle.d.ts +12 -0
  17. package/dist/history/index.d.ts +6 -0
  18. package/dist/history/index.type.d.ts +43 -0
  19. package/dist/history/index.vue.d.ts +2 -0
  20. package/dist/icon-button/index.d.ts +7 -0
  21. package/dist/icon-button/index.type.d.ts +6 -0
  22. package/dist/icon-button/index.vue.d.ts +6 -0
  23. package/dist/index.d.ts +10 -1
  24. package/dist/index.js +57 -27
  25. package/dist/node_modules/.pnpm/@opentiny_utils@3.22.0/node_modules/@opentiny/utils/dist/index.es.js +1335 -884
  26. package/dist/node_modules/.pnpm/@opentiny_vue-common@3.22.0/node_modules/@opentiny/vue-common/lib/index.js +660 -144
  27. package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/vue-popper.js +85 -0
  28. package/dist/node_modules/.pnpm/@opentiny_vue-locale@3.22.0/node_modules/@opentiny/vue-locale/lib/index.js +1783 -0
  29. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/tooltip/index.js +77 -0
  30. package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/tooltip/vue.js +90 -0
  31. package/dist/node_modules/.pnpm/@opentiny_vue-tooltip@3.22.0/node_modules/@opentiny/vue-tooltip/lib/index.js +176 -0
  32. package/dist/node_modules/.pnpm/@opentiny_vue-tooltip@3.22.0/node_modules/@opentiny/vue-tooltip/lib/pc.js +248 -0
  33. package/dist/node_modules/.pnpm/@vueuse_core@13.1.0_vue@3.5.13/node_modules/@vueuse/core/index.js +310 -0
  34. package/dist/node_modules/.pnpm/@vueuse_shared@13.1.0_vue@3.5.13/node_modules/@vueuse/shared/index.js +110 -0
  35. package/dist/packages/components/src/action-group/ActionGroup.vue.js +7 -0
  36. package/dist/packages/components/src/action-group/ActionGroup.vue2.js +121 -0
  37. package/dist/packages/components/src/action-group/ActionGroupItem.vue.js +14 -0
  38. package/dist/packages/components/src/action-group/ActionGroupItem.vue2.js +4 -0
  39. package/dist/packages/components/src/action-group/index.js +17 -0
  40. package/dist/packages/components/src/bubble/Bubble.vue.js +7 -0
  41. package/dist/packages/components/src/bubble/Bubble.vue2.js +76 -0
  42. package/dist/packages/components/src/bubble/BubbleList.vue.js +7 -0
  43. package/dist/packages/components/src/bubble/BubbleList.vue2.js +50 -0
  44. package/dist/packages/components/src/bubble/index.js +2 -2
  45. package/dist/packages/components/src/container/index.vue.js +2 -2
  46. package/dist/packages/components/src/container/index.vue2.js +36 -36
  47. package/dist/packages/components/src/feedback/components/SourceList.vue.js +7 -0
  48. package/dist/packages/components/src/feedback/components/SourceList.vue2.js +52 -0
  49. package/dist/packages/components/src/feedback/index.js +9 -0
  50. package/dist/packages/components/src/feedback/index.vue.js +7 -0
  51. package/dist/packages/components/src/feedback/index.vue2.js +143 -0
  52. package/dist/packages/components/src/history/components/item-tag.vue.js +7 -0
  53. package/dist/packages/components/src/history/components/item-tag.vue2.js +21 -0
  54. package/dist/packages/components/src/history/components/search-empty.vue.js +7 -0
  55. package/dist/packages/components/src/history/components/search-empty.vue2.js +20 -0
  56. package/dist/packages/components/src/history/composables/useEditItemTitle.js +43 -0
  57. package/dist/packages/components/src/history/index.js +11 -0
  58. package/dist/packages/components/src/history/index.vue.js +7 -0
  59. package/dist/packages/components/src/history/index.vue2.js +130 -0
  60. package/dist/packages/components/src/icon-button/index.js +9 -0
  61. package/dist/packages/components/src/icon-button/index.vue.js +7 -0
  62. package/dist/packages/components/src/icon-button/index.vue2.js +22 -0
  63. package/dist/packages/components/src/prompts/prompt.vue.js +2 -2
  64. package/dist/packages/components/src/prompts/prompt.vue2.js +17 -15
  65. package/dist/packages/components/src/question/components/HotQuestions.vue.js +23 -23
  66. package/dist/packages/components/src/question/index.vue.js +18 -18
  67. package/dist/packages/components/src/sender/components/TemplateEditor.vue.js +7 -0
  68. package/dist/packages/components/src/sender/components/TemplateEditor.vue2.js +175 -0
  69. package/dist/packages/components/src/sender/index.vue.js +149 -128
  70. package/dist/packages/components/src/suggestion/components/CategoryNav.vue.js +38 -0
  71. package/dist/packages/components/src/suggestion/components/CategoryNav.vue2.js +4 -0
  72. package/dist/packages/components/src/suggestion/components/SuggestionCapsule.vue.js +107 -0
  73. package/dist/packages/components/src/suggestion/components/SuggestionCapsule.vue2.js +4 -0
  74. package/dist/packages/components/src/suggestion/components/SuggestionPanel.vue.js +123 -0
  75. package/dist/packages/components/src/suggestion/components/SuggestionPanel.vue2.js +4 -0
  76. package/dist/packages/components/src/suggestion/composables/useKeyboardNavigation.js +45 -0
  77. package/dist/packages/components/src/suggestion/composables/useTriggerDetection.js +17 -0
  78. package/dist/packages/components/src/suggestion/index.js +9 -0
  79. package/dist/packages/components/src/suggestion/index.vue.js +179 -0
  80. package/dist/packages/components/src/suggestion/index.vue2.js +4 -0
  81. package/dist/packages/components/src/suggestion/utils/dom.js +18 -0
  82. package/dist/packages/svgs/dist/tiny-robot-svgs.js +306 -90
  83. package/dist/question/components/HotQuestions.vue.d.ts +2 -2
  84. package/dist/sender/components/TemplateEditor.vue.d.ts +18 -0
  85. package/dist/sender/index.type.d.ts +47 -0
  86. package/dist/sender/index.vue.d.ts +70 -5
  87. package/dist/style.css +1 -1
  88. package/dist/suggestion/components/CategoryNav.vue.d.ts +45 -0
  89. package/dist/suggestion/components/SuggestionCapsule.vue.d.ts +32 -0
  90. package/dist/suggestion/components/SuggestionPanel.vue.d.ts +84 -0
  91. package/dist/suggestion/composables/useKeyboardNavigation.d.ts +18 -0
  92. package/dist/suggestion/composables/useSuggestionFilter.d.ts +10 -0
  93. package/dist/suggestion/composables/useTriggerDetection.d.ts +11 -0
  94. package/dist/suggestion/index.d.ts +7 -0
  95. package/dist/suggestion/index.type.d.ts +94 -0
  96. package/dist/suggestion/index.vue.d.ts +343 -0
  97. package/dist/suggestion/utils/dom.d.ts +20 -0
  98. package/package.json +4 -3
  99. package/src/action-group/ActionGroup.vue +247 -0
  100. package/src/action-group/ActionGroupItem.vue +9 -0
  101. package/src/action-group/index.ts +25 -0
  102. package/src/action-group/index.type.ts +21 -0
  103. package/src/bubble/Bubble.vue +153 -0
  104. package/src/bubble/BubbleList.vue +55 -0
  105. package/src/bubble/index.ts +2 -2
  106. package/src/bubble/index.type.ts +7 -21
  107. package/src/container/index.vue +10 -36
  108. package/src/feedback/components/SourceList.vue +112 -0
  109. package/src/feedback/components/index.ts +1 -0
  110. package/src/feedback/index.ts +12 -0
  111. package/src/feedback/index.type.ts +27 -0
  112. package/src/feedback/index.vue +166 -0
  113. package/src/history/components/index.ts +2 -0
  114. package/src/history/components/item-tag.vue +49 -0
  115. package/src/history/components/search-empty.vue +38 -0
  116. package/src/history/composables/index.ts +1 -0
  117. package/src/history/composables/useEditItemTitle.ts +75 -0
  118. package/src/history/index.ts +12 -0
  119. package/src/history/index.type.ts +50 -0
  120. package/src/history/index.vue +292 -0
  121. package/src/icon-button/index.ts +12 -0
  122. package/src/icon-button/index.type.ts +7 -0
  123. package/src/icon-button/index.vue +58 -0
  124. package/src/index.ts +33 -1
  125. package/src/prompts/prompt.vue +7 -21
  126. package/src/question/components/HotQuestions.vue +1 -1
  127. package/src/question/index.less +9 -10
  128. package/src/sender/components/TemplateEditor.vue +465 -0
  129. package/src/sender/index.less +17 -7
  130. package/src/sender/index.type.ts +51 -0
  131. package/src/sender/index.vue +56 -8
  132. package/src/sender/vars.less +3 -3
  133. package/src/suggestion/components/CategoryNav.vue +38 -0
  134. package/src/suggestion/components/SuggestionCapsule.vue +183 -0
  135. package/src/suggestion/components/SuggestionPanel.vue +147 -0
  136. package/src/suggestion/composables/useKeyboardNavigation.ts +101 -0
  137. package/src/suggestion/composables/useSuggestionFilter.ts +34 -0
  138. package/src/suggestion/composables/useTriggerDetection.ts +46 -0
  139. package/src/suggestion/index.less +497 -0
  140. package/src/suggestion/index.ts +12 -0
  141. package/src/suggestion/index.type.ts +101 -0
  142. package/src/suggestion/index.vue +338 -0
  143. package/src/suggestion/utils/dom.ts +66 -0
  144. package/src/suggestion/vars.less +141 -0
  145. package/dist/bubble/components/actions/copy.vue.d.ts +0 -10
  146. package/dist/bubble/components/actions/index.d.ts +0 -2
  147. package/dist/bubble/components/actions/refresh.vue.d.ts +0 -2
  148. package/dist/bubble/useScroll.d.ts +0 -4
  149. package/dist/packages/components/src/bubble/bubble-list.vue.js +0 -7
  150. package/dist/packages/components/src/bubble/bubble-list.vue2.js +0 -37
  151. package/dist/packages/components/src/bubble/bubble.vue.js +0 -7
  152. package/dist/packages/components/src/bubble/bubble.vue2.js +0 -118
  153. package/dist/packages/components/src/bubble/components/actions/copy.vue.js +0 -7
  154. package/dist/packages/components/src/bubble/components/actions/copy.vue2.js +0 -35
  155. package/dist/packages/components/src/bubble/components/actions/refresh.vue.js +0 -7
  156. package/dist/packages/components/src/bubble/components/actions/refresh.vue2.js +0 -16
  157. package/dist/packages/components/src/bubble/useScroll.js +0 -13
  158. package/src/bubble/bubble-list.vue +0 -42
  159. package/src/bubble/bubble.vue +0 -247
  160. package/src/bubble/components/actions/copy.vue +0 -54
  161. package/src/bubble/components/actions/index.ts +0 -2
  162. package/src/bubble/components/actions/refresh.vue +0 -31
  163. package/src/bubble/useScroll.ts +0 -14
  164. /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
+ }
@@ -1,6 +1,6 @@
1
1
  import { App } from 'vue';
2
- import { default as BubbleComp } from './bubble.vue';
3
- import { default as BubbleListComp } from './bubble-list.vue';
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 { Component, CSSProperties, VNode } from 'vue';
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: () => unknown;
37
- footer: () => unknown;
38
- loading: () => unknown;
39
- }
40
- export interface BubbleEvents {
41
- (e: 'copy', result: boolean): void;
42
- (e: 'refresh'): void;
43
- (e: 'action', name: string, ...args: unknown[]): void;
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' | 'actions' | 'maxWidth'>;
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,7 @@
1
+ import { App } from 'vue';
2
+ import { default as Feedback } from './index.vue';
3
+ declare const install: <T>(app: App<T>) => void;
4
+ declare const _default: typeof Feedback & {
5
+ install: typeof install;
6
+ };
7
+ export default _default;
@@ -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,2 @@
1
+ export { default as ItemTag } from './item-tag.vue';
2
+ export { default as SearchEmpty } from './search-empty.vue';
@@ -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,6 @@
1
+ import { App } from 'vue';
2
+ declare const _default: {
3
+ install: <T>(app: App<T>) => void;
4
+ name: string;
5
+ };
6
+ export default _default;
@@ -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,2 @@
1
+ declare const _default: import('vue').DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import('vue').PublicProps>;
2
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { App } from 'vue';
2
+ import { default as IconButton } from './index.vue';
3
+ declare const install: <T>(app: App<T>) => void;
4
+ declare const _default: typeof IconButton & {
5
+ install: typeof install;
6
+ };
7
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import { Component, VNode } from 'vue';
2
+ export interface IconButtonProps {
3
+ icon: VNode | Component;
4
+ size?: string | number;
5
+ svgSize?: string | number;
6
+ }
@@ -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 t, BubbleList as e } from "./packages/components/src/bubble/index.js";
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 { Prompt as s, Prompts as a } from "./packages/components/src/prompts/index.js";
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 i from "./packages/components/src/container/index.vue.js";
9
- import n from "./packages/components/src/conversations/index.vue.js";
10
- import p from "./packages/components/src/question/index.vue.js";
11
- import c from "./packages/components/src/sender/index.vue.js";
12
- import f from "./packages/components/src/welcome/index.vue.js";
13
- const l = [t, e, i, n, s, a, p, c, f], W = {
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
- l.forEach((r) => {
16
- const m = r.name.replace(/^Tiny/, "").replace(/^Tr/, "");
17
- o.component(`Tr${m}`, r);
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
- t as Bubble,
23
- e as BubbleList,
24
- i as Container,
25
- n as Conversations,
26
- s as Prompt,
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
- p as Question,
29
- c as Sender,
30
- t as TrBubble,
31
- e as TrBubbleList,
32
- i as TrContainer,
33
- n as TrConversations,
34
- s as TrPrompt,
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
- c as TrSender,
37
- f as TrWelcome,
38
- f as Welcome,
39
- W as default
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
  };