@alliance-droid/chat-widget 0.1.7 → 0.1.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.
@@ -61,14 +61,10 @@
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>
67
- {/if}
68
-
64
+ <div class="flex flex-col {className}" class:items-end={isUser} style="min-width: 0; width: 100%;">
69
65
  <div class="rounded-2xl px-4 py-2 {bubbleClasses()}" style="max-width: 80%; overflow: hidden; word-wrap: break-word;">
70
66
  {#if renderedContent()}
71
- <div class="prose prose-sm dark:prose-invert max-w-none" style="word-break: break-word; overflow-wrap: anywhere;">
67
+ <div class="markdown-content" style="word-break: break-word; overflow-wrap: anywhere;">
72
68
  {@html renderedContent()}
73
69
  </div>
74
70
  {:else}
@@ -78,63 +74,74 @@
78
74
  <span class="inline-block w-2 h-4 bg-current animate-pulse ml-1">|</span>
79
75
  {/if}
80
76
  </div>
81
-
82
- <span class="text-xs text-foreground-tertiary px-1">
83
- {formatTime(message.timestamp)}
84
- </span>
85
77
  </div>
86
78
 
87
79
  <style>
88
- .prose :global(p) {
80
+ .markdown-content {
81
+ color: inherit;
82
+ }
83
+ .markdown-content :global(p) {
89
84
  margin: 0.5em 0;
85
+ color: inherit;
90
86
  }
91
- .prose :global(p:first-child) {
87
+ .markdown-content :global(p:first-child) {
92
88
  margin-top: 0;
93
89
  }
94
- .prose :global(p:last-child) {
90
+ .markdown-content :global(p:last-child) {
95
91
  margin-bottom: 0;
96
92
  }
97
- .prose :global(ul), .prose :global(ol) {
93
+ .markdown-content :global(ul), .markdown-content :global(ol) {
98
94
  margin: 0.5em 0;
99
95
  padding-left: 1.5em;
96
+ color: inherit;
100
97
  }
101
- .prose :global(li) {
98
+ .markdown-content :global(li) {
102
99
  margin: 0.25em 0;
100
+ color: inherit;
103
101
  }
104
- .prose :global(code) {
105
- background: rgba(0, 0, 0, 0.1);
102
+ .markdown-content :global(code) {
103
+ background: rgba(128, 128, 128, 0.2);
106
104
  padding: 0.1em 0.3em;
107
105
  border-radius: 0.25em;
108
106
  font-size: 0.9em;
107
+ color: inherit;
109
108
  }
110
- .prose :global(pre) {
111
- background: rgba(0, 0, 0, 0.1);
109
+ .markdown-content :global(pre) {
110
+ background: rgba(128, 128, 128, 0.2);
112
111
  padding: 0.75em;
113
112
  border-radius: 0.5em;
114
113
  overflow-x: auto;
115
114
  margin: 0.5em 0;
115
+ color: inherit;
116
116
  }
117
- .prose :global(pre code) {
117
+ .markdown-content :global(pre code) {
118
118
  background: none;
119
119
  padding: 0;
120
120
  }
121
- .prose :global(h1), .prose :global(h2), .prose :global(h3) {
121
+ .markdown-content :global(h1), .markdown-content :global(h2), .markdown-content :global(h3) {
122
122
  margin: 0.75em 0 0.5em;
123
123
  font-weight: 600;
124
+ color: inherit;
124
125
  }
125
- .prose :global(h1) { font-size: 1.25em; }
126
- .prose :global(h2) { font-size: 1.125em; }
127
- .prose :global(h3) { font-size: 1em; }
128
- .prose :global(blockquote) {
126
+ .markdown-content :global(h1) { font-size: 1.25em; }
127
+ .markdown-content :global(h2) { font-size: 1.125em; }
128
+ .markdown-content :global(h3) { font-size: 1em; }
129
+ .markdown-content :global(blockquote) {
129
130
  border-left: 3px solid currentColor;
130
131
  opacity: 0.8;
131
132
  padding-left: 1em;
132
133
  margin: 0.5em 0;
134
+ color: inherit;
133
135
  }
134
- .prose :global(a) {
136
+ .markdown-content :global(a) {
135
137
  text-decoration: underline;
138
+ color: inherit;
136
139
  }
137
- .prose :global(strong) {
140
+ .markdown-content :global(strong) {
138
141
  font-weight: 600;
142
+ color: inherit;
143
+ }
144
+ .markdown-content :global(em) {
145
+ color: inherit;
139
146
  }
140
147
  </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alliance-droid/chat-widget",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "Svelte chat widget with AI support and human escalation",
5
5
  "type": "module",
6
6
  "scripts": {