@poolse/react-ui 2.12.1 → 2.13.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/CHANGELOG.md +282 -260
- package/LICENSE +21 -21
- package/README.md +335 -335
- package/dist/index.cjs +217 -133
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +44 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.js +217 -133
- package/dist/index.js.map +1 -1
- package/dist/styles.css +2818 -2818
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -624,6 +624,14 @@ declare const ICONS: {
|
|
|
624
624
|
readonly vb: "0 0 24 24";
|
|
625
625
|
readonly d: "<path d=\"M6 9.2a6 6 0 0 1 12 0c0 4.8 1.4 6.3 1.9 6.8H4.1C4.6 15.5 6 14 6 9.2Z\"/><path d=\"M9.6 19.8a2.5 2.5 0 0 0 4.8 0\"/>";
|
|
626
626
|
};
|
|
627
|
+
readonly bluetooth: {
|
|
628
|
+
readonly vb: "0 0 24 24";
|
|
629
|
+
readonly d: "<path d=\"M7.5 7.5 16.5 16.5 12 21V3l4.5 4.5L7.5 16.5\"/>";
|
|
630
|
+
};
|
|
631
|
+
readonly 'camera-flip': {
|
|
632
|
+
readonly vb: "0 0 24 24";
|
|
633
|
+
readonly d: "<path d=\"M3 8.5a2 2 0 0 1 2-2h2.4l1.4-2h6.4l1.4 2H19a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-9Z\"/><path d=\"M14.6 13a2.6 2.6 0 0 1-4.5 1.8\"/><path d=\"M9.4 13a2.6 2.6 0 0 1 4.5-1.8\"/><path d=\"M13.9 9.6v1.7h-1.7\"/><path d=\"M10.1 16.4v-1.7h1.7\"/>";
|
|
634
|
+
};
|
|
627
635
|
readonly 'check-double': {
|
|
628
636
|
readonly vb: "0 0 24 24";
|
|
629
637
|
readonly d: "<path d=\"M2.5 12.8 6.9 17 15.4 7.6\"/><path d=\"M11.4 16.4 12.3 17.2 21 7.6\"/>";
|
|
@@ -640,6 +648,10 @@ declare const ICONS: {
|
|
|
640
648
|
readonly vb: "0 0 24 24";
|
|
641
649
|
readonly d: "<path d=\"M9 5 16 12 9 19\"/>";
|
|
642
650
|
};
|
|
651
|
+
readonly 'chevron-up': {
|
|
652
|
+
readonly vb: "0 0 24 24";
|
|
653
|
+
readonly d: "<path d=\"M6 14.5 12 8.5 18 14.5\"/>";
|
|
654
|
+
};
|
|
643
655
|
readonly close: {
|
|
644
656
|
readonly vb: "0 0 24 24";
|
|
645
657
|
readonly d: "<path d=\"M6 6 18 18M18 6 6 18\"/>";
|
|
@@ -668,6 +680,10 @@ declare const ICONS: {
|
|
|
668
680
|
readonly vb: "0 0 24 24";
|
|
669
681
|
readonly d: "<circle cx=\"12\" cy=\"12\" r=\"8.6\"/><circle cx=\"9\" cy=\"10\" r=\"1\" fill=\"currentColor\" stroke=\"none\"/><circle cx=\"15\" cy=\"10\" r=\"1\" fill=\"currentColor\" stroke=\"none\"/><path d=\"M8.4 14.2a4.6 4.6 0 0 0 7.2 0\"/>";
|
|
670
682
|
};
|
|
683
|
+
readonly headphones: {
|
|
684
|
+
readonly vb: "0 0 24 24";
|
|
685
|
+
readonly d: "<path d=\"M4 14v-2a8 8 0 0 1 16 0v2\"/><path d=\"M4 14h2.6a1.4 1.4 0 0 1 1.4 1.4v3.2A1.4 1.4 0 0 1 6.6 20H5.4A1.4 1.4 0 0 1 4 18.6Z\"/><path d=\"M20 14h-2.6a1.4 1.4 0 0 0-1.4 1.4v3.2A1.4 1.4 0 0 0 17.4 20h1.2A1.4 1.4 0 0 0 20 18.6Z\"/>";
|
|
686
|
+
};
|
|
671
687
|
readonly heart: {
|
|
672
688
|
readonly vb: "0 0 24 24";
|
|
673
689
|
readonly d: "<path d=\"M12 20.3 4.4 12.9a4.6 4.6 0 1 1 6.5-6.5l1.1 1.1 1.1-1.1a4.6 4.6 0 1 1 6.5 6.5L12 20.3Z\"/>";
|
|
@@ -704,6 +720,10 @@ declare const ICONS: {
|
|
|
704
720
|
readonly vb: "0 0 24 24";
|
|
705
721
|
readonly d: "<rect x=\"9\" y=\"2.6\" width=\"6\" height=\"11.2\" rx=\"3\"/><path d=\"M5.6 11.2a6.4 6.4 0 0 0 12.8 0\"/><path d=\"M12 17.6v3.4\"/><path d=\"M8.6 21h6.8\"/>";
|
|
706
722
|
};
|
|
723
|
+
readonly 'mic-off': {
|
|
724
|
+
readonly vb: "0 0 24 24";
|
|
725
|
+
readonly d: "<rect x=\"9\" y=\"2.6\" width=\"6\" height=\"11.2\" rx=\"3\"/><path d=\"M5.6 11.2a6.4 6.4 0 0 0 12.8 0\"/><path d=\"M12 17.6v3.4\"/><path d=\"M8.6 21h6.8\"/><path d=\"M3.6 3.2 20.4 20.8\"/>";
|
|
726
|
+
};
|
|
707
727
|
readonly 'more-h': {
|
|
708
728
|
readonly vb: "0 0 24 24";
|
|
709
729
|
readonly d: "<circle cx=\"5.4\" cy=\"12\" r=\"1.6\" fill=\"currentColor\" stroke=\"none\"/><circle cx=\"12\" cy=\"12\" r=\"1.6\" fill=\"currentColor\" stroke=\"none\"/><circle cx=\"18.6\" cy=\"12\" r=\"1.6\" fill=\"currentColor\" stroke=\"none\"/>";
|
|
@@ -712,6 +732,14 @@ declare const ICONS: {
|
|
|
712
732
|
readonly vb: "0 0 24 24";
|
|
713
733
|
readonly d: "<circle cx=\"12\" cy=\"5.4\" r=\"1.6\" fill=\"currentColor\" stroke=\"none\"/><circle cx=\"12\" cy=\"12\" r=\"1.6\" fill=\"currentColor\" stroke=\"none\"/><circle cx=\"12\" cy=\"18.6\" r=\"1.6\" fill=\"currentColor\" stroke=\"none\"/>";
|
|
714
734
|
};
|
|
735
|
+
readonly phone: {
|
|
736
|
+
readonly vb: "0 0 24 24";
|
|
737
|
+
readonly d: "<path d=\"M6.6 3.5h3l1.5 3.7-1.9 1.4a12.5 12.5 0 0 0 6.2 6.2l1.4-1.9 3.7 1.5v3a2 2 0 0 1-2.2 2A16.8 16.8 0 0 1 4.6 5.7a2 2 0 0 1 2-2.2Z\"/>";
|
|
738
|
+
};
|
|
739
|
+
readonly 'phone-off': {
|
|
740
|
+
readonly vb: "0 0 24 24";
|
|
741
|
+
readonly d: "<g transform=\"rotate(135 12 12)\"><path d=\"M6.6 3.5h3l1.5 3.7-1.9 1.4a12.5 12.5 0 0 0 6.2 6.2l1.4-1.9 3.7 1.5v3a2 2 0 0 1-2.2 2A16.8 16.8 0 0 1 4.6 5.7a2 2 0 0 1 2-2.2Z\"/></g>";
|
|
742
|
+
};
|
|
715
743
|
readonly pin: {
|
|
716
744
|
readonly vb: "0 0 24 24";
|
|
717
745
|
readonly d: "<path d=\"M9 3.4h6v1.8l-1 5.6 3 3.2H7l3-3.2-1-5.6V3.4Z\"/><path d=\"M12 17v3.6\"/>";
|
|
@@ -752,6 +780,14 @@ declare const ICONS: {
|
|
|
752
780
|
readonly vb: "0 0 24 24";
|
|
753
781
|
readonly d: "<path d=\"M4 7h9M17 7h3\"/><circle cx=\"15\" cy=\"7\" r=\"2.1\"/><path d=\"M4 17h3M11 17h9\"/><circle cx=\"9\" cy=\"17\" r=\"2.1\"/>";
|
|
754
782
|
};
|
|
783
|
+
readonly speaker: {
|
|
784
|
+
readonly vb: "0 0 24 24";
|
|
785
|
+
readonly d: "<path d=\"M4 9.5h3.2L12 5.4v13.2L7.2 14.5H4a1 1 0 0 1-1-1v-3a1 1 0 0 1 1-1Z\"/><path d=\"M15.6 9.2a4 4 0 0 1 0 5.6\"/><path d=\"M18.2 6.6a7.7 7.7 0 0 1 0 10.8\"/>";
|
|
786
|
+
};
|
|
787
|
+
readonly 'speaker-off': {
|
|
788
|
+
readonly vb: "0 0 24 24";
|
|
789
|
+
readonly d: "<path d=\"M4 9.5h3.2L12 5.4v13.2L7.2 14.5H4a1 1 0 0 1-1-1v-3a1 1 0 0 1 1-1Z\"/><path d=\"M16.4 9.6 21.4 14.4\"/><path d=\"M21.4 9.6 16.4 14.4\"/>";
|
|
790
|
+
};
|
|
755
791
|
readonly 'thumbs-up': {
|
|
756
792
|
readonly vb: "0 0 24 24";
|
|
757
793
|
readonly d: "<path d=\"M7 10.4V20H4.2V10.4Z\"/><path d=\"M7 10.4 11 3.2a2 2 0 0 1 1.9 2.2L12.4 9H18a2 2 0 0 1 2 2.4l-1.1 6A2 2 0 0 1 16.9 20H7\"/>";
|
|
@@ -776,6 +812,14 @@ declare const ICONS: {
|
|
|
776
812
|
readonly vb: "0 0 24 24";
|
|
777
813
|
readonly d: "<circle cx=\"9\" cy=\"8\" r=\"3.6\"/><path d=\"M2.6 20a6.4 6.4 0 0 1 12.8 0\"/><path d=\"M15.8 4.7a3.6 3.6 0 0 1 0 6.6\"/><path d=\"M17.6 20a6.4 6.4 0 0 0-3.1-5.5\"/>";
|
|
778
814
|
};
|
|
815
|
+
readonly video: {
|
|
816
|
+
readonly vb: "0 0 24 24";
|
|
817
|
+
readonly d: "<rect x=\"2.6\" y=\"6\" width=\"13\" height=\"12\" rx=\"2.4\"/><path d=\"M15.6 11.2 21.4 8v8l-5.8-3.2Z\"/>";
|
|
818
|
+
};
|
|
819
|
+
readonly 'video-off': {
|
|
820
|
+
readonly vb: "0 0 24 24";
|
|
821
|
+
readonly d: "<rect x=\"2.6\" y=\"6\" width=\"13\" height=\"12\" rx=\"2.4\"/><path d=\"M15.6 11.2 21.4 8v8l-5.8-3.2Z\"/><path d=\"M3.6 3.2 20.4 20.8\"/>";
|
|
822
|
+
};
|
|
779
823
|
readonly webhook: {
|
|
780
824
|
readonly vb: "0 0 24 24";
|
|
781
825
|
readonly d: "<circle cx=\"6\" cy=\"6\" r=\"2.6\"/><circle cx=\"18\" cy=\"9\" r=\"2.6\"/><circle cx=\"9.5\" cy=\"18\" r=\"2.6\"/><path d=\"M7.9 7.9 12 12l3.7-1.5\"/><path d=\"M11.6 12.7 9.8 16\"/>";
|
package/dist/index.d.ts
CHANGED
|
@@ -624,6 +624,14 @@ declare const ICONS: {
|
|
|
624
624
|
readonly vb: "0 0 24 24";
|
|
625
625
|
readonly d: "<path d=\"M6 9.2a6 6 0 0 1 12 0c0 4.8 1.4 6.3 1.9 6.8H4.1C4.6 15.5 6 14 6 9.2Z\"/><path d=\"M9.6 19.8a2.5 2.5 0 0 0 4.8 0\"/>";
|
|
626
626
|
};
|
|
627
|
+
readonly bluetooth: {
|
|
628
|
+
readonly vb: "0 0 24 24";
|
|
629
|
+
readonly d: "<path d=\"M7.5 7.5 16.5 16.5 12 21V3l4.5 4.5L7.5 16.5\"/>";
|
|
630
|
+
};
|
|
631
|
+
readonly 'camera-flip': {
|
|
632
|
+
readonly vb: "0 0 24 24";
|
|
633
|
+
readonly d: "<path d=\"M3 8.5a2 2 0 0 1 2-2h2.4l1.4-2h6.4l1.4 2H19a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-9Z\"/><path d=\"M14.6 13a2.6 2.6 0 0 1-4.5 1.8\"/><path d=\"M9.4 13a2.6 2.6 0 0 1 4.5-1.8\"/><path d=\"M13.9 9.6v1.7h-1.7\"/><path d=\"M10.1 16.4v-1.7h1.7\"/>";
|
|
634
|
+
};
|
|
627
635
|
readonly 'check-double': {
|
|
628
636
|
readonly vb: "0 0 24 24";
|
|
629
637
|
readonly d: "<path d=\"M2.5 12.8 6.9 17 15.4 7.6\"/><path d=\"M11.4 16.4 12.3 17.2 21 7.6\"/>";
|
|
@@ -640,6 +648,10 @@ declare const ICONS: {
|
|
|
640
648
|
readonly vb: "0 0 24 24";
|
|
641
649
|
readonly d: "<path d=\"M9 5 16 12 9 19\"/>";
|
|
642
650
|
};
|
|
651
|
+
readonly 'chevron-up': {
|
|
652
|
+
readonly vb: "0 0 24 24";
|
|
653
|
+
readonly d: "<path d=\"M6 14.5 12 8.5 18 14.5\"/>";
|
|
654
|
+
};
|
|
643
655
|
readonly close: {
|
|
644
656
|
readonly vb: "0 0 24 24";
|
|
645
657
|
readonly d: "<path d=\"M6 6 18 18M18 6 6 18\"/>";
|
|
@@ -668,6 +680,10 @@ declare const ICONS: {
|
|
|
668
680
|
readonly vb: "0 0 24 24";
|
|
669
681
|
readonly d: "<circle cx=\"12\" cy=\"12\" r=\"8.6\"/><circle cx=\"9\" cy=\"10\" r=\"1\" fill=\"currentColor\" stroke=\"none\"/><circle cx=\"15\" cy=\"10\" r=\"1\" fill=\"currentColor\" stroke=\"none\"/><path d=\"M8.4 14.2a4.6 4.6 0 0 0 7.2 0\"/>";
|
|
670
682
|
};
|
|
683
|
+
readonly headphones: {
|
|
684
|
+
readonly vb: "0 0 24 24";
|
|
685
|
+
readonly d: "<path d=\"M4 14v-2a8 8 0 0 1 16 0v2\"/><path d=\"M4 14h2.6a1.4 1.4 0 0 1 1.4 1.4v3.2A1.4 1.4 0 0 1 6.6 20H5.4A1.4 1.4 0 0 1 4 18.6Z\"/><path d=\"M20 14h-2.6a1.4 1.4 0 0 0-1.4 1.4v3.2A1.4 1.4 0 0 0 17.4 20h1.2A1.4 1.4 0 0 0 20 18.6Z\"/>";
|
|
686
|
+
};
|
|
671
687
|
readonly heart: {
|
|
672
688
|
readonly vb: "0 0 24 24";
|
|
673
689
|
readonly d: "<path d=\"M12 20.3 4.4 12.9a4.6 4.6 0 1 1 6.5-6.5l1.1 1.1 1.1-1.1a4.6 4.6 0 1 1 6.5 6.5L12 20.3Z\"/>";
|
|
@@ -704,6 +720,10 @@ declare const ICONS: {
|
|
|
704
720
|
readonly vb: "0 0 24 24";
|
|
705
721
|
readonly d: "<rect x=\"9\" y=\"2.6\" width=\"6\" height=\"11.2\" rx=\"3\"/><path d=\"M5.6 11.2a6.4 6.4 0 0 0 12.8 0\"/><path d=\"M12 17.6v3.4\"/><path d=\"M8.6 21h6.8\"/>";
|
|
706
722
|
};
|
|
723
|
+
readonly 'mic-off': {
|
|
724
|
+
readonly vb: "0 0 24 24";
|
|
725
|
+
readonly d: "<rect x=\"9\" y=\"2.6\" width=\"6\" height=\"11.2\" rx=\"3\"/><path d=\"M5.6 11.2a6.4 6.4 0 0 0 12.8 0\"/><path d=\"M12 17.6v3.4\"/><path d=\"M8.6 21h6.8\"/><path d=\"M3.6 3.2 20.4 20.8\"/>";
|
|
726
|
+
};
|
|
707
727
|
readonly 'more-h': {
|
|
708
728
|
readonly vb: "0 0 24 24";
|
|
709
729
|
readonly d: "<circle cx=\"5.4\" cy=\"12\" r=\"1.6\" fill=\"currentColor\" stroke=\"none\"/><circle cx=\"12\" cy=\"12\" r=\"1.6\" fill=\"currentColor\" stroke=\"none\"/><circle cx=\"18.6\" cy=\"12\" r=\"1.6\" fill=\"currentColor\" stroke=\"none\"/>";
|
|
@@ -712,6 +732,14 @@ declare const ICONS: {
|
|
|
712
732
|
readonly vb: "0 0 24 24";
|
|
713
733
|
readonly d: "<circle cx=\"12\" cy=\"5.4\" r=\"1.6\" fill=\"currentColor\" stroke=\"none\"/><circle cx=\"12\" cy=\"12\" r=\"1.6\" fill=\"currentColor\" stroke=\"none\"/><circle cx=\"12\" cy=\"18.6\" r=\"1.6\" fill=\"currentColor\" stroke=\"none\"/>";
|
|
714
734
|
};
|
|
735
|
+
readonly phone: {
|
|
736
|
+
readonly vb: "0 0 24 24";
|
|
737
|
+
readonly d: "<path d=\"M6.6 3.5h3l1.5 3.7-1.9 1.4a12.5 12.5 0 0 0 6.2 6.2l1.4-1.9 3.7 1.5v3a2 2 0 0 1-2.2 2A16.8 16.8 0 0 1 4.6 5.7a2 2 0 0 1 2-2.2Z\"/>";
|
|
738
|
+
};
|
|
739
|
+
readonly 'phone-off': {
|
|
740
|
+
readonly vb: "0 0 24 24";
|
|
741
|
+
readonly d: "<g transform=\"rotate(135 12 12)\"><path d=\"M6.6 3.5h3l1.5 3.7-1.9 1.4a12.5 12.5 0 0 0 6.2 6.2l1.4-1.9 3.7 1.5v3a2 2 0 0 1-2.2 2A16.8 16.8 0 0 1 4.6 5.7a2 2 0 0 1 2-2.2Z\"/></g>";
|
|
742
|
+
};
|
|
715
743
|
readonly pin: {
|
|
716
744
|
readonly vb: "0 0 24 24";
|
|
717
745
|
readonly d: "<path d=\"M9 3.4h6v1.8l-1 5.6 3 3.2H7l3-3.2-1-5.6V3.4Z\"/><path d=\"M12 17v3.6\"/>";
|
|
@@ -752,6 +780,14 @@ declare const ICONS: {
|
|
|
752
780
|
readonly vb: "0 0 24 24";
|
|
753
781
|
readonly d: "<path d=\"M4 7h9M17 7h3\"/><circle cx=\"15\" cy=\"7\" r=\"2.1\"/><path d=\"M4 17h3M11 17h9\"/><circle cx=\"9\" cy=\"17\" r=\"2.1\"/>";
|
|
754
782
|
};
|
|
783
|
+
readonly speaker: {
|
|
784
|
+
readonly vb: "0 0 24 24";
|
|
785
|
+
readonly d: "<path d=\"M4 9.5h3.2L12 5.4v13.2L7.2 14.5H4a1 1 0 0 1-1-1v-3a1 1 0 0 1 1-1Z\"/><path d=\"M15.6 9.2a4 4 0 0 1 0 5.6\"/><path d=\"M18.2 6.6a7.7 7.7 0 0 1 0 10.8\"/>";
|
|
786
|
+
};
|
|
787
|
+
readonly 'speaker-off': {
|
|
788
|
+
readonly vb: "0 0 24 24";
|
|
789
|
+
readonly d: "<path d=\"M4 9.5h3.2L12 5.4v13.2L7.2 14.5H4a1 1 0 0 1-1-1v-3a1 1 0 0 1 1-1Z\"/><path d=\"M16.4 9.6 21.4 14.4\"/><path d=\"M21.4 9.6 16.4 14.4\"/>";
|
|
790
|
+
};
|
|
755
791
|
readonly 'thumbs-up': {
|
|
756
792
|
readonly vb: "0 0 24 24";
|
|
757
793
|
readonly d: "<path d=\"M7 10.4V20H4.2V10.4Z\"/><path d=\"M7 10.4 11 3.2a2 2 0 0 1 1.9 2.2L12.4 9H18a2 2 0 0 1 2 2.4l-1.1 6A2 2 0 0 1 16.9 20H7\"/>";
|
|
@@ -776,6 +812,14 @@ declare const ICONS: {
|
|
|
776
812
|
readonly vb: "0 0 24 24";
|
|
777
813
|
readonly d: "<circle cx=\"9\" cy=\"8\" r=\"3.6\"/><path d=\"M2.6 20a6.4 6.4 0 0 1 12.8 0\"/><path d=\"M15.8 4.7a3.6 3.6 0 0 1 0 6.6\"/><path d=\"M17.6 20a6.4 6.4 0 0 0-3.1-5.5\"/>";
|
|
778
814
|
};
|
|
815
|
+
readonly video: {
|
|
816
|
+
readonly vb: "0 0 24 24";
|
|
817
|
+
readonly d: "<rect x=\"2.6\" y=\"6\" width=\"13\" height=\"12\" rx=\"2.4\"/><path d=\"M15.6 11.2 21.4 8v8l-5.8-3.2Z\"/>";
|
|
818
|
+
};
|
|
819
|
+
readonly 'video-off': {
|
|
820
|
+
readonly vb: "0 0 24 24";
|
|
821
|
+
readonly d: "<rect x=\"2.6\" y=\"6\" width=\"13\" height=\"12\" rx=\"2.4\"/><path d=\"M15.6 11.2 21.4 8v8l-5.8-3.2Z\"/><path d=\"M3.6 3.2 20.4 20.8\"/>";
|
|
822
|
+
};
|
|
779
823
|
readonly webhook: {
|
|
780
824
|
readonly vb: "0 0 24 24";
|
|
781
825
|
readonly d: "<circle cx=\"6\" cy=\"6\" r=\"2.6\"/><circle cx=\"18\" cy=\"9\" r=\"2.6\"/><circle cx=\"9.5\" cy=\"18\" r=\"2.6\"/><path d=\"M7.9 7.9 12 12l3.7-1.5\"/><path d=\"M11.6 12.7 9.8 16\"/>";
|
package/dist/index.js
CHANGED
|
@@ -6,112 +6,6 @@ import ReactMarkdown from 'react-markdown';
|
|
|
6
6
|
import remarkGfm from 'remark-gfm';
|
|
7
7
|
|
|
8
8
|
// src/CallVideoGrid.tsx
|
|
9
|
-
function CallVideoGrid({ participants, labelFor, className }) {
|
|
10
|
-
const label = labelFor ?? ((id) => `User ${id.slice(0, 6)}`);
|
|
11
|
-
if (participants.length === 0) return null;
|
|
12
|
-
return /* @__PURE__ */ jsx("div", { className: className ?? "callgrid", children: participants.map((participant) => /* @__PURE__ */ jsx(CallVideoTile, { participant, label }, participant.userId)) });
|
|
13
|
-
}
|
|
14
|
-
function CallVideoTile({
|
|
15
|
-
participant,
|
|
16
|
-
label
|
|
17
|
-
}) {
|
|
18
|
-
const ref = useRef(null);
|
|
19
|
-
const track = participant.videoTrack;
|
|
20
|
-
useEffect(() => {
|
|
21
|
-
const element = ref.current;
|
|
22
|
-
if (!element || !track) return;
|
|
23
|
-
track.attach(element);
|
|
24
|
-
return () => {
|
|
25
|
-
track.detach(element);
|
|
26
|
-
};
|
|
27
|
-
}, [track]);
|
|
28
|
-
return /* @__PURE__ */ jsxs("div", { className: `callgrid__tile${participant.speaking ? " callgrid__tile--speaking" : ""}`, children: [
|
|
29
|
-
track ? /* @__PURE__ */ jsx(
|
|
30
|
-
"video",
|
|
31
|
-
{
|
|
32
|
-
ref,
|
|
33
|
-
className: "callgrid__video",
|
|
34
|
-
autoPlay: true,
|
|
35
|
-
playsInline: true,
|
|
36
|
-
muted: participant.isSelf,
|
|
37
|
-
style: participant.isSelf ? { transform: "scaleX(-1)" } : void 0
|
|
38
|
-
}
|
|
39
|
-
) : /* @__PURE__ */ jsx("div", { className: "callgrid__placeholder", "aria-hidden": "true", children: label(participant.userId).slice(0, 1).toUpperCase() }),
|
|
40
|
-
/* @__PURE__ */ jsxs("div", { className: "callgrid__caption", children: [
|
|
41
|
-
/* @__PURE__ */ jsx("span", { className: "callgrid__name", children: participant.isSelf ? "You" : participant.name ?? label(participant.userId) }),
|
|
42
|
-
!participant.micEnabled && /* @__PURE__ */ jsx("span", { className: "callgrid__muted", children: "muted" })
|
|
43
|
-
] })
|
|
44
|
-
] });
|
|
45
|
-
}
|
|
46
|
-
var FONT_HREF = "https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,600;12..96,800&family=Hanken+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap";
|
|
47
|
-
var FONT_HREF_PRECONNECT_GOOGLE = "https://fonts.googleapis.com";
|
|
48
|
-
var FONT_HREF_PRECONNECT_STATIC = "https://fonts.gstatic.com";
|
|
49
|
-
var MARKER_ATTR = "data-poolse-fonts";
|
|
50
|
-
function injectFontLinks() {
|
|
51
|
-
if (typeof document === "undefined") return;
|
|
52
|
-
if (document.querySelector(`link[${MARKER_ATTR}]`)) return;
|
|
53
|
-
const head = document.head;
|
|
54
|
-
const pre1 = document.createElement("link");
|
|
55
|
-
pre1.rel = "preconnect";
|
|
56
|
-
pre1.href = FONT_HREF_PRECONNECT_GOOGLE;
|
|
57
|
-
pre1.setAttribute(MARKER_ATTR, "preconnect");
|
|
58
|
-
head.appendChild(pre1);
|
|
59
|
-
const pre2 = document.createElement("link");
|
|
60
|
-
pre2.rel = "preconnect";
|
|
61
|
-
pre2.href = FONT_HREF_PRECONNECT_STATIC;
|
|
62
|
-
pre2.crossOrigin = "anonymous";
|
|
63
|
-
pre2.setAttribute(MARKER_ATTR, "preconnect");
|
|
64
|
-
head.appendChild(pre2);
|
|
65
|
-
const font = document.createElement("link");
|
|
66
|
-
font.rel = "stylesheet";
|
|
67
|
-
font.href = FONT_HREF;
|
|
68
|
-
font.setAttribute(MARKER_ATTR, "stylesheet");
|
|
69
|
-
head.appendChild(font);
|
|
70
|
-
}
|
|
71
|
-
function usePoolseFonts(enabled = true) {
|
|
72
|
-
useEffect(() => {
|
|
73
|
-
if (!enabled) return;
|
|
74
|
-
injectFontLinks();
|
|
75
|
-
}, [enabled]);
|
|
76
|
-
}
|
|
77
|
-
function PoolseFonts() {
|
|
78
|
-
usePoolseFonts(true);
|
|
79
|
-
return null;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
// src/listAutocomplete.ts
|
|
83
|
-
var UNORDERED_RE = /^(\s*)([-*+]) (.*)$/;
|
|
84
|
-
var ORDERED_RE = /^(\s*)(\d+)\. (.*)$/;
|
|
85
|
-
function handleListEnter(value, caret) {
|
|
86
|
-
const lineStart = value.lastIndexOf("\n", caret - 1) + 1;
|
|
87
|
-
const lineEnd = (() => {
|
|
88
|
-
const nl = value.indexOf("\n", caret);
|
|
89
|
-
return nl === -1 ? value.length : nl;
|
|
90
|
-
})();
|
|
91
|
-
const currentLine = value.slice(lineStart, lineEnd);
|
|
92
|
-
const unordered = UNORDERED_RE.exec(currentLine);
|
|
93
|
-
const ordered = ORDERED_RE.exec(currentLine);
|
|
94
|
-
const match = unordered ?? ordered;
|
|
95
|
-
if (!match) return null;
|
|
96
|
-
const indent = match[1] ?? "";
|
|
97
|
-
const marker = match[2] ?? "";
|
|
98
|
-
const content = match[3] ?? "";
|
|
99
|
-
if (content === "") {
|
|
100
|
-
const before2 = value.slice(0, lineStart);
|
|
101
|
-
const after2 = value.slice(lineEnd);
|
|
102
|
-
return { kind: "end", value: before2 + after2, caret: lineStart };
|
|
103
|
-
}
|
|
104
|
-
const nextMarker = ordered ? `${parseInt(marker, 10) + 1}.` : marker;
|
|
105
|
-
const prefix = `
|
|
106
|
-
${indent}${nextMarker} `;
|
|
107
|
-
const before = value.slice(0, caret);
|
|
108
|
-
const after = value.slice(caret);
|
|
109
|
-
return {
|
|
110
|
-
kind: "continue",
|
|
111
|
-
value: before + prefix + after,
|
|
112
|
-
caret: caret + prefix.length
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
9
|
|
|
116
10
|
// src/icons-data.ts
|
|
117
11
|
var ICONS = {
|
|
@@ -123,6 +17,14 @@ var ICONS = {
|
|
|
123
17
|
vb: "0 0 24 24",
|
|
124
18
|
d: '<path d="M6 9.2a6 6 0 0 1 12 0c0 4.8 1.4 6.3 1.9 6.8H4.1C4.6 15.5 6 14 6 9.2Z"/><path d="M9.6 19.8a2.5 2.5 0 0 0 4.8 0"/>'
|
|
125
19
|
},
|
|
20
|
+
bluetooth: {
|
|
21
|
+
vb: "0 0 24 24",
|
|
22
|
+
d: '<path d="M7.5 7.5 16.5 16.5 12 21V3l4.5 4.5L7.5 16.5"/>'
|
|
23
|
+
},
|
|
24
|
+
"camera-flip": {
|
|
25
|
+
vb: "0 0 24 24",
|
|
26
|
+
d: '<path d="M3 8.5a2 2 0 0 1 2-2h2.4l1.4-2h6.4l1.4 2H19a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-9Z"/><path d="M14.6 13a2.6 2.6 0 0 1-4.5 1.8"/><path d="M9.4 13a2.6 2.6 0 0 1 4.5-1.8"/><path d="M13.9 9.6v1.7h-1.7"/><path d="M10.1 16.4v-1.7h1.7"/>'
|
|
27
|
+
},
|
|
126
28
|
"check-double": {
|
|
127
29
|
vb: "0 0 24 24",
|
|
128
30
|
d: '<path d="M2.5 12.8 6.9 17 15.4 7.6"/><path d="M11.4 16.4 12.3 17.2 21 7.6"/>'
|
|
@@ -139,6 +41,10 @@ var ICONS = {
|
|
|
139
41
|
vb: "0 0 24 24",
|
|
140
42
|
d: '<path d="M9 5 16 12 9 19"/>'
|
|
141
43
|
},
|
|
44
|
+
"chevron-up": {
|
|
45
|
+
vb: "0 0 24 24",
|
|
46
|
+
d: '<path d="M6 14.5 12 8.5 18 14.5"/>'
|
|
47
|
+
},
|
|
142
48
|
close: {
|
|
143
49
|
vb: "0 0 24 24",
|
|
144
50
|
d: '<path d="M6 6 18 18M18 6 6 18"/>'
|
|
@@ -167,6 +73,10 @@ var ICONS = {
|
|
|
167
73
|
vb: "0 0 24 24",
|
|
168
74
|
d: '<circle cx="12" cy="12" r="8.6"/><circle cx="9" cy="10" r="1" fill="currentColor" stroke="none"/><circle cx="15" cy="10" r="1" fill="currentColor" stroke="none"/><path d="M8.4 14.2a4.6 4.6 0 0 0 7.2 0"/>'
|
|
169
75
|
},
|
|
76
|
+
headphones: {
|
|
77
|
+
vb: "0 0 24 24",
|
|
78
|
+
d: '<path d="M4 14v-2a8 8 0 0 1 16 0v2"/><path d="M4 14h2.6a1.4 1.4 0 0 1 1.4 1.4v3.2A1.4 1.4 0 0 1 6.6 20H5.4A1.4 1.4 0 0 1 4 18.6Z"/><path d="M20 14h-2.6a1.4 1.4 0 0 0-1.4 1.4v3.2A1.4 1.4 0 0 0 17.4 20h1.2A1.4 1.4 0 0 0 20 18.6Z"/>'
|
|
79
|
+
},
|
|
170
80
|
heart: {
|
|
171
81
|
vb: "0 0 24 24",
|
|
172
82
|
d: '<path d="M12 20.3 4.4 12.9a4.6 4.6 0 1 1 6.5-6.5l1.1 1.1 1.1-1.1a4.6 4.6 0 1 1 6.5 6.5L12 20.3Z"/>'
|
|
@@ -203,6 +113,10 @@ var ICONS = {
|
|
|
203
113
|
vb: "0 0 24 24",
|
|
204
114
|
d: '<rect x="9" y="2.6" width="6" height="11.2" rx="3"/><path d="M5.6 11.2a6.4 6.4 0 0 0 12.8 0"/><path d="M12 17.6v3.4"/><path d="M8.6 21h6.8"/>'
|
|
205
115
|
},
|
|
116
|
+
"mic-off": {
|
|
117
|
+
vb: "0 0 24 24",
|
|
118
|
+
d: '<rect x="9" y="2.6" width="6" height="11.2" rx="3"/><path d="M5.6 11.2a6.4 6.4 0 0 0 12.8 0"/><path d="M12 17.6v3.4"/><path d="M8.6 21h6.8"/><path d="M3.6 3.2 20.4 20.8"/>'
|
|
119
|
+
},
|
|
206
120
|
"more-h": {
|
|
207
121
|
vb: "0 0 24 24",
|
|
208
122
|
d: '<circle cx="5.4" cy="12" r="1.6" fill="currentColor" stroke="none"/><circle cx="12" cy="12" r="1.6" fill="currentColor" stroke="none"/><circle cx="18.6" cy="12" r="1.6" fill="currentColor" stroke="none"/>'
|
|
@@ -211,6 +125,14 @@ var ICONS = {
|
|
|
211
125
|
vb: "0 0 24 24",
|
|
212
126
|
d: '<circle cx="12" cy="5.4" r="1.6" fill="currentColor" stroke="none"/><circle cx="12" cy="12" r="1.6" fill="currentColor" stroke="none"/><circle cx="12" cy="18.6" r="1.6" fill="currentColor" stroke="none"/>'
|
|
213
127
|
},
|
|
128
|
+
phone: {
|
|
129
|
+
vb: "0 0 24 24",
|
|
130
|
+
d: '<path d="M6.6 3.5h3l1.5 3.7-1.9 1.4a12.5 12.5 0 0 0 6.2 6.2l1.4-1.9 3.7 1.5v3a2 2 0 0 1-2.2 2A16.8 16.8 0 0 1 4.6 5.7a2 2 0 0 1 2-2.2Z"/>'
|
|
131
|
+
},
|
|
132
|
+
"phone-off": {
|
|
133
|
+
vb: "0 0 24 24",
|
|
134
|
+
d: '<g transform="rotate(135 12 12)"><path d="M6.6 3.5h3l1.5 3.7-1.9 1.4a12.5 12.5 0 0 0 6.2 6.2l1.4-1.9 3.7 1.5v3a2 2 0 0 1-2.2 2A16.8 16.8 0 0 1 4.6 5.7a2 2 0 0 1 2-2.2Z"/></g>'
|
|
135
|
+
},
|
|
214
136
|
pin: {
|
|
215
137
|
vb: "0 0 24 24",
|
|
216
138
|
d: '<path d="M9 3.4h6v1.8l-1 5.6 3 3.2H7l3-3.2-1-5.6V3.4Z"/><path d="M12 17v3.6"/>'
|
|
@@ -251,6 +173,14 @@ var ICONS = {
|
|
|
251
173
|
vb: "0 0 24 24",
|
|
252
174
|
d: '<path d="M4 7h9M17 7h3"/><circle cx="15" cy="7" r="2.1"/><path d="M4 17h3M11 17h9"/><circle cx="9" cy="17" r="2.1"/>'
|
|
253
175
|
},
|
|
176
|
+
speaker: {
|
|
177
|
+
vb: "0 0 24 24",
|
|
178
|
+
d: '<path d="M4 9.5h3.2L12 5.4v13.2L7.2 14.5H4a1 1 0 0 1-1-1v-3a1 1 0 0 1 1-1Z"/><path d="M15.6 9.2a4 4 0 0 1 0 5.6"/><path d="M18.2 6.6a7.7 7.7 0 0 1 0 10.8"/>'
|
|
179
|
+
},
|
|
180
|
+
"speaker-off": {
|
|
181
|
+
vb: "0 0 24 24",
|
|
182
|
+
d: '<path d="M4 9.5h3.2L12 5.4v13.2L7.2 14.5H4a1 1 0 0 1-1-1v-3a1 1 0 0 1 1-1Z"/><path d="M16.4 9.6 21.4 14.4"/><path d="M21.4 9.6 16.4 14.4"/>'
|
|
183
|
+
},
|
|
254
184
|
"thumbs-up": {
|
|
255
185
|
vb: "0 0 24 24",
|
|
256
186
|
d: '<path d="M7 10.4V20H4.2V10.4Z"/><path d="M7 10.4 11 3.2a2 2 0 0 1 1.9 2.2L12.4 9H18a2 2 0 0 1 2 2.4l-1.1 6A2 2 0 0 1 16.9 20H7"/>'
|
|
@@ -275,6 +205,14 @@ var ICONS = {
|
|
|
275
205
|
vb: "0 0 24 24",
|
|
276
206
|
d: '<circle cx="9" cy="8" r="3.6"/><path d="M2.6 20a6.4 6.4 0 0 1 12.8 0"/><path d="M15.8 4.7a3.6 3.6 0 0 1 0 6.6"/><path d="M17.6 20a6.4 6.4 0 0 0-3.1-5.5"/>'
|
|
277
207
|
},
|
|
208
|
+
video: {
|
|
209
|
+
vb: "0 0 24 24",
|
|
210
|
+
d: '<rect x="2.6" y="6" width="13" height="12" rx="2.4"/><path d="M15.6 11.2 21.4 8v8l-5.8-3.2Z"/>'
|
|
211
|
+
},
|
|
212
|
+
"video-off": {
|
|
213
|
+
vb: "0 0 24 24",
|
|
214
|
+
d: '<rect x="2.6" y="6" width="13" height="12" rx="2.4"/><path d="M15.6 11.2 21.4 8v8l-5.8-3.2Z"/><path d="M3.6 3.2 20.4 20.8"/>'
|
|
215
|
+
},
|
|
278
216
|
webhook: {
|
|
279
217
|
vb: "0 0 24 24",
|
|
280
218
|
d: '<circle cx="6" cy="6" r="2.6"/><circle cx="18" cy="9" r="2.6"/><circle cx="9.5" cy="18" r="2.6"/><path d="M7.9 7.9 12 12l3.7-1.5"/><path d="M11.6 12.7 9.8 16"/>'
|
|
@@ -317,6 +255,179 @@ function PoolseIcon({
|
|
|
317
255
|
}
|
|
318
256
|
);
|
|
319
257
|
}
|
|
258
|
+
|
|
259
|
+
// src/userColor.ts
|
|
260
|
+
var PALETTE = [
|
|
261
|
+
"#6366f1",
|
|
262
|
+
// indigo
|
|
263
|
+
"#10b981",
|
|
264
|
+
// emerald
|
|
265
|
+
"#f59e0b",
|
|
266
|
+
// amber
|
|
267
|
+
"#ec4899",
|
|
268
|
+
// rose
|
|
269
|
+
"#0ea5e9",
|
|
270
|
+
// sky
|
|
271
|
+
"#8b5cf6",
|
|
272
|
+
// violet
|
|
273
|
+
"#14b8a6",
|
|
274
|
+
// teal
|
|
275
|
+
"#d946ef"
|
|
276
|
+
// fuchsia
|
|
277
|
+
];
|
|
278
|
+
function userColor(userId) {
|
|
279
|
+
let h = 0;
|
|
280
|
+
for (let i = 0; i < userId.length; i++) {
|
|
281
|
+
h = h * 31 + userId.charCodeAt(i) | 0;
|
|
282
|
+
}
|
|
283
|
+
return PALETTE[Math.abs(h) % PALETTE.length];
|
|
284
|
+
}
|
|
285
|
+
function CallVideoGrid({ participants, labelFor, className }) {
|
|
286
|
+
const label = labelFor ?? ((id) => `User ${id.slice(0, 6)}`);
|
|
287
|
+
const self = participants.find((p) => p.isSelf) ?? null;
|
|
288
|
+
const others = useMemo(() => participants.filter((p) => !p.isSelf), [participants]);
|
|
289
|
+
if (participants.length === 0) return null;
|
|
290
|
+
if (others.length <= 1) {
|
|
291
|
+
const spotlight = others[0] ?? self;
|
|
292
|
+
if (!spotlight) return null;
|
|
293
|
+
return /* @__PURE__ */ jsxs("div", { className: className ?? "callstage callstage--solo", children: [
|
|
294
|
+
/* @__PURE__ */ jsx(CallVideoTile, { participant: spotlight, label, bleed: true }),
|
|
295
|
+
self && others.length === 1 && /* @__PURE__ */ jsx("div", { className: "callstage__pip", children: /* @__PURE__ */ jsx(CallVideoTile, { participant: self, label, hideName: true }) })
|
|
296
|
+
] });
|
|
297
|
+
}
|
|
298
|
+
const tiles = [...others, ...self ? [self] : []];
|
|
299
|
+
return /* @__PURE__ */ jsx(
|
|
300
|
+
"div",
|
|
301
|
+
{
|
|
302
|
+
className: className ?? "callgrid",
|
|
303
|
+
"data-count": tiles.length > 6 ? "many" : String(tiles.length),
|
|
304
|
+
children: tiles.map((participant) => /* @__PURE__ */ jsx(CallVideoTile, { participant, label }, participant.userId))
|
|
305
|
+
}
|
|
306
|
+
);
|
|
307
|
+
}
|
|
308
|
+
function CallVideoTile({
|
|
309
|
+
participant,
|
|
310
|
+
label,
|
|
311
|
+
bleed = false,
|
|
312
|
+
hideName = false
|
|
313
|
+
}) {
|
|
314
|
+
const ref = useRef(null);
|
|
315
|
+
const track = participant.videoTrack;
|
|
316
|
+
const name = participant.isSelf ? "You" : participant.name ?? label(participant.userId);
|
|
317
|
+
useEffect(() => {
|
|
318
|
+
const element = ref.current;
|
|
319
|
+
if (!element || !track) return;
|
|
320
|
+
track.attach(element);
|
|
321
|
+
return () => {
|
|
322
|
+
track.detach(element);
|
|
323
|
+
};
|
|
324
|
+
}, [track]);
|
|
325
|
+
const classes = [
|
|
326
|
+
"callgrid__tile",
|
|
327
|
+
bleed ? "callgrid__tile--bleed" : "",
|
|
328
|
+
participant.speaking ? "callgrid__tile--speaking" : ""
|
|
329
|
+
].filter(Boolean).join(" ");
|
|
330
|
+
return /* @__PURE__ */ jsxs("div", { className: classes, children: [
|
|
331
|
+
track ? /* @__PURE__ */ jsx(
|
|
332
|
+
"video",
|
|
333
|
+
{
|
|
334
|
+
ref,
|
|
335
|
+
className: "callgrid__video",
|
|
336
|
+
autoPlay: true,
|
|
337
|
+
playsInline: true,
|
|
338
|
+
muted: participant.isSelf,
|
|
339
|
+
style: participant.isSelf ? { transform: "scaleX(-1)" } : void 0
|
|
340
|
+
}
|
|
341
|
+
) : /* @__PURE__ */ jsx("div", { className: "callgrid__placeholder", children: /* @__PURE__ */ jsx(
|
|
342
|
+
"span",
|
|
343
|
+
{
|
|
344
|
+
className: "callgrid__avatar",
|
|
345
|
+
style: { background: userColor(participant.userId) },
|
|
346
|
+
"aria-hidden": "true",
|
|
347
|
+
children: initialsOf(name)
|
|
348
|
+
}
|
|
349
|
+
) }),
|
|
350
|
+
!hideName && /* @__PURE__ */ jsxs("div", { className: "callgrid__caption", children: [
|
|
351
|
+
!participant.micEnabled && /* @__PURE__ */ jsx(PoolseIcon, { name: "mic-off", size: 13, label: "muted", className: "callgrid__mutedicon" }),
|
|
352
|
+
/* @__PURE__ */ jsx("span", { className: "callgrid__name", children: name })
|
|
353
|
+
] })
|
|
354
|
+
] });
|
|
355
|
+
}
|
|
356
|
+
function initialsOf(name) {
|
|
357
|
+
const parts = name.trim().split(/\s+/).filter(Boolean);
|
|
358
|
+
if (parts.length === 0) return "?";
|
|
359
|
+
if (parts.length === 1) return parts[0].slice(0, 2).toUpperCase();
|
|
360
|
+
return (parts[0][0] + parts[parts.length - 1][0]).toUpperCase();
|
|
361
|
+
}
|
|
362
|
+
var FONT_HREF = "https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,600;12..96,800&family=Hanken+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap";
|
|
363
|
+
var FONT_HREF_PRECONNECT_GOOGLE = "https://fonts.googleapis.com";
|
|
364
|
+
var FONT_HREF_PRECONNECT_STATIC = "https://fonts.gstatic.com";
|
|
365
|
+
var MARKER_ATTR = "data-poolse-fonts";
|
|
366
|
+
function injectFontLinks() {
|
|
367
|
+
if (typeof document === "undefined") return;
|
|
368
|
+
if (document.querySelector(`link[${MARKER_ATTR}]`)) return;
|
|
369
|
+
const head = document.head;
|
|
370
|
+
const pre1 = document.createElement("link");
|
|
371
|
+
pre1.rel = "preconnect";
|
|
372
|
+
pre1.href = FONT_HREF_PRECONNECT_GOOGLE;
|
|
373
|
+
pre1.setAttribute(MARKER_ATTR, "preconnect");
|
|
374
|
+
head.appendChild(pre1);
|
|
375
|
+
const pre2 = document.createElement("link");
|
|
376
|
+
pre2.rel = "preconnect";
|
|
377
|
+
pre2.href = FONT_HREF_PRECONNECT_STATIC;
|
|
378
|
+
pre2.crossOrigin = "anonymous";
|
|
379
|
+
pre2.setAttribute(MARKER_ATTR, "preconnect");
|
|
380
|
+
head.appendChild(pre2);
|
|
381
|
+
const font = document.createElement("link");
|
|
382
|
+
font.rel = "stylesheet";
|
|
383
|
+
font.href = FONT_HREF;
|
|
384
|
+
font.setAttribute(MARKER_ATTR, "stylesheet");
|
|
385
|
+
head.appendChild(font);
|
|
386
|
+
}
|
|
387
|
+
function usePoolseFonts(enabled = true) {
|
|
388
|
+
useEffect(() => {
|
|
389
|
+
if (!enabled) return;
|
|
390
|
+
injectFontLinks();
|
|
391
|
+
}, [enabled]);
|
|
392
|
+
}
|
|
393
|
+
function PoolseFonts() {
|
|
394
|
+
usePoolseFonts(true);
|
|
395
|
+
return null;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
// src/listAutocomplete.ts
|
|
399
|
+
var UNORDERED_RE = /^(\s*)([-*+]) (.*)$/;
|
|
400
|
+
var ORDERED_RE = /^(\s*)(\d+)\. (.*)$/;
|
|
401
|
+
function handleListEnter(value, caret) {
|
|
402
|
+
const lineStart = value.lastIndexOf("\n", caret - 1) + 1;
|
|
403
|
+
const lineEnd = (() => {
|
|
404
|
+
const nl = value.indexOf("\n", caret);
|
|
405
|
+
return nl === -1 ? value.length : nl;
|
|
406
|
+
})();
|
|
407
|
+
const currentLine = value.slice(lineStart, lineEnd);
|
|
408
|
+
const unordered = UNORDERED_RE.exec(currentLine);
|
|
409
|
+
const ordered = ORDERED_RE.exec(currentLine);
|
|
410
|
+
const match = unordered ?? ordered;
|
|
411
|
+
if (!match) return null;
|
|
412
|
+
const indent = match[1] ?? "";
|
|
413
|
+
const marker = match[2] ?? "";
|
|
414
|
+
const content = match[3] ?? "";
|
|
415
|
+
if (content === "") {
|
|
416
|
+
const before2 = value.slice(0, lineStart);
|
|
417
|
+
const after2 = value.slice(lineEnd);
|
|
418
|
+
return { kind: "end", value: before2 + after2, caret: lineStart };
|
|
419
|
+
}
|
|
420
|
+
const nextMarker = ordered ? `${parseInt(marker, 10) + 1}.` : marker;
|
|
421
|
+
const prefix = `
|
|
422
|
+
${indent}${nextMarker} `;
|
|
423
|
+
const before = value.slice(0, caret);
|
|
424
|
+
const after = value.slice(caret);
|
|
425
|
+
return {
|
|
426
|
+
kind: "continue",
|
|
427
|
+
value: before + prefix + after,
|
|
428
|
+
caret: caret + prefix.length
|
|
429
|
+
};
|
|
430
|
+
}
|
|
320
431
|
function UploadQueueStrip({ items, onCancel, onDismiss }) {
|
|
321
432
|
if (items.length === 0) return null;
|
|
322
433
|
return /* @__PURE__ */ jsx("div", { className: "poolse-upload-strip", role: "status", "aria-live": "polite", children: items.map((item) => /* @__PURE__ */ jsx(
|
|
@@ -1072,33 +1183,6 @@ function formatBytes(n) {
|
|
|
1072
1183
|
if (n < 1024 * 1024 * 1024) return `${(n / (1024 * 1024)).toFixed(1)} MB`;
|
|
1073
1184
|
return `${(n / (1024 * 1024 * 1024)).toFixed(2)} GB`;
|
|
1074
1185
|
}
|
|
1075
|
-
|
|
1076
|
-
// src/userColor.ts
|
|
1077
|
-
var PALETTE = [
|
|
1078
|
-
"#6366f1",
|
|
1079
|
-
// indigo
|
|
1080
|
-
"#10b981",
|
|
1081
|
-
// emerald
|
|
1082
|
-
"#f59e0b",
|
|
1083
|
-
// amber
|
|
1084
|
-
"#ec4899",
|
|
1085
|
-
// rose
|
|
1086
|
-
"#0ea5e9",
|
|
1087
|
-
// sky
|
|
1088
|
-
"#8b5cf6",
|
|
1089
|
-
// violet
|
|
1090
|
-
"#14b8a6",
|
|
1091
|
-
// teal
|
|
1092
|
-
"#d946ef"
|
|
1093
|
-
// fuchsia
|
|
1094
|
-
];
|
|
1095
|
-
function userColor(userId) {
|
|
1096
|
-
let h = 0;
|
|
1097
|
-
for (let i = 0; i < userId.length; i++) {
|
|
1098
|
-
h = h * 31 + userId.charCodeAt(i) | 0;
|
|
1099
|
-
}
|
|
1100
|
-
return PALETTE[Math.abs(h) % PALETTE.length];
|
|
1101
|
-
}
|
|
1102
1186
|
function MessageBubble({
|
|
1103
1187
|
message,
|
|
1104
1188
|
currentUserId,
|