@tldraw/tldraw 5.7.0-canary.dcd1f2f4ac29 → 5.7.0-canary.e3e1885f07be
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-cjs/index.js +1 -1
- package/dist-esm/index.mjs +1 -1
- package/package.json +2 -2
- package/tldraw.css +159 -72
package/dist-cjs/index.js
CHANGED
|
@@ -19,7 +19,7 @@ var import_tldraw = require("tldraw");
|
|
|
19
19
|
__reExport(index_exports, require("tldraw"), module.exports);
|
|
20
20
|
(0, import_tldraw.registerTldrawLibraryVersion)(
|
|
21
21
|
"@tldraw/tldraw",
|
|
22
|
-
"5.7.0-canary.
|
|
22
|
+
"5.7.0-canary.e3e1885f07be",
|
|
23
23
|
"cjs"
|
|
24
24
|
);
|
|
25
25
|
//# sourceMappingURL=index.js.map
|
package/dist-esm/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tldraw/tldraw",
|
|
3
3
|
"description": "A tiny little drawing editor.",
|
|
4
|
-
"version": "5.7.0-canary.
|
|
4
|
+
"version": "5.7.0-canary.e3e1885f07be",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "tldraw Inc.",
|
|
7
7
|
"email": "hello@tldraw.com"
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"src"
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"tldraw": "5.7.0-canary.
|
|
42
|
+
"tldraw": "5.7.0-canary.e3e1885f07be"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"react": "^18.2.0 || ^19.2.1",
|
package/tldraw.css
CHANGED
|
@@ -270,6 +270,33 @@
|
|
|
270
270
|
inset 0px 0px 0px 1px var(--tl-color-panel-contrast);
|
|
271
271
|
}
|
|
272
272
|
|
|
273
|
+
/* The wash an open menu trigger shows: clear at one edge, muted-2 at the other, named for the
|
|
274
|
+
direction it fades in. Declared on the theme element, after both themes' colours, so each stop
|
|
275
|
+
resolves to the current theme's value. */
|
|
276
|
+
.tl-theme__light,
|
|
277
|
+
.tl-theme__dark {
|
|
278
|
+
--tl-muted-gradient-to-bottom: linear-gradient(
|
|
279
|
+
180deg,
|
|
280
|
+
var(--tl-color-muted-none) 0%,
|
|
281
|
+
var(--tl-color-muted-2) 100%
|
|
282
|
+
);
|
|
283
|
+
--tl-muted-gradient-to-top: linear-gradient(
|
|
284
|
+
0deg,
|
|
285
|
+
var(--tl-color-muted-none) 0%,
|
|
286
|
+
var(--tl-color-muted-2) 100%
|
|
287
|
+
);
|
|
288
|
+
--tl-muted-gradient-to-right: linear-gradient(
|
|
289
|
+
90deg,
|
|
290
|
+
var(--tl-color-muted-none) 0%,
|
|
291
|
+
var(--tl-color-muted-2) 100%
|
|
292
|
+
);
|
|
293
|
+
--tl-muted-gradient-to-left: linear-gradient(
|
|
294
|
+
270deg,
|
|
295
|
+
var(--tl-color-muted-none) 0%,
|
|
296
|
+
var(--tl-color-muted-2) 100%
|
|
297
|
+
);
|
|
298
|
+
}
|
|
299
|
+
|
|
273
300
|
.tl-counter-scaled {
|
|
274
301
|
transform: scale(var(--tl-scale));
|
|
275
302
|
transform-origin: top left;
|
|
@@ -1462,40 +1489,47 @@ it from receiving any pointer events or affecting the cursor. */
|
|
|
1462
1489
|
}
|
|
1463
1490
|
|
|
1464
1491
|
.tl-error-boundary__content {
|
|
1465
|
-
width: fit-content;
|
|
1466
|
-
height: fit-content;
|
|
1467
|
-
max-width: 100%;
|
|
1468
1492
|
width: 400px;
|
|
1493
|
+
max-width: 100%;
|
|
1469
1494
|
max-height: 100%;
|
|
1470
1495
|
background-color: var(--tl-color-panel);
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
font-size: 14px;
|
|
1496
|
+
border-radius: var(--tl-radius-3);
|
|
1497
|
+
box-shadow: var(--tl-shadow-3);
|
|
1498
|
+
font-size: 12px;
|
|
1475
1499
|
font-weight: 400;
|
|
1476
1500
|
display: flex;
|
|
1477
1501
|
flex-direction: column;
|
|
1478
|
-
overflow:
|
|
1502
|
+
overflow: hidden;
|
|
1479
1503
|
z-index: var(--tl-layer-error-content);
|
|
1480
|
-
gap: 12px;
|
|
1481
1504
|
}
|
|
1482
1505
|
|
|
1483
1506
|
.tl-error-boundary__content__expanded {
|
|
1484
1507
|
width: 600px;
|
|
1485
1508
|
}
|
|
1486
1509
|
|
|
1487
|
-
.tl-error-
|
|
1488
|
-
|
|
1510
|
+
.tl-error-boundary__title {
|
|
1511
|
+
flex: 0 0 auto;
|
|
1512
|
+
display: flex;
|
|
1513
|
+
align-items: center;
|
|
1514
|
+
height: 40px;
|
|
1489
1515
|
margin: 0px;
|
|
1516
|
+
padding-inline: var(--tl-space-4);
|
|
1517
|
+
font-size: 12px;
|
|
1490
1518
|
font-weight: 500;
|
|
1519
|
+
color: var(--tl-color-text-1);
|
|
1491
1520
|
}
|
|
1492
1521
|
|
|
1493
|
-
.tl-error-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1522
|
+
.tl-error-boundary__body {
|
|
1523
|
+
flex: 0 1 auto;
|
|
1524
|
+
min-height: 0;
|
|
1525
|
+
display: flex;
|
|
1526
|
+
flex-direction: column;
|
|
1527
|
+
gap: var(--tl-space-4);
|
|
1528
|
+
padding: var(--tl-space-4) var(--tl-space-4);
|
|
1529
|
+
overflow-y: auto;
|
|
1530
|
+
overflow-x: hidden;
|
|
1531
|
+
overflow-wrap: anywhere;
|
|
1532
|
+
color: var(--tl-color-text-1);
|
|
1499
1533
|
}
|
|
1500
1534
|
|
|
1501
1535
|
.tl-error-boundary__content p {
|
|
@@ -1503,27 +1537,28 @@ it from receiving any pointer events or affecting the cursor. */
|
|
|
1503
1537
|
margin: 0px;
|
|
1504
1538
|
}
|
|
1505
1539
|
|
|
1540
|
+
.tl-error-boundary__content strong {
|
|
1541
|
+
font-weight: 600;
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1506
1544
|
.tl-error-boundary__content pre {
|
|
1545
|
+
margin: 0px;
|
|
1546
|
+
padding: var(--tl-space-3) var(--tl-space-4);
|
|
1507
1547
|
background-color: var(--tl-color-muted-2);
|
|
1508
|
-
margin-top: 0;
|
|
1509
|
-
padding: var(--tl-space-5);
|
|
1510
1548
|
border-radius: var(--tl-radius-2);
|
|
1511
|
-
|
|
1512
|
-
font-size:
|
|
1513
|
-
|
|
1549
|
+
font-family: var(--tl-font-mono);
|
|
1550
|
+
font-size: 11px;
|
|
1551
|
+
line-height: 1.6;
|
|
1514
1552
|
}
|
|
1515
1553
|
|
|
1516
|
-
.tl-error-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
cursor: var(--tl-cursor-pointer);
|
|
1525
|
-
color: inherit;
|
|
1526
|
-
background-color: transparent;
|
|
1554
|
+
.tl-error-boundary__stack {
|
|
1555
|
+
position: relative;
|
|
1556
|
+
}
|
|
1557
|
+
|
|
1558
|
+
.tl-error-boundary__stack pre {
|
|
1559
|
+
overflow: auto;
|
|
1560
|
+
max-height: 240px;
|
|
1561
|
+
overflow-wrap: normal;
|
|
1527
1562
|
}
|
|
1528
1563
|
|
|
1529
1564
|
.tl-error-boundary__content a {
|
|
@@ -1532,43 +1567,93 @@ it from receiving any pointer events or affecting the cursor. */
|
|
|
1532
1567
|
text-decoration: none;
|
|
1533
1568
|
}
|
|
1534
1569
|
|
|
1535
|
-
.
|
|
1570
|
+
/* Mirrors .tlui-button so the fallback looks the same when only editor.css is loaded. */
|
|
1571
|
+
.tl-error-boundary__button {
|
|
1536
1572
|
position: relative;
|
|
1537
|
-
|
|
1573
|
+
isolation: isolate;
|
|
1574
|
+
height: 40px;
|
|
1575
|
+
min-width: 40px;
|
|
1576
|
+
padding: 0px 12px;
|
|
1577
|
+
display: flex;
|
|
1578
|
+
align-items: center;
|
|
1579
|
+
justify-content: center;
|
|
1580
|
+
background: none;
|
|
1581
|
+
border: none;
|
|
1582
|
+
font-family: inherit;
|
|
1583
|
+
font-size: 12px;
|
|
1584
|
+
font-weight: inherit;
|
|
1585
|
+
color: var(--tl-color-text-1);
|
|
1586
|
+
cursor: var(--tl-cursor-pointer);
|
|
1587
|
+
}
|
|
1588
|
+
|
|
1589
|
+
.tl-error-boundary__button::after {
|
|
1590
|
+
content: '';
|
|
1591
|
+
position: absolute;
|
|
1592
|
+
inset: 4px;
|
|
1593
|
+
z-index: -1;
|
|
1594
|
+
border-radius: var(--tl-radius-2);
|
|
1595
|
+
background: var(--tl-color-muted-2);
|
|
1596
|
+
opacity: 0;
|
|
1538
1597
|
}
|
|
1539
1598
|
|
|
1540
|
-
.tl-error-
|
|
1599
|
+
.tl-error-boundary__content .tl-error-boundary__copy {
|
|
1541
1600
|
position: absolute;
|
|
1542
1601
|
top: var(--tl-space-2);
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1602
|
+
inset-inline-end: var(--tl-space-2);
|
|
1603
|
+
height: 32px;
|
|
1604
|
+
min-width: 32px;
|
|
1605
|
+
padding: 0px;
|
|
1606
|
+
color: var(--tl-color-text-3);
|
|
1546
1607
|
background-color: var(--tl-color-panel);
|
|
1547
|
-
border-radius: var(--tl-radius-
|
|
1608
|
+
border-radius: var(--tl-radius-2);
|
|
1609
|
+
}
|
|
1610
|
+
|
|
1611
|
+
.tl-error-boundary__content .tl-error-boundary__copy::after {
|
|
1612
|
+
inset: 0px;
|
|
1613
|
+
}
|
|
1614
|
+
|
|
1615
|
+
/* Touch screens can't hover, so the button stays visible there. */
|
|
1616
|
+
@media (hover: hover) {
|
|
1617
|
+
.tl-error-boundary__content .tl-error-boundary__copy {
|
|
1618
|
+
opacity: 0;
|
|
1619
|
+
}
|
|
1620
|
+
|
|
1621
|
+
.tl-error-boundary__stack:hover .tl-error-boundary__copy,
|
|
1622
|
+
.tl-error-boundary__stack:focus-within .tl-error-boundary__copy,
|
|
1623
|
+
.tl-error-boundary__stack[data-copied='true'] .tl-error-boundary__copy {
|
|
1624
|
+
opacity: 1;
|
|
1625
|
+
}
|
|
1548
1626
|
}
|
|
1549
1627
|
|
|
1550
1628
|
.tl-error-boundary__content__actions {
|
|
1629
|
+
flex: 0 0 auto;
|
|
1551
1630
|
display: flex;
|
|
1631
|
+
align-items: center;
|
|
1552
1632
|
justify-content: space-between;
|
|
1553
|
-
|
|
1554
|
-
margin: 0px;
|
|
1555
|
-
margin-left: -4px;
|
|
1633
|
+
height: 40px;
|
|
1556
1634
|
}
|
|
1635
|
+
|
|
1557
1636
|
.tl-error-boundary__content__actions__group {
|
|
1558
1637
|
display: flex;
|
|
1559
|
-
|
|
1638
|
+
align-items: center;
|
|
1560
1639
|
}
|
|
1561
|
-
|
|
1562
|
-
|
|
1640
|
+
|
|
1641
|
+
.tl-error-boundary__content__actions__group > .tl-error-boundary__button:nth-last-child(n + 2) {
|
|
1642
|
+
margin-inline-end: -4px;
|
|
1563
1643
|
}
|
|
1644
|
+
|
|
1564
1645
|
.tl-error-boundary__content .tl-error-boundary__refresh {
|
|
1565
|
-
|
|
1566
|
-
color: var(--tl-color-selected-contrast);
|
|
1646
|
+
color: var(--tl-color-primary);
|
|
1567
1647
|
}
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1648
|
+
|
|
1649
|
+
.tl-error-boundary__content .tl-error-boundary__reset {
|
|
1650
|
+
color: var(--tl-color-danger);
|
|
1651
|
+
}
|
|
1652
|
+
|
|
1653
|
+
.tl-container__focused:not(.tl-container__no-focus-ring) .tl-error-boundary__button:focus-visible {
|
|
1654
|
+
border-radius: 10px;
|
|
1655
|
+
outline: 2px solid var(--tl-color-focus);
|
|
1656
|
+
outline-offset: -5px;
|
|
1572
1657
|
}
|
|
1573
1658
|
|
|
1574
1659
|
/* ---------------- Hit test blocker ---------------- */
|
|
@@ -1606,16 +1691,12 @@ it from receiving any pointer events or affecting the cursor. */
|
|
|
1606
1691
|
color: var(--tl-color-selected);
|
|
1607
1692
|
}
|
|
1608
1693
|
|
|
1609
|
-
.tl-error-
|
|
1610
|
-
|
|
1694
|
+
.tl-error-boundary__button:hover::after {
|
|
1695
|
+
opacity: 1;
|
|
1611
1696
|
}
|
|
1612
1697
|
.tl-error-boundary__content a:hover {
|
|
1613
1698
|
color: var(--tl-color-text-1);
|
|
1614
1699
|
}
|
|
1615
|
-
.tl-error-boundary__content .tl-error-boundary__refresh:hover {
|
|
1616
|
-
background-color: var(--tl-color-primary);
|
|
1617
|
-
opacity: 0.9;
|
|
1618
|
-
}
|
|
1619
1700
|
|
|
1620
1701
|
/* These three rules help preserve clicking into specific points in text areas *while*
|
|
1621
1702
|
* already in edit mode when jumping from shape to shape. */
|
|
@@ -1744,13 +1825,13 @@ it from receiving any pointer events or affecting the cursor. */
|
|
|
1744
1825
|
}
|
|
1745
1826
|
|
|
1746
1827
|
.tlui-button[aria-expanded='true'][data-direction='left'] {
|
|
1747
|
-
background:
|
|
1828
|
+
background: var(--tl-muted-gradient-to-left);
|
|
1748
1829
|
opacity: 1;
|
|
1749
1830
|
}
|
|
1750
1831
|
|
|
1751
1832
|
@media (hover: hover) {
|
|
1752
1833
|
.tlui-button[aria-expanded='true'][data-direction='left']:not(:hover)::after {
|
|
1753
|
-
background:
|
|
1834
|
+
background: var(--tl-muted-gradient-to-left);
|
|
1754
1835
|
opacity: 1;
|
|
1755
1836
|
}
|
|
1756
1837
|
|
|
@@ -1954,7 +2035,7 @@ it from receiving any pointer events or affecting the cursor. */
|
|
|
1954
2035
|
}
|
|
1955
2036
|
|
|
1956
2037
|
.tlui-zoom-menu__button[data-state='open']::after {
|
|
1957
|
-
background:
|
|
2038
|
+
background: var(--tl-muted-gradient-to-top);
|
|
1958
2039
|
opacity: 1;
|
|
1959
2040
|
}
|
|
1960
2041
|
|
|
@@ -2205,7 +2286,7 @@ it from receiving any pointer events or affecting the cursor. */
|
|
|
2205
2286
|
|
|
2206
2287
|
.tlui-select__chevron {
|
|
2207
2288
|
flex-shrink: 0;
|
|
2208
|
-
color: var(--tl-color-text-
|
|
2289
|
+
color: var(--tl-color-text-1);
|
|
2209
2290
|
}
|
|
2210
2291
|
|
|
2211
2292
|
/* Content extends .tlui-menu with Radix-aware sizing */
|
|
@@ -2419,13 +2500,13 @@ it from receiving any pointer events or affecting the cursor. */
|
|
|
2419
2500
|
}
|
|
2420
2501
|
|
|
2421
2502
|
.tlui-menu-zone *[data-state='open']::after {
|
|
2422
|
-
background:
|
|
2503
|
+
background: var(--tl-muted-gradient-to-bottom);
|
|
2423
2504
|
opacity: 1;
|
|
2424
2505
|
}
|
|
2425
2506
|
|
|
2426
2507
|
@media (hover: hover) {
|
|
2427
2508
|
.tlui-menu-zone *[data-state='open']:not(:hover)::after {
|
|
2428
|
-
background:
|
|
2509
|
+
background: var(--tl-muted-gradient-to-bottom);
|
|
2429
2510
|
opacity: 1;
|
|
2430
2511
|
}
|
|
2431
2512
|
}
|
|
@@ -2440,10 +2521,12 @@ it from receiving any pointer events or affecting the cursor. */
|
|
|
2440
2521
|
|
|
2441
2522
|
.tlui-page-menu__trigger {
|
|
2442
2523
|
width: auto;
|
|
2524
|
+
/* Long page names truncate in the label rather than stretching the menu zone across the top. */
|
|
2525
|
+
max-width: 320px;
|
|
2443
2526
|
}
|
|
2444
2527
|
|
|
2445
2528
|
.tlui-page-menu__trigger[data-state='open']::after {
|
|
2446
|
-
background:
|
|
2529
|
+
background: var(--tl-muted-gradient-to-bottom);
|
|
2447
2530
|
opacity: 1;
|
|
2448
2531
|
}
|
|
2449
2532
|
|
|
@@ -2633,6 +2716,10 @@ it from receiving any pointer events or affecting the cursor. */
|
|
|
2633
2716
|
opacity: 1;
|
|
2634
2717
|
}
|
|
2635
2718
|
|
|
2719
|
+
.tlui-page-menu__item__submenu > .tlui-button[data-state='open'] {
|
|
2720
|
+
color: var(--tl-color-text-1);
|
|
2721
|
+
}
|
|
2722
|
+
|
|
2636
2723
|
/* Hide the kebab while any row is being dragged: :hover sticks during pointer */
|
|
2637
2724
|
/* capture, which would otherwise leave the kebab visible mid-drag. */
|
|
2638
2725
|
.tlui-page-menu__list__content[data-dragging='true']
|
|
@@ -2674,7 +2761,7 @@ it from receiving any pointer events or affecting the cursor. */
|
|
|
2674
2761
|
}
|
|
2675
2762
|
|
|
2676
2763
|
.tlui-page-menu__item__submenu > .tlui-button:hover {
|
|
2677
|
-
color: var(--tl-color-text);
|
|
2764
|
+
color: var(--tl-color-text-1);
|
|
2678
2765
|
}
|
|
2679
2766
|
}
|
|
2680
2767
|
/* -------------- Skip to main content -------------- */
|
|
@@ -2838,7 +2925,7 @@ tldraw? probably.
|
|
|
2838
2925
|
|
|
2839
2926
|
.tlui-style-panel .tlui-button[data-state='open']::after {
|
|
2840
2927
|
opacity: 1;
|
|
2841
|
-
background:
|
|
2928
|
+
background: var(--tl-muted-gradient-to-left);
|
|
2842
2929
|
}
|
|
2843
2930
|
|
|
2844
2931
|
@media (hover: hover) {
|
|
@@ -2847,7 +2934,7 @@ tldraw? probably.
|
|
|
2847
2934
|
}
|
|
2848
2935
|
.tlui-style-panel .tlui-button[data-state='open']:not(:hover)::after {
|
|
2849
2936
|
opacity: 1;
|
|
2850
|
-
background:
|
|
2937
|
+
background: var(--tl-muted-gradient-to-left);
|
|
2851
2938
|
}
|
|
2852
2939
|
}
|
|
2853
2940
|
|
|
@@ -3074,11 +3161,11 @@ tldraw? probably.
|
|
|
3074
3161
|
}
|
|
3075
3162
|
|
|
3076
3163
|
.tlui-main-toolbar--horizontal *[data-state='open']::after {
|
|
3077
|
-
background:
|
|
3164
|
+
background: var(--tl-muted-gradient-to-top);
|
|
3078
3165
|
opacity: 1;
|
|
3079
3166
|
}
|
|
3080
3167
|
.tlui-main-toolbar--vertical *[data-state='open']::after {
|
|
3081
|
-
background:
|
|
3168
|
+
background: var(--tl-muted-gradient-to-right);
|
|
3082
3169
|
opacity: 1;
|
|
3083
3170
|
}
|
|
3084
3171
|
|
|
@@ -3114,11 +3201,11 @@ tldraw? probably.
|
|
|
3114
3201
|
|
|
3115
3202
|
@media (hover: hover) {
|
|
3116
3203
|
.tlui-main-toolbar--horizontal *[data-state='open']:not(:hover)::after {
|
|
3117
|
-
background:
|
|
3204
|
+
background: var(--tl-muted-gradient-to-top);
|
|
3118
3205
|
opacity: 1;
|
|
3119
3206
|
}
|
|
3120
3207
|
.tlui-main-toolbar--vertical *[data-state='open']:not(:hover)::after {
|
|
3121
|
-
background:
|
|
3208
|
+
background: var(--tl-muted-gradient-to-right);
|
|
3122
3209
|
opacity: 1;
|
|
3123
3210
|
}
|
|
3124
3211
|
}
|