@alliance-droid/chat-widget 0.1.4 → 0.1.6

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.
@@ -55,7 +55,7 @@
55
55
  });
56
56
  </script>
57
57
 
58
- <div class="flex flex-col h-full w-full min-w-0 bg-surface rounded-2xl shadow-xl border border-border overflow-hidden {className}">
58
+ <div class="chat-panel flex flex-col h-full bg-surface rounded-2xl shadow-xl border border-border {className}">
59
59
  <!-- Header -->
60
60
  <div class="flex items-center justify-between px-4 py-3 border-b border-border bg-surface">
61
61
  {#if header}
@@ -115,3 +115,11 @@
115
115
  </div>
116
116
  {/if}
117
117
  </div>
118
+
119
+ <style>
120
+ .chat-panel {
121
+ width: 100%;
122
+ min-width: 0;
123
+ overflow: hidden;
124
+ }
125
+ </style>
@@ -105,9 +105,7 @@
105
105
 
106
106
  <div class="fixed bottom-4 {positionClasses()} z-50 flex flex-col {alignmentClass()} {themeClass()} {className}">
107
107
  {#if isOpen}
108
- <div
109
- class="w-[380px] min-w-[380px] max-w-[380px] h-[600px] max-h-[80vh] mb-4 overflow-hidden animate-in fade-in slide-in-from-bottom-4 duration-200"
110
- >
108
+ <div class="chat-container mb-4 animate-in">
111
109
  <ChatPanel
112
110
  messages={$messages}
113
111
  status={$status}
@@ -156,6 +154,16 @@
156
154
  </div>
157
155
 
158
156
  <style>
157
+ .chat-container {
158
+ width: 380px !important;
159
+ min-width: 380px !important;
160
+ max-width: 380px !important;
161
+ height: 600px;
162
+ max-height: 80vh;
163
+ overflow: hidden !important;
164
+ contain: strict;
165
+ }
166
+
159
167
  @keyframes fade-in {
160
168
  from { opacity: 0; }
161
169
  to { opacity: 1; }
@@ -42,13 +42,13 @@
42
42
  }
43
43
  </script>
44
44
 
45
- <div class="flex flex-col gap-1 min-w-0 w-full {className}" class:items-end={isUser}>
45
+ <div class="flex flex-col gap-1 {className}" class:items-end={isUser} style="min-width: 0; width: 100%;">
46
46
  {#if senderLabel() && !isUser}
47
47
  <span class="text-xs text-foreground-tertiary px-1">{senderLabel()}</span>
48
48
  {/if}
49
49
 
50
- <div class="max-w-[80%] rounded-2xl px-4 py-2 overflow-hidden {bubbleClasses()}">
51
- <p class="whitespace-pre-wrap break-words overflow-wrap-anywhere">{message.content}</p>
50
+ <div class="rounded-2xl px-4 py-2 {bubbleClasses()}" style="max-width: 80%; overflow: hidden; word-wrap: break-word;">
51
+ <p style="white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere;">{message.content}</p>
52
52
  {#if message.streaming}
53
53
  <span class="inline-block w-2 h-4 bg-current animate-pulse ml-1">|</span>
54
54
  {/if}
@@ -37,7 +37,8 @@
37
37
 
38
38
  <div
39
39
  bind:this={listElement}
40
- class="flex-1 min-w-0 overflow-y-auto overflow-x-hidden p-4 space-y-4 {className}"
40
+ class="flex-1 p-4 space-y-4 {className}"
41
+ style="min-width: 0; overflow-y: auto; overflow-x: hidden;"
41
42
  >
42
43
  {#if messages.length === 0}
43
44
  <div class="flex items-center justify-center h-full text-foreground-tertiary">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alliance-droid/chat-widget",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Svelte chat widget with AI support and human escalation",
5
5
  "type": "module",
6
6
  "scripts": {