@farris/x-ui 0.0.1 → 0.0.3

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 (161) hide show
  1. package/accordion/index.d.ts +9 -0
  2. package/accordion/src/accordion.component.d.ts +8 -0
  3. package/accordion/src/accordion.props.d.ts +2 -0
  4. package/accordion/src/components/accordion-item.component.d.ts +8 -0
  5. package/accordion/src/components/accordion-item.props.d.ts +2 -0
  6. package/app-preview/index.d.ts +4 -4
  7. package/app-preview/src/app-preview.component.d.ts +8 -8
  8. package/app-preview/src/app-preview.props.d.ts +2 -2
  9. package/app-preview/src/types.d.ts +4 -0
  10. package/attachment-preview/index.d.ts +4 -4
  11. package/attachment-preview/src/attachment-preview.component.d.ts +8 -8
  12. package/attachment-preview/src/attachment-preview.props.d.ts +2 -2
  13. package/bubble/index.d.ts +6 -6
  14. package/bubble/src/bubble.component.d.ts +59 -56
  15. package/bubble/src/bubble.props.d.ts +11 -6
  16. package/bubble/src/components/action/bubble-action.component.d.ts +6 -6
  17. package/bubble/src/components/action/bubble-action.props.d.ts +1 -1
  18. package/bubble/src/components/attachment/bubble-attachment.component.d.ts +10 -4
  19. package/bubble/src/components/attachment/bubble-attachment.props.d.ts +12 -2
  20. package/bubble/src/components/bubble-think/bubble-think.component.d.ts +8 -8
  21. package/bubble/src/components/bubble-think/bubble-think.props.d.ts +3 -3
  22. package/bubble/src/components/bubble-thought-chain/bubble-thought-chain.component.d.ts +5 -5
  23. package/bubble/src/components/bubble-thought-chain/bubble-thought-chain.props.d.ts +2 -2
  24. package/bubble/src/components/embedded-content/file/file-embedded-content.component.d.ts +14 -14
  25. package/bubble/src/components/embedded-content/file/file-embedded-content.props.d.ts +2 -2
  26. package/bubble/src/components/embedded-content/page/page-embedded-content.component.d.ts +6 -6
  27. package/bubble/src/components/embedded-content/page/page-embedded-content.props.d.ts +1 -1
  28. package/bubble/src/components/header/content-header.component.d.ts +2 -2
  29. package/bubble/src/components/header/sender-header.component.d.ts +2 -2
  30. package/bubble/src/components/text-content/text-content.component.d.ts +15 -9
  31. package/bubble/src/components/text-content/text-content.props.d.ts +14 -3
  32. package/bubble/src/components/text-content/utils/widget-to-messages.d.ts +44 -0
  33. package/bubble/src/composition/types.d.ts +4 -4
  34. package/bubble/src/composition/use-embedded-content.d.ts +2 -2
  35. package/bubble/src/composition/use-widget-content.d.ts +4 -3
  36. package/carousel/index.d.ts +6 -6
  37. package/carousel/src/carousel.component.d.ts +31 -31
  38. package/carousel/src/carousel.props.d.ts +2 -2
  39. package/carousel/src/components/carousel-item.component.d.ts +12 -12
  40. package/carousel/src/components/carousel-item.props.d.ts +2 -2
  41. package/carousel/src/composition/type.d.ts +1 -1
  42. package/carousel/src/composition/use-carousel.d.ts +5 -5
  43. package/chat-preview/index.d.ts +7 -7
  44. package/chat-preview/src/agent-workbench-sdk.d.ts +6 -6
  45. package/chat-preview/src/chat-preview.component.d.ts +11 -11
  46. package/chat-preview/src/chat-preview.props.d.ts +2 -2
  47. package/chat-preview/src/preview-chrome-sdk.d.ts +1 -1
  48. package/chat-preview/src/preview-iframe-sdk.d.ts +2 -2
  49. package/coding/index.d.ts +4 -4
  50. package/coding/src/coding.component.d.ts +5 -5
  51. package/coding/src/coding.props.d.ts +2 -2
  52. package/common/index.d.ts +7 -7
  53. package/common/src/use-render.d.ts +3 -3
  54. package/common/src/use-sequential-streaming.d.ts +1 -1
  55. package/common/src/use-streaming-output.d.ts +2 -2
  56. package/common/src/use-timer.d.ts +2 -2
  57. package/components.d.ts +52 -40
  58. package/confirm-dialog/index.d.ts +3 -3
  59. package/confirm-dialog/src/confirm-dialog.component.d.ts +9 -9
  60. package/confirm-dialog/src/confirm-dialog.props.d.ts +1 -1
  61. package/dynamic-component/index.d.ts +5 -5
  62. package/dynamic-component/src/composition/dynamic-component-registry.d.ts +1 -1
  63. package/dynamic-component/src/composition/types.d.ts +10 -5
  64. package/dynamic-component/src/composition/use-dynamic-component-parser.d.ts +3 -3
  65. package/dynamic-component/src/dynamic-component.component.d.ts +5 -5
  66. package/enterprise-cloud/index.d.ts +12 -12
  67. package/enterprise-cloud/src/agent-thinking.component.d.ts +5 -5
  68. package/enterprise-cloud/src/attachment-file.component.d.ts +5 -5
  69. package/enterprise-cloud/src/error-reminder.component.d.ts +5 -5
  70. package/enterprise-cloud/src/hitl-question.component.d.ts +5 -5
  71. package/enterprise-cloud/src/input-recommend.component.d.ts +5 -5
  72. package/enterprise-cloud/src/link-card.component.d.ts +5 -5
  73. package/enterprise-cloud/src/reference-sources.component.d.ts +5 -5
  74. package/enterprise-cloud/src/unknown-enterprise.component.d.ts +5 -5
  75. package/enterprise-cloud/src/user-auth.component.d.ts +5 -5
  76. package/farris.x-ui.esm.js +5827 -4249
  77. package/farris.x-ui.umd.cjs +118 -71
  78. package/file-operation/index.d.ts +4 -4
  79. package/file-operation/src/file-operation.component.d.ts +5 -5
  80. package/file-operation/src/file-operation.props.d.ts +2 -2
  81. package/generate-process/index.d.ts +3 -3
  82. package/generate-process/src/generate-process.component.d.ts +17 -17
  83. package/generate-process/src/generate-process.props.d.ts +2 -2
  84. package/history/index.d.ts +3 -3
  85. package/history/src/composition/type.d.ts +1 -1
  86. package/history/src/history.component.d.ts +4 -4
  87. package/history/src/history.props.d.ts +2 -2
  88. package/index.css +1 -1
  89. package/index.d.ts +3 -3
  90. package/list-view/index.d.ts +8 -0
  91. package/list-view/src/components/list-view-group-item.component.d.ts +41 -0
  92. package/list-view/src/components/list-view-item.component.d.ts +122 -0
  93. package/list-view/src/composition/types.d.ts +13 -0
  94. package/list-view/src/composition/use-data-view.d.ts +29 -0
  95. package/list-view/src/list-view.component.d.ts +32 -0
  96. package/list-view/src/list-view.props.d.ts +51 -0
  97. package/markdown/index.d.ts +4 -4
  98. package/markdown/src/markdown.component.d.ts +5 -5
  99. package/markdown/src/markdown.props.d.ts +2 -2
  100. package/markdown-preview/index.d.ts +3 -3
  101. package/markdown-preview/src/markdown-preview.component.d.ts +3 -3
  102. package/markdown-preview/src/markdown-preview.props.d.ts +1 -1
  103. package/nav/index.d.ts +8 -0
  104. package/nav/src/composition/types.d.ts +11 -0
  105. package/nav/src/nav.component.d.ts +8 -0
  106. package/nav/src/nav.props.d.ts +2 -0
  107. package/package.json +1 -2
  108. package/popover/index.d.ts +8 -0
  109. package/popover/src/composition/types.d.ts +28 -0
  110. package/popover/src/composition/use-delayed-ref.d.ts +4 -0
  111. package/popover/src/composition/use-host.d.ts +9 -0
  112. package/popover/src/composition/use-popup.d.ts +5 -0
  113. package/popover/src/composition/use-position.d.ts +5 -0
  114. package/popover/src/composition/use-resize.d.ts +5 -0
  115. package/popover/src/popover.component.d.ts +61 -0
  116. package/popover/src/popover.directive.d.ts +5 -0
  117. package/popover/src/popover.props.d.ts +104 -0
  118. package/popover/src/popover.service.d.ts +17 -0
  119. package/prompts/index.d.ts +5 -5
  120. package/prompts/src/components/prompt.component.d.ts +34 -34
  121. package/prompts/src/components/prompt.props.d.ts +2 -2
  122. package/prompts/src/composition/type.d.ts +1 -1
  123. package/prompts/src/prompts.component.d.ts +19 -19
  124. package/prompts/src/prompts.props.d.ts +2 -2
  125. package/search-box/index.d.ts +9 -0
  126. package/search-box/src/components/search-box-container.component.d.ts +26 -0
  127. package/search-box/src/components/search-box-container.props.d.ts +40 -0
  128. package/search-box/src/search-box.component.d.ts +40 -0
  129. package/search-box/src/search-box.props.d.ts +64 -0
  130. package/splitter/index.d.ts +8 -0
  131. package/splitter/src/components/splitter-pane.component.d.ts +8 -0
  132. package/splitter/src/components/splitter-pane.props.d.ts +5 -0
  133. package/splitter/src/composition/types.d.ts +26 -0
  134. package/splitter/src/composition/use-resize-handle.d.ts +4 -0
  135. package/splitter/src/composition/use-resize-pane.d.ts +4 -0
  136. package/splitter/src/splitter.component.d.ts +8 -0
  137. package/splitter/src/splitter.props.d.ts +5 -0
  138. package/started-todo/index.d.ts +4 -4
  139. package/started-todo/src/started-todo.component.d.ts +20 -20
  140. package/started-todo/src/started-todo.props.d.ts +3 -3
  141. package/started-todo/src/types.d.ts +1 -1
  142. package/suggestion/index.d.ts +3 -3
  143. package/suggestion/src/suggestion.component.d.ts +13 -13
  144. package/suggestion/src/suggestion.props.d.ts +2 -2
  145. package/todo/index.d.ts +8 -8
  146. package/todo/src/components/todo-list-item-view.component.d.ts +16 -16
  147. package/todo/src/components/todo-list-item-view.props.d.ts +3 -3
  148. package/todo/src/components/todo-list-view.d.ts +6 -6
  149. package/todo/src/components/todo-list-view.props.d.ts +2 -2
  150. package/todo/src/composition/status-icon.d.ts +1 -1
  151. package/todo/src/todo.component.d.ts +9 -9
  152. package/todo/src/todo.props.d.ts +2 -2
  153. package/tool-use/index.d.ts +2 -2
  154. package/tool-use/src/tool-use.component.d.ts +5 -5
  155. package/welcome/index.d.ts +3 -3
  156. package/welcome/src/welcome.component.d.ts +18 -18
  157. package/welcome/src/welcome.props.d.ts +2 -2
  158. package/widget-container/index.d.ts +4 -4
  159. package/widget-container/src/composition/use-load-widget.d.ts +1 -1
  160. package/widget-container/src/widget-container.component.d.ts +9 -9
  161. package/widget-container/src/widget-container.props.d.ts +2 -2
package/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { App } from 'vue';
1
+ import { App } from '../vue';
2
2
 
3
- export * from './components';
4
- export * from './common';
3
+ export * from '.';
4
+ export * from '../common';
5
5
  declare const _default: {
6
6
  install(app: App): void;
7
7
  };
@@ -0,0 +1,8 @@
1
+ import { Plugin } from '../../vue';
2
+ import { default as FXListView } from '../../src/list-view.component';
3
+
4
+ export * from '../../src/list-view.props';
5
+ export * from '../../src/composition/types';
6
+ export { FXListView };
7
+ declare const _default: typeof FXListView & Plugin;
8
+ export default _default;
@@ -0,0 +1,41 @@
1
+ declare const _default: import('../../../../vue').DefineComponent<import('../../../../vue').ExtractPropTypes<{
2
+ groupData: {
3
+ type: ObjectConstructor;
4
+ default: () => {};
5
+ };
6
+ groupField: {
7
+ type: StringConstructor;
8
+ default: string;
9
+ };
10
+ groupValue: {
11
+ type: StringConstructor;
12
+ default: string;
13
+ };
14
+ index: {
15
+ type: NumberConstructor;
16
+ default: number;
17
+ };
18
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('../../../../vue').ComponentOptionsMixin, import('../../../../vue').ComponentOptionsMixin, {}, string, import('../../../../vue').PublicProps, Readonly<import('../../../../vue').ExtractPropTypes<{
19
+ groupData: {
20
+ type: ObjectConstructor;
21
+ default: () => {};
22
+ };
23
+ groupField: {
24
+ type: StringConstructor;
25
+ default: string;
26
+ };
27
+ groupValue: {
28
+ type: StringConstructor;
29
+ default: string;
30
+ };
31
+ index: {
32
+ type: NumberConstructor;
33
+ default: number;
34
+ };
35
+ }>> & Readonly<{}>, {
36
+ index: number;
37
+ groupData: Record<string, any>;
38
+ groupField: string;
39
+ groupValue: string;
40
+ }, {}, {}, {}, string, import('../../../../vue').ComponentProvideOptions, true, {}, any>;
41
+ export default _default;
@@ -0,0 +1,122 @@
1
+ declare const _default: import('../../../../vue').DefineComponent<import('../../../../vue').ExtractPropTypes<{
2
+ item: {
3
+ type: ObjectConstructor;
4
+ default: () => {};
5
+ };
6
+ index: {
7
+ type: NumberConstructor;
8
+ default: number;
9
+ };
10
+ isActive: {
11
+ type: BooleanConstructor;
12
+ default: boolean;
13
+ };
14
+ isSelected: {
15
+ type: BooleanConstructor;
16
+ default: boolean;
17
+ };
18
+ data: {
19
+ type: import('../../../../vue').PropType<any[]>;
20
+ default: () => never[];
21
+ };
22
+ view: {
23
+ type: import('../../../../vue').PropType<import('../../../../../..').ListViewType>;
24
+ default: string;
25
+ };
26
+ customClass: {
27
+ type: StringConstructor;
28
+ default: string;
29
+ };
30
+ itemClass: {
31
+ type: import('../../../../vue').PropType<string | ((item: any, index: number) => string)>;
32
+ default: string;
33
+ };
34
+ idField: {
35
+ type: StringConstructor;
36
+ default: string;
37
+ };
38
+ textField: {
39
+ type: StringConstructor;
40
+ default: string;
41
+ };
42
+ titleField: {
43
+ type: StringConstructor;
44
+ default: string;
45
+ };
46
+ valueField: {
47
+ type: StringConstructor;
48
+ default: string;
49
+ };
50
+ group: {
51
+ type: import('../../../../vue').PropType<import('../../../../../..').ListViewGroupConfig>;
52
+ default: undefined;
53
+ };
54
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('../../../../vue').ComponentOptionsMixin, import('../../../../vue').ComponentOptionsMixin, {}, "clickItem", import('../../../../vue').PublicProps, Readonly<import('../../../../vue').ExtractPropTypes<{
55
+ item: {
56
+ type: ObjectConstructor;
57
+ default: () => {};
58
+ };
59
+ index: {
60
+ type: NumberConstructor;
61
+ default: number;
62
+ };
63
+ isActive: {
64
+ type: BooleanConstructor;
65
+ default: boolean;
66
+ };
67
+ isSelected: {
68
+ type: BooleanConstructor;
69
+ default: boolean;
70
+ };
71
+ data: {
72
+ type: import('../../../../vue').PropType<any[]>;
73
+ default: () => never[];
74
+ };
75
+ view: {
76
+ type: import('../../../../vue').PropType<import('../../../../../..').ListViewType>;
77
+ default: string;
78
+ };
79
+ customClass: {
80
+ type: StringConstructor;
81
+ default: string;
82
+ };
83
+ itemClass: {
84
+ type: import('../../../../vue').PropType<string | ((item: any, index: number) => string)>;
85
+ default: string;
86
+ };
87
+ idField: {
88
+ type: StringConstructor;
89
+ default: string;
90
+ };
91
+ textField: {
92
+ type: StringConstructor;
93
+ default: string;
94
+ };
95
+ titleField: {
96
+ type: StringConstructor;
97
+ default: string;
98
+ };
99
+ valueField: {
100
+ type: StringConstructor;
101
+ default: string;
102
+ };
103
+ group: {
104
+ type: import('../../../../vue').PropType<import('../../../../../..').ListViewGroupConfig>;
105
+ default: undefined;
106
+ };
107
+ }>> & Readonly<{}>, {
108
+ data: any[];
109
+ view: import('../../../../../..').ListViewType;
110
+ customClass: string;
111
+ item: Record<string, any>;
112
+ index: number;
113
+ idField: string;
114
+ valueField: string;
115
+ textField: string;
116
+ itemClass: string | ((item: any, index: number) => string);
117
+ titleField: string;
118
+ group: import('../../../../../..').ListViewGroupConfig;
119
+ isActive: boolean;
120
+ isSelected: boolean;
121
+ }, {}, {}, {}, string, import('../../../../vue').ComponentProvideOptions, true, {}, any>;
122
+ export default _default;
@@ -0,0 +1,13 @@
1
+ /** 列表视图类型 */
2
+ export type ListViewType = 'SingleView' | 'ContentView' | 'CardView' | 'DraggableView';
3
+ /** 分组配置 */
4
+ export interface ListViewGroupConfig {
5
+ enable?: boolean;
6
+ groupFields?: string[];
7
+ }
8
+ /** 列表项渲染上下文 */
9
+ export interface ListItemContext {
10
+ item: any;
11
+ index: number;
12
+ selectedItem?: any;
13
+ }
@@ -0,0 +1,29 @@
1
+ import { ListViewGroupConfig } from '../../../../../composition/types';
2
+
3
+ interface GroupedData {
4
+ type: 0 | 1;
5
+ data: any;
6
+ groupField?: string;
7
+ groupValue?: string;
8
+ originalIndex: number;
9
+ }
10
+ /**
11
+ * 简化的数据视图组合式函数
12
+ * 支持:数据管理、分组、选中、激活
13
+ */
14
+ export declare function useDataView(props: {
15
+ data: any[];
16
+ idField: string;
17
+ group?: ListViewGroupConfig;
18
+ }): {
19
+ data: import('../../../../vue').Ref<any[], any[]>;
20
+ visualData: import('../../../../vue').ComputedRef<GroupedData[]>;
21
+ selectedItems: import('../../../../vue').Ref<any[], any[]>;
22
+ activeItemId: import('../../../../vue').Ref<string | number, string | number>;
23
+ updateDataSource: (newData: any[]) => void;
24
+ activeRowById: (id: string | number) => void;
25
+ clearSelection: () => void;
26
+ toggleSelection: (item: any) => void;
27
+ isSelected: (item: any) => boolean;
28
+ };
29
+ export {};
@@ -0,0 +1,32 @@
1
+ declare const _default: import('../../../vue').DefineComponent<{
2
+ data: any[];
3
+ view: import('../../../..').ListViewType;
4
+ customClass: string;
5
+ idField: string;
6
+ valueField: string;
7
+ textField: string;
8
+ itemClass: string | ((item: any, index: number) => string);
9
+ titleField: string;
10
+ group?: import('../../../..').ListViewGroupConfig | undefined;
11
+ }, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('../../../vue').ComponentOptionsMixin, import('../../../vue').ComponentOptionsMixin, {}, "clickItem", import('../../../vue').PublicProps, Readonly<{
12
+ data: any[];
13
+ view: import('../../../..').ListViewType;
14
+ customClass: string;
15
+ idField: string;
16
+ valueField: string;
17
+ textField: string;
18
+ itemClass: string | ((item: any, index: number) => string);
19
+ titleField: string;
20
+ group?: import('../../../..').ListViewGroupConfig | undefined;
21
+ }> & Readonly<{}>, {
22
+ data: any[];
23
+ view: import('../../../..').ListViewType;
24
+ customClass: string;
25
+ idField: string;
26
+ valueField: string;
27
+ textField: string;
28
+ itemClass: string | ((item: any, index: number) => string);
29
+ titleField: string;
30
+ group: import('../../../..').ListViewGroupConfig;
31
+ }, {}, {}, {}, string, import('../../../vue').ComponentProvideOptions, true, {}, any>;
32
+ export default _default;
@@ -0,0 +1,51 @@
1
+ import { PropType } from '../../../vue';
2
+ import { ListViewType, ListViewGroupConfig } from '../../../composition/types';
3
+
4
+ export declare const listViewProps: {
5
+ /** 数据源 */
6
+ data: {
7
+ type: PropType<any[]>;
8
+ default: () => never[];
9
+ };
10
+ /** 视图类型 */
11
+ view: {
12
+ type: PropType<ListViewType>;
13
+ default: string;
14
+ };
15
+ /** 自定义样式类名 */
16
+ customClass: {
17
+ type: StringConstructor;
18
+ default: string;
19
+ };
20
+ /** 列表项样式类名 */
21
+ itemClass: {
22
+ type: PropType<string | ((item: any, index: number) => string)>;
23
+ default: string;
24
+ };
25
+ /** 数据源id字段 */
26
+ idField: {
27
+ type: StringConstructor;
28
+ default: string;
29
+ };
30
+ /** 数据源文本字段 */
31
+ textField: {
32
+ type: StringConstructor;
33
+ default: string;
34
+ };
35
+ /** 数据源标题字段 */
36
+ titleField: {
37
+ type: StringConstructor;
38
+ default: string;
39
+ };
40
+ /** 数据源值字段 */
41
+ valueField: {
42
+ type: StringConstructor;
43
+ default: string;
44
+ };
45
+ /** 分组配置 */
46
+ group: {
47
+ type: PropType<ListViewGroupConfig>;
48
+ default: undefined;
49
+ };
50
+ };
51
+ export type ListViewProps = import('../../../vue').ExtractPropTypes<typeof listViewProps>;
@@ -1,8 +1,8 @@
1
- import { Plugin } from 'vue';
2
- import { default as FXMarkdown } from './src/markdown.component';
1
+ import { Plugin } from '../../vue';
2
+ import { default as FXMarkdown } from '../../src/markdown.component';
3
3
 
4
- export * from './src/markdown.props';
5
- export * from './src/types';
4
+ export * from '../../src/markdown.props';
5
+ export * from '../../src/types';
6
6
  export { FXMarkdown };
7
7
  declare const _default: typeof FXMarkdown & Plugin;
8
8
  export default _default;
@@ -1,12 +1,12 @@
1
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
1
+ declare const _default: import('../../../vue').DefineComponent<import('../../../vue').ExtractPropTypes<{
2
2
  content: {
3
- type: import('vue').PropType<import('./types').MessageContentMarkdown>;
3
+ type: import('../../../vue').PropType<import('../../../types').MessageContentMarkdown>;
4
4
  required: boolean;
5
5
  };
6
- }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
6
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('../../../vue').ComponentOptionsMixin, import('../../../vue').ComponentOptionsMixin, {}, string, import('../../../vue').PublicProps, Readonly<import('../../../vue').ExtractPropTypes<{
7
7
  content: {
8
- type: import('vue').PropType<import('./types').MessageContentMarkdown>;
8
+ type: import('../../../vue').PropType<import('../../../types').MessageContentMarkdown>;
9
9
  required: boolean;
10
10
  };
11
- }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
11
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('../../../vue').ComponentProvideOptions, true, {}, any>;
12
12
  export default _default;
@@ -1,5 +1,5 @@
1
- import { ExtractPropTypes, PropType } from 'vue';
2
- import { MessageContentMarkdown } from './types';
1
+ import { ExtractPropTypes, PropType } from '../../../vue';
2
+ import { MessageContentMarkdown } from '../../../types';
3
3
 
4
4
  export declare const markdownMessageProps: {
5
5
  content: {
@@ -1,7 +1,7 @@
1
- import { Plugin } from 'vue';
2
- import { default as FXMarkdownPreview } from './src/markdown-preview.component';
1
+ import { Plugin } from '../../vue';
2
+ import { default as FXMarkdownPreview } from '../../src/markdown-preview.component';
3
3
 
4
- export * from './src/markdown-preview.props';
4
+ export * from '../../src/markdown-preview.props';
5
5
  export { FXMarkdownPreview };
6
6
  declare const _default: typeof FXMarkdownPreview & Plugin;
7
7
  export default _default;
@@ -1,9 +1,9 @@
1
1
 
2
- declare const _default: import('vue').DefineComponent<{
2
+ declare const _default: import('../../../vue').DefineComponent<{
3
3
  content: string;
4
- }, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
4
+ }, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('../../../vue').ComponentOptionsMixin, import('../../../vue').ComponentOptionsMixin, {}, string, import('../../../vue').PublicProps, Readonly<{
5
5
  content: string;
6
6
  }> & Readonly<{}>, {
7
7
  content: string;
8
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
8
+ }, {}, {}, {}, string, import('../../../vue').ComponentProvideOptions, true, {}, any>;
9
9
  export default _default;
@@ -1,4 +1,4 @@
1
- import { ExtractPropTypes } from 'vue';
1
+ import { ExtractPropTypes } from '../../../vue';
2
2
 
3
3
  export declare const markdownPreviewProps: {
4
4
  content: {
package/nav/index.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ import { Plugin } from '../../vue';
2
+ import { default as FXNav } from '../../src/nav.component';
3
+
4
+ export * from '../../src/nav.props';
5
+ export * from '../../src/composition/types';
6
+ export { FXNav };
7
+ declare const _default: typeof FXNav & Plugin;
8
+ export default _default;
@@ -0,0 +1,11 @@
1
+ export interface NavItem {
2
+ id: string;
3
+ text: string;
4
+ num?: number;
5
+ disable?: boolean;
6
+ }
7
+ export type ShouldContinueResult = {
8
+ canContinue: boolean;
9
+ message?: string;
10
+ } | boolean;
11
+ export type BeforePickingFunction = (params?: NavItem) => Promise<ShouldContinueResult> | boolean;
@@ -0,0 +1,8 @@
1
+ declare const _default: import('../../../vue').DefineComponent<{
2
+ [x: string]: /*elided*/ any;
3
+ }, () => any, {}, {}, {}, import('../../../vue').ComponentOptionsMixin, import('../../../vue').ComponentOptionsMixin, {}, "nav" | "update:activeNavId", import('../../../vue').PublicProps, Readonly<{
4
+ [x: string]: /*elided*/ any;
5
+ }> & Readonly<{}>, {
6
+ [x: string]: any;
7
+ }, {}, {}, {}, string, import('../../../vue').ComponentProvideOptions, true, {}, any>;
8
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export declare const navProps: Record<string, any>;
2
+ export type NavProps = import('../../../vue').ExtractPropTypes<typeof navProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farris/x-ui",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "可复用的 AI 对话组件",
5
5
  "type": "module",
6
6
  "main": "./farris.x-ui.umd.cjs",
@@ -8,7 +8,6 @@
8
8
  "types": "./components/index.d.ts",
9
9
  "style": "./index.css",
10
10
  "dependencies": {
11
- "@farris/ui-vue": "^1.6.0",
12
11
  "@monaco-editor/loader": "^1.4.0",
13
12
  "markdown-it": "^14.1.0",
14
13
  "md-editor-v3": "^6.4.1"
@@ -0,0 +1,8 @@
1
+ import { Plugin } from '../../vue';
2
+ import { default as FXPopover } from '../../src/popover.component';
3
+ import { default as FXPopoverDirective } from '../../src/popover.directive';
4
+
5
+ export * from '../../src/popover.props';
6
+ export { FXPopover, FXPopoverDirective };
7
+ declare const _default: typeof FXPopover & Plugin;
8
+ export default _default;
@@ -0,0 +1,28 @@
1
+ import { ComputedRef, Ref } from '../../../../vue';
2
+ import { PopoverPlacement } from '../../../../../popover.props';
3
+
4
+ export interface UsePosition {
5
+ arrowStyle: ComputedRef<Record<string, any>>;
6
+ popoverStyle: ComputedRef<Record<string, any>>;
7
+ position: Ref<PopoverPlacement>;
8
+ popoverWidth: Ref<number>;
9
+ fitToReference: (referenceElement: HTMLElement) => void;
10
+ followToReferencePosition: (referenceElement: HTMLElement) => void;
11
+ locateToReference: (referenceElement: HTMLElement) => void;
12
+ resetPosition: () => void;
13
+ }
14
+ export interface UseHost {
15
+ host: any;
16
+ hostLeft: ComputedRef<number>;
17
+ hostTop: ComputedRef<number>;
18
+ hostWidth: ComputedRef<number>;
19
+ hostHeight: ComputedRef<number>;
20
+ hostBottom: ComputedRef<number>;
21
+ }
22
+ export interface UsePopup {
23
+ hidePopverOnClickBodyHandler: ($event: MouseEvent) => any;
24
+ showPopover: Ref<boolean>;
25
+ }
26
+ export interface UseResize {
27
+ onResize: () => void;
28
+ }
@@ -0,0 +1,4 @@
1
+ export declare function useDelayedRef(source: any, delay?: number): {
2
+ delayedValue: import('../../../../vue').Ref<any, any>;
3
+ cleanup: () => void;
4
+ };
@@ -0,0 +1,9 @@
1
+ import { PopoverProps } from '../../../../../popover.props';
2
+ import { UseHost } from '../../../../types';
3
+
4
+ /**
5
+ * 因为涉及到body的样式,可能出现在计算bottom和height时为0的情况,所以使用了window的高度
6
+ * @param props
7
+ * @returns
8
+ */
9
+ export declare function useHost(props: PopoverProps): UseHost;
@@ -0,0 +1,5 @@
1
+ import { Ref, SetupContext } from '../../../../vue';
2
+ import { PopoverProps } from '../../../../../popover.props';
3
+ import { UsePopup, UsePosition } from '../../../../types';
4
+
5
+ export declare function usePopup(props: PopoverProps, context: SetupContext, arrowRef: Ref<any>, popoverRef: Ref<any>, reference: Ref<any>, shouldFitWidthToReference: Ref<boolean>, usePositionComposition: UsePosition): UsePopup;
@@ -0,0 +1,5 @@
1
+ import { Ref } from '../../../../vue';
2
+ import { PopoverProps } from '../../../../../popover.props';
3
+ import { UseHost, UsePosition } from '../../../../types';
4
+
5
+ export declare function usePosition(props: PopoverProps, arrowRef: Ref<any>, popoverRef: Ref<any>, hostComposition: UseHost): UsePosition;
@@ -0,0 +1,5 @@
1
+ import { Ref, SetupContext } from '../../../../vue';
2
+ import { PopoverProps } from '../../../../../popover.props';
3
+ import { UsePosition, UseResize } from '../../../../types';
4
+
5
+ export declare function useResize(props: PopoverProps, context: SetupContext, reference: Ref<any>, shouldFitWidthToReference: Ref<boolean>, positionComposition: UsePosition, popoverRef: Ref<any>): UseResize;
@@ -0,0 +1,61 @@
1
+ declare const _default: import('../../../vue').DefineComponent<{
2
+ class: string;
3
+ arrowOffsetX: number;
4
+ customStyles: Record<string, any>;
5
+ isSimpleTips: boolean;
6
+ fitContent: boolean;
7
+ keepWidthWithReference: boolean;
8
+ minWidth: number;
9
+ offsetX: any;
10
+ offsetY: any;
11
+ placement: import('../../../popover.props').PopoverPlacement;
12
+ showArrow: boolean;
13
+ visible: boolean;
14
+ zIndex: number;
15
+ limitContentBySpace: boolean;
16
+ title?: string | undefined;
17
+ id?: string | undefined;
18
+ host?: any;
19
+ leftBoundary?: any;
20
+ reference?: any;
21
+ rightBoundary?: any;
22
+ beforeClose?: (() => Promise<boolean> | boolean) | undefined;
23
+ }, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('../../../vue').ComponentOptionsMixin, import('../../../vue').ComponentOptionsMixin, {}, string, import('../../../vue').PublicProps, Readonly<{
24
+ class: string;
25
+ arrowOffsetX: number;
26
+ customStyles: Record<string, any>;
27
+ isSimpleTips: boolean;
28
+ fitContent: boolean;
29
+ keepWidthWithReference: boolean;
30
+ minWidth: number;
31
+ offsetX: any;
32
+ offsetY: any;
33
+ placement: import('../../../popover.props').PopoverPlacement;
34
+ showArrow: boolean;
35
+ visible: boolean;
36
+ zIndex: number;
37
+ limitContentBySpace: boolean;
38
+ title?: string | undefined;
39
+ id?: string | undefined;
40
+ host?: any;
41
+ leftBoundary?: any;
42
+ reference?: any;
43
+ rightBoundary?: any;
44
+ beforeClose?: (() => Promise<boolean> | boolean) | undefined;
45
+ }> & Readonly<{}>, {
46
+ class: string;
47
+ arrowOffsetX: number;
48
+ customStyles: Record<string, any>;
49
+ isSimpleTips: boolean;
50
+ fitContent: boolean;
51
+ keepWidthWithReference: boolean;
52
+ minWidth: number;
53
+ offsetX: any;
54
+ offsetY: any;
55
+ placement: import('../../../popover.props').PopoverPlacement;
56
+ showArrow: boolean;
57
+ visible: boolean;
58
+ zIndex: number;
59
+ limitContentBySpace: boolean;
60
+ }, {}, {}, {}, string, import('../../../vue').ComponentProvideOptions, true, {}, any>;
61
+ export default _default;
@@ -0,0 +1,5 @@
1
+ declare const fxPopoverDirective: {
2
+ mounted: (element: any, binding: Record<string, any>, vnode: any) => void;
3
+ unMounted: (element: any, binding: Record<string, any>, vnode: any) => void;
4
+ };
5
+ export default fxPopoverDirective;