lisichatbot 1.0.3 → 1.0.5
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 +1 -1
- package/src/index.js +21 -132
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -544,151 +544,40 @@ function injectStyles() {
|
|
|
544
544
|
const style = document.createElement('style');
|
|
545
545
|
style.id = styleId;
|
|
546
546
|
style.textContent = `
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
height: 100%;
|
|
551
|
-
max-height: 600px;
|
|
552
|
-
border: 1px solid #e5e5e5;
|
|
553
|
-
border-radius: 8px;
|
|
554
|
-
overflow: hidden;
|
|
555
|
-
background: #f9f9f9;
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
.cf-messages {
|
|
559
|
-
flex: 1;
|
|
560
|
-
overflow-y: auto;
|
|
561
|
-
padding: 20px;
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
.cf-message {
|
|
565
|
-
margin-bottom: 15px;
|
|
566
|
-
animation: cfSlideIn 0.3s ease;
|
|
567
|
-
position: relative;
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
@keyframes cfSlideIn {
|
|
571
|
-
from { opacity: 0; transform: translateY(10px); }
|
|
572
|
-
to { opacity: 1; transform: translateY(0); }
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
.cf-bot {
|
|
576
|
-
text-align: left;
|
|
577
|
-
}
|
|
578
|
-
|
|
579
|
-
.cf-user {
|
|
580
|
-
text-align: right;
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
.cf-edit-icon {
|
|
584
|
-
position: absolute;
|
|
585
|
-
right: -30px;
|
|
586
|
-
top: 50%;
|
|
587
|
-
transform: translateY(-50%);
|
|
588
|
-
background: none;
|
|
589
|
-
border: none;
|
|
590
|
-
cursor: pointer;
|
|
591
|
-
font-size: 16px;
|
|
592
|
-
opacity: 0;
|
|
593
|
-
transition: opacity 0.2s ease;
|
|
594
|
-
padding: 4px 8px;
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
.cf-message:hover .cf-edit-icon {
|
|
598
|
-
opacity: 1;
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
.cf-edit-icon:hover {
|
|
602
|
-
transform: translateY(-50%) scale(1.2);
|
|
547
|
+
/* Bot message spacing */
|
|
548
|
+
[data-chat-element="bot-message-wrapper"] {
|
|
549
|
+
margin-bottom: 16px;
|
|
603
550
|
}
|
|
604
551
|
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
border-radius: 8px;
|
|
609
|
-
max-width: 80%;
|
|
552
|
+
/* User message spacing */
|
|
553
|
+
[data-chat-element="user-message-wrapper"] {
|
|
554
|
+
margin-bottom: 16px;
|
|
610
555
|
}
|
|
611
556
|
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
.cf-user .cf-message-content {
|
|
618
|
-
background: #667eea;
|
|
619
|
-
color: white;
|
|
620
|
-
}
|
|
621
|
-
|
|
622
|
-
.cf-options {
|
|
557
|
+
/* Options wrapper spacing and layout */
|
|
558
|
+
[data-chat-element="options-wrapper"] {
|
|
559
|
+
margin-bottom: 20px;
|
|
623
560
|
display: flex;
|
|
624
561
|
flex-direction: column;
|
|
625
|
-
gap: 10px;
|
|
626
|
-
margin-top: 10px;
|
|
627
|
-
}
|
|
628
|
-
|
|
629
|
-
.cf-option {
|
|
630
|
-
display: flex;
|
|
631
|
-
align-items: center;
|
|
632
562
|
gap: 12px;
|
|
633
|
-
padding: 14px 16px;
|
|
634
|
-
background: white;
|
|
635
|
-
border: 2px solid #e5e5e5;
|
|
636
|
-
border-radius: 8px;
|
|
637
|
-
cursor: pointer;
|
|
638
|
-
transition: all 0.2s ease;
|
|
639
563
|
}
|
|
640
564
|
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
565
|
+
/* Individual option spacing */
|
|
566
|
+
[data-chat-input-element="container"] {
|
|
567
|
+
margin-bottom: 0;
|
|
644
568
|
}
|
|
645
569
|
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
570
|
+
/* Remove any default stretching */
|
|
571
|
+
[data-chat-element="single-select-input"],
|
|
572
|
+
[data-chat-element="multi-select-input"] {
|
|
573
|
+
width: auto;
|
|
574
|
+
max-width: 100%;
|
|
575
|
+
display: inline-flex;
|
|
649
576
|
}
|
|
650
577
|
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
min-width: 20px;
|
|
655
|
-
}
|
|
656
|
-
|
|
657
|
-
.cf-option-text {
|
|
658
|
-
flex: 1;
|
|
659
|
-
}
|
|
660
|
-
|
|
661
|
-
.cf-bottom {
|
|
662
|
-
padding: 16px;
|
|
663
|
-
background: white;
|
|
664
|
-
border-top: 1px solid #e5e5e5;
|
|
665
|
-
}
|
|
666
|
-
|
|
667
|
-
.cf-next-btn {
|
|
668
|
-
width: 100%;
|
|
669
|
-
padding: 14px 24px;
|
|
670
|
-
background: #667eea;
|
|
671
|
-
color: white;
|
|
672
|
-
border: none;
|
|
673
|
-
border-radius: 8px;
|
|
674
|
-
font-size: 16px;
|
|
675
|
-
font-weight: 600;
|
|
676
|
-
cursor: pointer;
|
|
677
|
-
transition: all 0.2s ease;
|
|
678
|
-
display: flex;
|
|
679
|
-
align-items: center;
|
|
680
|
-
justify-content: center;
|
|
681
|
-
gap: 8px;
|
|
682
|
-
}
|
|
683
|
-
|
|
684
|
-
.cf-next-btn:not(:disabled):hover {
|
|
685
|
-
background: #5568d3;
|
|
686
|
-
transform: translateY(-2px);
|
|
687
|
-
box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
|
|
688
|
-
}
|
|
689
|
-
|
|
690
|
-
.cf-next-btn:disabled {
|
|
691
|
-
cursor: not-allowed;
|
|
578
|
+
/* Messages container padding */
|
|
579
|
+
[data-chat-element="messages-container"] {
|
|
580
|
+
padding: 20px;
|
|
692
581
|
}
|
|
693
582
|
`;
|
|
694
583
|
|