@tldraw/tldraw 5.7.0-next.c1f7f00fa975 → 5.7.0-next.f64b0c9050e1
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 +526 -75
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-next.
|
|
22
|
+
"5.7.0-next.f64b0c9050e1",
|
|
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-next.
|
|
4
|
+
"version": "5.7.0-next.f64b0c9050e1",
|
|
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-next.
|
|
42
|
+
"tldraw": "5.7.0-next.f64b0c9050e1"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"react": "^18.2.0 || ^19.2.1",
|
package/tldraw.css
CHANGED
|
@@ -141,6 +141,9 @@
|
|
|
141
141
|
--tl-font-sans: 'tldraw_sans', sans-serif;
|
|
142
142
|
--tl-font-serif: 'tldraw_serif', serif;
|
|
143
143
|
--tl-font-mono: 'tldraw_mono', monospace;
|
|
144
|
+
/* checkboxes, for fonts whose theme entry doesn't draw its own */
|
|
145
|
+
--tl-checkbox-box: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Crect x='6.2' y='27.2' width='66' height='66' rx='14.4' fill='none' stroke='%23000' stroke-width='8.3'/%3E%3C/svg%3E");
|
|
146
|
+
--tl-checkbox-tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M24.13 62.63L33.11 73.14L56.02 46.3' fill='none' stroke='%23000' stroke-width='8.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
|
|
144
147
|
/* text outline */
|
|
145
148
|
--tl-text-outline-a: calc(min(0.5, 1 / var(--tl-zoom)) * 2px);
|
|
146
149
|
--tl-text-outline-b: calc(min(0.5, 1 / var(--tl-zoom)) * -2px);
|
|
@@ -270,6 +273,33 @@
|
|
|
270
273
|
inset 0px 0px 0px 1px var(--tl-color-panel-contrast);
|
|
271
274
|
}
|
|
272
275
|
|
|
276
|
+
/* The wash an open menu trigger shows: clear at one edge, muted-2 at the other, named for the
|
|
277
|
+
direction it fades in. Declared on the theme element, after both themes' colours, so each stop
|
|
278
|
+
resolves to the current theme's value. */
|
|
279
|
+
.tl-theme__light,
|
|
280
|
+
.tl-theme__dark {
|
|
281
|
+
--tl-muted-gradient-to-bottom: linear-gradient(
|
|
282
|
+
180deg,
|
|
283
|
+
var(--tl-color-muted-none) 0%,
|
|
284
|
+
var(--tl-color-muted-2) 100%
|
|
285
|
+
);
|
|
286
|
+
--tl-muted-gradient-to-top: linear-gradient(
|
|
287
|
+
0deg,
|
|
288
|
+
var(--tl-color-muted-none) 0%,
|
|
289
|
+
var(--tl-color-muted-2) 100%
|
|
290
|
+
);
|
|
291
|
+
--tl-muted-gradient-to-right: linear-gradient(
|
|
292
|
+
90deg,
|
|
293
|
+
var(--tl-color-muted-none) 0%,
|
|
294
|
+
var(--tl-color-muted-2) 100%
|
|
295
|
+
);
|
|
296
|
+
--tl-muted-gradient-to-left: linear-gradient(
|
|
297
|
+
270deg,
|
|
298
|
+
var(--tl-color-muted-none) 0%,
|
|
299
|
+
var(--tl-color-muted-2) 100%
|
|
300
|
+
);
|
|
301
|
+
}
|
|
302
|
+
|
|
273
303
|
.tl-counter-scaled {
|
|
274
304
|
transform: scale(var(--tl-scale));
|
|
275
305
|
transform-origin: top left;
|
|
@@ -825,6 +855,130 @@ input,
|
|
|
825
855
|
padding-left: 3.625ch;
|
|
826
856
|
}
|
|
827
857
|
|
|
858
|
+
/**
|
|
859
|
+
* Task lists. TipTap's TaskItem renders each item as
|
|
860
|
+
* `<li><label><input type="checkbox"><span></span></label><div>…</div></li>`.
|
|
861
|
+
*
|
|
862
|
+
* The `<input>` is the hit target only — it's laid over the label at zero opacity, and the visible
|
|
863
|
+
* box is the `<span>` beside it. Form controls aren't rendered when an SVG is loaded as an image,
|
|
864
|
+
* so an exported PNG would otherwise come back with the checkboxes missing. Everything is sized in
|
|
865
|
+
* `em` and drawn in `currentColor` so a checkbox tracks the font size and color of the shape it
|
|
866
|
+
* lives in.
|
|
867
|
+
*/
|
|
868
|
+
.tl-rich-text ul[data-type='taskList'] {
|
|
869
|
+
padding-left: 0;
|
|
870
|
+
list-style: none;
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
.tl-rich-text ul[data-type='taskList'] > li {
|
|
874
|
+
display: flex;
|
|
875
|
+
align-items: flex-start;
|
|
876
|
+
gap: 0.6ch;
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
.tl-rich-text ul[data-type='taskList'] > li > label {
|
|
880
|
+
/* Center the box on the first line of the item rather than on the whole item. */
|
|
881
|
+
display: flex;
|
|
882
|
+
align-items: center;
|
|
883
|
+
height: 1lh;
|
|
884
|
+
position: relative;
|
|
885
|
+
flex: 0 0 auto;
|
|
886
|
+
user-select: none;
|
|
887
|
+
/**
|
|
888
|
+
* Outside of edit mode the rich text is static HTML with no ProseMirror node view behind it, so
|
|
889
|
+
* a checkbox click would toggle the input without ever reaching the shape and then snap back on
|
|
890
|
+
* the next render. Only the editing copy takes clicks; elsewhere RichTextLabel hit-tests the
|
|
891
|
+
* label's rect itself and writes the toggle to the shape.
|
|
892
|
+
*/
|
|
893
|
+
pointer-events: none;
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
.tl-rich-text .ProseMirror ul[data-type='taskList'] > li > label {
|
|
897
|
+
pointer-events: auto;
|
|
898
|
+
/* On the label, not the input: the span paints over the input, so it's what the pointer hits. */
|
|
899
|
+
cursor: pointer;
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
.tl-rich-text ul[data-type='taskList'] > li > label > input[type='checkbox'] {
|
|
903
|
+
position: absolute;
|
|
904
|
+
inset: 0;
|
|
905
|
+
margin: 0;
|
|
906
|
+
opacity: 0;
|
|
907
|
+
/* The UA sheet gives form controls their own cursor, and this one is the pointer's target. */
|
|
908
|
+
cursor: inherit;
|
|
909
|
+
/**
|
|
910
|
+
* Above the span, so the pointer lands on the input rather than on the box drawn over it.
|
|
911
|
+
* TaskItem's node view cancels mousedown on the input to stop a click starting a text
|
|
912
|
+
* selection; letting the span take the hit instead defeats that, and a multi-click then
|
|
913
|
+
* selects the whole item and pops the rich text toolbar up over a checkbox.
|
|
914
|
+
*/
|
|
915
|
+
z-index: 1;
|
|
916
|
+
/**
|
|
917
|
+
* In the static copy the input is otherwise still focusable: Tab reaches it inside an
|
|
918
|
+
* aria-hidden label, and Space ticks it on screen without writing to the shape. The box and tick
|
|
919
|
+
* are drawn on the span, so hiding the input doesn't change how it looks.
|
|
920
|
+
*/
|
|
921
|
+
visibility: hidden;
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
.tl-rich-text .ProseMirror ul[data-type='taskList'] > li > label > input[type='checkbox'] {
|
|
925
|
+
visibility: visible;
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
.tl-rich-text ul[data-type='taskList'] > li > label > span {
|
|
929
|
+
position: relative;
|
|
930
|
+
display: block;
|
|
931
|
+
width: 1.08em;
|
|
932
|
+
height: 1.08em;
|
|
933
|
+
/* The box art is centered at 60% of the span, leaving room above for a tick to break out of it;
|
|
934
|
+
lift it so the box itself, not the span, is centered on the line. */
|
|
935
|
+
translate: 0 -10%;
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
/**
|
|
939
|
+
* The box and the tick take a pseudo-element each: a mask clips everything its element paints,
|
|
940
|
+
* pseudo-elements included, so masking the span with the box would erase the tick inside it.
|
|
941
|
+
*
|
|
942
|
+
* The numbered box slots and the tick come from the font's theme entry (see getFontCheckboxStyle).
|
|
943
|
+
*/
|
|
944
|
+
.tl-rich-text ul[data-type='taskList'] > li > label > span::before,
|
|
945
|
+
.tl-rich-text ul[data-type='taskList'] > li > label > input:checked + span::after {
|
|
946
|
+
content: '';
|
|
947
|
+
position: absolute;
|
|
948
|
+
inset: 0;
|
|
949
|
+
background-color: currentColor;
|
|
950
|
+
mask-size: 100% 100%;
|
|
951
|
+
mask-repeat: no-repeat;
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
.tl-rich-text ul[data-type='taskList'] > li:nth-child(6n + 1) > label > span::before {
|
|
955
|
+
mask-image: var(--tl-checkbox-box-1, var(--tl-checkbox-box));
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
.tl-rich-text ul[data-type='taskList'] > li:nth-child(6n + 2) > label > span::before {
|
|
959
|
+
mask-image: var(--tl-checkbox-box-2, var(--tl-checkbox-box));
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
.tl-rich-text ul[data-type='taskList'] > li:nth-child(6n + 3) > label > span::before {
|
|
963
|
+
mask-image: var(--tl-checkbox-box-3, var(--tl-checkbox-box));
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
.tl-rich-text ul[data-type='taskList'] > li:nth-child(6n + 4) > label > span::before {
|
|
967
|
+
mask-image: var(--tl-checkbox-box-4, var(--tl-checkbox-box));
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
.tl-rich-text ul[data-type='taskList'] > li:nth-child(6n + 5) > label > span::before {
|
|
971
|
+
mask-image: var(--tl-checkbox-box-5, var(--tl-checkbox-box));
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
.tl-rich-text ul[data-type='taskList'] > li:nth-child(6n) > label > span::before {
|
|
975
|
+
mask-image: var(--tl-checkbox-box-6, var(--tl-checkbox-box));
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
.tl-rich-text ul[data-type='taskList'] > li > label > input:checked + span::after {
|
|
979
|
+
mask-image: var(--tl-checkbox-tick);
|
|
980
|
+
}
|
|
981
|
+
|
|
828
982
|
.tl-rich-text h1,
|
|
829
983
|
.tl-rich-text h2,
|
|
830
984
|
.tl-rich-text h3,
|
|
@@ -1462,40 +1616,47 @@ it from receiving any pointer events or affecting the cursor. */
|
|
|
1462
1616
|
}
|
|
1463
1617
|
|
|
1464
1618
|
.tl-error-boundary__content {
|
|
1465
|
-
width: fit-content;
|
|
1466
|
-
height: fit-content;
|
|
1467
|
-
max-width: 100%;
|
|
1468
1619
|
width: 400px;
|
|
1620
|
+
max-width: 100%;
|
|
1469
1621
|
max-height: 100%;
|
|
1470
1622
|
background-color: var(--tl-color-panel);
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
font-size: 14px;
|
|
1623
|
+
border-radius: var(--tl-radius-3);
|
|
1624
|
+
box-shadow: var(--tl-shadow-3);
|
|
1625
|
+
font-size: 12px;
|
|
1475
1626
|
font-weight: 400;
|
|
1476
1627
|
display: flex;
|
|
1477
1628
|
flex-direction: column;
|
|
1478
|
-
overflow:
|
|
1629
|
+
overflow: hidden;
|
|
1479
1630
|
z-index: var(--tl-layer-error-content);
|
|
1480
|
-
gap: 12px;
|
|
1481
1631
|
}
|
|
1482
1632
|
|
|
1483
1633
|
.tl-error-boundary__content__expanded {
|
|
1484
1634
|
width: 600px;
|
|
1485
1635
|
}
|
|
1486
1636
|
|
|
1487
|
-
.tl-error-
|
|
1488
|
-
|
|
1637
|
+
.tl-error-boundary__title {
|
|
1638
|
+
flex: 0 0 auto;
|
|
1639
|
+
display: flex;
|
|
1640
|
+
align-items: center;
|
|
1641
|
+
height: 40px;
|
|
1489
1642
|
margin: 0px;
|
|
1643
|
+
padding-inline: var(--tl-space-4);
|
|
1644
|
+
font-size: 12px;
|
|
1490
1645
|
font-weight: 500;
|
|
1646
|
+
color: var(--tl-color-text-1);
|
|
1491
1647
|
}
|
|
1492
1648
|
|
|
1493
|
-
.tl-error-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1649
|
+
.tl-error-boundary__body {
|
|
1650
|
+
flex: 0 1 auto;
|
|
1651
|
+
min-height: 0;
|
|
1652
|
+
display: flex;
|
|
1653
|
+
flex-direction: column;
|
|
1654
|
+
gap: var(--tl-space-4);
|
|
1655
|
+
padding: var(--tl-space-4) var(--tl-space-4);
|
|
1656
|
+
overflow-y: auto;
|
|
1657
|
+
overflow-x: hidden;
|
|
1658
|
+
overflow-wrap: anywhere;
|
|
1659
|
+
color: var(--tl-color-text-1);
|
|
1499
1660
|
}
|
|
1500
1661
|
|
|
1501
1662
|
.tl-error-boundary__content p {
|
|
@@ -1503,27 +1664,28 @@ it from receiving any pointer events or affecting the cursor. */
|
|
|
1503
1664
|
margin: 0px;
|
|
1504
1665
|
}
|
|
1505
1666
|
|
|
1667
|
+
.tl-error-boundary__content strong {
|
|
1668
|
+
font-weight: 600;
|
|
1669
|
+
}
|
|
1670
|
+
|
|
1506
1671
|
.tl-error-boundary__content pre {
|
|
1672
|
+
margin: 0px;
|
|
1673
|
+
padding: var(--tl-space-3) var(--tl-space-4);
|
|
1507
1674
|
background-color: var(--tl-color-muted-2);
|
|
1508
|
-
margin-top: 0;
|
|
1509
|
-
padding: var(--tl-space-5);
|
|
1510
1675
|
border-radius: var(--tl-radius-2);
|
|
1511
|
-
|
|
1512
|
-
font-size:
|
|
1513
|
-
|
|
1676
|
+
font-family: var(--tl-font-mono);
|
|
1677
|
+
font-size: 11px;
|
|
1678
|
+
line-height: 1.6;
|
|
1514
1679
|
}
|
|
1515
1680
|
|
|
1516
|
-
.tl-error-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
cursor: var(--tl-cursor-pointer);
|
|
1525
|
-
color: inherit;
|
|
1526
|
-
background-color: transparent;
|
|
1681
|
+
.tl-error-boundary__stack {
|
|
1682
|
+
position: relative;
|
|
1683
|
+
}
|
|
1684
|
+
|
|
1685
|
+
.tl-error-boundary__stack pre {
|
|
1686
|
+
overflow: auto;
|
|
1687
|
+
max-height: 240px;
|
|
1688
|
+
overflow-wrap: normal;
|
|
1527
1689
|
}
|
|
1528
1690
|
|
|
1529
1691
|
.tl-error-boundary__content a {
|
|
@@ -1532,43 +1694,93 @@ it from receiving any pointer events or affecting the cursor. */
|
|
|
1532
1694
|
text-decoration: none;
|
|
1533
1695
|
}
|
|
1534
1696
|
|
|
1535
|
-
.
|
|
1697
|
+
/* Mirrors .tlui-button so the fallback looks the same when only editor.css is loaded. */
|
|
1698
|
+
.tl-error-boundary__button {
|
|
1536
1699
|
position: relative;
|
|
1537
|
-
|
|
1700
|
+
isolation: isolate;
|
|
1701
|
+
height: 40px;
|
|
1702
|
+
min-width: 40px;
|
|
1703
|
+
padding: 0px 12px;
|
|
1704
|
+
display: flex;
|
|
1705
|
+
align-items: center;
|
|
1706
|
+
justify-content: center;
|
|
1707
|
+
background: none;
|
|
1708
|
+
border: none;
|
|
1709
|
+
font-family: inherit;
|
|
1710
|
+
font-size: 12px;
|
|
1711
|
+
font-weight: inherit;
|
|
1712
|
+
color: var(--tl-color-text-1);
|
|
1713
|
+
cursor: var(--tl-cursor-pointer);
|
|
1714
|
+
}
|
|
1715
|
+
|
|
1716
|
+
.tl-error-boundary__button::after {
|
|
1717
|
+
content: '';
|
|
1718
|
+
position: absolute;
|
|
1719
|
+
inset: 4px;
|
|
1720
|
+
z-index: -1;
|
|
1721
|
+
border-radius: var(--tl-radius-2);
|
|
1722
|
+
background: var(--tl-color-muted-2);
|
|
1723
|
+
opacity: 0;
|
|
1538
1724
|
}
|
|
1539
1725
|
|
|
1540
|
-
.tl-error-
|
|
1726
|
+
.tl-error-boundary__content .tl-error-boundary__copy {
|
|
1541
1727
|
position: absolute;
|
|
1542
1728
|
top: var(--tl-space-2);
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1729
|
+
inset-inline-end: var(--tl-space-2);
|
|
1730
|
+
height: 32px;
|
|
1731
|
+
min-width: 32px;
|
|
1732
|
+
padding: 0px;
|
|
1733
|
+
color: var(--tl-color-text-3);
|
|
1546
1734
|
background-color: var(--tl-color-panel);
|
|
1547
|
-
border-radius: var(--tl-radius-
|
|
1735
|
+
border-radius: var(--tl-radius-2);
|
|
1736
|
+
}
|
|
1737
|
+
|
|
1738
|
+
.tl-error-boundary__content .tl-error-boundary__copy::after {
|
|
1739
|
+
inset: 0px;
|
|
1740
|
+
}
|
|
1741
|
+
|
|
1742
|
+
/* Touch screens can't hover, so the button stays visible there. */
|
|
1743
|
+
@media (hover: hover) {
|
|
1744
|
+
.tl-error-boundary__content .tl-error-boundary__copy {
|
|
1745
|
+
opacity: 0;
|
|
1746
|
+
}
|
|
1747
|
+
|
|
1748
|
+
.tl-error-boundary__stack:hover .tl-error-boundary__copy,
|
|
1749
|
+
.tl-error-boundary__stack:focus-within .tl-error-boundary__copy,
|
|
1750
|
+
.tl-error-boundary__stack[data-copied='true'] .tl-error-boundary__copy {
|
|
1751
|
+
opacity: 1;
|
|
1752
|
+
}
|
|
1548
1753
|
}
|
|
1549
1754
|
|
|
1550
1755
|
.tl-error-boundary__content__actions {
|
|
1756
|
+
flex: 0 0 auto;
|
|
1551
1757
|
display: flex;
|
|
1758
|
+
align-items: center;
|
|
1552
1759
|
justify-content: space-between;
|
|
1553
|
-
|
|
1554
|
-
margin: 0px;
|
|
1555
|
-
margin-left: -4px;
|
|
1760
|
+
height: 40px;
|
|
1556
1761
|
}
|
|
1762
|
+
|
|
1557
1763
|
.tl-error-boundary__content__actions__group {
|
|
1558
1764
|
display: flex;
|
|
1559
|
-
|
|
1765
|
+
align-items: center;
|
|
1560
1766
|
}
|
|
1561
|
-
|
|
1562
|
-
|
|
1767
|
+
|
|
1768
|
+
.tl-error-boundary__content__actions__group > .tl-error-boundary__button:nth-last-child(n + 2) {
|
|
1769
|
+
margin-inline-end: -4px;
|
|
1563
1770
|
}
|
|
1771
|
+
|
|
1564
1772
|
.tl-error-boundary__content .tl-error-boundary__refresh {
|
|
1565
|
-
|
|
1566
|
-
color: var(--tl-color-selected-contrast);
|
|
1773
|
+
color: var(--tl-color-primary);
|
|
1567
1774
|
}
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1775
|
+
|
|
1776
|
+
.tl-error-boundary__content .tl-error-boundary__reset {
|
|
1777
|
+
color: var(--tl-color-danger);
|
|
1778
|
+
}
|
|
1779
|
+
|
|
1780
|
+
.tl-container__focused:not(.tl-container__no-focus-ring) .tl-error-boundary__button:focus-visible {
|
|
1781
|
+
border-radius: 10px;
|
|
1782
|
+
outline: 2px solid var(--tl-color-focus);
|
|
1783
|
+
outline-offset: -5px;
|
|
1572
1784
|
}
|
|
1573
1785
|
|
|
1574
1786
|
/* ---------------- Hit test blocker ---------------- */
|
|
@@ -1606,16 +1818,12 @@ it from receiving any pointer events or affecting the cursor. */
|
|
|
1606
1818
|
color: var(--tl-color-selected);
|
|
1607
1819
|
}
|
|
1608
1820
|
|
|
1609
|
-
.tl-error-
|
|
1610
|
-
|
|
1821
|
+
.tl-error-boundary__button:hover::after {
|
|
1822
|
+
opacity: 1;
|
|
1611
1823
|
}
|
|
1612
1824
|
.tl-error-boundary__content a:hover {
|
|
1613
1825
|
color: var(--tl-color-text-1);
|
|
1614
1826
|
}
|
|
1615
|
-
.tl-error-boundary__content .tl-error-boundary__refresh:hover {
|
|
1616
|
-
background-color: var(--tl-color-primary);
|
|
1617
|
-
opacity: 0.9;
|
|
1618
|
-
}
|
|
1619
1827
|
|
|
1620
1828
|
/* These three rules help preserve clicking into specific points in text areas *while*
|
|
1621
1829
|
* already in edit mode when jumping from shape to shape. */
|
|
@@ -1744,13 +1952,13 @@ it from receiving any pointer events or affecting the cursor. */
|
|
|
1744
1952
|
}
|
|
1745
1953
|
|
|
1746
1954
|
.tlui-button[aria-expanded='true'][data-direction='left'] {
|
|
1747
|
-
background:
|
|
1955
|
+
background: var(--tl-muted-gradient-to-left);
|
|
1748
1956
|
opacity: 1;
|
|
1749
1957
|
}
|
|
1750
1958
|
|
|
1751
1959
|
@media (hover: hover) {
|
|
1752
1960
|
.tlui-button[aria-expanded='true'][data-direction='left']:not(:hover)::after {
|
|
1753
|
-
background:
|
|
1961
|
+
background: var(--tl-muted-gradient-to-left);
|
|
1754
1962
|
opacity: 1;
|
|
1755
1963
|
}
|
|
1756
1964
|
|
|
@@ -1822,8 +2030,9 @@ it from receiving any pointer events or affecting the cursor. */
|
|
|
1822
2030
|
border-radius: var(--tl-radius-2);
|
|
1823
2031
|
}
|
|
1824
2032
|
|
|
2033
|
+
/* Leading icons and checks sit 6px from the label; trailing items keep the 8px gap. */
|
|
1825
2034
|
.tlui-button__menu > .tlui-icon + .tlui-button__label {
|
|
1826
|
-
margin-inline-start:
|
|
2035
|
+
margin-inline-start: -2px;
|
|
1827
2036
|
}
|
|
1828
2037
|
|
|
1829
2038
|
.tlui-button__menu:nth-child(1) {
|
|
@@ -1840,6 +2049,11 @@ it from receiving any pointer events or affecting the cursor. */
|
|
|
1840
2049
|
padding-left: 8px;
|
|
1841
2050
|
}
|
|
1842
2051
|
|
|
2052
|
+
/* Switches sit at the trailing edge, so the label keeps the standard menu inset. */
|
|
2053
|
+
.tlui-button__toggle {
|
|
2054
|
+
padding-left: 12px;
|
|
2055
|
+
}
|
|
2056
|
+
|
|
1843
2057
|
.tlui-button__checkbox__indicator {
|
|
1844
2058
|
width: 15px;
|
|
1845
2059
|
height: 15px;
|
|
@@ -1954,7 +2168,7 @@ it from receiving any pointer events or affecting the cursor. */
|
|
|
1954
2168
|
}
|
|
1955
2169
|
|
|
1956
2170
|
.tlui-zoom-menu__button[data-state='open']::after {
|
|
1957
|
-
background:
|
|
2171
|
+
background: var(--tl-muted-gradient-to-top);
|
|
1958
2172
|
opacity: 1;
|
|
1959
2173
|
}
|
|
1960
2174
|
|
|
@@ -2205,7 +2419,7 @@ it from receiving any pointer events or affecting the cursor. */
|
|
|
2205
2419
|
|
|
2206
2420
|
.tlui-select__chevron {
|
|
2207
2421
|
flex-shrink: 0;
|
|
2208
|
-
color: var(--tl-color-text-
|
|
2422
|
+
color: var(--tl-color-text-1);
|
|
2209
2423
|
}
|
|
2210
2424
|
|
|
2211
2425
|
/* Content extends .tlui-menu with Radix-aware sizing */
|
|
@@ -2247,6 +2461,11 @@ it from receiving any pointer events or affecting the cursor. */
|
|
|
2247
2461
|
margin-inline-start: var(--tl-space-4);
|
|
2248
2462
|
}
|
|
2249
2463
|
|
|
2464
|
+
.tlui-button__menu .tlui-kbd,
|
|
2465
|
+
.tlui-command-palette__item .tlui-kbd {
|
|
2466
|
+
color: var(--tl-color-text-3);
|
|
2467
|
+
}
|
|
2468
|
+
|
|
2250
2469
|
.tlui-kbd > span {
|
|
2251
2470
|
width: 100%;
|
|
2252
2471
|
text-align: center;
|
|
@@ -2419,13 +2638,13 @@ it from receiving any pointer events or affecting the cursor. */
|
|
|
2419
2638
|
}
|
|
2420
2639
|
|
|
2421
2640
|
.tlui-menu-zone *[data-state='open']::after {
|
|
2422
|
-
background:
|
|
2641
|
+
background: var(--tl-muted-gradient-to-bottom);
|
|
2423
2642
|
opacity: 1;
|
|
2424
2643
|
}
|
|
2425
2644
|
|
|
2426
2645
|
@media (hover: hover) {
|
|
2427
2646
|
.tlui-menu-zone *[data-state='open']:not(:hover)::after {
|
|
2428
|
-
background:
|
|
2647
|
+
background: var(--tl-muted-gradient-to-bottom);
|
|
2429
2648
|
opacity: 1;
|
|
2430
2649
|
}
|
|
2431
2650
|
}
|
|
@@ -2440,10 +2659,12 @@ it from receiving any pointer events or affecting the cursor. */
|
|
|
2440
2659
|
|
|
2441
2660
|
.tlui-page-menu__trigger {
|
|
2442
2661
|
width: auto;
|
|
2662
|
+
/* Long page names truncate in the label rather than stretching the menu zone across the top. */
|
|
2663
|
+
max-width: 320px;
|
|
2443
2664
|
}
|
|
2444
2665
|
|
|
2445
2666
|
.tlui-page-menu__trigger[data-state='open']::after {
|
|
2446
|
-
background:
|
|
2667
|
+
background: var(--tl-muted-gradient-to-bottom);
|
|
2447
2668
|
opacity: 1;
|
|
2448
2669
|
}
|
|
2449
2670
|
|
|
@@ -2633,6 +2854,10 @@ it from receiving any pointer events or affecting the cursor. */
|
|
|
2633
2854
|
opacity: 1;
|
|
2634
2855
|
}
|
|
2635
2856
|
|
|
2857
|
+
.tlui-page-menu__item__submenu > .tlui-button[data-state='open'] {
|
|
2858
|
+
color: var(--tl-color-text-1);
|
|
2859
|
+
}
|
|
2860
|
+
|
|
2636
2861
|
/* Hide the kebab while any row is being dragged: :hover sticks during pointer */
|
|
2637
2862
|
/* capture, which would otherwise leave the kebab visible mid-drag. */
|
|
2638
2863
|
.tlui-page-menu__list__content[data-dragging='true']
|
|
@@ -2674,7 +2899,7 @@ it from receiving any pointer events or affecting the cursor. */
|
|
|
2674
2899
|
}
|
|
2675
2900
|
|
|
2676
2901
|
.tlui-page-menu__item__submenu > .tlui-button:hover {
|
|
2677
|
-
color: var(--tl-color-text);
|
|
2902
|
+
color: var(--tl-color-text-1);
|
|
2678
2903
|
}
|
|
2679
2904
|
}
|
|
2680
2905
|
/* -------------- Skip to main content -------------- */
|
|
@@ -2838,7 +3063,7 @@ tldraw? probably.
|
|
|
2838
3063
|
|
|
2839
3064
|
.tlui-style-panel .tlui-button[data-state='open']::after {
|
|
2840
3065
|
opacity: 1;
|
|
2841
|
-
background:
|
|
3066
|
+
background: var(--tl-muted-gradient-to-left);
|
|
2842
3067
|
}
|
|
2843
3068
|
|
|
2844
3069
|
@media (hover: hover) {
|
|
@@ -2847,7 +3072,7 @@ tldraw? probably.
|
|
|
2847
3072
|
}
|
|
2848
3073
|
.tlui-style-panel .tlui-button[data-state='open']:not(:hover)::after {
|
|
2849
3074
|
opacity: 1;
|
|
2850
|
-
background:
|
|
3075
|
+
background: var(--tl-muted-gradient-to-left);
|
|
2851
3076
|
}
|
|
2852
3077
|
}
|
|
2853
3078
|
|
|
@@ -3074,11 +3299,11 @@ tldraw? probably.
|
|
|
3074
3299
|
}
|
|
3075
3300
|
|
|
3076
3301
|
.tlui-main-toolbar--horizontal *[data-state='open']::after {
|
|
3077
|
-
background:
|
|
3302
|
+
background: var(--tl-muted-gradient-to-top);
|
|
3078
3303
|
opacity: 1;
|
|
3079
3304
|
}
|
|
3080
3305
|
.tlui-main-toolbar--vertical *[data-state='open']::after {
|
|
3081
|
-
background:
|
|
3306
|
+
background: var(--tl-muted-gradient-to-right);
|
|
3082
3307
|
opacity: 1;
|
|
3083
3308
|
}
|
|
3084
3309
|
|
|
@@ -3114,11 +3339,11 @@ tldraw? probably.
|
|
|
3114
3339
|
|
|
3115
3340
|
@media (hover: hover) {
|
|
3116
3341
|
.tlui-main-toolbar--horizontal *[data-state='open']:not(:hover)::after {
|
|
3117
|
-
background:
|
|
3342
|
+
background: var(--tl-muted-gradient-to-top);
|
|
3118
3343
|
opacity: 1;
|
|
3119
3344
|
}
|
|
3120
3345
|
.tlui-main-toolbar--vertical *[data-state='open']:not(:hover)::after {
|
|
3121
|
-
background:
|
|
3346
|
+
background: var(--tl-muted-gradient-to-right);
|
|
3122
3347
|
opacity: 1;
|
|
3123
3348
|
}
|
|
3124
3349
|
}
|
|
@@ -3886,12 +4111,19 @@ tldraw? probably.
|
|
|
3886
4111
|
}
|
|
3887
4112
|
|
|
3888
4113
|
.tlui-rich-text__toolbar-link-input {
|
|
3889
|
-
margin
|
|
4114
|
+
/* Padding rather than margin, so the invalid outline runs to the toolbar's left edge. */
|
|
4115
|
+
padding-left: 12px;
|
|
3890
4116
|
/*
|
|
3891
4117
|
* Nice touch tweak: keep the link editor toolbar the same as the default toolbar.
|
|
3892
4118
|
* This is so the toolbar size stays stable going in and out of the link editor.
|
|
3893
4119
|
*/
|
|
3894
|
-
width:
|
|
4120
|
+
width: 160px;
|
|
4121
|
+
}
|
|
4122
|
+
|
|
4123
|
+
.tlui-rich-text__toolbar-link-input--invalid {
|
|
4124
|
+
/* An inset shadow rather than a border, so the input doesn't change size. */
|
|
4125
|
+
box-shadow: inset 0 0 0 1px var(--tl-color-danger);
|
|
4126
|
+
border-radius: var(--tl-radius-3) var(--tl-radius-2) var(--tl-radius-2) var(--tl-radius-3);
|
|
3895
4127
|
}
|
|
3896
4128
|
|
|
3897
4129
|
.tlui-media__toolbar-alt-text-input {
|
|
@@ -3970,4 +4202,223 @@ tldraw? probably.
|
|
|
3970
4202
|
}
|
|
3971
4203
|
}
|
|
3972
4204
|
|
|
4205
|
+
/* ------------------ Command palette ------------------ */
|
|
4206
|
+
|
|
4207
|
+
.tlui-command-palette__overlay {
|
|
4208
|
+
position: absolute;
|
|
4209
|
+
inset: 0;
|
|
4210
|
+
z-index: var(--tl-layer-menus);
|
|
4211
|
+
pointer-events: all;
|
|
4212
|
+
}
|
|
4213
|
+
|
|
4214
|
+
.tlui-command-palette__overlay[data-passthrough] {
|
|
4215
|
+
pointer-events: none;
|
|
4216
|
+
}
|
|
4217
|
+
|
|
4218
|
+
.tlui-command-palette__overlay[data-passthrough] > .tlui-command-palette {
|
|
4219
|
+
pointer-events: all;
|
|
4220
|
+
}
|
|
4221
|
+
|
|
4222
|
+
.tlui-command-palette {
|
|
4223
|
+
--tlui-command-palette-row: 40px;
|
|
4224
|
+
position: absolute;
|
|
4225
|
+
/* The top sits 130px above the anchor and stays put as the list shrinks; short screens raise it
|
|
4226
|
+
to 252px above the bottom, but no higher than 8px. max-height keeps the 260px full palette at
|
|
4227
|
+
most 60% tall and ending at least 8px above the bottom edge. */
|
|
4228
|
+
--tlui-command-palette-anchor: 65%;
|
|
4229
|
+
top: max(8px, min(calc(var(--tlui-command-palette-anchor) - 130px), calc(100% - 252px)));
|
|
4230
|
+
left: 50%;
|
|
4231
|
+
transform: translateX(-50%);
|
|
4232
|
+
/* Room for group headings next to longer labels. */
|
|
4233
|
+
width: min(360px, calc(100% - 16px));
|
|
4234
|
+
/* Fixed, so the palette doesn't resize as results come and go: the search row plus 6 rows. The
|
|
4235
|
+
max-heights below still shrink it on short screens. */
|
|
4236
|
+
height: calc(var(--tlui-command-palette-row) + 6 * (var(--tlui-command-palette-row) - 4px) + 4px);
|
|
4237
|
+
max-height: min(60%, calc(100% - var(--tlui-command-palette-anchor) + 122px));
|
|
4238
|
+
display: flex;
|
|
4239
|
+
flex-direction: column;
|
|
4240
|
+
overflow: hidden;
|
|
4241
|
+
border-radius: var(--tl-radius-3);
|
|
4242
|
+
background-color: var(--tl-color-panel);
|
|
4243
|
+
box-shadow: var(--tl-shadow-3);
|
|
4244
|
+
color: var(--tl-color-text-1);
|
|
4245
|
+
font-size: 12px;
|
|
4246
|
+
}
|
|
4247
|
+
|
|
4248
|
+
/* Centers the full 260px palette; shorter lists keep the same top, so the input never moves. */
|
|
4249
|
+
.tlui-command-palette[data-position='center'] {
|
|
4250
|
+
top: max(8px, calc(50% - 130px));
|
|
4251
|
+
max-height: 60%;
|
|
4252
|
+
}
|
|
4253
|
+
|
|
4254
|
+
/* The same gap to the edge as the toolbar has below it. The on-screen keyboard covers the lower
|
|
4255
|
+
half on touch devices, so every position uses it there. */
|
|
4256
|
+
.tlui-command-palette[data-position='top'],
|
|
4257
|
+
.tl-container[data-coarse='true'] .tlui-command-palette {
|
|
4258
|
+
top: calc(var(--tl-space-3) + env(safe-area-inset-top, 0px));
|
|
4259
|
+
max-height: 60%;
|
|
4260
|
+
}
|
|
4261
|
+
|
|
4262
|
+
/* No focus ring: the palette keeps focus on the input the whole time it's open. */
|
|
4263
|
+
.tlui-command-palette__search {
|
|
4264
|
+
display: flex;
|
|
4265
|
+
align-items: center;
|
|
4266
|
+
gap: 6px;
|
|
4267
|
+
flex-shrink: 0;
|
|
4268
|
+
height: var(--tlui-command-palette-row);
|
|
4269
|
+
padding: 0 var(--tl-space-4) 0 8px;
|
|
4270
|
+
border-bottom: 1px solid var(--tl-color-divider);
|
|
4271
|
+
color: var(--tl-color-text-3);
|
|
4272
|
+
}
|
|
4273
|
+
|
|
4274
|
+
/* Extends .tlui-input; no font-size here, so its iOS 16px rule still applies. */
|
|
4275
|
+
.tlui-command-palette__input {
|
|
4276
|
+
flex: 1;
|
|
4277
|
+
min-width: 0;
|
|
4278
|
+
height: 100%;
|
|
4279
|
+
padding: 0;
|
|
4280
|
+
}
|
|
4281
|
+
|
|
4282
|
+
/* Fills the palette under the search: 8 rows' worth, since rows overlap by 4px like
|
|
4283
|
+
.tlui-button__menu (n rows are n * 36px + 4px). Group titles take rows' space, so about 5
|
|
4284
|
+
commands are in view. */
|
|
4285
|
+
.tlui-command-palette__list {
|
|
4286
|
+
flex: 1 1 auto;
|
|
4287
|
+
min-height: 0;
|
|
4288
|
+
overflow-y: auto;
|
|
4289
|
+
overscroll-behavior: contain;
|
|
4290
|
+
/* Keeps a group's title in view above its first row. */
|
|
4291
|
+
scroll-padding-block-start: calc(var(--tlui-command-palette-row) - 4px);
|
|
4292
|
+
scroll-padding-block-end: var(--tlui-command-palette-row);
|
|
4293
|
+
scrollbar-width: none;
|
|
4294
|
+
}
|
|
4295
|
+
|
|
4296
|
+
.tlui-command-palette__list::-webkit-scrollbar {
|
|
4297
|
+
display: none;
|
|
4298
|
+
}
|
|
4299
|
+
|
|
4300
|
+
.tlui-command-palette__list[data-more] {
|
|
4301
|
+
-webkit-mask-image: linear-gradient(
|
|
4302
|
+
to bottom,
|
|
4303
|
+
black calc(100% - var(--tlui-command-palette-row)),
|
|
4304
|
+
transparent
|
|
4305
|
+
);
|
|
4306
|
+
mask-image: linear-gradient(
|
|
4307
|
+
to bottom,
|
|
4308
|
+
black calc(100% - var(--tlui-command-palette-row)),
|
|
4309
|
+
transparent
|
|
4310
|
+
);
|
|
4311
|
+
}
|
|
4312
|
+
|
|
4313
|
+
/* Divided like .tlui-menu__group. */
|
|
4314
|
+
.tlui-command-palette__group + .tlui-command-palette__group {
|
|
4315
|
+
border-top: 1px solid var(--tl-color-divider);
|
|
4316
|
+
}
|
|
4317
|
+
|
|
4318
|
+
/* A menu row's height and type, muted, so a title reads as a row that can't be picked. */
|
|
4319
|
+
.tlui-command-palette__heading {
|
|
4320
|
+
display: flex;
|
|
4321
|
+
align-items: center;
|
|
4322
|
+
height: var(--tlui-command-palette-row);
|
|
4323
|
+
padding: 0 var(--tl-space-4);
|
|
4324
|
+
color: var(--tl-color-text-3);
|
|
4325
|
+
}
|
|
4326
|
+
|
|
4327
|
+
.tlui-command-palette__heading + .tlui-command-palette__item {
|
|
4328
|
+
margin-top: -4px;
|
|
4329
|
+
}
|
|
4330
|
+
|
|
4331
|
+
.tlui-command-palette__back {
|
|
4332
|
+
flex-shrink: 0;
|
|
4333
|
+
gap: 6px;
|
|
4334
|
+
padding-inline-start: var(--tl-space-3);
|
|
4335
|
+
border-bottom: 1px solid var(--tl-color-divider);
|
|
4336
|
+
color: var(--tl-color-text-1);
|
|
4337
|
+
cursor: pointer;
|
|
4338
|
+
}
|
|
4339
|
+
|
|
4340
|
+
.tlui-command-palette__back-kbd {
|
|
4341
|
+
margin-inline-start: auto;
|
|
4342
|
+
color: var(--tl-color-text-3);
|
|
4343
|
+
}
|
|
4344
|
+
|
|
4345
|
+
.tlui-command-palette__item {
|
|
4346
|
+
position: relative;
|
|
4347
|
+
z-index: 0;
|
|
4348
|
+
padding: 0 var(--tl-space-4);
|
|
4349
|
+
cursor: pointer;
|
|
4350
|
+
}
|
|
4351
|
+
|
|
4352
|
+
/* Pulls the check into the inset, like .tlui-button__checkbox. */
|
|
4353
|
+
.tlui-command-palette__item[aria-checked] {
|
|
4354
|
+
padding-inline-start: var(--tl-space-3);
|
|
4355
|
+
}
|
|
4356
|
+
|
|
4357
|
+
.tlui-command-palette__item + .tlui-command-palette__item {
|
|
4358
|
+
margin-top: -4px;
|
|
4359
|
+
}
|
|
4360
|
+
|
|
4361
|
+
.tlui-command-palette__item::after {
|
|
4362
|
+
content: '';
|
|
4363
|
+
position: absolute;
|
|
4364
|
+
inset: 4px;
|
|
4365
|
+
z-index: -1;
|
|
4366
|
+
border-radius: var(--tl-radius-2);
|
|
4367
|
+
background: var(--tl-color-muted-2);
|
|
4368
|
+
opacity: 0;
|
|
4369
|
+
}
|
|
4370
|
+
|
|
4371
|
+
/* Raised like a hovered .tlui-button, so it keeps the pointer where rows overlap. */
|
|
4372
|
+
.tlui-command-palette__item[data-highlighted] {
|
|
4373
|
+
z-index: 1;
|
|
4374
|
+
}
|
|
4375
|
+
|
|
4376
|
+
.tlui-command-palette__item[data-highlighted]::after {
|
|
4377
|
+
opacity: 1;
|
|
4378
|
+
}
|
|
4379
|
+
|
|
4380
|
+
.tlui-command-palette__item[aria-disabled='true'],
|
|
4381
|
+
.tlui-command-palette__item[aria-disabled='true'] .tlui-kbd {
|
|
4382
|
+
color: var(--tl-color-text-disabled);
|
|
4383
|
+
cursor: default;
|
|
4384
|
+
}
|
|
4385
|
+
|
|
4386
|
+
.tlui-command-palette__row {
|
|
4387
|
+
display: flex;
|
|
4388
|
+
align-items: center;
|
|
4389
|
+
gap: var(--tl-space-3);
|
|
4390
|
+
height: var(--tlui-command-palette-row);
|
|
4391
|
+
}
|
|
4392
|
+
|
|
4393
|
+
.tlui-command-palette__row > .tlui-icon {
|
|
4394
|
+
flex-shrink: 0;
|
|
4395
|
+
}
|
|
4396
|
+
|
|
4397
|
+
/* The same uneven gap as .tlui-button__menu. */
|
|
4398
|
+
.tlui-command-palette__row > .tlui-icon + .tlui-command-palette__label {
|
|
4399
|
+
margin-inline-start: -2px;
|
|
4400
|
+
}
|
|
4401
|
+
|
|
4402
|
+
.tlui-command-palette__label {
|
|
4403
|
+
flex: 1 1 0;
|
|
4404
|
+
min-width: 0;
|
|
4405
|
+
overflow: hidden;
|
|
4406
|
+
text-overflow: ellipsis;
|
|
4407
|
+
white-space: nowrap;
|
|
4408
|
+
}
|
|
4409
|
+
|
|
4410
|
+
.tlui-command-palette__detail {
|
|
4411
|
+
margin-inline-start: var(--tl-space-3);
|
|
4412
|
+
color: var(--tl-color-text-3);
|
|
4413
|
+
}
|
|
4414
|
+
|
|
4415
|
+
.tlui-command-palette__list:empty {
|
|
4416
|
+
display: none;
|
|
4417
|
+
}
|
|
4418
|
+
|
|
4419
|
+
.tlui-command-palette__empty {
|
|
4420
|
+
padding: var(--tl-space-4);
|
|
4421
|
+
color: var(--tl-color-text-3);
|
|
4422
|
+
}
|
|
4423
|
+
|
|
3973
4424
|
|