@salesforcedevs/docs-components 0.0.34-chat → 0.0.35-chat

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/docs-components",
3
- "version": "0.0.34-chat",
3
+ "version": "0.0.35-chat",
4
4
  "description": "Docs Lightning web components for DSC",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
Binary file
@@ -37,58 +37,47 @@ body.chat-closed .global-header {
37
37
  position: fixed;
38
38
  bottom: 20px;
39
39
  right: 20px;
40
- width: 64px;
41
- height: 64px;
42
- border-radius: 50%;
43
- background: linear-gradient(135deg, #0176d3 0%, #005fb2 100%);
40
+ background: transparent;
44
41
  color: white;
45
42
  border: none;
46
43
  cursor: pointer;
47
- box-shadow: 0 8px 24px rgb(1 118 211 / 25%), 0 2px 8px rgb(1 118 211 / 15%);
48
44
  z-index: 1001;
49
45
  display: flex;
50
46
  align-items: center;
51
47
  justify-content: center;
52
48
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
53
49
  animation: pulse 3s infinite;
50
+ padding: 0;
54
51
  }
55
52
 
56
- .chat-trigger-button:hover {
57
- background: linear-gradient(135deg, #005fb2 0%, #003e73 100%);
58
- transform: scale(1.05);
59
- box-shadow: 0 12px 32px rgb(1 118 211 / 35%), 0 4px 12px rgb(1 118 211 / 25%);
53
+ .chat-trigger-button:hover .chat-gif {
54
+ transform: scale(1.1);
60
55
  }
61
56
 
62
- .chat-trigger-button:active {
57
+ .chat-trigger-button:active .chat-gif {
63
58
  transform: scale(0.95);
64
59
  }
65
60
 
66
- .chat-icon {
67
- width: 28px;
68
- height: 28px;
69
- position: absolute;
61
+ .chat-gif {
62
+ width: 155px;
63
+ height: 218px;
64
+ object-fit: cover;
65
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
70
66
  }
71
67
 
72
- .chat-trigger-text {
73
- font-size: 10px;
74
- font-weight: 600;
75
- text-transform: uppercase;
76
- letter-spacing: 0.5px;
77
- margin-top: 20px;
78
- opacity: 0.9;
79
- }
68
+
80
69
 
81
70
  @keyframes pulse {
82
71
  0% {
83
- box-shadow: 0 8px 24px rgb(1 118 211 / 25%), 0 2px 8px rgb(1 118 211 / 15%), 0 0 0 0 rgb(1 118 211 / 40%);
72
+ transform: scale(1);
84
73
  }
85
74
 
86
75
  70% {
87
- box-shadow: 0 8px 24px rgb(1 118 211 / 25%), 0 2px 8px rgb(1 118 211 / 15%), 0 0 0 16px rgb(1 118 211 / 0%);
76
+ transform: scale(1.05);
88
77
  }
89
78
 
90
79
  100% {
91
- box-shadow: 0 8px 24px rgb(1 118 211 / 25%), 0 2px 8px rgb(1 118 211 / 15%), 0 0 0 0 rgb(1 118 211 / 0%);
80
+ transform: scale(1);
92
81
  }
93
82
  }
94
83
 
@@ -244,6 +233,7 @@ body.chat-closed .global-header {
244
233
  box-shadow: 0 2px 8px rgb(0 0 0 / 10%);
245
234
  position: relative;
246
235
  overflow: hidden;
236
+ animation: thinking-avatar-pulse 3s ease-in-out infinite;
247
237
  }
248
238
 
249
239
  .avatar-container::before {
@@ -254,10 +244,6 @@ body.chat-closed .global-header {
254
244
  border-radius: 50%;
255
245
  }
256
246
 
257
- .avatar-container {
258
- animation: thinking-avatar-pulse 3s ease-in-out infinite;
259
- }
260
-
261
247
  .avatar-icon {
262
248
  width: 32px;
263
249
  height: 32px;
@@ -287,6 +273,7 @@ body.chat-closed .global-header {
287
273
  transform: scale(1);
288
274
  box-shadow: 0 2px 8px rgb(0 0 0 / 10%);
289
275
  }
276
+
290
277
  50% {
291
278
  transform: scale(1.08);
292
279
  box-shadow: 0 4px 16px rgb(0 0 0 / 20%);
@@ -297,6 +284,7 @@ body.chat-closed .global-header {
297
284
  0%, 100% {
298
285
  transform: scale(1);
299
286
  }
287
+
300
288
  50% {
301
289
  transform: scale(1.05);
302
290
  }
@@ -304,8 +292,9 @@ body.chat-closed .global-header {
304
292
 
305
293
  @keyframes thinking-smile-animation {
306
294
  0%, 100% {
307
- transform: translateY(0px);
295
+ transform: translateY(0);
308
296
  }
297
+
309
298
  50% {
310
299
  transform: translateY(-2px);
311
300
  }
@@ -315,15 +304,19 @@ body.chat-closed .global-header {
315
304
  0%, 85%, 100% {
316
305
  transform: scaleY(1);
317
306
  }
307
+
318
308
  90% {
319
309
  transform: scaleY(0.6);
320
310
  }
311
+
321
312
  92% {
322
313
  transform: scaleY(0.2);
323
314
  }
315
+
324
316
  94% {
325
317
  transform: scaleY(0.6);
326
318
  }
319
+
327
320
  96% {
328
321
  transform: scaleY(1);
329
322
  }
@@ -514,21 +507,16 @@ body.chat-closed .global-header {
514
507
  /* Responsive design */
515
508
  @media (max-width: 768px) {
516
509
  .chat-trigger-button {
517
- width: 56px;
518
- height: 56px;
519
510
  bottom: 16px;
520
511
  right: 16px;
521
512
  }
522
513
 
523
- .chat-icon {
524
- width: 24px;
525
- height: 24px;
514
+ .chat-gif {
515
+ width: 56px;
516
+ height: 56px;
526
517
  }
527
518
 
528
- .chat-trigger-text {
529
- font-size: 8px;
530
- margin-top: 18px;
531
- }
519
+
532
520
 
533
521
  .chat-container {
534
522
  width: 100%;
@@ -577,21 +565,16 @@ body.chat-closed .global-header {
577
565
 
578
566
  @media (max-width: 480px) {
579
567
  .chat-trigger-button {
580
- width: 45px;
581
- height: 45px;
582
568
  bottom: 10px;
583
569
  right: 10px;
584
570
  }
585
571
 
586
- .chat-icon {
587
- width: 20px;
588
- height: 20px;
572
+ .chat-gif {
573
+ width: 48px;
574
+ height: 48px;
589
575
  }
590
576
 
591
- .chat-trigger-text {
592
- font-size: 7px;
593
- margin-top: 16px;
594
- }
577
+
595
578
 
596
579
  .chat-container {
597
580
  width: 100%;
@@ -6,19 +6,11 @@
6
6
  onclick={handleOpenClick}
7
7
  aria-label="Open chat"
8
8
  >
9
- <svg
10
- class="chat-icon"
11
- viewBox="0 0 24 24"
12
- fill="none"
13
- stroke="currentColor"
14
- >
15
- <path
16
- stroke-linecap="round"
17
- stroke-linejoin="round"
18
- stroke-width="2"
19
- d="M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"
20
- />
21
- </svg>
9
+ <img
10
+ class="chat-gif"
11
+ src="/hi_bot.gif"
12
+ alt="Hi Bot"
13
+ />
22
14
  <!-- <span class="chat-trigger-text">Chat</span> -->
23
15
  </button>
24
16
  </template>
@@ -58,6 +58,7 @@ export default class Chat extends LightningElement {
58
58
  private static readonly OPEN_STATE_KEY = "doc-chat-should-open";
59
59
 
60
60
  connectedCallback() {
61
+ console.log('---- Connected callback ------');
61
62
  // Load existing messages from localStorage
62
63
  this.loadMessages();
63
64