@alliance-droid/chat-widget 0.1.8 → 0.1.10

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,30 +61,61 @@
61
61
  }
62
62
  </script>
63
63
 
64
- <div class="flex flex-col gap-1 {className}" class:items-end={isUser} style="min-width: 0; width: 100%;">
65
- {#if senderLabel() && !isUser}
66
- <span class="text-xs text-foreground-tertiary px-1">{senderLabel()}</span>
64
+ <div class="flex {className}" class:justify-end={isUser} style="min-width: 0; width: 100%;">
65
+ {#if !isUser && !isSystem}
66
+ <!-- Colored accent bar for incoming messages -->
67
+ <div class="accent-bar"></div>
67
68
  {/if}
68
-
69
- <div class="rounded-2xl px-4 py-2 {bubbleClasses()}" style="max-width: 80%; overflow: hidden; word-wrap: break-word;">
69
+ <div class="bubble {isUser ? 'bubble-user' : isSystem ? 'bubble-system' : 'bubble-incoming'}" style="max-width: 80%; overflow: hidden; word-wrap: break-word;">
70
70
  {#if renderedContent()}
71
71
  <div class="markdown-content" style="word-break: break-word; overflow-wrap: anywhere;">
72
72
  {@html renderedContent()}
73
73
  </div>
74
74
  {:else}
75
- <p style="white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere;">{message.content}</p>
75
+ <p style="white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; margin: 0;">{message.content}</p>
76
76
  {/if}
77
77
  {#if message.streaming}
78
78
  <span class="inline-block w-2 h-4 bg-current animate-pulse ml-1">|</span>
79
79
  {/if}
80
80
  </div>
81
-
82
- <span class="text-xs text-foreground-tertiary px-1">
83
- {formatTime(message.timestamp)}
84
- </span>
85
81
  </div>
86
82
 
87
83
  <style>
84
+ .accent-bar {
85
+ width: 3px;
86
+ min-width: 3px;
87
+ background: #3b82f6;
88
+ border-radius: 3px;
89
+ margin-right: 8px;
90
+ align-self: stretch;
91
+ }
92
+
93
+ .bubble {
94
+ padding: 10px 14px;
95
+ line-height: 1.4;
96
+ }
97
+
98
+ .bubble-user {
99
+ background: #2b5278;
100
+ color: #fff;
101
+ border-radius: 18px 18px 4px 18px;
102
+ }
103
+
104
+ .bubble-incoming {
105
+ background: #182533;
106
+ color: #fff;
107
+ border-radius: 18px 18px 18px 4px;
108
+ }
109
+
110
+ .bubble-system {
111
+ background: transparent;
112
+ color: rgba(255, 255, 255, 0.6);
113
+ text-align: center;
114
+ font-size: 0.875rem;
115
+ font-style: italic;
116
+ margin: 0 auto;
117
+ }
118
+
88
119
  .markdown-content {
89
120
  color: inherit;
90
121
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alliance-droid/chat-widget",
3
- "version": "0.1.8",
3
+ "version": "0.1.10",
4
4
  "description": "Svelte chat widget with AI support and human escalation",
5
5
  "type": "module",
6
6
  "scripts": {