@blueking/ai-blueking 0.0.2 → 0.0.4
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/README.md +26 -4
- package/dist/ai-blueking.vue.d.ts +5 -3
- package/dist/components/render-modal.vue.d.ts +15 -4
- package/dist/types/index.d.ts +1 -1
- package/dist/vue2/index.es.min.js +32 -16
- package/dist/vue2/index.iife.min.js +35 -35
- package/dist/vue2/index.umd.min.js +28 -28
- package/dist/vue2/style.css +1 -1
- package/dist/vue3/index.es.min.js +448 -442
- package/dist/vue3/index.iife.min.js +2 -2
- package/dist/vue3/index.umd.min.js +6 -6
- package/dist/vue3/style.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,6 +21,8 @@ npm i @blueking/ai-blueking
|
|
|
21
21
|
:position-limit="positionLimit"
|
|
22
22
|
:prompts="prompts"
|
|
23
23
|
:size-limit="sizeLimit"
|
|
24
|
+
:start-position="startPosition"
|
|
25
|
+
:start-size="startSize"
|
|
24
26
|
@choose-prompt="handleChoosePrompt"
|
|
25
27
|
@clear="handleClear"
|
|
26
28
|
@close="handleClose"
|
|
@@ -94,8 +96,18 @@ npm i @blueking/ai-blueking
|
|
|
94
96
|
};
|
|
95
97
|
// 组件最小尺寸
|
|
96
98
|
const sizeLimit = {
|
|
97
|
-
height:
|
|
98
|
-
width:
|
|
99
|
+
height: 320,
|
|
100
|
+
width: 400,
|
|
101
|
+
};
|
|
102
|
+
// 初始位置
|
|
103
|
+
const startPosition = {
|
|
104
|
+
right: 0,
|
|
105
|
+
left: window.innerWidth - sizeLimit.width,
|
|
106
|
+
};
|
|
107
|
+
// 初始大小
|
|
108
|
+
const startSize = {
|
|
109
|
+
height: 560,
|
|
110
|
+
width: 400,
|
|
99
111
|
};
|
|
100
112
|
|
|
101
113
|
const handleClear = () => {
|
|
@@ -135,6 +147,8 @@ npm i @blueking/bkui-library
|
|
|
135
147
|
:position-limit="positionLimit"
|
|
136
148
|
:prompts="prompts"
|
|
137
149
|
:size-limit="sizeLimit"
|
|
150
|
+
:start-position="startPosition"
|
|
151
|
+
:start-size="startSize"
|
|
138
152
|
@choose-prompt="handleChoosePrompt"
|
|
139
153
|
@clear="handleClear"
|
|
140
154
|
@close="handleClose"
|
|
@@ -203,8 +217,16 @@ npm i @blueking/bkui-library
|
|
|
203
217
|
right: 0,
|
|
204
218
|
},
|
|
205
219
|
sizeLimit: {
|
|
206
|
-
height:
|
|
207
|
-
width:
|
|
220
|
+
height: 320,
|
|
221
|
+
width: 400,
|
|
222
|
+
},
|
|
223
|
+
startPosition: {
|
|
224
|
+
right: 0,
|
|
225
|
+
left: window.innerWidth - 400,
|
|
226
|
+
},
|
|
227
|
+
startSize: {
|
|
228
|
+
height: 560,
|
|
229
|
+
width: 400,
|
|
208
230
|
},
|
|
209
231
|
};
|
|
210
232
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IMessage, IPrompt, IPositionLimit,
|
|
1
|
+
import type { IMessage, IPrompt, IPositionLimit, ISize, IStartPosition } from './types';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
3
3
|
messages: IMessage[];
|
|
4
4
|
prompts?: IPrompt[] | undefined;
|
|
@@ -6,8 +6,9 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
|
6
6
|
headBackground?: string | undefined;
|
|
7
7
|
background?: string | undefined;
|
|
8
8
|
positionLimit?: IPositionLimit | undefined;
|
|
9
|
-
sizeLimit?:
|
|
9
|
+
sizeLimit?: ISize | undefined;
|
|
10
10
|
startPosition?: IStartPosition | undefined;
|
|
11
|
+
startSize?: ISize | undefined;
|
|
11
12
|
userPhoto?: string | undefined;
|
|
12
13
|
logo?: string | undefined;
|
|
13
14
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -22,8 +23,9 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
|
22
23
|
headBackground?: string | undefined;
|
|
23
24
|
background?: string | undefined;
|
|
24
25
|
positionLimit?: IPositionLimit | undefined;
|
|
25
|
-
sizeLimit?:
|
|
26
|
+
sizeLimit?: ISize | undefined;
|
|
26
27
|
startPosition?: IStartPosition | undefined;
|
|
28
|
+
startSize?: ISize | undefined;
|
|
27
29
|
userPhoto?: string | undefined;
|
|
28
30
|
logo?: string | undefined;
|
|
29
31
|
}>>> & {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import type { IPositionLimit,
|
|
1
|
+
import type { IPositionLimit, ISize, IStartPosition } from '../types';
|
|
2
2
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
3
3
|
headBackground: string;
|
|
4
4
|
positionLimit?: IPositionLimit | undefined;
|
|
5
|
-
sizeLimit?:
|
|
5
|
+
sizeLimit?: ISize | undefined;
|
|
6
6
|
logo?: string | undefined;
|
|
7
7
|
startPosition?: IStartPosition | undefined;
|
|
8
|
+
startSize?: ISize | undefined;
|
|
8
9
|
}>, {
|
|
9
10
|
headBackground: string;
|
|
10
11
|
positionLimit: () => {
|
|
@@ -17,6 +18,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
17
18
|
height: number;
|
|
18
19
|
width: number;
|
|
19
20
|
};
|
|
21
|
+
startSize: () => {
|
|
22
|
+
height: number;
|
|
23
|
+
width: number;
|
|
24
|
+
};
|
|
20
25
|
logo: string;
|
|
21
26
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
22
27
|
close: () => void;
|
|
@@ -24,9 +29,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
24
29
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
25
30
|
headBackground: string;
|
|
26
31
|
positionLimit?: IPositionLimit | undefined;
|
|
27
|
-
sizeLimit?:
|
|
32
|
+
sizeLimit?: ISize | undefined;
|
|
28
33
|
logo?: string | undefined;
|
|
29
34
|
startPosition?: IStartPosition | undefined;
|
|
35
|
+
startSize?: ISize | undefined;
|
|
30
36
|
}>, {
|
|
31
37
|
headBackground: string;
|
|
32
38
|
positionLimit: () => {
|
|
@@ -39,6 +45,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
39
45
|
height: number;
|
|
40
46
|
width: number;
|
|
41
47
|
};
|
|
48
|
+
startSize: () => {
|
|
49
|
+
height: number;
|
|
50
|
+
width: number;
|
|
51
|
+
};
|
|
42
52
|
logo: string;
|
|
43
53
|
}>>> & {
|
|
44
54
|
onClear?: (() => any) | undefined;
|
|
@@ -46,8 +56,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
46
56
|
}, {
|
|
47
57
|
headBackground: string;
|
|
48
58
|
positionLimit: IPositionLimit;
|
|
49
|
-
sizeLimit:
|
|
59
|
+
sizeLimit: ISize;
|
|
50
60
|
logo: string;
|
|
61
|
+
startSize: ISize;
|
|
51
62
|
}, {}>, {
|
|
52
63
|
default?(_: {}): any;
|
|
53
64
|
}>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -16610,7 +16610,7 @@ const ice = /* @__PURE__ */ Lo(oce), sce = "data:image/png;base64,iVBORw0KGgoAAA
|
|
|
16610
16610
|
for (const [r, o] of e)
|
|
16611
16611
|
n[r] = o;
|
|
16612
16612
|
return n;
|
|
16613
|
-
}, Lce = /* @__PURE__ */ wc(wce, [["__scopeId", "data-v-
|
|
16613
|
+
}, Lce = /* @__PURE__ */ wc(wce, [["__scopeId", "data-v-f2501723"]]), Tce = (t) => (Vp("data-v-fa72e9f6"), t = t(), $p(), t), xce = { class: "ai-messages" }, kce = { class: "ai-operation" }, Nce = /* @__PURE__ */ Tce(() => /* @__PURE__ */ Ne(
|
|
16614
16614
|
"i",
|
|
16615
16615
|
{ class: "ai-blueking-icon ai-blueking-fasong" },
|
|
16616
16616
|
null,
|
|
@@ -16711,11 +16711,15 @@ const ice = /* @__PURE__ */ Lo(oce), sce = "data:image/png;base64,iVBORw0KGgoAAA
|
|
|
16711
16711
|
right: 0
|
|
16712
16712
|
}) },
|
|
16713
16713
|
sizeLimit: { default: () => ({
|
|
16714
|
-
height:
|
|
16715
|
-
width:
|
|
16714
|
+
height: 320,
|
|
16715
|
+
width: 400
|
|
16716
16716
|
}) },
|
|
16717
16717
|
logo: { default: "ai-blueking-icon ai-blueking-ai" },
|
|
16718
|
-
startPosition: {}
|
|
16718
|
+
startPosition: {},
|
|
16719
|
+
startSize: { default: () => ({
|
|
16720
|
+
height: 560,
|
|
16721
|
+
width: 400
|
|
16722
|
+
}) }
|
|
16719
16723
|
},
|
|
16720
16724
|
emits: ["clear", "close"],
|
|
16721
16725
|
setup(t, { emit: e }) {
|
|
@@ -16731,10 +16735,10 @@ const ice = /* @__PURE__ */ Lo(oce), sce = "data:image/png;base64,iVBORw0KGgoAAA
|
|
|
16731
16735
|
var F, E, S, D;
|
|
16732
16736
|
const _ = (J, ee) => J === void 0 ? ee : J;
|
|
16733
16737
|
return {
|
|
16734
|
-
top: _((F = n.startPosition) == null ? void 0 : F.top, i.height - n.
|
|
16738
|
+
top: _((F = n.startPosition) == null ? void 0 : F.top, i.height - n.startSize.height),
|
|
16735
16739
|
bottom: _((E = n.startPosition) == null ? void 0 : E.bottom, 0),
|
|
16736
16740
|
left: _((S = n.startPosition) == null ? void 0 : S.left, 0),
|
|
16737
|
-
right: _((D = n.startPosition) == null ? void 0 : D.right, i.width - n.
|
|
16741
|
+
right: _((D = n.startPosition) == null ? void 0 : D.right, i.width - n.startSize.width)
|
|
16738
16742
|
};
|
|
16739
16743
|
}, c = $n(a()), l = fi(() => c.value.top <= n.positionLimit.top && c.value.bottom <= n.positionLimit.bottom), u = (_) => {
|
|
16740
16744
|
s.isMove = !0, s.type = "move", s.clientX = _.clientX, s.clientY = _.clientY;
|
|
@@ -16977,7 +16981,7 @@ const ice = /* @__PURE__ */ Lo(oce), sce = "data:image/png;base64,iVBORw0KGgoAAA
|
|
|
16977
16981
|
/* STYLE */
|
|
16978
16982
|
));
|
|
16979
16983
|
}
|
|
16980
|
-
}), Ece = /* @__PURE__ */ wc(Dce, [["__scopeId", "data-v-
|
|
16984
|
+
}), Ece = /* @__PURE__ */ wc(Dce, [["__scopeId", "data-v-dfc0dcb4"]]), Pce = /* @__PURE__ */ Mo({
|
|
16981
16985
|
__name: "ai-blueking",
|
|
16982
16986
|
props: {
|
|
16983
16987
|
messages: {},
|
|
@@ -16988,6 +16992,7 @@ const ice = /* @__PURE__ */ Lo(oce), sce = "data:image/png;base64,iVBORw0KGgoAAA
|
|
|
16988
16992
|
positionLimit: {},
|
|
16989
16993
|
sizeLimit: {},
|
|
16990
16994
|
startPosition: {},
|
|
16995
|
+
startSize: {},
|
|
16991
16996
|
userPhoto: {},
|
|
16992
16997
|
logo: {}
|
|
16993
16998
|
},
|
|
@@ -17008,6 +17013,7 @@ const ice = /* @__PURE__ */ Lo(oce), sce = "data:image/png;base64,iVBORw0KGgoAAA
|
|
|
17008
17013
|
"position-limit": a.positionLimit,
|
|
17009
17014
|
"size-limit": a.sizeLimit,
|
|
17010
17015
|
"start-position": a.startPosition,
|
|
17016
|
+
"start-size": a.startSize,
|
|
17011
17017
|
onClear: r,
|
|
17012
17018
|
onClose: o
|
|
17013
17019
|
}, {
|
|
@@ -17024,7 +17030,7 @@ const ice = /* @__PURE__ */ Lo(oce), sce = "data:image/png;base64,iVBORw0KGgoAAA
|
|
|
17024
17030
|
]),
|
|
17025
17031
|
_: 1
|
|
17026
17032
|
/* STABLE */
|
|
17027
|
-
}, 8, ["head-background", "logo", "position-limit", "size-limit", "start-position"]));
|
|
17033
|
+
}, 8, ["head-background", "logo", "position-limit", "size-limit", "start-position", "start-size"]));
|
|
17028
17034
|
}
|
|
17029
17035
|
});
|
|
17030
17036
|
(function() {
|
|
@@ -17065,11 +17071,15 @@ const _ce = {
|
|
|
17065
17071
|
},
|
|
17066
17072
|
...this.$attrs
|
|
17067
17073
|
};
|
|
17068
|
-
return (this.headBackground || t.headBackground) && (r.headBackground = this.headBackground || t.headBackground), (this.background || t.background) && (r.background = this.background || t.background), (this.positionLimit || t.positionLimit) && (r.positionLimit = this.positionLimit || t.positionLimit), (this.sizeLimit || t.sizeLimit) && (r.sizeLimit = this.sizeLimit || t.sizeLimit), (this.userPhoto || t.userPhoto) && (r.userPhoto = this.userPhoto || t.userPhoto), (this.logo || t.logo) && (r.logo = this.logo || t.logo), tg(Pce, r);
|
|
17074
|
+
return (this.headBackground || t.headBackground) && (r.headBackground = this.headBackground || t.headBackground), (this.background || t.background) && (r.background = this.background || t.background), (this.positionLimit || t.positionLimit) && (r.positionLimit = this.positionLimit || t.positionLimit), (this.sizeLimit || t.sizeLimit) && (r.sizeLimit = this.sizeLimit || t.sizeLimit), (this.userPhoto || t.userPhoto) && (r.userPhoto = this.userPhoto || t.userPhoto), (this.logo || t.logo) && (r.logo = this.logo || t.logo), (this.startPosition || t.startPosition) && (r.startPosition = this.startPosition || t.startPosition), (this.startSize || t.startSize) && (r.startSize = this.startSize || t.startSize), tg(Pce, r);
|
|
17069
17075
|
}
|
|
17070
|
-
}), this.unWatchStack = Object.keys(this.$props).map((r) => this.$watch(
|
|
17071
|
-
|
|
17072
|
-
|
|
17076
|
+
}), this.unWatchStack = Object.keys(this.$props).map((r) => this.$watch(
|
|
17077
|
+
r,
|
|
17078
|
+
(o) => {
|
|
17079
|
+
n[r] = o, n.$forceUpdate();
|
|
17080
|
+
},
|
|
17081
|
+
{ deep: !0 }
|
|
17082
|
+
));
|
|
17073
17083
|
},
|
|
17074
17084
|
data() {
|
|
17075
17085
|
return {
|
|
@@ -17115,15 +17125,21 @@ const _ce = {
|
|
|
17115
17125
|
},
|
|
17116
17126
|
sizeLimit: {
|
|
17117
17127
|
default: () => ({
|
|
17118
|
-
height:
|
|
17119
|
-
width:
|
|
17128
|
+
height: 320,
|
|
17129
|
+
width: 400
|
|
17120
17130
|
}),
|
|
17121
17131
|
type: Object
|
|
17122
17132
|
},
|
|
17123
17133
|
startPosition: {
|
|
17124
17134
|
default: () => ({
|
|
17125
|
-
|
|
17126
|
-
|
|
17135
|
+
left: 0
|
|
17136
|
+
}),
|
|
17137
|
+
type: Object
|
|
17138
|
+
},
|
|
17139
|
+
startSize: {
|
|
17140
|
+
default: () => ({
|
|
17141
|
+
height: 560,
|
|
17142
|
+
width: 400
|
|
17127
17143
|
}),
|
|
17128
17144
|
type: Object
|
|
17129
17145
|
},
|