@realtimexsco/live-chat 1.3.3 → 1.4.0

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/dist/styles.css CHANGED
@@ -446,28 +446,105 @@
446
446
  .chat-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
447
447
  .chat-typing-dots span:nth-child(3) { animation-delay: 0.4s; }
448
448
 
449
- .chat-date-divider {
450
- position: sticky;
451
- top: 0.375rem;
452
- z-index: 20;
453
- display: flex;
454
- justify-content: center;
455
- padding: 0.25rem 0;
456
- margin-bottom: 0.5rem;
449
+ .chat-date-divider-pill {
450
+ display: inline-flex;
451
+ align-items: center;
452
+ gap: 0.5rem;
453
+ border-radius: 9999px;
454
+ border: 1px solid color-mix(in srgb, var(--chat-text) 10%, var(--chat-border));
455
+ background: color-mix(in srgb, var(--chat-surface) 92%, transparent);
456
+ padding: 0.45rem 1rem;
457
+ font-size: 0.9rem;
458
+ font-weight: 600;
459
+ line-height: 1.1;
460
+ color: var(--chat-text);
461
+ box-shadow: 0 10px 30px color-mix(in srgb, var(--chat-text) 10%, transparent);
462
+ backdrop-filter: blur(10px);
463
+ }
464
+
465
+ .chat-date-divider-pill--interactive {
466
+ cursor: pointer;
467
+ transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
468
+ }
469
+
470
+ .chat-date-divider-pill--interactive:hover,
471
+ .chat-date-divider-pill--interactive[data-state="open"] {
472
+ border-color: color-mix(in srgb, var(--chat-text) 16%, var(--chat-border));
473
+ background: color-mix(in srgb, var(--chat-surface) 86%, var(--chat-text));
474
+ box-shadow: 0 12px 34px color-mix(in srgb, var(--chat-text) 14%, transparent);
475
+ }
476
+
477
+ .chat-date-divider-chevron {
478
+ width: 1rem;
479
+ height: 1rem;
480
+ opacity: 0.8;
481
+ flex-shrink: 0;
482
+ transition: transform 0.15s ease;
483
+ }
484
+
485
+ .chat-date-divider-pill--interactive[data-state="open"] .chat-date-divider-chevron {
486
+ transform: rotate(180deg);
487
+ }
488
+
489
+ /* shadcn calendar inside chat popover */
490
+ .chat-theme-scope [data-slot="calendar"] {
491
+ --primary: var(--chat-theme);
492
+ --primary-foreground: #ffffff;
493
+ --accent: var(--chat-hover);
494
+ --accent-foreground: var(--chat-text);
495
+ --muted-foreground: var(--chat-muted);
496
+ }
497
+
498
+ .chat-jump-calendar .rdp-button_previous:disabled,
499
+ .chat-jump-calendar .rdp-button_next:disabled {
500
+ opacity: 0.28;
457
501
  pointer-events: none;
502
+ cursor: default;
458
503
  }
459
504
 
460
- .chat-date-divider-pill {
505
+ .chat-jump-calendar .rdp-disabled .rdp-day_button,
506
+ .chat-jump-calendar .rdp-day_button:disabled {
507
+ opacity: 0.32;
508
+ pointer-events: none;
509
+ cursor: default;
510
+ color: var(--chat-muted);
511
+ }
512
+
513
+ .chat-scroll-to-bottom {
514
+ position: absolute;
515
+ bottom: 1rem;
516
+ left: 50%;
517
+ z-index: 30;
518
+ display: inline-flex;
519
+ width: 2.5rem;
520
+ height: 2.5rem;
521
+ align-items: center;
522
+ justify-content: center;
461
523
  border-radius: 9999px;
462
524
  border: 1px solid var(--chat-border);
463
- background: var(--chat-date-pill-bg);
464
- padding: 0.2rem 0.65rem;
465
- font-size: 0.6875rem;
466
- font-weight: 500;
467
- line-height: 1.25;
525
+ background: var(--chat-surface);
468
526
  color: var(--chat-muted);
469
- box-shadow: 0 6px 18px color-mix(in srgb, var(--chat-text) 8%, transparent);
470
- backdrop-filter: blur(14px);
527
+ box-shadow: 0 8px 24px color-mix(in srgb, var(--chat-text) 12%, transparent);
528
+ transform: translateX(-50%);
529
+ transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
530
+ animation: chat-scroll-to-bottom-in 0.2s ease-out;
531
+ }
532
+
533
+ .chat-scroll-to-bottom:hover {
534
+ color: var(--chat-text);
535
+ border-color: color-mix(in srgb, var(--chat-text) 18%, var(--chat-border));
536
+ box-shadow: 0 10px 28px color-mix(in srgb, var(--chat-text) 16%, transparent);
537
+ }
538
+
539
+ @keyframes chat-scroll-to-bottom-in {
540
+ from {
541
+ opacity: 0;
542
+ transform: translateX(-50%) translateY(8px);
543
+ }
544
+ to {
545
+ opacity: 1;
546
+ transform: translateX(-50%) translateY(0);
547
+ }
471
548
  }
472
549
 
473
550
  @keyframes chat-message-enter {
@@ -718,46 +795,3 @@
718
795
  color-mix(in srgb, var(--chat-border) 55%, transparent) 100%
719
796
  );
720
797
  }
721
-
722
- /* -------------------------------------------------------------------------- */
723
- /* Layout containment — keeps chat inside host pages (admin templates, etc.) */
724
- /* -------------------------------------------------------------------------- */
725
-
726
- .chat-package-viewport,
727
- .chat-container-root,
728
- .chat-shell,
729
- .chat-message-canvas {
730
- max-height: 100%;
731
- }
732
-
733
- .chat-package-viewport {
734
- display: flex;
735
- flex-direction: column;
736
- min-height: 0;
737
- overflow: hidden;
738
- width: 100%;
739
- }
740
-
741
- .chat-container-root {
742
- display: flex;
743
- flex: 1 1 0%;
744
- flex-direction: column;
745
- min-height: 0;
746
- overflow: hidden;
747
- width: 100%;
748
- }
749
-
750
- .chat-shell {
751
- min-height: 0;
752
- }
753
-
754
- .chat-message-scroll {
755
- min-height: 0;
756
- overscroll-behavior: contain;
757
- -webkit-overflow-scrolling: touch;
758
- }
759
-
760
- .chat-sidebar-scroll {
761
- min-height: 0;
762
- overscroll-behavior: contain;
763
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@realtimexsco/live-chat",
3
- "version": "1.3.3",
3
+ "version": "1.4.0",
4
4
  "types": "./dist/index.d.ts",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
@@ -50,12 +50,14 @@
50
50
  "axios": "^1.13.6",
51
51
  "class-variance-authority": "^0.7.1",
52
52
  "clsx": "^2.1.1",
53
- "emoji-picker-react": "^4.18.0",
54
53
  "lucide-react": "^0.574.0",
55
54
  "radix-ui": "^1.4.3",
55
+ "react-day-picker": "^10.0.1",
56
56
  "socket.io-client": "^4.8.3",
57
57
  "tailwind-merge": "^3.4.1",
58
- "tw-animate-css": "^1.4.0"
58
+ "tw-animate-css": "^1.4.0",
59
+ "date-fns": "^4.4.0",
60
+ "emoji-picker-react": "^4.18.0"
59
61
  },
60
62
  "devDependencies": {
61
63
  "@semantic-release/changelog": "^6.0.3",