@livelayer/react 0.8.0 → 0.9.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/index.d.ts +12 -0
- package/dist/index.js +3 -3
- package/dist/index.mjs +1716 -1465
- package/dist/styles.css +142 -0
- package/package.json +9 -10
package/dist/styles.css
CHANGED
|
@@ -1425,6 +1425,47 @@
|
|
|
1425
1425
|
background: none;
|
|
1426
1426
|
}
|
|
1427
1427
|
|
|
1428
|
+
/* ── OverflowPopover ─────────────────────────────────────────── */
|
|
1429
|
+
|
|
1430
|
+
/* Floating panel anchored above the ••• trigger button. Sits inside
|
|
1431
|
+
the same offsetParent as the toolbar — no portal needed. */
|
|
1432
|
+
.ll-overflow-popover {
|
|
1433
|
+
min-width: 160px;
|
|
1434
|
+
padding: 6px;
|
|
1435
|
+
border-radius: 12px;
|
|
1436
|
+
border: 1px solid rgba(255, 255, 255, 0.14);
|
|
1437
|
+
background: rgba(0, 0, 0, 0.85);
|
|
1438
|
+
-webkit-backdrop-filter: blur(20px);
|
|
1439
|
+
backdrop-filter: blur(20px);
|
|
1440
|
+
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.3);
|
|
1441
|
+
color: #fff;
|
|
1442
|
+
z-index: 4;
|
|
1443
|
+
}
|
|
1444
|
+
|
|
1445
|
+
/* Full-width row buttons inside the popover. */
|
|
1446
|
+
.ll-overflow-popover__item {
|
|
1447
|
+
display: flex;
|
|
1448
|
+
align-items: center;
|
|
1449
|
+
gap: 10px;
|
|
1450
|
+
width: 100%;
|
|
1451
|
+
padding: 8px 12px;
|
|
1452
|
+
border-radius: 8px;
|
|
1453
|
+
border: none;
|
|
1454
|
+
background: transparent;
|
|
1455
|
+
color: rgba(255, 255, 255, 0.85);
|
|
1456
|
+
font-family: inherit;
|
|
1457
|
+
font-size: 13px;
|
|
1458
|
+
line-height: 1.4;
|
|
1459
|
+
text-align: left;
|
|
1460
|
+
cursor: pointer;
|
|
1461
|
+
transition: background 0.12s ease, color 0.12s ease;
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1464
|
+
.ll-overflow-popover__item:hover {
|
|
1465
|
+
background: rgba(255, 255, 255, 0.1);
|
|
1466
|
+
color: #fff;
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1428
1469
|
/* ── Focus rings (accessibility) ─────────────────────────────── */
|
|
1429
1470
|
|
|
1430
1471
|
.ll-widget button:focus-visible,
|
|
@@ -1433,3 +1474,104 @@
|
|
|
1433
1474
|
outline: 2px solid var(--ll-color-primary);
|
|
1434
1475
|
outline-offset: 2px;
|
|
1435
1476
|
}
|
|
1477
|
+
|
|
1478
|
+
/* ── Compact toolbar (3-button) ────────────────────────────
|
|
1479
|
+
Used when compactControls=true. Renders mic | ••• | end-call,
|
|
1480
|
+
with secondary controls tucked behind the OverflowPopover.
|
|
1481
|
+
|
|
1482
|
+
Sized to fit a 140px-wide slot: the parent .ll-expanded__bottom
|
|
1483
|
+
has 12px insets on each side (116px usable). Three 40px buttons
|
|
1484
|
+
need 120px + gaps, so we bleed past the inset with negative
|
|
1485
|
+
margins and tighten the gap. flex-wrap:nowrap is critical —
|
|
1486
|
+
without it the mic stacks above the ••• and end-call. */
|
|
1487
|
+
.ll-toolbar--compact {
|
|
1488
|
+
gap: 6px;
|
|
1489
|
+
flex-wrap: nowrap;
|
|
1490
|
+
margin-left: -8px;
|
|
1491
|
+
margin-right: -8px;
|
|
1492
|
+
}
|
|
1493
|
+
|
|
1494
|
+
/* ── Overflow popover items: language pill ─────────────────
|
|
1495
|
+
The disabled "EN English" row needs a subtle code badge; matches the
|
|
1496
|
+
compact language pill style used in the regular topbar. */
|
|
1497
|
+
.ll-overflow-popover__item:disabled {
|
|
1498
|
+
cursor: default;
|
|
1499
|
+
opacity: 0.7;
|
|
1500
|
+
}
|
|
1501
|
+
.ll-overflow-popover__lang-code {
|
|
1502
|
+
display: inline-flex;
|
|
1503
|
+
align-items: center;
|
|
1504
|
+
justify-content: center;
|
|
1505
|
+
width: 24px;
|
|
1506
|
+
height: 18px;
|
|
1507
|
+
border-radius: 4px;
|
|
1508
|
+
background: rgba(255, 255, 255, 0.15);
|
|
1509
|
+
color: rgba(255, 255, 255, 0.95);
|
|
1510
|
+
font-size: 10px;
|
|
1511
|
+
font-weight: 600;
|
|
1512
|
+
letter-spacing: 0.04em;
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1515
|
+
/* Item glyphs (svg) sit at the start of the row. */
|
|
1516
|
+
.ll-overflow-popover__item > svg {
|
|
1517
|
+
width: 16px;
|
|
1518
|
+
height: 16px;
|
|
1519
|
+
flex-shrink: 0;
|
|
1520
|
+
}
|
|
1521
|
+
|
|
1522
|
+
/* When `is-on`, item gets the same treatment as `.ll-tool.is-on` —
|
|
1523
|
+
subtle white background to indicate the toggle is active. */
|
|
1524
|
+
.ll-overflow-popover__item.is-on {
|
|
1525
|
+
background: rgba(255, 255, 255, 0.16);
|
|
1526
|
+
color: #fff;
|
|
1527
|
+
}
|
|
1528
|
+
|
|
1529
|
+
/* ── Compact status pill ───────────────────────────────────────────────
|
|
1530
|
+
Tiny live-state indicator at top-left of the avatar when the
|
|
1531
|
+
topbar is hidden in compact mode. Pulses when speaking/listening
|
|
1532
|
+
so it reads as "live" without taking screen real estate. */
|
|
1533
|
+
.ll-compact-status {
|
|
1534
|
+
position: absolute;
|
|
1535
|
+
top: 12px;
|
|
1536
|
+
left: 12px;
|
|
1537
|
+
z-index: 3;
|
|
1538
|
+
display: inline-flex;
|
|
1539
|
+
align-items: center;
|
|
1540
|
+
gap: 6px;
|
|
1541
|
+
padding: 4px 10px;
|
|
1542
|
+
border-radius: 999px;
|
|
1543
|
+
background: rgba(0, 0, 0, 0.55);
|
|
1544
|
+
-webkit-backdrop-filter: blur(20px);
|
|
1545
|
+
backdrop-filter: blur(20px);
|
|
1546
|
+
color: rgba(255, 255, 255, 0.95);
|
|
1547
|
+
font-size: 11px;
|
|
1548
|
+
font-weight: 500;
|
|
1549
|
+
letter-spacing: 0.02em;
|
|
1550
|
+
text-transform: lowercase;
|
|
1551
|
+
pointer-events: none;
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1554
|
+
.ll-compact-status__dot {
|
|
1555
|
+
width: 6px;
|
|
1556
|
+
height: 6px;
|
|
1557
|
+
border-radius: 999px;
|
|
1558
|
+
background: rgba(255, 255, 255, 0.85);
|
|
1559
|
+
flex-shrink: 0;
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1562
|
+
.ll-compact-status[data-state="listening"] .ll-compact-status__dot {
|
|
1563
|
+
background: #34d399; /* green */
|
|
1564
|
+
animation: ll-pulse 1.4s ease-in-out infinite;
|
|
1565
|
+
}
|
|
1566
|
+
.ll-compact-status[data-state="speaking"] .ll-compact-status__dot {
|
|
1567
|
+
background: #fbbf24; /* amber */
|
|
1568
|
+
}
|
|
1569
|
+
.ll-compact-status[data-state="thinking"] .ll-compact-status__dot {
|
|
1570
|
+
background: #a78bfa; /* violet */
|
|
1571
|
+
animation: ll-pulse 1.4s ease-in-out infinite;
|
|
1572
|
+
}
|
|
1573
|
+
|
|
1574
|
+
@keyframes ll-pulse {
|
|
1575
|
+
0%, 100% { opacity: 1; transform: scale(1); }
|
|
1576
|
+
50% { opacity: 0.55; transform: scale(0.7); }
|
|
1577
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@livelayer/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "LiveLayer agent widget for React — avatar video, team switching, responsive layouts, full-fidelity embed",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -16,19 +16,13 @@
|
|
|
16
16
|
"files": [
|
|
17
17
|
"dist"
|
|
18
18
|
],
|
|
19
|
-
"scripts": {
|
|
20
|
-
"build": "vite build",
|
|
21
|
-
"prepublishOnly": "npm run build",
|
|
22
|
-
"test": "vitest run",
|
|
23
|
-
"test:watch": "vitest"
|
|
24
|
-
},
|
|
25
19
|
"peerDependencies": {
|
|
26
20
|
"react": ">=18.0.0",
|
|
27
21
|
"react-dom": ">=18.0.0"
|
|
28
22
|
},
|
|
29
23
|
"dependencies": {
|
|
30
|
-
"
|
|
31
|
-
"
|
|
24
|
+
"livekit-client": "^2.17.3",
|
|
25
|
+
"@livelayer/sdk": "0.4.2"
|
|
32
26
|
},
|
|
33
27
|
"devDependencies": {
|
|
34
28
|
"@testing-library/dom": "^10.4.1",
|
|
@@ -49,5 +43,10 @@
|
|
|
49
43
|
"type": "git",
|
|
50
44
|
"url": "https://github.com/Fusion-Studios-Code/live-layer.git",
|
|
51
45
|
"directory": "packages/react"
|
|
46
|
+
},
|
|
47
|
+
"scripts": {
|
|
48
|
+
"build": "vite build",
|
|
49
|
+
"test": "vitest run",
|
|
50
|
+
"test:watch": "vitest"
|
|
52
51
|
}
|
|
53
|
-
}
|
|
52
|
+
}
|