shepherd-onboard 0.1.14 → 0.1.16
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/bin/shepherd-onboard.js +87 -120
- package/package.json +1 -1
package/bin/shepherd-onboard.js
CHANGED
|
@@ -1339,7 +1339,6 @@ function renderMessagesSelectorPage(chats, token, error = "") {
|
|
|
1339
1339
|
<label class="chat-row" data-index="${index}" data-search="${htmlAttr(searchText)}">
|
|
1340
1340
|
<input type="checkbox" name="chatId" value="${htmlAttr(chat.chatId)}">
|
|
1341
1341
|
<span class="box" aria-hidden="true"></span>
|
|
1342
|
-
<span class="avatar" aria-hidden="true">${html(chatInitials(chat.label))}</span>
|
|
1343
1342
|
<span class="chat-name-block">
|
|
1344
1343
|
<span class="chat-name">${html(chat.label)}</span>
|
|
1345
1344
|
${people ? `<span class="chat-people">${html(people)}</span>` : ""}
|
|
@@ -1357,131 +1356,127 @@ function renderMessagesSelectorPage(chats, token, error = "") {
|
|
|
1357
1356
|
<title>Select Messages Chats</title>
|
|
1358
1357
|
<style>
|
|
1359
1358
|
:root {
|
|
1360
|
-
--
|
|
1361
|
-
--
|
|
1362
|
-
--
|
|
1363
|
-
--
|
|
1364
|
-
--
|
|
1365
|
-
--
|
|
1366
|
-
--
|
|
1367
|
-
--
|
|
1368
|
-
--
|
|
1369
|
-
--green-text: #1F7A43;
|
|
1370
|
-
--neutral-soft: #F0F1EF;
|
|
1371
|
-
--button: #1F6E3C;
|
|
1372
|
-
--button-hover: #237b44;
|
|
1373
|
-
--radius: 12px;
|
|
1374
|
-
--grid: 20px 36px minmax(0, 1fr) 92px 124px;
|
|
1359
|
+
--bg: #fbfbfa;
|
|
1360
|
+
--fg: #141614;
|
|
1361
|
+
--muted: #767d78;
|
|
1362
|
+
--faint: #9aa09b;
|
|
1363
|
+
--line: #dedfdd;
|
|
1364
|
+
--green: #1f5c2e;
|
|
1365
|
+
--green-hover: #246836;
|
|
1366
|
+
--radius: 8px;
|
|
1367
|
+
--grid: 20px minmax(0, 1fr) 78px 104px;
|
|
1375
1368
|
}
|
|
1376
1369
|
* { box-sizing: border-box; }
|
|
1377
1370
|
body {
|
|
1378
1371
|
margin: 0;
|
|
1379
1372
|
min-height: 100vh;
|
|
1380
|
-
background:
|
|
1373
|
+
background: var(--bg);
|
|
1381
1374
|
color: var(--fg);
|
|
1382
1375
|
font-family: Geist, "Geist Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
1383
1376
|
letter-spacing: 0;
|
|
1384
1377
|
-webkit-font-smoothing: antialiased;
|
|
1385
1378
|
}
|
|
1386
1379
|
main {
|
|
1387
|
-
width: min(
|
|
1380
|
+
width: min(680px, calc(100vw - 32px));
|
|
1388
1381
|
margin: 0 auto;
|
|
1389
|
-
padding: 48px 0
|
|
1382
|
+
padding: 48px 0 28px;
|
|
1390
1383
|
}
|
|
1391
|
-
.
|
|
1392
|
-
display:
|
|
1393
|
-
|
|
1394
|
-
align
|
|
1395
|
-
padding: 0
|
|
1396
|
-
|
|
1384
|
+
.header {
|
|
1385
|
+
display: grid;
|
|
1386
|
+
justify-items: center;
|
|
1387
|
+
text-align: center;
|
|
1388
|
+
padding: 0 0 28px;
|
|
1389
|
+
}
|
|
1390
|
+
.brand {
|
|
1391
|
+
display: grid;
|
|
1392
|
+
justify-items: center;
|
|
1393
|
+
gap: 14px;
|
|
1394
|
+
min-width: 0;
|
|
1397
1395
|
}
|
|
1398
|
-
.
|
|
1399
|
-
width:
|
|
1400
|
-
height:
|
|
1396
|
+
.logo {
|
|
1397
|
+
width: 30px;
|
|
1398
|
+
height: 30px;
|
|
1401
1399
|
object-fit: contain;
|
|
1402
|
-
flex: none;
|
|
1403
1400
|
}
|
|
1404
|
-
.
|
|
1405
|
-
width:
|
|
1406
|
-
height:
|
|
1407
|
-
border-radius:
|
|
1401
|
+
.logo-fallback {
|
|
1402
|
+
width: 30px;
|
|
1403
|
+
height: 30px;
|
|
1404
|
+
border-radius: 6px;
|
|
1408
1405
|
display: grid;
|
|
1409
1406
|
place-items: center;
|
|
1410
1407
|
color: #FFFFFF;
|
|
1411
|
-
|
|
1412
|
-
font-size:
|
|
1408
|
+
background: var(--green);
|
|
1409
|
+
font-size: 13px;
|
|
1413
1410
|
font-weight: 700;
|
|
1414
1411
|
flex: none;
|
|
1415
1412
|
}
|
|
1416
1413
|
h1 {
|
|
1417
1414
|
margin: 0;
|
|
1418
|
-
font-size:
|
|
1419
|
-
line-height: 1.
|
|
1415
|
+
font-size: 28px;
|
|
1416
|
+
line-height: 1.1;
|
|
1420
1417
|
font-weight: 700;
|
|
1421
|
-
letter-spacing:
|
|
1418
|
+
letter-spacing: 0;
|
|
1422
1419
|
}
|
|
1423
1420
|
.subtitle {
|
|
1424
|
-
margin:
|
|
1425
|
-
font-size:
|
|
1426
|
-
line-height: 1.
|
|
1427
|
-
color:
|
|
1421
|
+
margin: 8px 0 0;
|
|
1422
|
+
font-size: 15px;
|
|
1423
|
+
line-height: 1.4;
|
|
1424
|
+
color: var(--muted);
|
|
1428
1425
|
}
|
|
1429
1426
|
.panel {
|
|
1430
|
-
background:
|
|
1431
|
-
border-radius: 22px;
|
|
1432
|
-
box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
|
|
1433
|
-
padding: 8px 0 0;
|
|
1434
|
-
overflow: hidden;
|
|
1427
|
+
background: transparent;
|
|
1435
1428
|
}
|
|
1436
1429
|
.panel-head {
|
|
1437
|
-
padding:
|
|
1430
|
+
padding: 0 0 18px;
|
|
1438
1431
|
}
|
|
1439
1432
|
.search {
|
|
1440
1433
|
width: 100%;
|
|
1441
|
-
border: 1px solid #
|
|
1442
|
-
border-radius:
|
|
1443
|
-
background: #
|
|
1434
|
+
border: 1px solid #d7d9d6;
|
|
1435
|
+
border-radius: 8px;
|
|
1436
|
+
background: #ffffff;
|
|
1444
1437
|
color: var(--fg);
|
|
1445
|
-
padding: 11px
|
|
1438
|
+
padding: 11px 12px;
|
|
1446
1439
|
font: inherit;
|
|
1447
|
-
font-size:
|
|
1440
|
+
font-size: 15px;
|
|
1448
1441
|
outline: none;
|
|
1449
1442
|
}
|
|
1450
1443
|
.search:focus {
|
|
1451
1444
|
border-color: var(--green);
|
|
1452
|
-
|
|
1453
|
-
|
|
1445
|
+
outline: 2px solid color-mix(in srgb, var(--green) 22%, transparent);
|
|
1446
|
+
outline-offset: 1px;
|
|
1454
1447
|
}
|
|
1455
1448
|
.search::placeholder { color: var(--faint); }
|
|
1456
1449
|
.error {
|
|
1457
|
-
margin:
|
|
1450
|
+
margin: 0 0 12px;
|
|
1458
1451
|
color: #9B1C1C;
|
|
1459
|
-
font-size:
|
|
1452
|
+
font-size: 13px;
|
|
1460
1453
|
}
|
|
1461
1454
|
.list-head {
|
|
1462
1455
|
display: grid;
|
|
1463
1456
|
grid-template-columns: var(--grid);
|
|
1464
|
-
gap:
|
|
1457
|
+
gap: 12px;
|
|
1465
1458
|
align-items: center;
|
|
1466
|
-
padding:
|
|
1459
|
+
padding: 9px 0;
|
|
1460
|
+
border-top: 1px solid var(--line);
|
|
1467
1461
|
border-bottom: 1px solid var(--line);
|
|
1468
1462
|
color: var(--faint);
|
|
1469
|
-
font-size:
|
|
1470
|
-
font-weight:
|
|
1463
|
+
font-size: 11px;
|
|
1464
|
+
font-weight: 600;
|
|
1465
|
+
text-transform: uppercase;
|
|
1471
1466
|
}
|
|
1472
1467
|
.list-head .right { text-align: left; }
|
|
1473
1468
|
.chat-list { display: block; }
|
|
1474
1469
|
.chat-row {
|
|
1475
1470
|
display: grid;
|
|
1476
1471
|
grid-template-columns: var(--grid);
|
|
1477
|
-
gap:
|
|
1472
|
+
gap: 12px;
|
|
1478
1473
|
align-items: center;
|
|
1479
|
-
padding:
|
|
1474
|
+
padding: 11px 0;
|
|
1480
1475
|
border-bottom: 1px solid var(--line);
|
|
1481
1476
|
cursor: pointer;
|
|
1482
1477
|
transition: background 120ms ease;
|
|
1483
1478
|
}
|
|
1484
|
-
.chat-row:hover { background: #
|
|
1479
|
+
.chat-row:hover { background: #f6f7f5; }
|
|
1485
1480
|
input[type="checkbox"] {
|
|
1486
1481
|
position: absolute;
|
|
1487
1482
|
opacity: 0;
|
|
@@ -1491,7 +1486,7 @@ function renderMessagesSelectorPage(chats, token, error = "") {
|
|
|
1491
1486
|
width: 18px;
|
|
1492
1487
|
height: 18px;
|
|
1493
1488
|
border: 1.5px solid #C7CDC8;
|
|
1494
|
-
border-radius:
|
|
1489
|
+
border-radius: 4px;
|
|
1495
1490
|
display: inline-grid;
|
|
1496
1491
|
place-items: center;
|
|
1497
1492
|
transition: background 120ms ease, border-color 120ms ease;
|
|
@@ -1509,18 +1504,6 @@ function renderMessagesSelectorPage(chats, token, error = "") {
|
|
|
1509
1504
|
border-bottom: 2px solid #FFFFFF;
|
|
1510
1505
|
transform: rotate(-45deg) translateY(-1px);
|
|
1511
1506
|
}
|
|
1512
|
-
.avatar {
|
|
1513
|
-
width: 36px;
|
|
1514
|
-
height: 36px;
|
|
1515
|
-
border-radius: 50%;
|
|
1516
|
-
background: var(--green);
|
|
1517
|
-
color: #FFFFFF;
|
|
1518
|
-
display: grid;
|
|
1519
|
-
place-items: center;
|
|
1520
|
-
font-size: 13px;
|
|
1521
|
-
font-weight: 650;
|
|
1522
|
-
letter-spacing: 0.02em;
|
|
1523
|
-
}
|
|
1524
1507
|
.chat-name-block {
|
|
1525
1508
|
min-width: 0;
|
|
1526
1509
|
display: grid;
|
|
@@ -1531,11 +1514,11 @@ function renderMessagesSelectorPage(chats, token, error = "") {
|
|
|
1531
1514
|
text-overflow: ellipsis;
|
|
1532
1515
|
white-space: nowrap;
|
|
1533
1516
|
font-size: 15px;
|
|
1534
|
-
font-weight:
|
|
1517
|
+
font-weight: 550;
|
|
1535
1518
|
}
|
|
1536
1519
|
.chat-people {
|
|
1537
1520
|
color: var(--muted);
|
|
1538
|
-
font-size:
|
|
1521
|
+
font-size: 12.5px;
|
|
1539
1522
|
line-height: 1.3;
|
|
1540
1523
|
overflow: hidden;
|
|
1541
1524
|
text-overflow: ellipsis;
|
|
@@ -1543,25 +1526,22 @@ function renderMessagesSelectorPage(chats, token, error = "") {
|
|
|
1543
1526
|
}
|
|
1544
1527
|
.chat-kind {
|
|
1545
1528
|
justify-self: start;
|
|
1546
|
-
|
|
1547
|
-
border-radius: 999px;
|
|
1529
|
+
color: var(--muted);
|
|
1548
1530
|
font-size: 12.5px;
|
|
1549
1531
|
font-weight: 500;
|
|
1550
1532
|
}
|
|
1551
|
-
.chat-kind--group {
|
|
1552
|
-
.chat-kind--dm,
|
|
1553
|
-
.chat-kind--other { background: var(--neutral-soft); color: var(--muted); }
|
|
1533
|
+
.chat-kind--group { color: var(--green); }
|
|
1554
1534
|
.chat-meta {
|
|
1555
1535
|
color: var(--muted);
|
|
1556
|
-
font-size:
|
|
1536
|
+
font-size: 12.5px;
|
|
1557
1537
|
overflow-wrap: anywhere;
|
|
1558
1538
|
}
|
|
1559
1539
|
[hidden] { display: none !important; }
|
|
1560
1540
|
.empty {
|
|
1561
1541
|
margin: 0;
|
|
1562
|
-
padding:
|
|
1542
|
+
padding: 26px 12px;
|
|
1563
1543
|
color: var(--muted);
|
|
1564
|
-
font-size:
|
|
1544
|
+
font-size: 13px;
|
|
1565
1545
|
text-align: center;
|
|
1566
1546
|
}
|
|
1567
1547
|
.actions {
|
|
@@ -1571,36 +1551,31 @@ function renderMessagesSelectorPage(chats, token, error = "") {
|
|
|
1571
1551
|
gap: 12px;
|
|
1572
1552
|
position: sticky;
|
|
1573
1553
|
bottom: 0;
|
|
1574
|
-
margin-top:
|
|
1575
|
-
padding:
|
|
1554
|
+
margin-top: 16px;
|
|
1555
|
+
padding: 12px 0 0;
|
|
1556
|
+
background: var(--bg);
|
|
1576
1557
|
}
|
|
1577
1558
|
.selection-count {
|
|
1578
|
-
color:
|
|
1579
|
-
font-size:
|
|
1559
|
+
color: var(--muted);
|
|
1560
|
+
font-size: 13px;
|
|
1580
1561
|
font-weight: 500;
|
|
1581
1562
|
}
|
|
1582
1563
|
button {
|
|
1583
1564
|
appearance: none;
|
|
1584
1565
|
border: 0;
|
|
1585
|
-
border-radius:
|
|
1586
|
-
background: var(--
|
|
1566
|
+
border-radius: 6px;
|
|
1567
|
+
background: var(--green);
|
|
1587
1568
|
color: #FFFFFF;
|
|
1588
|
-
padding:
|
|
1569
|
+
padding: 9px 13px;
|
|
1589
1570
|
font: inherit;
|
|
1590
|
-
font-size:
|
|
1571
|
+
font-size: 13px;
|
|
1591
1572
|
font-weight: 600;
|
|
1592
1573
|
cursor: pointer;
|
|
1593
|
-
|
|
1594
|
-
align-items: center;
|
|
1595
|
-
gap: 10px;
|
|
1596
|
-
box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
|
|
1597
|
-
transition: background 120ms ease, transform 120ms ease;
|
|
1574
|
+
transition: background 120ms ease;
|
|
1598
1575
|
}
|
|
1599
|
-
button:hover { background: var(--
|
|
1600
|
-
button:active { transform: scale(0.985); }
|
|
1601
|
-
button svg { width: 18px; height: 18px; }
|
|
1576
|
+
button:hover { background: var(--green-hover); }
|
|
1602
1577
|
@media (max-width: 560px) {
|
|
1603
|
-
:root { --grid: 18px
|
|
1578
|
+
:root { --grid: 18px minmax(0, 1fr) auto; }
|
|
1604
1579
|
.list-head span:last-child,
|
|
1605
1580
|
.chat-meta { display: none; }
|
|
1606
1581
|
}
|
|
@@ -1608,11 +1583,13 @@ function renderMessagesSelectorPage(chats, token, error = "") {
|
|
|
1608
1583
|
</head>
|
|
1609
1584
|
<body>
|
|
1610
1585
|
<main>
|
|
1611
|
-
<header class="
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
<
|
|
1615
|
-
|
|
1586
|
+
<header class="header">
|
|
1587
|
+
<div class="brand">
|
|
1588
|
+
${logo ? `<img class="logo" src="${htmlAttr(logo)}" alt="">` : `<span class="logo-fallback" aria-hidden="true">S</span>`}
|
|
1589
|
+
<div>
|
|
1590
|
+
<h1>Select chats</h1>
|
|
1591
|
+
<p class="subtitle">Choose which local Messages chats Shepherd should sync.</p>
|
|
1592
|
+
</div>
|
|
1616
1593
|
</div>
|
|
1617
1594
|
</header>
|
|
1618
1595
|
<form method="post" action="/select">
|
|
@@ -1634,10 +1611,7 @@ function renderMessagesSelectorPage(chats, token, error = "") {
|
|
|
1634
1611
|
</div>
|
|
1635
1612
|
<div class="actions">
|
|
1636
1613
|
<span class="selection-count" id="selection-count">0 selected</span>
|
|
1637
|
-
<button type="submit">
|
|
1638
|
-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M19 12H5"/><path d="m12 19-7-7 7-7"/></svg>
|
|
1639
|
-
Return
|
|
1640
|
-
</button>
|
|
1614
|
+
<button type="submit">Return</button>
|
|
1641
1615
|
</div>
|
|
1642
1616
|
</form>
|
|
1643
1617
|
</main>
|
|
@@ -1709,13 +1683,6 @@ function renderChatPeople(chat) {
|
|
|
1709
1683
|
return `<span class="chat-people">${html(people)}</span>`;
|
|
1710
1684
|
}
|
|
1711
1685
|
|
|
1712
|
-
function chatInitials(label) {
|
|
1713
|
-
const words = String(label ?? "").trim().split(/\s+/).filter(Boolean);
|
|
1714
|
-
if (words.length === 0) return "?";
|
|
1715
|
-
if (words.length === 1) return words[0].slice(0, 2).toUpperCase();
|
|
1716
|
-
return (words[0][0] + words[words.length - 1][0]).toUpperCase();
|
|
1717
|
-
}
|
|
1718
|
-
|
|
1719
1686
|
function chatPeopleLine(chat) {
|
|
1720
1687
|
if (chat.kind !== "group") return "";
|
|
1721
1688
|
const names = chat.participants?.map((participant) => participant.name ?? participant.handle).filter(Boolean) ?? [];
|