@siact/sime-x-vue 0.0.8 → 0.0.9

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/style.css CHANGED
@@ -847,7 +847,7 @@
847
847
  [data-theme=dark] .action-btn.theme-btn.woke[data-v-91f104d1] {
848
848
  background: rgba(34, 197, 94, 0.3);
849
849
  }
850
- .voice-assistant[data-v-9e420a26] {
850
+ .voice-assistant[data-v-d81f42d8] {
851
851
  --text-primary: #e6edf7;
852
852
  --text-secondary: #95a8c8;
853
853
  --glass-bg: rgba(8, 16, 32, 0.72);
@@ -864,16 +864,16 @@
864
864
  }
865
865
 
866
866
  /* ── FAB 按钮 ── */
867
- .assistant-fab[data-v-9e420a26] {
867
+ .assistant-fab[data-v-d81f42d8] {
868
868
  position: relative;
869
869
  cursor: pointer;
870
870
  transition: transform 0.2s ease, filter 0.2s ease;
871
871
  }
872
- .assistant-fab[data-v-9e420a26]:hover {
872
+ .assistant-fab[data-v-d81f42d8]:hover {
873
873
  transform: translateY(-1px) scale(1.03);
874
874
  filter: brightness(1.06);
875
875
  }
876
- .status-pill[data-v-9e420a26] {
876
+ .status-pill[data-v-d81f42d8] {
877
877
  position: absolute;
878
878
  right: calc(100% + 12px);
879
879
  top: 50%;
@@ -892,13 +892,13 @@
892
892
  text-overflow: ellipsis;
893
893
  box-shadow: 0 10px 20px rgba(2, 8, 24, 0.38);
894
894
  }
895
- .fab-avatar-wrapper[data-v-9e420a26] {
895
+ .fab-avatar-wrapper[data-v-d81f42d8] {
896
896
  position: relative;
897
897
  display: flex;
898
898
  align-items: center;
899
899
  justify-content: center;
900
900
  }
901
- .fab-avatar-wrapper img[data-v-9e420a26] {
901
+ .fab-avatar-wrapper img[data-v-d81f42d8] {
902
902
  display: block;
903
903
  height: auto;
904
904
  object-fit: contain;
@@ -906,7 +906,7 @@
906
906
  }
907
907
 
908
908
  /* ── 气泡容器 ── */
909
- .bubble-stack[data-v-9e420a26] {
909
+ .bubble-stack[data-v-d81f42d8] {
910
910
  position: absolute;
911
911
  right: 0;
912
912
  bottom: calc(100% + 16px);
@@ -914,16 +914,16 @@
914
914
  max-height: min(58vh, 520px);
915
915
  overflow: auto;
916
916
  }
917
- .bubble-stack[data-v-9e420a26]::-webkit-scrollbar {
917
+ .bubble-stack[data-v-d81f42d8]::-webkit-scrollbar {
918
918
  width: 4px;
919
919
  }
920
- .bubble-stack[data-v-9e420a26]::-webkit-scrollbar-thumb {
920
+ .bubble-stack[data-v-d81f42d8]::-webkit-scrollbar-thumb {
921
921
  background: rgba(126, 155, 204, 0.3);
922
922
  border-radius: 999px;
923
923
  }
924
924
 
925
925
  /* ── 统一 agent 气泡 ── */
926
- .agent-bubble[data-v-9e420a26] {
926
+ .agent-bubble[data-v-d81f42d8] {
927
927
  border-radius: 16px;
928
928
  padding: 12px 14px;
929
929
  background: radial-gradient(circle at 12% 10%, rgba(80, 122, 255, 0.14), transparent 50%), linear-gradient(155deg, rgba(24, 42, 72, 0.96), rgba(14, 24, 46, 0.97));
@@ -933,9 +933,9 @@
933
933
  display: flex;
934
934
  flex-direction: column;
935
935
  gap: 0;
936
- animation: bubble-appear-9e420a26 0.3s cubic-bezier(0.16, 1, 0.3, 1);
936
+ animation: bubble-appear-d81f42d8 0.3s cubic-bezier(0.16, 1, 0.3, 1);
937
937
  }
938
- @keyframes bubble-appear-9e420a26 {
938
+ @keyframes bubble-appear-d81f42d8 {
939
939
  from {
940
940
  opacity: 0;
941
941
  transform: translateY(8px) scale(0.97);
@@ -946,7 +946,7 @@ to {
946
946
  }
947
947
  }
948
948
  /* ── 工具执行步骤(内联紧凑) ── */
949
- .tool-steps[data-v-9e420a26] {
949
+ .tool-steps[data-v-d81f42d8] {
950
950
  display: flex;
951
951
  flex-direction: column;
952
952
  gap: 2px;
@@ -954,40 +954,40 @@ to {
954
954
  padding-bottom: 8px;
955
955
  border-bottom: 1px solid rgba(125, 160, 220, 0.1);
956
956
  }
957
- .tool-step[data-v-9e420a26] {
957
+ .tool-step[data-v-d81f42d8] {
958
958
  display: flex;
959
959
  align-items: center;
960
960
  gap: 7px;
961
961
  padding: 4px 6px;
962
962
  border-radius: 8px;
963
963
  transition: background 0.2s ease;
964
- animation: step-in-9e420a26 0.25s cubic-bezier(0.16, 1, 0.3, 1);
964
+ animation: step-in-d81f42d8 0.25s cubic-bezier(0.16, 1, 0.3, 1);
965
965
  }
966
- .tool-step--loading .tool-step__icon[data-v-9e420a26] {
966
+ .tool-step--loading .tool-step__icon[data-v-d81f42d8] {
967
967
  color: var(--color-accent);
968
968
  }
969
- .tool-step--loading .tool-step__name[data-v-9e420a26] {
969
+ .tool-step--loading .tool-step__name[data-v-d81f42d8] {
970
970
  color: rgba(200, 215, 240, 0.85);
971
971
  }
972
- .tool-step--done .tool-step__icon[data-v-9e420a26] {
972
+ .tool-step--done .tool-step__icon[data-v-d81f42d8] {
973
973
  color: var(--color-success);
974
974
  }
975
- .tool-step--done .tool-step__name[data-v-9e420a26] {
975
+ .tool-step--done .tool-step__name[data-v-d81f42d8] {
976
976
  color: rgba(200, 215, 240, 0.55);
977
977
  }
978
- .tool-step--error .tool-step__icon[data-v-9e420a26] {
978
+ .tool-step--error .tool-step__icon[data-v-d81f42d8] {
979
979
  color: var(--color-error);
980
980
  }
981
- .tool-step--error .tool-step__name[data-v-9e420a26] {
981
+ .tool-step--error .tool-step__name[data-v-d81f42d8] {
982
982
  color: rgba(248, 113, 113, 0.8);
983
983
  }
984
- .tool-step--executing[data-v-9e420a26] {
984
+ .tool-step--executing[data-v-d81f42d8] {
985
985
  background: rgba(129, 140, 248, 0.06);
986
986
  }
987
- .tool-step--executing .tool-step__icon[data-v-9e420a26] {
987
+ .tool-step--executing .tool-step__icon[data-v-d81f42d8] {
988
988
  color: var(--color-accent);
989
989
  }
990
- @keyframes step-in-9e420a26 {
990
+ @keyframes step-in-d81f42d8 {
991
991
  from {
992
992
  opacity: 0;
993
993
  transform: translateX(-6px);
@@ -997,7 +997,7 @@ to {
997
997
  transform: translateX(0);
998
998
  }
999
999
  }
1000
- .tool-step__icon[data-v-9e420a26] {
1000
+ .tool-step__icon[data-v-d81f42d8] {
1001
1001
  display: flex;
1002
1002
  align-items: center;
1003
1003
  justify-content: center;
@@ -1005,10 +1005,10 @@ to {
1005
1005
  height: 18px;
1006
1006
  flex-shrink: 0;
1007
1007
  }
1008
- .tool-step__spinner[data-v-9e420a26] {
1009
- animation: tool-spin-9e420a26 0.8s linear infinite;
1008
+ .tool-step__spinner[data-v-d81f42d8] {
1009
+ animation: tool-spin-d81f42d8 0.8s linear infinite;
1010
1010
  }
1011
- @keyframes tool-spin-9e420a26 {
1011
+ @keyframes tool-spin-d81f42d8 {
1012
1012
  from {
1013
1013
  transform: rotate(0deg);
1014
1014
  }
@@ -1016,7 +1016,7 @@ to {
1016
1016
  transform: rotate(360deg);
1017
1017
  }
1018
1018
  }
1019
- .tool-step__name[data-v-9e420a26] {
1019
+ .tool-step__name[data-v-d81f42d8] {
1020
1020
  font-size: 12px;
1021
1021
  font-weight: 500;
1022
1022
  white-space: nowrap;
@@ -1024,7 +1024,7 @@ to {
1024
1024
  text-overflow: ellipsis;
1025
1025
  transition: color 0.2s ease;
1026
1026
  }
1027
- .tool-step__tag[data-v-9e420a26] {
1027
+ .tool-step__tag[data-v-d81f42d8] {
1028
1028
  font-size: 10px;
1029
1029
  font-weight: 500;
1030
1030
  padding: 1px 6px;
@@ -1032,32 +1032,32 @@ to {
1032
1032
  white-space: nowrap;
1033
1033
  flex-shrink: 0;
1034
1034
  }
1035
- .tool-step__tag--exec[data-v-9e420a26] {
1035
+ .tool-step__tag--exec[data-v-d81f42d8] {
1036
1036
  background: rgba(129, 140, 248, 0.12);
1037
1037
  color: var(--color-accent);
1038
1038
  }
1039
1039
 
1040
1040
  /* ── 思考中动画 ── */
1041
- .thinking-dots[data-v-9e420a26] {
1041
+ .thinking-dots[data-v-d81f42d8] {
1042
1042
  display: inline-flex;
1043
1043
  align-items: center;
1044
1044
  gap: 5px;
1045
1045
  padding: 2px 0;
1046
1046
  }
1047
- .thinking-dots span[data-v-9e420a26] {
1047
+ .thinking-dots span[data-v-d81f42d8] {
1048
1048
  width: 5px;
1049
1049
  height: 5px;
1050
1050
  border-radius: 50%;
1051
1051
  background: var(--text-secondary);
1052
- animation: thinking-bounce-9e420a26 1s infinite ease-in-out;
1052
+ animation: thinking-bounce-d81f42d8 1s infinite ease-in-out;
1053
1053
  }
1054
- .thinking-dots span[data-v-9e420a26]:nth-child(2) {
1054
+ .thinking-dots span[data-v-d81f42d8]:nth-child(2) {
1055
1055
  animation-delay: 0.15s;
1056
1056
  }
1057
- .thinking-dots span[data-v-9e420a26]:nth-child(3) {
1057
+ .thinking-dots span[data-v-d81f42d8]:nth-child(3) {
1058
1058
  animation-delay: 0.3s;
1059
1059
  }
1060
- @keyframes thinking-bounce-9e420a26 {
1060
+ @keyframes thinking-bounce-d81f42d8 {
1061
1061
  0%, 100% {
1062
1062
  transform: translateY(0);
1063
1063
  opacity: 0.3;
@@ -1068,7 +1068,7 @@ to {
1068
1068
  }
1069
1069
  }
1070
1070
  /* ── 文本内容 ── */
1071
- .agent-text[data-v-9e420a26] {
1071
+ .agent-text[data-v-d81f42d8] {
1072
1072
  font-size: 14px;
1073
1073
  line-height: 1.55;
1074
1074
  color: var(--text-primary);
@@ -1077,23 +1077,23 @@ to {
1077
1077
  }
1078
1078
 
1079
1079
  /* ── 气泡淡入淡出过渡 ── */
1080
- .bubble-fade-enter-active[data-v-9e420a26] {
1080
+ .bubble-fade-enter-active[data-v-d81f42d8] {
1081
1081
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
1082
1082
  }
1083
- .bubble-fade-leave-active[data-v-9e420a26] {
1083
+ .bubble-fade-leave-active[data-v-d81f42d8] {
1084
1084
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
1085
1085
  }
1086
- .bubble-fade-enter-from[data-v-9e420a26] {
1086
+ .bubble-fade-enter-from[data-v-d81f42d8] {
1087
1087
  opacity: 0;
1088
1088
  transform: translateY(12px) scale(0.95);
1089
1089
  }
1090
- .bubble-fade-leave-to[data-v-9e420a26] {
1090
+ .bubble-fade-leave-to[data-v-d81f42d8] {
1091
1091
  opacity: 0;
1092
1092
  transform: translateY(8px) scale(0.97);
1093
1093
  }
1094
1094
 
1095
1095
  /* ── 监听状态指示器 ── */
1096
- .listening-badge[data-v-9e420a26] {
1096
+ .listening-badge[data-v-d81f42d8] {
1097
1097
  position: absolute;
1098
1098
  top: -8px;
1099
1099
  right: -8px;
@@ -1105,57 +1105,57 @@ to {
1105
1105
  align-items: center;
1106
1106
  justify-content: center;
1107
1107
  }
1108
- .listening-waves[data-v-9e420a26] {
1108
+ .listening-waves[data-v-d81f42d8] {
1109
1109
  position: absolute;
1110
1110
  inset: 0;
1111
1111
  display: flex;
1112
1112
  align-items: center;
1113
1113
  justify-content: center;
1114
1114
  }
1115
- .wave[data-v-9e420a26] {
1115
+ .wave[data-v-d81f42d8] {
1116
1116
  position: absolute;
1117
1117
  width: 100%;
1118
1118
  height: 100%;
1119
1119
  border-radius: 50%;
1120
1120
  border: 2px solid rgba(255, 255, 255, 0.65);
1121
- animation: wave-expand-9e420a26 3s ease-out infinite;
1121
+ animation: wave-expand-d81f42d8 3s ease-out infinite;
1122
1122
  }
1123
- .wave-1[data-v-9e420a26] {
1123
+ .wave-1[data-v-d81f42d8] {
1124
1124
  animation-delay: 0s;
1125
1125
  }
1126
- .wave-2[data-v-9e420a26] {
1126
+ .wave-2[data-v-d81f42d8] {
1127
1127
  animation-delay: 0.6s;
1128
1128
  }
1129
- .wave-3[data-v-9e420a26] {
1129
+ .wave-3[data-v-d81f42d8] {
1130
1130
  animation-delay: 1.2s;
1131
1131
  }
1132
- .listening-icon[data-v-9e420a26] {
1132
+ .listening-icon[data-v-d81f42d8] {
1133
1133
  position: relative;
1134
1134
  color: #fff;
1135
1135
  }
1136
- .listening-badge.wake-active[data-v-9e420a26] {
1136
+ .listening-badge.wake-active[data-v-d81f42d8] {
1137
1137
  background-color: rgba(34, 197, 94, 0.9);
1138
- animation: wake-badge-pop-9e420a26 0.35s ease;
1138
+ animation: wake-badge-pop-d81f42d8 0.35s ease;
1139
1139
  }
1140
- .indicator-fade-enter-active[data-v-9e420a26],
1141
- .indicator-fade-leave-active[data-v-9e420a26] {
1140
+ .indicator-fade-enter-active[data-v-d81f42d8],
1141
+ .indicator-fade-leave-active[data-v-d81f42d8] {
1142
1142
  transition: all 0.2s ease;
1143
1143
  }
1144
- .indicator-fade-enter-from[data-v-9e420a26],
1145
- .indicator-fade-leave-to[data-v-9e420a26] {
1144
+ .indicator-fade-enter-from[data-v-d81f42d8],
1145
+ .indicator-fade-leave-to[data-v-d81f42d8] {
1146
1146
  opacity: 0;
1147
1147
  transform: translateY(6px);
1148
1148
  }
1149
1149
  @media (max-width: 768px) {
1150
- .bubble-stack[data-v-9e420a26] {
1150
+ .bubble-stack[data-v-d81f42d8] {
1151
1151
  width: min(320px, 88vw);
1152
1152
  max-height: min(54vh, 420px);
1153
1153
  }
1154
- .status-pill[data-v-9e420a26] {
1154
+ .status-pill[data-v-d81f42d8] {
1155
1155
  max-width: 220px;
1156
1156
  }
1157
1157
  }
1158
- @keyframes wave-expand-9e420a26 {
1158
+ @keyframes wave-expand-d81f42d8 {
1159
1159
  0% {
1160
1160
  transform: scale(0.8);
1161
1161
  opacity: 0.8;
@@ -1165,7 +1165,7 @@ to {
1165
1165
  opacity: 0;
1166
1166
  }
1167
1167
  }
1168
- @keyframes wake-badge-pop-9e420a26 {
1168
+ @keyframes wake-badge-pop-d81f42d8 {
1169
1169
  0% {
1170
1170
  transform: scale(1);
1171
1171
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@siact/sime-x-vue",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -10,6 +10,8 @@ export interface UseBubbleOptions {
10
10
  dismissDelay?: number;
11
11
  /** 外部 isSpeaking 引用,TTS 播报期间阻止消失 */
12
12
  isSpeaking?: Ref<boolean>;
13
+ /** 外部 hasPendingAudio 引用,TTS 已提交内容但尚未开始播放(覆盖异步窗口期) */
14
+ hasPendingAudio?: Ref<boolean>;
13
15
  /** 外部 isInvoking 引用,调用期间阻止消失 */
14
16
  isInvoking?: Ref<boolean>;
15
17
  /** 气泡尺寸 */
@@ -19,7 +21,7 @@ export interface UseBubbleOptions {
19
21
  * 气泡生命周期 composable
20
22
  *
21
23
  * 管理气泡显示/隐藏、自动消失倒计时、滚动。
22
- * 核心保证:TTS 播报期间气泡绝不消失。
24
+ * 核心保证:TTS 播报期间(含异步等待 WebSocket 的窗口期)气泡绝不消失。
23
25
  */
24
26
  export declare function useBubble(options?: UseBubbleOptions): {
25
27
  visible: Ref<boolean, boolean>;
@@ -7,6 +7,7 @@ import type { VoiceConfig } from '../types';
7
7
  */
8
8
  export declare function useTTS(getVoiceConfig: () => VoiceConfig | null): {
9
9
  isSpeaking: import("vue").Ref<boolean, boolean>;
10
+ hasPendingAudio: import("vue").Ref<boolean, boolean>;
10
11
  warmUpAudio: () => void;
11
12
  speak: (text: string) => Promise<void>;
12
13
  feed: (delta: string) => void;