@runtypelabs/persona 3.8.1 → 3.8.2
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.cjs +11 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.global.js +11 -11
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +10 -10
- package/dist/index.js.map +1 -1
- package/dist/theme-editor.cjs +16 -14
- package/dist/theme-editor.js +16 -14
- package/dist/widget.css +102 -102
- package/package.json +1 -1
- package/src/components/approval-bubble.ts +1 -0
- package/src/components/message-bubble.ts +7 -7
- package/src/components/reasoning-bubble.ts +2 -2
- package/src/components/tool-bubble.ts +2 -2
- package/src/styles/widget.css +102 -102
- package/src/ui.ts +5 -3
package/dist/widget.css
CHANGED
|
@@ -1129,7 +1129,7 @@
|
|
|
1129
1129
|
}
|
|
1130
1130
|
|
|
1131
1131
|
/* Markdown content overflow handling */
|
|
1132
|
-
.
|
|
1132
|
+
.persona-message-bubble pre {
|
|
1133
1133
|
overflow-x: auto;
|
|
1134
1134
|
max-width: 100%;
|
|
1135
1135
|
word-wrap: break-word;
|
|
@@ -1145,7 +1145,7 @@
|
|
|
1145
1145
|
border: 1px solid var(--persona-md-code-block-border-color);
|
|
1146
1146
|
}
|
|
1147
1147
|
|
|
1148
|
-
.
|
|
1148
|
+
.persona-message-bubble code {
|
|
1149
1149
|
word-break: break-word;
|
|
1150
1150
|
word-wrap: break-word;
|
|
1151
1151
|
white-space: pre-wrap;
|
|
@@ -1154,14 +1154,14 @@
|
|
|
1154
1154
|
font-size: 0.875em;
|
|
1155
1155
|
}
|
|
1156
1156
|
|
|
1157
|
-
.
|
|
1157
|
+
.persona-message-bubble pre code {
|
|
1158
1158
|
font-size: inherit;
|
|
1159
1159
|
background-color: transparent;
|
|
1160
1160
|
padding: 0;
|
|
1161
1161
|
border-radius: 0;
|
|
1162
1162
|
}
|
|
1163
1163
|
|
|
1164
|
-
.
|
|
1164
|
+
.persona-message-bubble img {
|
|
1165
1165
|
max-width: 100%;
|
|
1166
1166
|
height: auto;
|
|
1167
1167
|
display: block;
|
|
@@ -1169,32 +1169,32 @@
|
|
|
1169
1169
|
border-radius: var(--persona-radius-md, 0.375rem);
|
|
1170
1170
|
}
|
|
1171
1171
|
|
|
1172
|
-
.
|
|
1172
|
+
.persona-message-user-bubble {
|
|
1173
1173
|
border-radius: var(--persona-message-user-radius, var(--persona-radius-lg, 0.5rem));
|
|
1174
1174
|
}
|
|
1175
1175
|
|
|
1176
|
-
.
|
|
1176
|
+
.persona-message-assistant-bubble {
|
|
1177
1177
|
border-radius: var(--persona-message-assistant-radius, var(--persona-radius-lg, 0.5rem));
|
|
1178
1178
|
border-color: var(--persona-message-assistant-border, var(--persona-border, #e5e7eb));
|
|
1179
1179
|
}
|
|
1180
1180
|
|
|
1181
|
-
[data-persona-root] .
|
|
1181
|
+
[data-persona-root] .persona-message-assistant-bubble.persona-shadow-sm {
|
|
1182
1182
|
box-shadow: var(--persona-message-assistant-shadow, 0 1px 2px 0 rgb(0 0 0 / 0.05));
|
|
1183
1183
|
}
|
|
1184
1184
|
|
|
1185
|
-
[data-persona-root] .
|
|
1185
|
+
[data-persona-root] .persona-message-user-bubble.persona-shadow-sm {
|
|
1186
1186
|
box-shadow: var(--persona-message-user-shadow, 0 5px 15px rgba(15, 23, 42, 0.08));
|
|
1187
1187
|
}
|
|
1188
1188
|
|
|
1189
|
-
[data-persona-root] .
|
|
1189
|
+
[data-persona-root] .persona-tool-bubble.persona-shadow-sm {
|
|
1190
1190
|
box-shadow: var(--persona-tool-bubble-shadow, 0 5px 15px rgba(15, 23, 42, 0.08));
|
|
1191
1191
|
}
|
|
1192
1192
|
|
|
1193
|
-
[data-persona-root] .
|
|
1193
|
+
[data-persona-root] .persona-reasoning-bubble.persona-shadow-sm {
|
|
1194
1194
|
box-shadow: var(--persona-reasoning-bubble-shadow, 0 5px 15px rgba(15, 23, 42, 0.08));
|
|
1195
1195
|
}
|
|
1196
1196
|
|
|
1197
|
-
/* Artifact markdown (no .
|
|
1197
|
+
/* Artifact markdown (no .persona-message-bubble wrapper) */
|
|
1198
1198
|
[data-persona-root] .persona-markdown-bubble {
|
|
1199
1199
|
color: var(--persona-text, #111827);
|
|
1200
1200
|
font-family: var(--persona-md-prose-font-family, inherit);
|
|
@@ -1293,123 +1293,123 @@
|
|
|
1293
1293
|
}
|
|
1294
1294
|
|
|
1295
1295
|
/* Ensure all links in chat bubbles have underlines */
|
|
1296
|
-
.
|
|
1296
|
+
.persona-message-bubble a {
|
|
1297
1297
|
text-decoration: underline;
|
|
1298
1298
|
}
|
|
1299
1299
|
|
|
1300
|
-
.
|
|
1300
|
+
.persona-message-bubble a:visited {
|
|
1301
1301
|
text-decoration: underline;
|
|
1302
1302
|
}
|
|
1303
1303
|
|
|
1304
|
-
.
|
|
1304
|
+
.persona-message-bubble a:hover {
|
|
1305
1305
|
text-decoration: underline;
|
|
1306
1306
|
}
|
|
1307
1307
|
|
|
1308
|
-
.
|
|
1308
|
+
.persona-message-bubble a:active {
|
|
1309
1309
|
text-decoration: underline;
|
|
1310
1310
|
}
|
|
1311
1311
|
|
|
1312
1312
|
/* Ensure links in user messages match the text color */
|
|
1313
|
-
.
|
|
1314
|
-
.
|
|
1315
|
-
.
|
|
1316
|
-
.
|
|
1313
|
+
.persona-message-user-bubble a,
|
|
1314
|
+
.persona-message-user-bubble a:visited,
|
|
1315
|
+
.persona-message-user-bubble a:hover,
|
|
1316
|
+
.persona-message-user-bubble a:active {
|
|
1317
1317
|
color: inherit;
|
|
1318
1318
|
text-decoration: underline;
|
|
1319
1319
|
}
|
|
1320
1320
|
|
|
1321
|
-
[data-persona-root] .
|
|
1321
|
+
[data-persona-root] .persona-message-assistant-bubble a {
|
|
1322
1322
|
color: var(--persona-md-link-color, var(--persona-accent, #0f0f0f));
|
|
1323
1323
|
}
|
|
1324
1324
|
|
|
1325
1325
|
/* Markdown paragraph styles */
|
|
1326
|
-
.
|
|
1326
|
+
.persona-message-bubble p {
|
|
1327
1327
|
margin: 0;
|
|
1328
1328
|
}
|
|
1329
1329
|
|
|
1330
|
-
.
|
|
1330
|
+
.persona-message-bubble p + p {
|
|
1331
1331
|
margin-top: 0.75rem;
|
|
1332
1332
|
}
|
|
1333
1333
|
|
|
1334
1334
|
/* Markdown list styles */
|
|
1335
|
-
.
|
|
1336
|
-
.
|
|
1335
|
+
.persona-message-bubble ul,
|
|
1336
|
+
.persona-message-bubble ol {
|
|
1337
1337
|
margin: 0.5rem 0;
|
|
1338
1338
|
padding-left: 1.5rem;
|
|
1339
1339
|
}
|
|
1340
1340
|
|
|
1341
|
-
.
|
|
1341
|
+
.persona-message-bubble ul {
|
|
1342
1342
|
list-style-type: disc;
|
|
1343
1343
|
}
|
|
1344
1344
|
|
|
1345
|
-
.
|
|
1345
|
+
.persona-message-bubble ol {
|
|
1346
1346
|
list-style-type: decimal;
|
|
1347
1347
|
}
|
|
1348
1348
|
|
|
1349
|
-
.
|
|
1349
|
+
.persona-message-bubble li {
|
|
1350
1350
|
margin: 0.25rem 0;
|
|
1351
1351
|
padding-left: 0.25rem;
|
|
1352
1352
|
}
|
|
1353
1353
|
|
|
1354
1354
|
/* Nested lists */
|
|
1355
|
-
.
|
|
1356
|
-
.
|
|
1355
|
+
.persona-message-bubble ul ul,
|
|
1356
|
+
.persona-message-bubble ol ul {
|
|
1357
1357
|
list-style-type: circle;
|
|
1358
1358
|
margin: 0.25rem 0;
|
|
1359
1359
|
}
|
|
1360
1360
|
|
|
1361
|
-
.
|
|
1362
|
-
.
|
|
1363
|
-
.
|
|
1364
|
-
.
|
|
1361
|
+
.persona-message-bubble ul ul ul,
|
|
1362
|
+
.persona-message-bubble ol ul ul,
|
|
1363
|
+
.persona-message-bubble ul ol ul,
|
|
1364
|
+
.persona-message-bubble ol ol ul {
|
|
1365
1365
|
list-style-type: square;
|
|
1366
1366
|
}
|
|
1367
1367
|
|
|
1368
|
-
.
|
|
1369
|
-
.
|
|
1368
|
+
.persona-message-bubble ul ol,
|
|
1369
|
+
.persona-message-bubble ol ol {
|
|
1370
1370
|
list-style-type: lower-alpha;
|
|
1371
1371
|
margin: 0.25rem 0;
|
|
1372
1372
|
}
|
|
1373
1373
|
|
|
1374
1374
|
/* Ensure user message paragraphs and lists have proper styling too */
|
|
1375
|
-
.
|
|
1375
|
+
.persona-message-user-bubble p {
|
|
1376
1376
|
margin: 0;
|
|
1377
1377
|
color: inherit;
|
|
1378
1378
|
}
|
|
1379
1379
|
|
|
1380
|
-
.
|
|
1380
|
+
.persona-message-user-bubble p + p {
|
|
1381
1381
|
margin-top: 0.75rem;
|
|
1382
1382
|
}
|
|
1383
1383
|
|
|
1384
|
-
.
|
|
1385
|
-
.
|
|
1384
|
+
.persona-message-user-bubble ul,
|
|
1385
|
+
.persona-message-user-bubble ol {
|
|
1386
1386
|
margin: 0.5rem 0;
|
|
1387
1387
|
padding-left: 1.5rem;
|
|
1388
1388
|
}
|
|
1389
1389
|
|
|
1390
|
-
.
|
|
1390
|
+
.persona-message-user-bubble ul {
|
|
1391
1391
|
list-style-type: disc;
|
|
1392
1392
|
}
|
|
1393
1393
|
|
|
1394
|
-
.
|
|
1394
|
+
.persona-message-user-bubble ol {
|
|
1395
1395
|
list-style-type: decimal;
|
|
1396
1396
|
}
|
|
1397
1397
|
|
|
1398
|
-
.
|
|
1398
|
+
.persona-message-user-bubble li {
|
|
1399
1399
|
margin: 0.25rem 0;
|
|
1400
1400
|
padding-left: 0.25rem;
|
|
1401
1401
|
color: inherit;
|
|
1402
1402
|
}
|
|
1403
1403
|
|
|
1404
|
-
.
|
|
1405
|
-
.
|
|
1404
|
+
.persona-message-assistant-bubble p,
|
|
1405
|
+
.persona-message-assistant-bubble li {
|
|
1406
1406
|
color: inherit;
|
|
1407
1407
|
}
|
|
1408
1408
|
|
|
1409
1409
|
/* ============================================
|
|
1410
1410
|
Markdown Header Styles
|
|
1411
1411
|
============================================ */
|
|
1412
|
-
.
|
|
1412
|
+
.persona-message-bubble h1,
|
|
1413
1413
|
[data-persona-root] .persona-markdown-bubble h1 {
|
|
1414
1414
|
font-size: var(--persona-md-h1-size);
|
|
1415
1415
|
font-weight: var(--persona-md-h1-weight);
|
|
@@ -1418,7 +1418,7 @@
|
|
|
1418
1418
|
color: inherit;
|
|
1419
1419
|
}
|
|
1420
1420
|
|
|
1421
|
-
.
|
|
1421
|
+
.persona-message-bubble h2,
|
|
1422
1422
|
[data-persona-root] .persona-markdown-bubble h2 {
|
|
1423
1423
|
font-size: var(--persona-md-h2-size);
|
|
1424
1424
|
font-weight: var(--persona-md-h2-weight);
|
|
@@ -1427,7 +1427,7 @@
|
|
|
1427
1427
|
color: inherit;
|
|
1428
1428
|
}
|
|
1429
1429
|
|
|
1430
|
-
.
|
|
1430
|
+
.persona-message-bubble h3,
|
|
1431
1431
|
[data-persona-root] .persona-markdown-bubble h3 {
|
|
1432
1432
|
font-size: var(--persona-md-h3-size);
|
|
1433
1433
|
font-weight: var(--persona-md-h3-weight);
|
|
@@ -1436,7 +1436,7 @@
|
|
|
1436
1436
|
color: inherit;
|
|
1437
1437
|
}
|
|
1438
1438
|
|
|
1439
|
-
.
|
|
1439
|
+
.persona-message-bubble h4,
|
|
1440
1440
|
[data-persona-root] .persona-markdown-bubble h4 {
|
|
1441
1441
|
font-size: var(--persona-md-h4-size);
|
|
1442
1442
|
font-weight: var(--persona-md-h4-weight);
|
|
@@ -1445,7 +1445,7 @@
|
|
|
1445
1445
|
color: inherit;
|
|
1446
1446
|
}
|
|
1447
1447
|
|
|
1448
|
-
.
|
|
1448
|
+
.persona-message-bubble h5,
|
|
1449
1449
|
[data-persona-root] .persona-markdown-bubble h5 {
|
|
1450
1450
|
font-size: var(--persona-md-h5-size);
|
|
1451
1451
|
font-weight: var(--persona-md-h5-weight);
|
|
@@ -1454,7 +1454,7 @@
|
|
|
1454
1454
|
color: inherit;
|
|
1455
1455
|
}
|
|
1456
1456
|
|
|
1457
|
-
.
|
|
1457
|
+
.persona-message-bubble h6,
|
|
1458
1458
|
[data-persona-root] .persona-markdown-bubble h6 {
|
|
1459
1459
|
font-size: var(--persona-md-h6-size);
|
|
1460
1460
|
font-weight: var(--persona-md-h6-weight);
|
|
@@ -1464,19 +1464,19 @@
|
|
|
1464
1464
|
}
|
|
1465
1465
|
|
|
1466
1466
|
/* Remove top margin on first heading */
|
|
1467
|
-
.
|
|
1468
|
-
.
|
|
1469
|
-
.
|
|
1470
|
-
.
|
|
1471
|
-
.
|
|
1472
|
-
.
|
|
1467
|
+
.persona-message-bubble h1:first-child,
|
|
1468
|
+
.persona-message-bubble h2:first-child,
|
|
1469
|
+
.persona-message-bubble h3:first-child,
|
|
1470
|
+
.persona-message-bubble h4:first-child,
|
|
1471
|
+
.persona-message-bubble h5:first-child,
|
|
1472
|
+
.persona-message-bubble h6:first-child {
|
|
1473
1473
|
margin-top: 0;
|
|
1474
1474
|
}
|
|
1475
1475
|
|
|
1476
1476
|
/* ============================================
|
|
1477
1477
|
Markdown Table Styles
|
|
1478
1478
|
============================================ */
|
|
1479
|
-
.
|
|
1479
|
+
.persona-message-bubble table {
|
|
1480
1480
|
width: 100%;
|
|
1481
1481
|
border-collapse: collapse;
|
|
1482
1482
|
margin: 0.5rem 0;
|
|
@@ -1486,35 +1486,35 @@
|
|
|
1486
1486
|
border: 1px solid var(--persona-md-table-border-color);
|
|
1487
1487
|
}
|
|
1488
1488
|
|
|
1489
|
-
.
|
|
1489
|
+
.persona-message-bubble thead {
|
|
1490
1490
|
background-color: var(--persona-md-table-header-bg);
|
|
1491
1491
|
}
|
|
1492
1492
|
|
|
1493
|
-
.
|
|
1493
|
+
.persona-message-bubble th {
|
|
1494
1494
|
font-weight: var(--persona-md-table-header-weight);
|
|
1495
1495
|
text-align: left;
|
|
1496
1496
|
padding: var(--persona-md-table-cell-padding);
|
|
1497
1497
|
border-bottom: 1px solid var(--persona-md-table-border-color);
|
|
1498
1498
|
}
|
|
1499
1499
|
|
|
1500
|
-
.
|
|
1500
|
+
.persona-message-bubble td {
|
|
1501
1501
|
padding: var(--persona-md-table-cell-padding);
|
|
1502
1502
|
border-bottom: 1px solid var(--persona-md-table-border-color);
|
|
1503
1503
|
text-align: left;
|
|
1504
1504
|
}
|
|
1505
1505
|
|
|
1506
|
-
.
|
|
1506
|
+
.persona-message-bubble tr:last-child td {
|
|
1507
1507
|
border-bottom: none;
|
|
1508
1508
|
}
|
|
1509
1509
|
|
|
1510
|
-
.
|
|
1510
|
+
.persona-message-bubble tbody tr:nth-child(even) {
|
|
1511
1511
|
background-color: rgba(0, 0, 0, 0.02);
|
|
1512
1512
|
}
|
|
1513
1513
|
|
|
1514
1514
|
/* ============================================
|
|
1515
1515
|
Markdown Horizontal Rule Styles
|
|
1516
1516
|
============================================ */
|
|
1517
|
-
.
|
|
1517
|
+
.persona-message-bubble hr {
|
|
1518
1518
|
border: none;
|
|
1519
1519
|
height: var(--persona-md-hr-height);
|
|
1520
1520
|
background-color: var(--persona-md-hr-color);
|
|
@@ -1524,7 +1524,7 @@
|
|
|
1524
1524
|
/* ============================================
|
|
1525
1525
|
Markdown Blockquote Styles
|
|
1526
1526
|
============================================ */
|
|
1527
|
-
.
|
|
1527
|
+
.persona-message-bubble blockquote {
|
|
1528
1528
|
border-left: var(--persona-md-blockquote-border-width) solid var(--persona-md-blockquote-border-color);
|
|
1529
1529
|
padding: var(--persona-md-blockquote-padding);
|
|
1530
1530
|
margin: var(--persona-md-blockquote-margin);
|
|
@@ -1533,23 +1533,23 @@
|
|
|
1533
1533
|
font-style: var(--persona-md-blockquote-font-style);
|
|
1534
1534
|
}
|
|
1535
1535
|
|
|
1536
|
-
.
|
|
1536
|
+
.persona-message-bubble blockquote p {
|
|
1537
1537
|
margin: 0;
|
|
1538
1538
|
}
|
|
1539
1539
|
|
|
1540
|
-
.
|
|
1540
|
+
.persona-message-bubble blockquote p + p {
|
|
1541
1541
|
margin-top: 0.5rem;
|
|
1542
1542
|
}
|
|
1543
1543
|
|
|
1544
1544
|
/* Nested blockquotes */
|
|
1545
|
-
.
|
|
1545
|
+
.persona-message-bubble blockquote blockquote {
|
|
1546
1546
|
margin-left: 0.5rem;
|
|
1547
1547
|
}
|
|
1548
1548
|
|
|
1549
1549
|
/* ============================================
|
|
1550
1550
|
Markdown Inline Code Styles (not in pre)
|
|
1551
1551
|
============================================ */
|
|
1552
|
-
.
|
|
1552
|
+
.persona-message-bubble code:not(pre code) {
|
|
1553
1553
|
background-color: var(--persona-md-inline-code-bg);
|
|
1554
1554
|
color: var(--persona-md-inline-code-color, inherit);
|
|
1555
1555
|
padding: var(--persona-md-inline-code-padding);
|
|
@@ -1560,13 +1560,13 @@
|
|
|
1560
1560
|
/* ============================================
|
|
1561
1561
|
Markdown Strong/Emphasis Styles
|
|
1562
1562
|
============================================ */
|
|
1563
|
-
.
|
|
1564
|
-
.
|
|
1563
|
+
.persona-message-bubble strong,
|
|
1564
|
+
.persona-message-bubble b {
|
|
1565
1565
|
font-weight: var(--persona-md-strong-weight);
|
|
1566
1566
|
}
|
|
1567
1567
|
|
|
1568
|
-
.
|
|
1569
|
-
.
|
|
1568
|
+
.persona-message-bubble em,
|
|
1569
|
+
.persona-message-bubble i {
|
|
1570
1570
|
font-style: var(--persona-md-em-style);
|
|
1571
1571
|
}
|
|
1572
1572
|
|
|
@@ -1574,43 +1574,43 @@
|
|
|
1574
1574
|
User Message Markdown Overrides
|
|
1575
1575
|
Ensure styles work in user bubbles too
|
|
1576
1576
|
============================================ */
|
|
1577
|
-
.
|
|
1578
|
-
.
|
|
1579
|
-
.
|
|
1580
|
-
.
|
|
1581
|
-
.
|
|
1582
|
-
.
|
|
1577
|
+
.persona-message-user-bubble h1,
|
|
1578
|
+
.persona-message-user-bubble h2,
|
|
1579
|
+
.persona-message-user-bubble h3,
|
|
1580
|
+
.persona-message-user-bubble h4,
|
|
1581
|
+
.persona-message-user-bubble h5,
|
|
1582
|
+
.persona-message-user-bubble h6 {
|
|
1583
1583
|
color: inherit;
|
|
1584
1584
|
}
|
|
1585
1585
|
|
|
1586
|
-
.
|
|
1586
|
+
.persona-message-user-bubble table {
|
|
1587
1587
|
border-color: rgba(255, 255, 255, 0.3);
|
|
1588
1588
|
}
|
|
1589
1589
|
|
|
1590
|
-
.
|
|
1591
|
-
.
|
|
1590
|
+
.persona-message-user-bubble th,
|
|
1591
|
+
.persona-message-user-bubble td {
|
|
1592
1592
|
border-color: rgba(255, 255, 255, 0.3);
|
|
1593
1593
|
}
|
|
1594
1594
|
|
|
1595
|
-
.
|
|
1595
|
+
.persona-message-user-bubble thead {
|
|
1596
1596
|
background-color: rgba(255, 255, 255, 0.1);
|
|
1597
1597
|
}
|
|
1598
1598
|
|
|
1599
|
-
.
|
|
1599
|
+
.persona-message-user-bubble tbody tr:nth-child(even) {
|
|
1600
1600
|
background-color: rgba(255, 255, 255, 0.05);
|
|
1601
1601
|
}
|
|
1602
1602
|
|
|
1603
|
-
.
|
|
1603
|
+
.persona-message-user-bubble hr {
|
|
1604
1604
|
background-color: rgba(255, 255, 255, 0.3);
|
|
1605
1605
|
}
|
|
1606
1606
|
|
|
1607
|
-
.
|
|
1607
|
+
.persona-message-user-bubble blockquote {
|
|
1608
1608
|
border-left-color: rgba(255, 255, 255, 0.5);
|
|
1609
1609
|
color: inherit;
|
|
1610
1610
|
opacity: 0.9;
|
|
1611
1611
|
}
|
|
1612
1612
|
|
|
1613
|
-
.
|
|
1613
|
+
.persona-message-user-bubble code:not(pre code) {
|
|
1614
1614
|
background-color: rgba(255, 255, 255, 0.2);
|
|
1615
1615
|
}
|
|
1616
1616
|
|
|
@@ -1619,7 +1619,7 @@
|
|
|
1619
1619
|
============================================ */
|
|
1620
1620
|
|
|
1621
1621
|
/* Make message bubble position relative for overlay positioning */
|
|
1622
|
-
.
|
|
1622
|
+
.persona-message-bubble {
|
|
1623
1623
|
position: relative;
|
|
1624
1624
|
}
|
|
1625
1625
|
|
|
@@ -1756,8 +1756,8 @@
|
|
|
1756
1756
|
border-radius: 0 0 var(--persona-radius-lg, 1.5rem) var(--persona-radius-lg, 1.5rem);
|
|
1757
1757
|
}
|
|
1758
1758
|
|
|
1759
|
-
.
|
|
1760
|
-
.
|
|
1759
|
+
.persona-message-bubble:hover .persona-message-actions-hover,
|
|
1760
|
+
.persona-message-bubble:focus-within .persona-message-actions-hover {
|
|
1761
1761
|
opacity: 1;
|
|
1762
1762
|
pointer-events: auto;
|
|
1763
1763
|
}
|
|
@@ -2069,25 +2069,25 @@
|
|
|
2069
2069
|
============================================ */
|
|
2070
2070
|
|
|
2071
2071
|
/* Content areas: themed border and background for tool/reasoning bubbles */
|
|
2072
|
-
.
|
|
2073
|
-
.
|
|
2072
|
+
.persona-tool-bubble .persona-border-t,
|
|
2073
|
+
.persona-reasoning-bubble .persona-border-t {
|
|
2074
2074
|
border-top-color: var(--cw-border, #e5e7eb);
|
|
2075
2075
|
background-color: var(--cw-container, #f9fafb);
|
|
2076
2076
|
}
|
|
2077
2077
|
|
|
2078
2078
|
/* Tool bubble code blocks: themed surface and border */
|
|
2079
|
-
.
|
|
2079
|
+
.persona-tool-bubble pre {
|
|
2080
2080
|
background-color: var(--cw-surface, #ffffff);
|
|
2081
2081
|
border-color: var(--cw-border, #f1f5f9);
|
|
2082
2082
|
}
|
|
2083
2083
|
|
|
2084
2084
|
/* Collapsible header hover (tool + reasoning) */
|
|
2085
|
-
.
|
|
2086
|
-
.
|
|
2085
|
+
.persona-tool-bubble button[data-expand-header],
|
|
2086
|
+
.persona-reasoning-bubble button[data-expand-header] {
|
|
2087
2087
|
transition: background-color 0.15s ease;
|
|
2088
2088
|
}
|
|
2089
|
-
.
|
|
2090
|
-
.
|
|
2089
|
+
.persona-tool-bubble button[data-expand-header]:hover,
|
|
2090
|
+
.persona-reasoning-bubble button[data-expand-header]:hover {
|
|
2091
2091
|
background-color: var(--cw-container, #f8fafc);
|
|
2092
2092
|
}
|
|
2093
2093
|
|
|
@@ -2096,25 +2096,25 @@
|
|
|
2096
2096
|
============================================ */
|
|
2097
2097
|
|
|
2098
2098
|
/* Approval bubble defaults (overridden by inline styles when config exists) */
|
|
2099
|
-
.
|
|
2099
|
+
.persona-approval-bubble {
|
|
2100
2100
|
background-color: var(--cw-surface, #ffffff);
|
|
2101
2101
|
border-color: var(--cw-border, #e5e7eb);
|
|
2102
2102
|
}
|
|
2103
2103
|
|
|
2104
2104
|
/* Approval button hover/active states */
|
|
2105
|
-
.
|
|
2105
|
+
.persona-approval-bubble [data-approval-action] {
|
|
2106
2106
|
transition: opacity 0.15s ease, transform 0.1s ease, background-color 0.15s ease;
|
|
2107
2107
|
}
|
|
2108
|
-
.
|
|
2108
|
+
.persona-approval-bubble [data-approval-action="approve"]:hover {
|
|
2109
2109
|
opacity: 0.85;
|
|
2110
2110
|
}
|
|
2111
|
-
.
|
|
2111
|
+
.persona-approval-bubble [data-approval-action="approve"]:active {
|
|
2112
2112
|
transform: scale(0.97);
|
|
2113
2113
|
}
|
|
2114
|
-
.
|
|
2114
|
+
.persona-approval-bubble [data-approval-action="deny"]:hover {
|
|
2115
2115
|
background-color: rgba(220, 38, 38, 0.08);
|
|
2116
2116
|
}
|
|
2117
|
-
.
|
|
2117
|
+
.persona-approval-bubble [data-approval-action="deny"]:active {
|
|
2118
2118
|
transform: scale(0.97);
|
|
2119
2119
|
}
|
|
2120
2120
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@runtypelabs/persona",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.2",
|
|
4
4
|
"description": "Themeable, pluggable streaming agent widget for websites, in plain JS with support for voice input and reasoning / tool output.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -276,21 +276,21 @@ const getBubbleClasses = (
|
|
|
276
276
|
role: "user" | "assistant" | "system",
|
|
277
277
|
layout: AgentWidgetMessageLayoutConfig["layout"] = "bubble"
|
|
278
278
|
): string[] => {
|
|
279
|
-
const baseClasses = ["
|
|
279
|
+
const baseClasses = ["persona-message-bubble", "persona-max-w-[85%]"];
|
|
280
280
|
|
|
281
281
|
switch (layout) {
|
|
282
282
|
case "flat":
|
|
283
283
|
// Flat layout: no bubble styling, just text
|
|
284
284
|
if (role === "user") {
|
|
285
285
|
baseClasses.push(
|
|
286
|
-
"
|
|
286
|
+
"persona-message-user-bubble",
|
|
287
287
|
"persona-ml-auto",
|
|
288
288
|
"persona-text-persona-primary",
|
|
289
289
|
"persona-py-2"
|
|
290
290
|
);
|
|
291
291
|
} else {
|
|
292
292
|
baseClasses.push(
|
|
293
|
-
"
|
|
293
|
+
"persona-message-assistant-bubble",
|
|
294
294
|
"persona-text-persona-primary",
|
|
295
295
|
"persona-py-2"
|
|
296
296
|
);
|
|
@@ -305,7 +305,7 @@ const getBubbleClasses = (
|
|
|
305
305
|
);
|
|
306
306
|
if (role === "user") {
|
|
307
307
|
baseClasses.push(
|
|
308
|
-
"
|
|
308
|
+
"persona-message-user-bubble",
|
|
309
309
|
"persona-ml-auto",
|
|
310
310
|
"persona-bg-persona-accent",
|
|
311
311
|
"persona-text-white",
|
|
@@ -315,7 +315,7 @@ const getBubbleClasses = (
|
|
|
315
315
|
);
|
|
316
316
|
} else {
|
|
317
317
|
baseClasses.push(
|
|
318
|
-
"
|
|
318
|
+
"persona-message-assistant-bubble",
|
|
319
319
|
"persona-bg-persona-surface",
|
|
320
320
|
"persona-text-persona-primary",
|
|
321
321
|
"persona-px-3",
|
|
@@ -336,7 +336,7 @@ const getBubbleClasses = (
|
|
|
336
336
|
);
|
|
337
337
|
if (role === "user") {
|
|
338
338
|
baseClasses.push(
|
|
339
|
-
"
|
|
339
|
+
"persona-message-user-bubble",
|
|
340
340
|
"persona-ml-auto",
|
|
341
341
|
"persona-bg-persona-accent",
|
|
342
342
|
"persona-text-white",
|
|
@@ -345,7 +345,7 @@ const getBubbleClasses = (
|
|
|
345
345
|
);
|
|
346
346
|
} else {
|
|
347
347
|
baseClasses.push(
|
|
348
|
-
"
|
|
348
|
+
"persona-message-assistant-bubble",
|
|
349
349
|
"persona-bg-persona-surface",
|
|
350
350
|
"persona-border",
|
|
351
351
|
"persona-border-persona-message-border",
|
|
@@ -38,8 +38,8 @@ export const createReasoningBubble = (message: AgentWidgetMessage): HTMLElement
|
|
|
38
38
|
const bubble = createElement(
|
|
39
39
|
"div",
|
|
40
40
|
[
|
|
41
|
-
"
|
|
42
|
-
"
|
|
41
|
+
"persona-message-bubble",
|
|
42
|
+
"persona-reasoning-bubble",
|
|
43
43
|
"persona-w-full",
|
|
44
44
|
"persona-max-w-[85%]",
|
|
45
45
|
"persona-rounded-2xl",
|
|
@@ -41,8 +41,8 @@ export const createToolBubble = (message: AgentWidgetMessage, config?: AgentWidg
|
|
|
41
41
|
const bubble = createElement(
|
|
42
42
|
"div",
|
|
43
43
|
[
|
|
44
|
-
"
|
|
45
|
-
"
|
|
44
|
+
"persona-message-bubble",
|
|
45
|
+
"persona-tool-bubble",
|
|
46
46
|
"persona-w-full",
|
|
47
47
|
"persona-max-w-[85%]",
|
|
48
48
|
"persona-rounded-2xl",
|