@nickle/chatbot-react 0.1.1 → 0.1.3

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/src/styles.css CHANGED
@@ -104,60 +104,86 @@
104
104
  background: color-mix(in srgb, var(--cb-muted-foreground) 65%, #000000 35%);
105
105
  }
106
106
 
107
- .cb-markdown p,
108
- .cb-markdown ul,
109
- .cb-markdown ol,
110
- .cb-markdown pre,
111
- .cb-markdown blockquote,
112
- .cb-markdown table {
107
+ [data-chatbot-root] .cb-markdown {
108
+ line-height: 1.5;
109
+ color: inherit;
110
+ }
111
+
112
+ [data-chatbot-root] .cb-markdown p,
113
+ [data-chatbot-root] .cb-markdown ul,
114
+ [data-chatbot-root] .cb-markdown ol,
115
+ [data-chatbot-root] .cb-markdown pre,
116
+ [data-chatbot-root] .cb-markdown blockquote,
117
+ [data-chatbot-root] .cb-markdown table {
113
118
  margin: 0.2rem 0;
114
119
  }
115
120
 
116
- .cb-markdown h1,
117
- .cb-markdown h2,
118
- .cb-markdown h3,
119
- .cb-markdown h4,
120
- .cb-markdown h5,
121
- .cb-markdown h6 {
121
+ [data-chatbot-root] .cb-markdown h1,
122
+ [data-chatbot-root] .cb-markdown h2,
123
+ [data-chatbot-root] .cb-markdown h3,
124
+ [data-chatbot-root] .cb-markdown h4,
125
+ [data-chatbot-root] .cb-markdown h5,
126
+ [data-chatbot-root] .cb-markdown h6 {
122
127
  font-weight: 600;
123
128
  margin: 0.3rem 0;
124
129
  line-height: 1.35;
125
130
  }
126
131
 
127
- .cb-markdown > :first-child {
132
+ [data-chatbot-root] .cb-markdown > :first-child {
128
133
  margin-top: 0;
129
134
  }
130
135
 
131
- .cb-markdown > :last-child {
136
+ [data-chatbot-root] .cb-markdown > :last-child {
132
137
  margin-bottom: 0;
133
138
  }
134
139
 
135
- .cb-markdown h1 {
140
+ [data-chatbot-root] .cb-markdown h1 {
136
141
  font-size: 1.1rem;
137
142
  }
138
143
 
139
- .cb-markdown h2 {
144
+ [data-chatbot-root] .cb-markdown h2 {
140
145
  font-size: 1rem;
141
146
  }
142
147
 
143
- .cb-markdown h3,
144
- .cb-markdown h4,
145
- .cb-markdown h5,
146
- .cb-markdown h6 {
148
+ [data-chatbot-root] .cb-markdown h3,
149
+ [data-chatbot-root] .cb-markdown h4,
150
+ [data-chatbot-root] .cb-markdown h5,
151
+ [data-chatbot-root] .cb-markdown h6 {
147
152
  font-size: 0.95rem;
148
153
  }
149
154
 
150
- .cb-markdown ul,
151
- .cb-markdown ol {
155
+ [data-chatbot-root] .cb-markdown ul,
156
+ [data-chatbot-root] .cb-markdown ol {
152
157
  padding-left: 1.2rem;
153
158
  }
154
159
 
155
- .cb-markdown a {
160
+ [data-chatbot-root] .cb-markdown ul {
161
+ list-style: disc;
162
+ }
163
+
164
+ [data-chatbot-root] .cb-markdown ol {
165
+ list-style: decimal;
166
+ }
167
+
168
+ [data-chatbot-root] .cb-markdown li {
169
+ margin: 0.12rem 0;
170
+ }
171
+
172
+ [data-chatbot-root] .cb-markdown strong {
173
+ font-weight: 700;
174
+ }
175
+
176
+ [data-chatbot-root] .cb-markdown em {
177
+ font-style: italic;
178
+ }
179
+
180
+ [data-chatbot-root] .cb-markdown a {
156
181
  text-decoration: underline;
157
182
  color: var(--cb-primary);
183
+ word-break: break-word;
158
184
  }
159
185
 
160
- .cb-markdown code {
186
+ [data-chatbot-root] .cb-markdown code {
161
187
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, monospace;
162
188
  background-color: color-mix(in srgb, var(--cb-muted) 70%, transparent);
163
189
  border-radius: 0.35rem;
@@ -165,7 +191,7 @@
165
191
  font-size: 0.85em;
166
192
  }
167
193
 
168
- .cb-markdown pre {
194
+ [data-chatbot-root] .cb-markdown pre {
169
195
  overflow-x: auto;
170
196
  border-radius: 0.8rem;
171
197
  border: 1px solid var(--cb-border);
@@ -173,30 +199,42 @@
173
199
  padding: 0.65rem 0.75rem;
174
200
  }
175
201
 
176
- .cb-markdown pre code {
202
+ [data-chatbot-root] .cb-markdown pre code {
177
203
  background: transparent;
178
204
  padding: 0;
179
205
  }
180
206
 
181
- .cb-markdown blockquote {
207
+ [data-chatbot-root] .cb-markdown blockquote {
182
208
  border-left: 2px solid var(--cb-border);
183
209
  padding-left: 0.75rem;
184
210
  color: var(--cb-muted-foreground);
185
211
  }
186
212
 
187
- .cb-markdown table {
213
+ [data-chatbot-root] .cb-markdown table {
188
214
  width: 100%;
189
215
  border-collapse: collapse;
190
216
  font-size: 0.875rem;
191
217
  }
192
218
 
193
- .cb-markdown th,
194
- .cb-markdown td {
219
+ [data-chatbot-root] .cb-markdown th,
220
+ [data-chatbot-root] .cb-markdown td {
195
221
  border: 1px solid var(--cb-border);
196
222
  padding: 0.35rem 0.45rem;
197
223
  text-align: left;
198
224
  }
199
225
 
226
+ [data-chatbot-root] .cb-markdown img {
227
+ max-width: 100%;
228
+ height: auto;
229
+ border-radius: 0.5rem;
230
+ }
231
+
232
+ [data-chatbot-root] .cb-markdown hr {
233
+ border: 0;
234
+ border-top: 1px solid var(--cb-border);
235
+ margin: 0.45rem 0;
236
+ }
237
+
200
238
  @keyframes cb-slide-fade-in-left {
201
239
  from {
202
240
  opacity: 0;
@@ -247,6 +285,55 @@
247
285
  animation: cb-dots 1s infinite ease-in-out;
248
286
  }
249
287
 
288
+ .cb-panel-transition {
289
+ transition-property: opacity, transform, width, height, top, left, right, bottom;
290
+ transition-duration: 380ms;
291
+ transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
292
+ will-change: opacity, transform;
293
+ }
294
+
295
+ .cb-panel-open {
296
+ opacity: 1;
297
+ transform: translate3d(0, 0, 0) scale(1);
298
+ }
299
+
300
+ .cb-panel-closed {
301
+ opacity: 0;
302
+ transform: translate3d(0, 12px, 0) scale(0.9);
303
+ }
304
+
305
+ .cb-launcher-icon-transition {
306
+ transition-property: transform, opacity;
307
+ transition-duration: 300ms;
308
+ transition-timing-function: ease-out;
309
+ }
310
+
311
+ .cb-launcher-icon-base {
312
+ transform-origin: center;
313
+ backface-visibility: hidden;
314
+ will-change: transform, opacity;
315
+ }
316
+
317
+ .cb-launcher-icon-closed-closed {
318
+ opacity: 1;
319
+ transform: rotate(0deg);
320
+ }
321
+
322
+ .cb-launcher-icon-closed-open {
323
+ opacity: 0;
324
+ transform: rotate(90deg);
325
+ }
326
+
327
+ .cb-launcher-icon-open-closed {
328
+ opacity: 0;
329
+ transform: rotate(-90deg);
330
+ }
331
+
332
+ .cb-launcher-icon-open-open {
333
+ opacity: 1;
334
+ transform: rotate(0deg);
335
+ }
336
+
250
337
  @media (prefers-reduced-motion: reduce) {
251
338
  [data-chatbot-root] * {
252
339
  animation-duration: 0.01ms !important;