@realtimexsco/live-chat 1.3.4 → 1.4.1
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/firebase-messaging-sw.js +68 -0
- package/dist/index.cjs +1268 -292
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +155 -1
- package/dist/index.d.ts +155 -1
- package/dist/index.mjs +1231 -294
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +93 -59
- package/package.json +9 -2
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
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
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-
|
|
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-
|
|
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
|
|
470
|
-
|
|
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
|
+
"version": "1.4.1",
|
|
4
4
|
"types": "./dist/index.d.ts",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"**/*.css"
|
|
22
22
|
],
|
|
23
23
|
"peerDependencies": {
|
|
24
|
+
"firebase": ">=10",
|
|
24
25
|
"next": ">=13",
|
|
25
26
|
"react": ">=17",
|
|
26
27
|
"react-dom": ">=17",
|
|
@@ -37,6 +38,9 @@
|
|
|
37
38
|
},
|
|
38
39
|
"react-hot-toast": {
|
|
39
40
|
"optional": true
|
|
41
|
+
},
|
|
42
|
+
"firebase": {
|
|
43
|
+
"optional": true
|
|
40
44
|
}
|
|
41
45
|
},
|
|
42
46
|
"dependencies": {
|
|
@@ -50,9 +54,11 @@
|
|
|
50
54
|
"axios": "^1.13.6",
|
|
51
55
|
"class-variance-authority": "^0.7.1",
|
|
52
56
|
"clsx": "^2.1.1",
|
|
57
|
+
"date-fns": "^4.4.0",
|
|
53
58
|
"emoji-picker-react": "^4.18.0",
|
|
54
59
|
"lucide-react": "^0.574.0",
|
|
55
60
|
"radix-ui": "^1.4.3",
|
|
61
|
+
"react-day-picker": "^10.0.1",
|
|
56
62
|
"socket.io-client": "^4.8.3",
|
|
57
63
|
"tailwind-merge": "^3.4.1",
|
|
58
64
|
"tw-animate-css": "^1.4.0"
|
|
@@ -67,6 +73,7 @@
|
|
|
67
73
|
"autoprefixer": "^10.4.24",
|
|
68
74
|
"conventional-changelog-conventionalcommits": "^9.3.1",
|
|
69
75
|
"copyfiles": "^2.4.1",
|
|
76
|
+
"firebase": "^12.16.0",
|
|
70
77
|
"postcss": "^8.5.6",
|
|
71
78
|
"react-hot-toast": "^2.6.0",
|
|
72
79
|
"semantic-release": "^25.0.5",
|
|
@@ -77,7 +84,7 @@
|
|
|
77
84
|
"zustand": "^5.0.11"
|
|
78
85
|
},
|
|
79
86
|
"scripts": {
|
|
80
|
-
"build": "tsup && copyfiles -u 1 src/styles.css dist",
|
|
87
|
+
"build": "tsup && copyfiles -u 1 src/styles.css src/firebase-messaging-sw.js dist",
|
|
81
88
|
"postbuild": "node -e \"require('fs').accessSync('dist/index.d.ts')\"",
|
|
82
89
|
"dev": "tsup --watch",
|
|
83
90
|
"typecheck": "tsc --noEmit",
|