lisichatbot 1.0.3 → 1.0.4

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +12 -139
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisichatbot",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "type": "module",
5
5
  "main": "./src/index.js",
6
6
  "exports": {
package/src/index.js CHANGED
@@ -544,151 +544,24 @@ function injectStyles() {
544
544
  const style = document.createElement('style');
545
545
  style.id = styleId;
546
546
  style.textContent = `
547
- .cf-wrapper {
548
- display: flex;
549
- flex-direction: column;
550
- height: 100%;
551
- max-height: 600px;
552
- border: 1px solid #e5e5e5;
553
- border-radius: 8px;
554
- overflow: hidden;
555
- background: #f9f9f9;
547
+ /* Bot message spacing */
548
+ [data-chat-element="bot-message-wrapper"] {
549
+ margin-bottom: 16px;
556
550
  }
557
551
 
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);
603
- }
604
-
605
- .cf-message-content {
606
- display: inline-block;
607
- padding: 12px 16px;
608
- border-radius: 8px;
609
- max-width: 80%;
610
- }
611
-
612
- .cf-bot .cf-message-content {
613
- background: white;
614
- border: 1px solid #e5e5e5;
552
+ /* User message spacing */
553
+ [data-chat-element="user-message-wrapper"] {
554
+ margin-bottom: 16px;
615
555
  }
616
556
 
617
- .cf-user .cf-message-content {
618
- background: #667eea;
619
- color: white;
557
+ /* Options wrapper spacing */
558
+ [data-chat-element="options-wrapper"] {
559
+ margin-bottom: 20px;
620
560
  }
621
561
 
622
- .cf-options {
623
- display: flex;
624
- flex-direction: column;
625
- gap: 10px;
626
- margin-top: 10px;
627
- }
628
-
629
- .cf-option {
630
- display: flex;
631
- align-items: center;
632
- 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
- }
640
-
641
- .cf-option:hover {
642
- border-color: #667eea;
643
- transform: translateX(4px);
644
- }
645
-
646
- .cf-option.cf-checked {
647
- border-color: #667eea;
648
- color: white;
649
- }
650
-
651
- .cf-tick {
652
- font-weight: bold;
653
- font-size: 18px;
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;
562
+ /* Messages container padding */
563
+ [data-chat-element="messages-container"] {
564
+ padding: 20px;
692
565
  }
693
566
  `;
694
567