ibc-ai-web-sdk 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +3 -37
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +3 -37
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +3 -37
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -2,25 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
// 机器人图标 - 内联轻量 SVG(尺寸 ~900 bytes,替换原 1.9MB 的 base64 GIF)
|
|
6
|
-
// 设计为圆形类属色背景 + 白色几何机器人脸,适配 border-radius 截切
|
|
7
|
-
var robotIcon = 'data:image/svg+xml,' + encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
|
8
|
-
<defs>
|
|
9
|
-
<linearGradient id="g" x1="0" y1="0" x2="1" y2="1">
|
|
10
|
-
<stop offset="0%" stop-color="#2563eb"/>
|
|
11
|
-
<stop offset="100%" stop-color="#7c3aed"/>
|
|
12
|
-
</linearGradient>
|
|
13
|
-
</defs>
|
|
14
|
-
<circle cx="50" cy="50" r="50" fill="url(#g)"/>
|
|
15
|
-
<rect x="24" y="36" width="14" height="14" rx="4" fill="#fff" opacity=".9"/>
|
|
16
|
-
<rect x="62" y="36" width="14" height="14" rx="4" fill="#fff" opacity=".9"/>
|
|
17
|
-
<circle cx="28" cy="40" r="3.5" fill="#2563eb"/>
|
|
18
|
-
<circle cx="66" cy="40" r="3.5" fill="#2563eb"/>
|
|
19
|
-
<rect x="38" y="26" width="4" height="10" rx="2" fill="#fff" opacity=".8"/>
|
|
20
|
-
<circle cx="40" cy="24" r="5" fill="#fff" opacity=".7"/>
|
|
21
|
-
<path d="M36 62 Q50 76 64 62" fill="none" stroke="#fff" stroke-width="3" stroke-linecap="round" opacity=".8"/>
|
|
22
|
-
</svg>`);
|
|
23
|
-
|
|
24
5
|
/**
|
|
25
6
|
* 错误码常量
|
|
26
7
|
* 统一定义所有错误码,方便维护
|
|
@@ -3684,16 +3665,6 @@ class AIChatDialog extends HTMLElement {
|
|
|
3684
3665
|
padding: 0 0 18px;
|
|
3685
3666
|
}
|
|
3686
3667
|
.welcome-content { margin-bottom: 0; width: 100%; }
|
|
3687
|
-
/* 欢迎页图标(与Vue一致:使用img而非emoji) */
|
|
3688
|
-
.welcome-icon {
|
|
3689
|
-
width: 52px;
|
|
3690
|
-
height: auto;
|
|
3691
|
-
margin-bottom: 12px;
|
|
3692
|
-
opacity: 1;
|
|
3693
|
-
animation: none;
|
|
3694
|
-
border-radius: 999px;
|
|
3695
|
-
box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
|
|
3696
|
-
}
|
|
3697
3668
|
@keyframes floatUp { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
|
|
3698
3669
|
|
|
3699
3670
|
/* 欢迎标题 - 渐变品牌色 */
|
|
@@ -4211,9 +4182,11 @@ class AIChatDialog extends HTMLElement {
|
|
|
4211
4182
|
color: var(--ai-primary);
|
|
4212
4183
|
background: rgba(37, 99, 235, 0.08);
|
|
4213
4184
|
}
|
|
4185
|
+
.input-tool.attach-tool { display: none; }
|
|
4214
4186
|
|
|
4215
4187
|
/* 发送按钮(与Vue .send-btn 完全一致,含光泽动画)*/
|
|
4216
4188
|
.send-btn {
|
|
4189
|
+
margin-left: auto;
|
|
4217
4190
|
flex-shrink: 0;
|
|
4218
4191
|
width: 28px;
|
|
4219
4192
|
height: 28px;
|
|
@@ -4298,8 +4271,6 @@ class AIChatDialog extends HTMLElement {
|
|
|
4298
4271
|
box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
|
|
4299
4272
|
}
|
|
4300
4273
|
.float-button:hover::before { opacity: 1; animation-play-state: initial; }
|
|
4301
|
-
.float-icon { width: 24px; height: auto; transition: none; border-radius: 50%; }
|
|
4302
|
-
.float-button:hover .float-icon { transform: none; }
|
|
4303
4274
|
|
|
4304
4275
|
/* 错误提示toast */
|
|
4305
4276
|
.error-toast {
|
|
@@ -4519,7 +4490,6 @@ class AIChatDialog extends HTMLElement {
|
|
|
4519
4490
|
.message-list { gap: 9px; }
|
|
4520
4491
|
.message-item { max-width: 100%; width: 100%; }
|
|
4521
4492
|
.message-bubble { padding: 11px 15px; font-size: 14px; }
|
|
4522
|
-
.welcome-icon { width: 48px; margin-bottom: 10px; }
|
|
4523
4493
|
.welcome-text { font-size: 22px; line-height: 1.3; margin-bottom: 9px; }
|
|
4524
4494
|
.welcome-desc { font-size: 13px; line-height: 1.55; margin-bottom: 18px; }
|
|
4525
4495
|
.quick-suggestions { gap: 10px; margin-top: 0; }
|
|
@@ -4530,7 +4500,6 @@ class AIChatDialog extends HTMLElement {
|
|
|
4530
4500
|
.message-input { font-size: 16px; padding: 10px 12px 6px; min-height: 44px; }
|
|
4531
4501
|
.send-btn { width: 28px; height: 28px; }
|
|
4532
4502
|
.float-button { height: 42px; min-width: 96px; }
|
|
4533
|
-
.float-icon { width: 22px; }
|
|
4534
4503
|
.action-icon { width: 30px; height: 30px; }
|
|
4535
4504
|
}
|
|
4536
4505
|
|
|
@@ -4616,9 +4585,7 @@ class AIChatDialog extends HTMLElement {
|
|
|
4616
4585
|
</div>
|
|
4617
4586
|
|
|
4618
4587
|
<!-- 悬浮按钮 -->
|
|
4619
|
-
<div class="float-button" id="floatBtn" title="打开AI助手">
|
|
4620
|
-
<img class="float-icon" src="${robotIcon}" alt="打开AI助手" />
|
|
4621
|
-
</div>
|
|
4588
|
+
<div class="float-button" id="floatBtn" title="打开AI助手"></div>
|
|
4622
4589
|
</div>
|
|
4623
4590
|
`;
|
|
4624
4591
|
|
|
@@ -4919,7 +4886,6 @@ class AIChatDialog extends HTMLElement {
|
|
|
4919
4886
|
this._body.innerHTML = `
|
|
4920
4887
|
<div class="empty-state">
|
|
4921
4888
|
<div class="welcome-content">
|
|
4922
|
-
<img class="welcome-icon" src="${robotIcon}" alt="AI助手" />
|
|
4923
4889
|
<p class="welcome-text">${this.escapeHtml(this._config?.welcomeText || '您好!我是 AI 智能助理')}</p>
|
|
4924
4890
|
<p class="welcome-desc">${this.escapeHtml(this._config?.welcomeDesc || '我可以帮您解答系统使用问题')}</p>
|
|
4925
4891
|
${chipsHtml}
|