@alliance-droid/chat-widget 0.1.9 → 0.1.11
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.
|
@@ -61,14 +61,14 @@
|
|
|
61
61
|
}
|
|
62
62
|
</script>
|
|
63
63
|
|
|
64
|
-
<div class="flex
|
|
65
|
-
<div class="
|
|
64
|
+
<div class="flex {className}" class:justify-end={isUser} style="min-width: 0; width: 100%;">
|
|
65
|
+
<div class="bubble {isUser ? 'bubble-user' : isSystem ? 'bubble-system' : 'bubble-incoming'}" style="max-width: 80%; overflow: hidden; word-wrap: break-word;">
|
|
66
66
|
{#if renderedContent()}
|
|
67
67
|
<div class="markdown-content" style="word-break: break-word; overflow-wrap: anywhere;">
|
|
68
68
|
{@html renderedContent()}
|
|
69
69
|
</div>
|
|
70
70
|
{:else}
|
|
71
|
-
<p style="white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere;">{message.content}</p>
|
|
71
|
+
<p style="white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; margin: 0;">{message.content}</p>
|
|
72
72
|
{/if}
|
|
73
73
|
{#if message.streaming}
|
|
74
74
|
<span class="inline-block w-2 h-4 bg-current animate-pulse ml-1">|</span>
|
|
@@ -77,6 +77,32 @@
|
|
|
77
77
|
</div>
|
|
78
78
|
|
|
79
79
|
<style>
|
|
80
|
+
.bubble {
|
|
81
|
+
padding: 10px 14px;
|
|
82
|
+
line-height: 1.4;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.bubble-user {
|
|
86
|
+
background: #2b5278;
|
|
87
|
+
color: #fff;
|
|
88
|
+
border-radius: 18px 18px 4px 18px;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.bubble-incoming {
|
|
92
|
+
background: #182533;
|
|
93
|
+
color: #fff;
|
|
94
|
+
border-radius: 18px 18px 18px 4px;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.bubble-system {
|
|
98
|
+
background: transparent;
|
|
99
|
+
color: rgba(255, 255, 255, 0.6);
|
|
100
|
+
text-align: center;
|
|
101
|
+
font-size: 0.875rem;
|
|
102
|
+
font-style: italic;
|
|
103
|
+
margin: 0 auto;
|
|
104
|
+
}
|
|
105
|
+
|
|
80
106
|
.markdown-content {
|
|
81
107
|
color: inherit;
|
|
82
108
|
}
|