@poolse/react-ui 2.22.0 → 2.24.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
@@ -3027,3 +3027,552 @@
3027
3027
  border-top: 1px solid var(--poolse-border);
3028
3028
  padding-top: 8px;
3029
3029
  }
3030
+
3031
+ /* ───────────────────── Calls and rooms ─────────────────────
3032
+ The call controls, video grid and device menus used by RoomStage (and
3033
+ the legacy CallProvider). Shipped here so a room is styled out of the
3034
+ box; previously only the showcase app carried these rules. */
3035
+
3036
+ /* Round call controls. Engaged controls invert to solid white so the
3037
+ user can tell at a glance which ones are doing something. */
3038
+ .callbtn__slot {
3039
+ display: flex;
3040
+ flex-direction: column;
3041
+ align-items: center;
3042
+ gap: 7px;
3043
+ width: 76px;
3044
+ }
3045
+
3046
+ .callbtn {
3047
+ width: 56px;
3048
+ height: 56px;
3049
+ border-radius: 50%;
3050
+ border: none;
3051
+ display: grid;
3052
+ place-items: center;
3053
+ cursor: pointer;
3054
+ color: #fff;
3055
+ background: rgba(255, 255, 255, 0.16);
3056
+ transition:
3057
+ background 120ms ease,
3058
+ transform 120ms ease;
3059
+ }
3060
+
3061
+ .callbtn:hover {
3062
+ background: rgba(255, 255, 255, 0.26);
3063
+ }
3064
+
3065
+ .callbtn:active {
3066
+ transform: scale(0.94);
3067
+ }
3068
+
3069
+ .callbtn--large {
3070
+ width: 66px;
3071
+ height: 66px;
3072
+ }
3073
+
3074
+ .callbtn--active {
3075
+ background: #ffffff;
3076
+ color: #101012;
3077
+ }
3078
+
3079
+ .callbtn--danger,
3080
+ .callbtn--danger:hover {
3081
+ background: #ef4444;
3082
+ color: #fff;
3083
+ }
3084
+
3085
+ .callbtn--accept,
3086
+ .callbtn--accept:hover {
3087
+ background: #22c55e;
3088
+ color: #fff;
3089
+ }
3090
+
3091
+ .callbtn__label {
3092
+ font-size: 11.5px;
3093
+ font-weight: 500;
3094
+ color: rgba(255, 255, 255, 0.72);
3095
+ }
3096
+
3097
+ /* Call stage — @poolse/react-ui's CallVideoGrid renders these class
3098
+ names and ships no CSS of its own, so the host app owns the look. */
3099
+ .callstage {
3100
+ position: relative;
3101
+ flex: 1;
3102
+ min-height: 0;
3103
+ }
3104
+
3105
+ /* The floating self-preview. Anchored to a corner rather than left
3106
+ wherever the pointer stopped — a tile at a slight angle to the edge
3107
+ reads as dropped rather than placed. */
3108
+ .callstage__pip {
3109
+ position: absolute;
3110
+ width: clamp(110px, 13vw, 168px);
3111
+ aspect-ratio: 3 / 4;
3112
+ /* Generous enough to read as a bubble rather than a cropped
3113
+ rectangle. The video is clipped to it, and the tile inside is
3114
+ borderless, so this is the only rounding in play — two radii that
3115
+ disagree leave a hairline seam along the edge. */
3116
+ border-radius: 20px;
3117
+ overflow: hidden;
3118
+ box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
3119
+ cursor: grab;
3120
+ touch-action: none;
3121
+ /* Above the header, whose gradient would otherwise wash it out. The
3122
+ stage creates no stacking context of its own, so this competes
3123
+ directly with the header and control bar below. */
3124
+ z-index: 5;
3125
+ transition:
3126
+ top 180ms ease,
3127
+ left 180ms ease,
3128
+ right 180ms ease,
3129
+ bottom 180ms ease;
3130
+ }
3131
+
3132
+ /* Tucked into the real corners of the viewport.
3133
+ It used to be inset far enough to clear the header and the control
3134
+ bar, which left it floating in the middle of nowhere rather than
3135
+ parked in a corner — and on a connected video call the chrome is
3136
+ hidden most of the time anyway, so it was reserving room for
3137
+ something that was not there. It floats OVER the header instead
3138
+ (see the z-index below), and the bottom corners stop just short of
3139
+ the controls so a dragged tile can never cover the hang-up button. */
3140
+ .callstage__pip--c0 {
3141
+ top: 14px;
3142
+ left: 14px;
3143
+ }
3144
+ .callstage__pip--c1 {
3145
+ top: 14px;
3146
+ right: 14px;
3147
+ }
3148
+ .callstage__pip--c2 {
3149
+ bottom: 132px;
3150
+ left: 14px;
3151
+ }
3152
+ .callstage__pip--c3 {
3153
+ bottom: 132px;
3154
+ right: 14px;
3155
+ }
3156
+
3157
+ .callstage__pip--dragging {
3158
+ cursor: grabbing;
3159
+ /* Follow the pointer exactly while dragging; the easing above is for
3160
+ the snap, and would otherwise make the tile lag the finger. */
3161
+ transition: none;
3162
+ box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
3163
+ }
3164
+
3165
+ @media (prefers-reduced-motion: reduce) {
3166
+ .callstage__pip {
3167
+ transition: none;
3168
+ }
3169
+ }
3170
+
3171
+ .callgrid {
3172
+ flex: 1;
3173
+ min-height: 0;
3174
+ display: grid;
3175
+ grid-template-columns: repeat(2, 1fr);
3176
+ gap: 8px;
3177
+ padding: 84px 16px 150px;
3178
+ align-content: center;
3179
+ overflow-y: auto;
3180
+ }
3181
+
3182
+ .callgrid[data-count='many'] {
3183
+ grid-template-columns: repeat(3, 1fr);
3184
+ }
3185
+
3186
+ .callgrid__tile {
3187
+ position: relative;
3188
+ aspect-ratio: 3 / 4;
3189
+ border-radius: 14px;
3190
+ overflow: hidden;
3191
+ background: #1c1c20;
3192
+ /* Transparent rather than absent, so a tile does not resize by two
3193
+ pixels the moment somebody starts talking. */
3194
+ border: 2px solid transparent;
3195
+ }
3196
+
3197
+ .callgrid__tile--bleed {
3198
+ position: absolute;
3199
+ inset: 0;
3200
+ aspect-ratio: auto;
3201
+ border-radius: 0;
3202
+ border-width: 0;
3203
+ }
3204
+
3205
+ .callgrid__tile--speaking {
3206
+ border-color: #22c55e;
3207
+ }
3208
+
3209
+ .callgrid__video {
3210
+ width: 100%;
3211
+ height: 100%;
3212
+ object-fit: cover;
3213
+ display: block;
3214
+ }
3215
+
3216
+ .callgrid__placeholder {
3217
+ display: grid;
3218
+ place-items: center;
3219
+ width: 100%;
3220
+ height: 100%;
3221
+ }
3222
+
3223
+ .callgrid__avatar {
3224
+ width: clamp(56px, 26%, 132px);
3225
+ aspect-ratio: 1;
3226
+ border-radius: 50%;
3227
+ display: grid;
3228
+ place-items: center;
3229
+ color: #fff;
3230
+ font-weight: 600;
3231
+ font-size: clamp(20px, 9cqw, 46px);
3232
+ container-type: inline-size;
3233
+ }
3234
+
3235
+ .callgrid__caption {
3236
+ position: absolute;
3237
+ inset: auto auto 10px 10px;
3238
+ display: flex;
3239
+ align-items: center;
3240
+ gap: 5px;
3241
+ padding: 5px 10px;
3242
+ border-radius: 999px;
3243
+ max-width: calc(100% - 20px);
3244
+ /* Legible over both a bright video frame and a flat placeholder. */
3245
+ background: rgba(0, 0, 0, 0.55);
3246
+ color: #fff;
3247
+ font-size: 12.5px;
3248
+ font-weight: 600;
3249
+ }
3250
+
3251
+ .callgrid__name {
3252
+ overflow: hidden;
3253
+ text-overflow: ellipsis;
3254
+ white-space: nowrap;
3255
+ }
3256
+
3257
+ .callgrid__mutedicon {
3258
+ flex: none;
3259
+ }
3260
+
3261
+ /* Chrome fades on a connected video call rather than disappearing, so
3262
+ the eye can follow it out. Pointer events go with it — invisible
3263
+ controls must not still be clickable. */
3264
+ .callsheet__header,
3265
+ .callsheet__actions {
3266
+ transition: opacity 220ms ease;
3267
+ }
3268
+
3269
+ .callsheet__header--hidden,
3270
+ .callsheet__actions--hidden {
3271
+ opacity: 0;
3272
+ pointer-events: none;
3273
+ }
3274
+
3275
+ @media (prefers-reduced-motion: reduce) {
3276
+ .callsheet__header,
3277
+ .callsheet__actions {
3278
+ transition: none;
3279
+ }
3280
+ }
3281
+
3282
+ /* A control that also opens a device menu. */
3283
+ .callsheet__control {
3284
+ position: relative;
3285
+ display: inline-flex;
3286
+ }
3287
+
3288
+ .callbtn__wrap {
3289
+ position: relative;
3290
+ display: inline-flex;
3291
+ }
3292
+
3293
+ .callbtn__caret {
3294
+ position: absolute;
3295
+ right: -2px;
3296
+ bottom: -2px;
3297
+ width: 22px;
3298
+ height: 22px;
3299
+ border-radius: 50%;
3300
+ border: 2px solid #101012;
3301
+ background: rgba(255, 255, 255, 0.32);
3302
+ color: #fff;
3303
+ display: grid;
3304
+ place-items: center;
3305
+ cursor: pointer;
3306
+ padding: 0;
3307
+ }
3308
+
3309
+ .callbtn__caret:hover {
3310
+ background: rgba(255, 255, 255, 0.5);
3311
+ }
3312
+
3313
+ .calldevices {
3314
+ position: absolute;
3315
+ bottom: calc(100% + 12px);
3316
+ left: 50%;
3317
+ transform: translateX(-50%);
3318
+ min-width: 240px;
3319
+ max-width: 320px;
3320
+ background: #1c1c20;
3321
+ border-radius: 14px;
3322
+ box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
3323
+ padding: 8px;
3324
+ z-index: 5;
3325
+ }
3326
+
3327
+ .calldevices__title {
3328
+ margin: 0;
3329
+ padding: 6px 10px 8px;
3330
+ font-size: 11.5px;
3331
+ font-weight: 600;
3332
+ letter-spacing: 0.6px;
3333
+ text-transform: uppercase;
3334
+ color: rgba(255, 255, 255, 0.6);
3335
+ }
3336
+
3337
+ .calldevices__row {
3338
+ display: flex;
3339
+ align-items: center;
3340
+ gap: 10px;
3341
+ width: 100%;
3342
+ padding: 10px;
3343
+ border: none;
3344
+ border-radius: 10px;
3345
+ background: transparent;
3346
+ color: #fff;
3347
+ font: inherit;
3348
+ font-size: 14px;
3349
+ text-align: left;
3350
+ cursor: pointer;
3351
+ }
3352
+
3353
+ .calldevices__row:hover {
3354
+ background: rgba(255, 255, 255, 0.09);
3355
+ }
3356
+
3357
+ .calldevices__row--on {
3358
+ color: #22c55e;
3359
+ }
3360
+
3361
+ .calldevices__name {
3362
+ flex: 1;
3363
+ overflow: hidden;
3364
+ text-overflow: ellipsis;
3365
+ white-space: nowrap;
3366
+ }
3367
+
3368
+ /* The room — Meet-style: a dark stage with the controls under it. Fills
3369
+ whatever box the host gives it. */
3370
+ .poolse-room {
3371
+ display: flex;
3372
+ flex-direction: column;
3373
+ min-height: 0;
3374
+ height: 100%;
3375
+ background: #101114;
3376
+ color: #fff;
3377
+ border-radius: var(--poolse-radius-lg, 14px);
3378
+ overflow: hidden;
3379
+ }
3380
+
3381
+ .poolse-room__head {
3382
+ display: flex;
3383
+ align-items: baseline;
3384
+ justify-content: space-between;
3385
+ gap: 12px;
3386
+ padding: 12px 16px 6px;
3387
+ }
3388
+
3389
+ .poolse-room__title {
3390
+ font: 600 15px / 1.3 var(--poolse-font-body);
3391
+ white-space: nowrap;
3392
+ overflow: hidden;
3393
+ text-overflow: ellipsis;
3394
+ }
3395
+
3396
+ .poolse-room__status {
3397
+ font: 500 12.5px / 1.3 var(--poolse-font-body);
3398
+ color: rgba(255, 255, 255, 0.7);
3399
+ font-variant-numeric: tabular-nums;
3400
+ white-space: nowrap;
3401
+ }
3402
+
3403
+ .poolse-room__stage {
3404
+ position: relative;
3405
+ flex: 1;
3406
+ min-height: 220px;
3407
+ padding: 8px;
3408
+ }
3409
+
3410
+ .poolse-room__stage > .callgrid,
3411
+ .poolse-room__stage > .callstage {
3412
+ position: absolute;
3413
+ inset: 8px;
3414
+ }
3415
+
3416
+ .poolse-room__stage > .callstage {
3417
+ border-radius: 12px;
3418
+ overflow: hidden;
3419
+ background: #1c1c20;
3420
+ }
3421
+
3422
+ /* In a room the grid fills the stage, Meet-style, instead of the call
3423
+ sheet's portrait tiles: rows share the height, tiles take their cell. */
3424
+ .poolse-room .callgrid {
3425
+ padding: 0;
3426
+ height: auto;
3427
+ grid-auto-rows: 1fr;
3428
+ align-content: stretch;
3429
+ overflow: hidden;
3430
+ }
3431
+
3432
+ .poolse-room .callgrid[data-count='2'],
3433
+ .poolse-room .callgrid[data-count='3'],
3434
+ .poolse-room .callgrid[data-count='4'] {
3435
+ grid-template-columns: repeat(2, 1fr);
3436
+ }
3437
+
3438
+ .poolse-room .callgrid[data-count='5'],
3439
+ .poolse-room .callgrid[data-count='6'] {
3440
+ grid-template-columns: repeat(3, 1fr);
3441
+ }
3442
+
3443
+ .poolse-room .callgrid[data-count='many'] {
3444
+ grid-template-columns: repeat(4, 1fr);
3445
+ overflow-y: auto;
3446
+ grid-auto-rows: minmax(140px, 1fr);
3447
+ }
3448
+
3449
+ .poolse-room .callgrid__tile {
3450
+ aspect-ratio: auto;
3451
+ min-height: 0;
3452
+ }
3453
+
3454
+ /* Initials sized to the tile, so the small self-view bubble does not
3455
+ overflow its circle. */
3456
+ .callgrid__placeholder {
3457
+ container-type: size;
3458
+ }
3459
+
3460
+ .callgrid__placeholder .callgrid__avatar {
3461
+ width: clamp(40px, 34cqmin, 132px);
3462
+ font-size: clamp(14px, 13cqmin, 46px);
3463
+ }
3464
+
3465
+ /* The floating self-view stays inside the stage, clear of the controls
3466
+ that sit below it rather than over it. */
3467
+ .poolse-room .callstage__pip--c2,
3468
+ .poolse-room .callstage__pip--c3 {
3469
+ bottom: 14px;
3470
+ }
3471
+
3472
+ @media (max-width: 640px) {
3473
+ .poolse-room .callgrid[data-count='5'],
3474
+ .poolse-room .callgrid[data-count='6'],
3475
+ .poolse-room .callgrid[data-count='many'] {
3476
+ grid-template-columns: repeat(2, 1fr);
3477
+ }
3478
+ }
3479
+
3480
+ .poolse-room__waiting {
3481
+ display: grid;
3482
+ place-items: center;
3483
+ height: 100%;
3484
+ font: 500 14px / 1 var(--poolse-font-body);
3485
+ color: rgba(255, 255, 255, 0.7);
3486
+ }
3487
+
3488
+ .poolse-room__error {
3489
+ margin: 0 16px;
3490
+ font: 500 12.5px / 1.4 var(--poolse-font-body);
3491
+ color: #ff8a8a;
3492
+ text-align: center;
3493
+ }
3494
+
3495
+ .poolse-room__bar {
3496
+ display: flex;
3497
+ justify-content: center;
3498
+ align-items: flex-start;
3499
+ gap: 6px;
3500
+ flex-wrap: wrap;
3501
+ padding: 12px 12px 16px;
3502
+ }
3503
+
3504
+ /* The join / start bar — on the page's own theme, above the chat. */
3505
+ .poolse-roombar {
3506
+ display: flex;
3507
+ align-items: center;
3508
+ gap: 10px;
3509
+ flex-wrap: wrap;
3510
+ padding: 10px 14px;
3511
+ border-bottom: 1px solid var(--poolse-border);
3512
+ background: var(--poolse-surface);
3513
+ font: 500 13.5px / 1.4 var(--poolse-font-body);
3514
+ color: var(--poolse-ink-2);
3515
+ }
3516
+
3517
+ .poolse-roombar--live {
3518
+ background: color-mix(in srgb, var(--poolse-success) 10%, var(--poolse-surface));
3519
+ color: var(--poolse-ink);
3520
+ }
3521
+
3522
+ .poolse-roombar__dot {
3523
+ width: 8px;
3524
+ height: 8px;
3525
+ border-radius: 50%;
3526
+ background: var(--poolse-success);
3527
+ box-shadow: 0 0 0 4px color-mix(in srgb, var(--poolse-success) 25%, transparent);
3528
+ flex: none;
3529
+ }
3530
+
3531
+ .poolse-roombar__text {
3532
+ flex: 1;
3533
+ min-width: 0;
3534
+ }
3535
+
3536
+ .poolse-roombar__actions {
3537
+ display: flex;
3538
+ gap: 8px;
3539
+ flex-wrap: wrap;
3540
+ }
3541
+
3542
+ .poolse-roombar__btn {
3543
+ display: inline-flex;
3544
+ align-items: center;
3545
+ gap: 6px;
3546
+ padding: 7px 12px;
3547
+ border-radius: var(--poolse-radius-pill, 999px);
3548
+ border: 1px solid var(--poolse-border);
3549
+ background: var(--poolse-surface);
3550
+ color: var(--poolse-ink);
3551
+ font: 600 13px / 1 var(--poolse-font-body);
3552
+ cursor: pointer;
3553
+ }
3554
+
3555
+ .poolse-roombar__btn:hover:not(:disabled) {
3556
+ border-color: var(--poolse-ink-3);
3557
+ }
3558
+
3559
+ .poolse-roombar__btn--primary {
3560
+ background: var(--poolse-brand);
3561
+ border-color: var(--poolse-brand);
3562
+ color: var(--poolse-on-brand, #fff);
3563
+ }
3564
+
3565
+ .poolse-roombar__btn--primary:hover:not(:disabled) {
3566
+ background: var(--poolse-brand-strong, var(--poolse-brand));
3567
+ border-color: var(--poolse-brand-strong, var(--poolse-brand));
3568
+ }
3569
+
3570
+ .poolse-roombar__btn:disabled {
3571
+ opacity: 0.6;
3572
+ cursor: default;
3573
+ }
3574
+
3575
+ .poolse-roombar__btn:focus-visible {
3576
+ outline: 2px solid var(--poolse-brand);
3577
+ outline-offset: 2px;
3578
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poolse/react-ui",
3
- "version": "2.22.0",
3
+ "version": "2.24.0",
4
4
  "description": "React chat UI components — ConversationView, PoolseInbox, MessageBubble, TypingIndicator, ReactionPicker, ThreadView. CSS-variable theming, render-prop escape hatches. MIT — alternative to Sendbird, Stream, TalkJS, CometChat.",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -57,8 +57,8 @@
57
57
  "CHANGELOG.md"
58
58
  ],
59
59
  "dependencies": {
60
- "@poolse/react": "^2.26.0",
61
- "@poolse/sdk": "^2.22.0",
60
+ "@poolse/react": "^2.28.0",
61
+ "@poolse/sdk": "^2.24.0",
62
62
  "react-markdown": "^9.0.1",
63
63
  "remark-gfm": "^4.0.0"
64
64
  },