@aipanel/ui 1.2.0-beta.0

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 (153) hide show
  1. package/es/AI-panel-widget/composables/use-inspector.d.ts +52 -0
  2. package/es/AI-panel-widget/composables/use-inspector.mjs +437 -0
  3. package/es/AI-panel-widget/composables/use-persist-state.d.ts +32 -0
  4. package/es/AI-panel-widget/composables/use-persist-state.mjs +83 -0
  5. package/es/AI-panel-widget/composables/use-selection.d.ts +19 -0
  6. package/es/AI-panel-widget/composables/use-selection.mjs +112 -0
  7. package/es/AI-panel-widget/composables/use-session.d.ts +16 -0
  8. package/es/AI-panel-widget/composables/use-session.mjs +47 -0
  9. package/es/AI-panel-widget/composables/use-split.d.ts +30 -0
  10. package/es/AI-panel-widget/composables/use-split.mjs +133 -0
  11. package/es/AI-panel-widget/composables/use-widget.d.ts +27 -0
  12. package/es/AI-panel-widget/composables/use-widget.mjs +78 -0
  13. package/es/AI-panel-widget/index.d.ts +5 -0
  14. package/es/AI-panel-widget/index.mjs +9 -0
  15. package/es/AI-panel-widget/src/assets/logo.svg +13 -0
  16. package/es/AI-panel-widget/src/components/AIPanelLogo-sfc.css +1 -0
  17. package/es/AI-panel-widget/src/components/AIPanelLogo.vue.d.ts +8 -0
  18. package/es/AI-panel-widget/src/components/AIPanelLogo.vue.mjs +40 -0
  19. package/es/AI-panel-widget/src/components/ChatPanel-sfc.css +1 -0
  20. package/es/AI-panel-widget/src/components/ChatPanel.vue.d.ts +179 -0
  21. package/es/AI-panel-widget/src/components/ChatPanel.vue.mjs +308 -0
  22. package/es/AI-panel-widget/src/components/FloatingBubble/FloatingBubble-sfc.css +1 -0
  23. package/es/AI-panel-widget/src/components/FloatingBubble/FloatingBubble.vue.d.ts +44 -0
  24. package/es/AI-panel-widget/src/components/FloatingBubble/FloatingBubble.vue.mjs +311 -0
  25. package/es/AI-panel-widget/src/components/FloatingBubble/index.d.ts +3 -0
  26. package/es/AI-panel-widget/src/components/FloatingBubble/index.mjs +5 -0
  27. package/es/AI-panel-widget/src/components/FloatingBubble/types.d.ts +24 -0
  28. package/es/AI-panel-widget/src/components/FloatingBubble/types.mjs +0 -0
  29. package/es/AI-panel-widget/src/components/Frame-sfc.css +1 -0
  30. package/es/AI-panel-widget/src/components/Frame.vue.d.ts +22 -0
  31. package/es/AI-panel-widget/src/components/Frame.vue.mjs +143 -0
  32. package/es/AI-panel-widget/src/components/Header-sfc.css +1 -0
  33. package/es/AI-panel-widget/src/components/Header.vue.d.ts +27 -0
  34. package/es/AI-panel-widget/src/components/Header.vue.mjs +683 -0
  35. package/es/AI-panel-widget/src/components/ResizeHandle-sfc.css +1 -0
  36. package/es/AI-panel-widget/src/components/ResizeHandle.vue.d.ts +22 -0
  37. package/es/AI-panel-widget/src/components/ResizeHandle.vue.mjs +79 -0
  38. package/es/AI-panel-widget/src/components/SelectHint-sfc.css +1 -0
  39. package/es/AI-panel-widget/src/components/SelectHint.vue.d.ts +3 -0
  40. package/es/AI-panel-widget/src/components/SelectHint.vue.mjs +40 -0
  41. package/es/AI-panel-widget/src/components/SelectedBubbles-sfc.css +1 -0
  42. package/es/AI-panel-widget/src/components/SelectedBubbles.vue.d.ts +3 -0
  43. package/es/AI-panel-widget/src/components/SelectedBubbles.vue.mjs +84 -0
  44. package/es/AI-panel-widget/src/components/SelectedNodes-sfc.css +1 -0
  45. package/es/AI-panel-widget/src/components/SelectedNodes.vue.d.ts +3 -0
  46. package/es/AI-panel-widget/src/components/SelectedNodes.vue.mjs +103 -0
  47. package/es/AI-panel-widget/src/components/SessionList-sfc.css +1 -0
  48. package/es/AI-panel-widget/src/components/SessionList.vue.d.ts +13 -0
  49. package/es/AI-panel-widget/src/components/SessionList.vue.mjs +222 -0
  50. package/es/AI-panel-widget/src/components/SplitTrigger-sfc.css +1 -0
  51. package/es/AI-panel-widget/src/components/SplitTrigger.vue.d.ts +18 -0
  52. package/es/AI-panel-widget/src/components/SplitTrigger.vue.mjs +112 -0
  53. package/es/AI-panel-widget/src/components/Trigger-sfc.css +1 -0
  54. package/es/AI-panel-widget/src/components/Trigger.vue.d.ts +28 -0
  55. package/es/AI-panel-widget/src/components/Trigger.vue.mjs +74 -0
  56. package/es/AI-panel-widget/src/context.d.ts +67 -0
  57. package/es/AI-panel-widget/src/context.mjs +16 -0
  58. package/es/AI-panel-widget/src/index-sfc.css +1 -0
  59. package/es/AI-panel-widget/src/index.vue.d.ts +69 -0
  60. package/es/AI-panel-widget/src/index.vue.mjs +782 -0
  61. package/es/AI-panel-widget/src/types.d.ts +2 -0
  62. package/es/AI-panel-widget/src/types.mjs +0 -0
  63. package/es/AI-panel-widget/style/index-pure.d.ts +0 -0
  64. package/es/AI-panel-widget/style/index-pure.mjs +0 -0
  65. package/es/AI-panel-widget/style/index.d.ts +0 -0
  66. package/es/AI-panel-widget/style/index.mjs +0 -0
  67. package/es/AI-panel-widget/style/less-pure.d.ts +0 -0
  68. package/es/AI-panel-widget/style/less-pure.mjs +0 -0
  69. package/es/AI-panel-widget/style/less.d.ts +0 -0
  70. package/es/AI-panel-widget/style/less.mjs +0 -0
  71. package/es/env.d.ts +15 -0
  72. package/es/index.d.ts +7 -0
  73. package/es/index.mjs +22 -0
  74. package/es/setup.d.ts +1 -0
  75. package/es/setup.mjs +4 -0
  76. package/lib/AI-panel-widget/composables/use-inspector.cjs +466 -0
  77. package/lib/AI-panel-widget/composables/use-inspector.d.ts +52 -0
  78. package/lib/AI-panel-widget/composables/use-persist-state.cjs +102 -0
  79. package/lib/AI-panel-widget/composables/use-persist-state.d.ts +32 -0
  80. package/lib/AI-panel-widget/composables/use-selection.cjs +131 -0
  81. package/lib/AI-panel-widget/composables/use-selection.d.ts +19 -0
  82. package/lib/AI-panel-widget/composables/use-session.cjs +66 -0
  83. package/lib/AI-panel-widget/composables/use-session.d.ts +16 -0
  84. package/lib/AI-panel-widget/composables/use-split.cjs +152 -0
  85. package/lib/AI-panel-widget/composables/use-split.d.ts +30 -0
  86. package/lib/AI-panel-widget/composables/use-widget.cjs +97 -0
  87. package/lib/AI-panel-widget/composables/use-widget.d.ts +27 -0
  88. package/lib/AI-panel-widget/index.cjs +39 -0
  89. package/lib/AI-panel-widget/index.d.ts +5 -0
  90. package/lib/AI-panel-widget/src/assets/logo.svg +13 -0
  91. package/lib/AI-panel-widget/src/components/AIPanelLogo-sfc.css +1 -0
  92. package/lib/AI-panel-widget/src/components/AIPanelLogo.vue.cjs +69 -0
  93. package/lib/AI-panel-widget/src/components/AIPanelLogo.vue.d.ts +8 -0
  94. package/lib/AI-panel-widget/src/components/ChatPanel-sfc.css +1 -0
  95. package/lib/AI-panel-widget/src/components/ChatPanel.vue.cjs +337 -0
  96. package/lib/AI-panel-widget/src/components/ChatPanel.vue.d.ts +179 -0
  97. package/lib/AI-panel-widget/src/components/FloatingBubble/FloatingBubble-sfc.css +1 -0
  98. package/lib/AI-panel-widget/src/components/FloatingBubble/FloatingBubble.vue.cjs +330 -0
  99. package/lib/AI-panel-widget/src/components/FloatingBubble/FloatingBubble.vue.d.ts +44 -0
  100. package/lib/AI-panel-widget/src/components/FloatingBubble/index.cjs +35 -0
  101. package/lib/AI-panel-widget/src/components/FloatingBubble/index.d.ts +3 -0
  102. package/lib/AI-panel-widget/src/components/FloatingBubble/types.cjs +15 -0
  103. package/lib/AI-panel-widget/src/components/FloatingBubble/types.d.ts +24 -0
  104. package/lib/AI-panel-widget/src/components/Frame-sfc.css +1 -0
  105. package/lib/AI-panel-widget/src/components/Frame.vue.cjs +162 -0
  106. package/lib/AI-panel-widget/src/components/Frame.vue.d.ts +22 -0
  107. package/lib/AI-panel-widget/src/components/Header-sfc.css +1 -0
  108. package/lib/AI-panel-widget/src/components/Header.vue.cjs +702 -0
  109. package/lib/AI-panel-widget/src/components/Header.vue.d.ts +27 -0
  110. package/lib/AI-panel-widget/src/components/ResizeHandle-sfc.css +1 -0
  111. package/lib/AI-panel-widget/src/components/ResizeHandle.vue.cjs +98 -0
  112. package/lib/AI-panel-widget/src/components/ResizeHandle.vue.d.ts +22 -0
  113. package/lib/AI-panel-widget/src/components/SelectHint-sfc.css +1 -0
  114. package/lib/AI-panel-widget/src/components/SelectHint.vue.cjs +59 -0
  115. package/lib/AI-panel-widget/src/components/SelectHint.vue.d.ts +3 -0
  116. package/lib/AI-panel-widget/src/components/SelectedBubbles-sfc.css +1 -0
  117. package/lib/AI-panel-widget/src/components/SelectedBubbles.vue.cjs +103 -0
  118. package/lib/AI-panel-widget/src/components/SelectedBubbles.vue.d.ts +3 -0
  119. package/lib/AI-panel-widget/src/components/SelectedNodes-sfc.css +1 -0
  120. package/lib/AI-panel-widget/src/components/SelectedNodes.vue.cjs +122 -0
  121. package/lib/AI-panel-widget/src/components/SelectedNodes.vue.d.ts +3 -0
  122. package/lib/AI-panel-widget/src/components/SessionList-sfc.css +1 -0
  123. package/lib/AI-panel-widget/src/components/SessionList.vue.cjs +241 -0
  124. package/lib/AI-panel-widget/src/components/SessionList.vue.d.ts +13 -0
  125. package/lib/AI-panel-widget/src/components/SplitTrigger-sfc.css +1 -0
  126. package/lib/AI-panel-widget/src/components/SplitTrigger.vue.cjs +131 -0
  127. package/lib/AI-panel-widget/src/components/SplitTrigger.vue.d.ts +18 -0
  128. package/lib/AI-panel-widget/src/components/Trigger-sfc.css +1 -0
  129. package/lib/AI-panel-widget/src/components/Trigger.vue.cjs +103 -0
  130. package/lib/AI-panel-widget/src/components/Trigger.vue.d.ts +28 -0
  131. package/lib/AI-panel-widget/src/context.cjs +35 -0
  132. package/lib/AI-panel-widget/src/context.d.ts +67 -0
  133. package/lib/AI-panel-widget/src/index-sfc.css +1 -0
  134. package/lib/AI-panel-widget/src/index.vue.cjs +811 -0
  135. package/lib/AI-panel-widget/src/index.vue.d.ts +69 -0
  136. package/lib/AI-panel-widget/src/types.cjs +15 -0
  137. package/lib/AI-panel-widget/src/types.d.ts +2 -0
  138. package/lib/AI-panel-widget/style/index-pure.cjs +0 -0
  139. package/lib/AI-panel-widget/style/index-pure.d.ts +0 -0
  140. package/lib/AI-panel-widget/style/index.cjs +0 -0
  141. package/lib/AI-panel-widget/style/index.d.ts +0 -0
  142. package/lib/AI-panel-widget/style/less-pure.cjs +0 -0
  143. package/lib/AI-panel-widget/style/less-pure.d.ts +0 -0
  144. package/lib/AI-panel-widget/style/less.cjs +0 -0
  145. package/lib/AI-panel-widget/style/less.d.ts +0 -0
  146. package/lib/env.d.ts +15 -0
  147. package/lib/index.cjs +42 -0
  148. package/lib/index.css +0 -0
  149. package/lib/index.d.ts +7 -0
  150. package/lib/index.less +0 -0
  151. package/lib/setup.cjs +23 -0
  152. package/lib/setup.d.ts +1 -0
  153. package/package.json +42 -0
@@ -0,0 +1,179 @@
1
+ type __VLS_Props = {
2
+ mode?: "bubble" | "split";
3
+ open?: boolean;
4
+ minimized?: boolean;
5
+ positionStyle?: Record<string, string>;
6
+ animationOrigin?: {
7
+ x: string;
8
+ y: string;
9
+ };
10
+ panelWidth?: number;
11
+ resizable?: boolean;
12
+ minWidth?: number;
13
+ maxWidth?: number;
14
+ noTransition?: boolean;
15
+ dragging?: boolean;
16
+ thinking?: boolean;
17
+ resolvedTheme?: "light" | "dark";
18
+ splitPosition?: "left" | "right";
19
+ extension?: boolean;
20
+ };
21
+ declare var __VLS_17: {}, __VLS_20: {}, __VLS_23: {}, __VLS_32: {}, __VLS_43: {}, __VLS_46: {}, __VLS_49: {}, __VLS_52: {};
22
+ type __VLS_Slots = {} & {
23
+ 'session-toggle-icon'?: (props: typeof __VLS_17) => any;
24
+ } & {
25
+ 'select-icon'?: (props: typeof __VLS_20) => any;
26
+ } & {
27
+ 'close-icon'?: (props: typeof __VLS_23) => any;
28
+ } & {
29
+ 'sessions-empty'?: (props: typeof __VLS_32) => any;
30
+ } & {
31
+ 'empty-state'?: (props: typeof __VLS_43) => any;
32
+ } & {
33
+ loading?: (props: typeof __VLS_46) => any;
34
+ } & {
35
+ error?: (props: typeof __VLS_49) => any;
36
+ } & {
37
+ content?: (props: typeof __VLS_52) => any;
38
+ };
39
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
40
+ sendMessageToIframe: (type: string, data?: Record<string, unknown>) => void;
41
+ frameRef: import("vue").Ref<({
42
+ $: import("vue").ComponentInternalInstance;
43
+ $data: {};
44
+ $props: Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>;
45
+ $attrs: import("vue").Attrs;
46
+ $refs: {
47
+ [x: string]: unknown;
48
+ };
49
+ $slots: Readonly<{
50
+ [name: string]: import("vue").Slot<any> | undefined;
51
+ }>;
52
+ $root: import("vue").ComponentPublicInstance | null;
53
+ $parent: import("vue").ComponentPublicInstance | null;
54
+ $host: Element | null;
55
+ $emit: (event: string, ...args: any[]) => void;
56
+ $el: any;
57
+ $options: import("vue").ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {
58
+ sendMessageToIframe: (type: string, data?: Record<string, unknown>) => void;
59
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
60
+ beforeCreate?: (() => void) | (() => void)[];
61
+ created?: (() => void) | (() => void)[];
62
+ beforeMount?: (() => void) | (() => void)[];
63
+ mounted?: (() => void) | (() => void)[];
64
+ beforeUpdate?: (() => void) | (() => void)[];
65
+ updated?: (() => void) | (() => void)[];
66
+ activated?: (() => void) | (() => void)[];
67
+ deactivated?: (() => void) | (() => void)[];
68
+ beforeDestroy?: (() => void) | (() => void)[];
69
+ beforeUnmount?: (() => void) | (() => void)[];
70
+ destroyed?: (() => void) | (() => void)[];
71
+ unmounted?: (() => void) | (() => void)[];
72
+ renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
73
+ renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
74
+ errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
75
+ };
76
+ $forceUpdate: () => void;
77
+ $nextTick: typeof import("vue").nextTick;
78
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
79
+ } & Readonly<{}> & Omit<Readonly<{}> & Readonly<{}>, "sendMessageToIframe"> & {
80
+ sendMessageToIframe: (type: string, data?: Record<string, unknown>) => void;
81
+ } & {} & import("vue").ComponentCustomProperties & {} & {
82
+ $slots: {
83
+ 'empty-state'?: (props: {}) => any;
84
+ } & {
85
+ loading?: (props: {}) => any;
86
+ } & {
87
+ error?: (props: {}) => any;
88
+ } & {
89
+ content?: (props: {}) => any;
90
+ };
91
+ }) | null, ({
92
+ $: import("vue").ComponentInternalInstance;
93
+ $data: {};
94
+ $props: Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>;
95
+ $attrs: import("vue").Attrs;
96
+ $refs: {
97
+ [x: string]: unknown;
98
+ };
99
+ $slots: Readonly<{
100
+ [name: string]: import("vue").Slot<any> | undefined;
101
+ }>;
102
+ $root: import("vue").ComponentPublicInstance | null;
103
+ $parent: import("vue").ComponentPublicInstance | null;
104
+ $host: Element | null;
105
+ $emit: (event: string, ...args: any[]) => void;
106
+ $el: any;
107
+ $options: import("vue").ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {
108
+ sendMessageToIframe: (type: string, data?: Record<string, unknown>) => void;
109
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
110
+ beforeCreate?: (() => void) | (() => void)[];
111
+ created?: (() => void) | (() => void)[];
112
+ beforeMount?: (() => void) | (() => void)[];
113
+ mounted?: (() => void) | (() => void)[];
114
+ beforeUpdate?: (() => void) | (() => void)[];
115
+ updated?: (() => void) | (() => void)[];
116
+ activated?: (() => void) | (() => void)[];
117
+ deactivated?: (() => void) | (() => void)[];
118
+ beforeDestroy?: (() => void) | (() => void)[];
119
+ beforeUnmount?: (() => void) | (() => void)[];
120
+ destroyed?: (() => void) | (() => void)[];
121
+ unmounted?: (() => void) | (() => void)[];
122
+ renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
123
+ renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
124
+ errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
125
+ };
126
+ $forceUpdate: () => void;
127
+ $nextTick: typeof import("vue").nextTick;
128
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
129
+ } & Readonly<{}> & Omit<Readonly<{}> & Readonly<{}>, "sendMessageToIframe"> & {
130
+ sendMessageToIframe: (type: string, data?: Record<string, unknown>) => void;
131
+ } & {} & import("vue").ComponentCustomProperties & {} & {
132
+ $slots: {
133
+ 'empty-state'?: (props: {}) => any;
134
+ } & {
135
+ loading?: (props: {}) => any;
136
+ } & {
137
+ error?: (props: {}) => any;
138
+ } & {
139
+ content?: (props: {}) => any;
140
+ };
141
+ }) | null>;
142
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
143
+ resize: (width: number) => any;
144
+ "resize-start": () => any;
145
+ "resize-end": () => any;
146
+ toggle: () => any;
147
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
148
+ onResize?: ((width: number) => any) | undefined;
149
+ "onResize-start"?: (() => any) | undefined;
150
+ "onResize-end"?: (() => any) | undefined;
151
+ onToggle?: (() => any) | undefined;
152
+ }>, {
153
+ extension: boolean;
154
+ resolvedTheme: "light" | "dark";
155
+ minimized: boolean;
156
+ mode: "bubble" | "split";
157
+ splitPosition: "left" | "right";
158
+ thinking: boolean;
159
+ minWidth: number;
160
+ maxWidth: number;
161
+ open: boolean;
162
+ positionStyle: Record<string, string>;
163
+ animationOrigin: {
164
+ x: string;
165
+ y: string;
166
+ };
167
+ panelWidth: number;
168
+ resizable: boolean;
169
+ noTransition: boolean;
170
+ dragging: boolean;
171
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
172
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
173
+ declare const _default: typeof __VLS_export;
174
+ export default _default;
175
+ type __VLS_WithSlots<T, S> = T & {
176
+ new (): {
177
+ $slots: S;
178
+ };
179
+ };
@@ -0,0 +1,308 @@
1
+ import "./ChatPanel-sfc.css";
2
+ import { useCssVars as _useCssVars, defineComponent as _defineComponent } from "vue";
3
+ import { ref, computed, useSlots } from "vue";
4
+ import Frame from "./Frame.vue.mjs";
5
+ import Header from "./Header.vue.mjs";
6
+ import SessionList from "./SessionList.vue.mjs";
7
+ import SelectedNodes from "./SelectedNodes.vue.mjs";
8
+ import ResizeHandle from "./ResizeHandle.vue.mjs";
9
+ const __vue_sfc__ = /* @__PURE__ */ _defineComponent({
10
+ ...{
11
+ name: "ChatPanel"
12
+ },
13
+ __name: "ChatPanel",
14
+ props: {
15
+ mode: { type: String, required: false, default: "bubble" },
16
+ open: { type: Boolean, required: false, default: false },
17
+ minimized: { type: Boolean, required: false, default: false },
18
+ positionStyle: { type: Object, required: false, default: () => ({}) },
19
+ animationOrigin: { type: Object, required: false, default: () => ({ x: "20px", y: "20px" }) },
20
+ panelWidth: { type: Number, required: false, default: 500 },
21
+ resizable: { type: Boolean, required: false, default: true },
22
+ minWidth: { type: Number, required: false, default: 400 },
23
+ maxWidth: { type: Number, required: false, default: 800 },
24
+ noTransition: { type: Boolean, required: false, default: false },
25
+ dragging: { type: Boolean, required: false, default: false },
26
+ thinking: { type: Boolean, required: false, default: false },
27
+ resolvedTheme: { type: String, required: false, default: "light" },
28
+ splitPosition: { type: String, required: false, default: "right" },
29
+ extension: { type: Boolean, required: false, default: false }
30
+ },
31
+ emits: ["resize", "resize-start", "resize-end", "toggle"],
32
+ setup(__props, { expose: __expose, emit: __emit }) {
33
+ _useCssVars((_ctx) => ({
34
+ "-animationOrigin.x": _ctx.animationOrigin.x,
35
+ "-animationOrigin.y": _ctx.animationOrigin.y
36
+ }));
37
+ const props = __props;
38
+ const emit = __emit;
39
+ const slots = useSlots();
40
+ const frameRef = ref(null);
41
+ const sendMessageToIframe = (type, data) => {
42
+ frameRef.value?.sendMessageToIframe(type, data);
43
+ };
44
+ __expose({
45
+ sendMessageToIframe,
46
+ frameRef
47
+ });
48
+ const handleResizeStart = () => {
49
+ emit("resize-start");
50
+ };
51
+ const handleResize = (width) => {
52
+ emit("resize", width);
53
+ };
54
+ const handleResizeEnd = () => {
55
+ emit("resize-end");
56
+ };
57
+ const handleToggle = () => {
58
+ emit("toggle");
59
+ };
60
+ const panelStyle = computed(() => {
61
+ if (props.extension) {
62
+ return {};
63
+ }
64
+ if (props.mode === "split") {
65
+ return {
66
+ width: `${props.panelWidth}px`
67
+ };
68
+ }
69
+ return props.positionStyle;
70
+ });
71
+ const panelClasses = computed(() => [
72
+ "aipanel-chat",
73
+ {
74
+ open: props.open,
75
+ minimized: props.minimized,
76
+ dragging: props.dragging,
77
+ "no-transition": props.noTransition,
78
+ "split-mode": props.mode === "split",
79
+ "split-left": props.mode === "split" && props.splitPosition === "left" && !props.extension,
80
+ "split-right": props.mode === "split" && props.splitPosition === "right" && !props.extension,
81
+ "extension-mode": props.extension
82
+ }
83
+ ]);
84
+ const __returned__ = { props, emit, slots, frameRef, sendMessageToIframe, handleResizeStart, handleResize, handleResizeEnd, handleToggle, panelStyle, panelClasses, Frame, Header, SessionList, SelectedNodes, ResizeHandle };
85
+ Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
86
+ return __returned__;
87
+ }
88
+ });
89
+ import { openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, createElementBlock as _createElementBlock, normalizeClass as _normalizeClass, renderSlot as _renderSlot, withCtx as _withCtx, createSlots as _createSlots, createVNode as _createVNode, normalizeStyle as _normalizeStyle } from "vue";
90
+ const _hoisted_1 = ["aria-expanded"];
91
+ const _hoisted_2 = { class: "aipanel-split-toggle-icon" };
92
+ const _hoisted_3 = {
93
+ key: 0,
94
+ viewBox: "0 0 24 24",
95
+ width: "16",
96
+ height: "16",
97
+ fill: "none",
98
+ stroke: "currentColor",
99
+ "stroke-width": "2"
100
+ };
101
+ const _hoisted_4 = {
102
+ key: 1,
103
+ viewBox: "0 0 24 24",
104
+ width: "16",
105
+ height: "16",
106
+ fill: "none",
107
+ stroke: "currentColor",
108
+ "stroke-width": "2"
109
+ };
110
+ const _hoisted_5 = {
111
+ key: 2,
112
+ viewBox: "0 0 24 24",
113
+ width: "16",
114
+ height: "16",
115
+ fill: "none",
116
+ stroke: "currentColor",
117
+ "stroke-width": "2"
118
+ };
119
+ const _hoisted_6 = {
120
+ key: 3,
121
+ viewBox: "0 0 24 24",
122
+ width: "16",
123
+ height: "16",
124
+ fill: "none",
125
+ stroke: "currentColor",
126
+ "stroke-width": "2"
127
+ };
128
+ const _hoisted_7 = { class: "aipanel-chat-content" };
129
+ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
130
+ return _openBlock(), _createElementBlock(
131
+ "div",
132
+ {
133
+ class: _normalizeClass($setup.panelClasses),
134
+ style: _normalizeStyle($setup.panelStyle)
135
+ },
136
+ [
137
+ $props.mode === "split" && $props.resizable && $props.open ? (_openBlock(), _createBlock($setup["ResizeHandle"], {
138
+ key: 0,
139
+ width: $props.panelWidth,
140
+ "min-width": $props.minWidth,
141
+ "max-width": $props.maxWidth,
142
+ position: $props.splitPosition,
143
+ onResize: $setup.handleResize,
144
+ onResizeStart: $setup.handleResizeStart,
145
+ onResizeEnd: $setup.handleResizeEnd
146
+ }, null, 8, ["width", "min-width", "max-width", "position"])) : _createCommentVNode("v-if", true),
147
+ $props.mode === "split" && $props.resizable ? (_openBlock(), _createElementBlock("button", {
148
+ key: 1,
149
+ type: "button",
150
+ class: _normalizeClass(["aipanel-split-toggle-btn", { open: $setup.props.open, thinking: $setup.props.thinking, "aipanel-theme-dark": $props.resolvedTheme === "dark", "split-left": $props.splitPosition === "left" }]),
151
+ "aria-expanded": $props.open,
152
+ "aria-label": "\u5207\u6362\u9762\u677F",
153
+ onClick: $setup.handleToggle
154
+ }, [
155
+ _createElementVNode("span", _hoisted_2, [
156
+ $props.open && $props.splitPosition === "right" ? (_openBlock(), _createElementBlock("svg", _hoisted_3, [..._cache[0] || (_cache[0] = [
157
+ _createElementVNode(
158
+ "path",
159
+ {
160
+ d: "M9 18l6-6-6-6",
161
+ "stroke-linecap": "round",
162
+ "stroke-linejoin": "round"
163
+ },
164
+ null,
165
+ -1
166
+ /* CACHED */
167
+ )
168
+ ])])) : _createCommentVNode("v-if", true),
169
+ !$props.open && $props.splitPosition === "right" ? (_openBlock(), _createElementBlock("svg", _hoisted_4, [..._cache[1] || (_cache[1] = [
170
+ _createElementVNode(
171
+ "path",
172
+ {
173
+ d: "M15 18l-6-6 6-6",
174
+ "stroke-linecap": "round",
175
+ "stroke-linejoin": "round"
176
+ },
177
+ null,
178
+ -1
179
+ /* CACHED */
180
+ )
181
+ ])])) : _createCommentVNode("v-if", true),
182
+ $props.open && $props.splitPosition === "left" ? (_openBlock(), _createElementBlock("svg", _hoisted_5, [..._cache[2] || (_cache[2] = [
183
+ _createElementVNode(
184
+ "path",
185
+ {
186
+ d: "M15 18l-6-6 6-6",
187
+ "stroke-linecap": "round",
188
+ "stroke-linejoin": "round"
189
+ },
190
+ null,
191
+ -1
192
+ /* CACHED */
193
+ )
194
+ ])])) : _createCommentVNode("v-if", true),
195
+ !$props.open && $props.splitPosition === "left" ? (_openBlock(), _createElementBlock("svg", _hoisted_6, [..._cache[3] || (_cache[3] = [
196
+ _createElementVNode(
197
+ "path",
198
+ {
199
+ d: "M9 18l6-6-6-6",
200
+ "stroke-linecap": "round",
201
+ "stroke-linejoin": "round"
202
+ },
203
+ null,
204
+ -1
205
+ /* CACHED */
206
+ )
207
+ ])])) : _createCommentVNode("v-if", true)
208
+ ])
209
+ ], 10, _hoisted_1)) : _createCommentVNode("v-if", true),
210
+ _createVNode(
211
+ $setup["Header"],
212
+ null,
213
+ _createSlots({
214
+ _: 2
215
+ /* DYNAMIC */
216
+ }, [
217
+ $setup.slots["session-toggle-icon"] ? {
218
+ name: "session-toggle-icon",
219
+ fn: _withCtx(() => [
220
+ _renderSlot(_ctx.$slots, "session-toggle-icon")
221
+ ]),
222
+ key: "0"
223
+ } : void 0,
224
+ $setup.slots["select-icon"] ? {
225
+ name: "select-icon",
226
+ fn: _withCtx(() => [
227
+ _renderSlot(_ctx.$slots, "select-icon")
228
+ ]),
229
+ key: "1"
230
+ } : void 0,
231
+ $setup.slots["close-icon"] ? {
232
+ name: "close-icon",
233
+ fn: _withCtx(() => [
234
+ _renderSlot(_ctx.$slots, "close-icon")
235
+ ]),
236
+ key: "2"
237
+ } : void 0
238
+ ]),
239
+ 1024
240
+ /* DYNAMIC_SLOTS */
241
+ ),
242
+ _createElementVNode("div", _hoisted_7, [
243
+ _createVNode($setup["SessionList"], null, {
244
+ empty: _withCtx(() => [
245
+ _renderSlot(_ctx.$slots, "sessions-empty", {}, () => [
246
+ _cache[4] || (_cache[4] = _createElementVNode(
247
+ "div",
248
+ { class: "aipanel-session-empty" },
249
+ "\u6682\u65E0\u4F1A\u8BDD",
250
+ -1
251
+ /* CACHED */
252
+ ))
253
+ ])
254
+ ]),
255
+ _: 3
256
+ /* FORWARDED */
257
+ }),
258
+ _createVNode(
259
+ $setup["Frame"],
260
+ { ref: "frameRef" },
261
+ _createSlots({
262
+ _: 2
263
+ /* DYNAMIC */
264
+ }, [
265
+ $setup.slots["empty-state"] ? {
266
+ name: "empty-state",
267
+ fn: _withCtx(() => [
268
+ _renderSlot(_ctx.$slots, "empty-state")
269
+ ]),
270
+ key: "0"
271
+ } : void 0,
272
+ $setup.slots.loading ? {
273
+ name: "loading",
274
+ fn: _withCtx(() => [
275
+ _renderSlot(_ctx.$slots, "loading")
276
+ ]),
277
+ key: "1"
278
+ } : void 0,
279
+ $setup.slots.error ? {
280
+ name: "error",
281
+ fn: _withCtx(() => [
282
+ _renderSlot(_ctx.$slots, "error")
283
+ ]),
284
+ key: "2"
285
+ } : void 0,
286
+ $setup.slots.content ? {
287
+ name: "content",
288
+ fn: _withCtx(() => [
289
+ _renderSlot(_ctx.$slots, "content")
290
+ ]),
291
+ key: "3"
292
+ } : void 0
293
+ ]),
294
+ 1536
295
+ /* NEED_PATCH, DYNAMIC_SLOTS */
296
+ ),
297
+ _createVNode($setup["SelectedNodes"])
298
+ ])
299
+ ],
300
+ 6
301
+ /* CLASS, STYLE */
302
+ );
303
+ }
304
+ __vue_sfc__.render = __vue_render__;
305
+ var ChatPanel_vue_default = __vue_sfc__;
306
+ export {
307
+ ChatPanel_vue_default as default
308
+ };
@@ -0,0 +1 @@
1
+ .floating-bubble{position:fixed;top:0;left:0;z-index:999999;cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none;touch-action:none;will-change:transform}.floating-bubble:active{cursor:grabbing}body.floating-bubble-dragging *{pointer-events:none!important}body.floating-bubble-dragging .floating-bubble,body.floating-bubble-dragging .floating-bubble *{pointer-events:auto!important}
@@ -0,0 +1,44 @@
1
+ import type { FloatingBubbleAxis, FloatingBubbleMagnetic, FloatingBubbleOffset, FloatingBubbleGap } from "./types";
2
+ type __VLS_Props = {
3
+ offset?: FloatingBubbleOffset;
4
+ axis?: FloatingBubbleAxis;
5
+ magnetic?: FloatingBubbleMagnetic;
6
+ gap?: number | FloatingBubbleGap;
7
+ teleport?: string | Element;
8
+ };
9
+ declare var __VLS_7: {};
10
+ type __VLS_Slots = {} & {
11
+ default?: (props: typeof __VLS_7) => any;
12
+ };
13
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
14
+ offset: import("vue").ComputedRef<{
15
+ x: number;
16
+ y: number;
17
+ }>;
18
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
19
+ "update:offset": (value: FloatingBubbleOffset) => any;
20
+ click: (event: MouseEvent) => any;
21
+ "offset-change": (offset: FloatingBubbleOffset) => any;
22
+ "drag-start": () => any;
23
+ "drag-end": () => any;
24
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
25
+ "onUpdate:offset"?: ((value: FloatingBubbleOffset) => any) | undefined;
26
+ onClick?: ((event: MouseEvent) => any) | undefined;
27
+ "onOffset-change"?: ((offset: FloatingBubbleOffset) => any) | undefined;
28
+ "onDrag-start"?: (() => any) | undefined;
29
+ "onDrag-end"?: (() => any) | undefined;
30
+ }>, {
31
+ offset: FloatingBubbleOffset;
32
+ axis: FloatingBubbleAxis;
33
+ magnetic: FloatingBubbleMagnetic;
34
+ gap: number | FloatingBubbleGap;
35
+ teleport: string | Element;
36
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
37
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
38
+ declare const _default: typeof __VLS_export;
39
+ export default _default;
40
+ type __VLS_WithSlots<T, S> = T & {
41
+ new (): {
42
+ $slots: S;
43
+ };
44
+ };