@tldraw/tldraw 4.4.0-canary.afdcafe834b3 → 4.4.0-canary.b5c642789999
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 +3 -4
- package/tldraw.css +83 -2
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
|
-
"4.4.0-canary.
|
|
22
|
+
"4.4.0-canary.b5c642789999",
|
|
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": "4.4.0-canary.
|
|
4
|
+
"version": "4.4.0-canary.b5c642789999",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "tldraw Inc.",
|
|
7
7
|
"email": "hello@tldraw.com"
|
|
@@ -38,8 +38,7 @@
|
|
|
38
38
|
"prepack": "yarn run -T tsx ../../internal/scripts/prepack.ts",
|
|
39
39
|
"postpack": "../../internal/scripts/postpack.sh",
|
|
40
40
|
"pack-tarball": "yarn pack",
|
|
41
|
-
"lint": "yarn run -T tsx ../../internal/scripts/lint.ts"
|
|
42
|
-
"context": "yarn run -T tsx ../../internal/scripts/context.ts"
|
|
41
|
+
"lint": "yarn run -T tsx ../../internal/scripts/lint.ts"
|
|
43
42
|
},
|
|
44
43
|
"files": [
|
|
45
44
|
"tldraw.css",
|
|
@@ -48,7 +47,7 @@
|
|
|
48
47
|
"src"
|
|
49
48
|
],
|
|
50
49
|
"dependencies": {
|
|
51
|
-
"tldraw": "4.4.0-canary.
|
|
50
|
+
"tldraw": "4.4.0-canary.b5c642789999"
|
|
52
51
|
},
|
|
53
52
|
"peerDependencies": {
|
|
54
53
|
"react": "^18.2.0 || ^19.2.1",
|
package/tldraw.css
CHANGED
|
@@ -26,14 +26,25 @@
|
|
|
26
26
|
--tl-radius-3: 9px;
|
|
27
27
|
--tl-radius-4: 11px;
|
|
28
28
|
|
|
29
|
-
/*
|
|
29
|
+
/*
|
|
30
|
+
* Canvas z-index
|
|
31
|
+
*
|
|
32
|
+
* .tl-canvas has `contain: strict` which creates its own stacking context.
|
|
33
|
+
* background, grid, shapes, overlays, and blocker are all children of .tl-canvas,
|
|
34
|
+
* so their z-indices are relative to the canvas, not the container.
|
|
35
|
+
*
|
|
36
|
+
* watermark and canvas-in-front are siblings of .tl-canvas (outside it),
|
|
37
|
+
* so they compete with the UI layer (.tlui-layout at z-index 300).
|
|
38
|
+
* canvas-in-front must be below the UI layer (300) to sit between
|
|
39
|
+
* the canvas and the UI.
|
|
40
|
+
*/
|
|
30
41
|
--tl-layer-canvas-hidden: -999999;
|
|
31
42
|
--tl-layer-canvas-background: 100;
|
|
32
43
|
--tl-layer-canvas-grid: 150;
|
|
33
44
|
--tl-layer-watermark: 200;
|
|
45
|
+
--tl-layer-canvas-in-front: 250;
|
|
34
46
|
--tl-layer-canvas-shapes: 300;
|
|
35
47
|
--tl-layer-canvas-overlays: 500;
|
|
36
|
-
--tl-layer-canvas-in-front: 600;
|
|
37
48
|
--tl-layer-canvas-blocker: 10000;
|
|
38
49
|
|
|
39
50
|
/* Canvas overlays z-index */
|
|
@@ -64,6 +75,7 @@
|
|
|
64
75
|
|
|
65
76
|
/* Misc */
|
|
66
77
|
--tl-zoom: 1;
|
|
78
|
+
--tl-tab-size: 2;
|
|
67
79
|
|
|
68
80
|
/* Cursor SVGs */
|
|
69
81
|
--tl-cursor-none: none;
|
|
@@ -150,6 +162,8 @@
|
|
|
150
162
|
--tl-color-selection-fill: hsl(210, 100%, 56%, 24%);
|
|
151
163
|
--tl-color-selection-stroke: hsl(214, 84%, 56%);
|
|
152
164
|
--tl-color-background: hsl(210, 20%, 98%);
|
|
165
|
+
/* if you ever update --tl-color-background, update the hardcoded values in theme-init.js and globals.css
|
|
166
|
+
they're there to make sure the background color matches the user's preference before the actual app loads*/
|
|
153
167
|
--tl-color-brush-fill: hsl(0, 0%, 56%, 10.2%);
|
|
154
168
|
--tl-color-brush-stroke: hsl(0, 0%, 56%, 25.1%);
|
|
155
169
|
--tl-color-grid: hsl(0, 0%, 43%);
|
|
@@ -206,6 +220,8 @@
|
|
|
206
220
|
--tl-color-selection-fill: hsl(209, 100%, 57%, 20%);
|
|
207
221
|
--tl-color-selection-stroke: hsl(214, 84%, 56%);
|
|
208
222
|
--tl-color-background: hsl(240, 5%, 6.5%);
|
|
223
|
+
/* if you ever update --tl-color-background, update the hardcoded values in theme-init.js and globals.css
|
|
224
|
+
they're there to make sure the background color matches the user's preference before the actual app loads*/
|
|
209
225
|
--tl-color-brush-fill: hsl(0, 0%, 71%, 5.1%);
|
|
210
226
|
--tl-color-brush-stroke: hsl(0, 0%, 71%, 25.1%);
|
|
211
227
|
--tl-color-grid: hsl(0, 0%, 40%);
|
|
@@ -899,6 +915,10 @@ input,
|
|
|
899
915
|
/* white-space: break-spaces; */
|
|
900
916
|
}
|
|
901
917
|
|
|
918
|
+
.tl-rich-text {
|
|
919
|
+
tab-size: var(--tl-tab-size, 2);
|
|
920
|
+
}
|
|
921
|
+
|
|
902
922
|
.tl-rich-text p {
|
|
903
923
|
margin: 0;
|
|
904
924
|
/* Depending on the extensions, <p> tags can be empty, without a <br />. */
|
|
@@ -1801,6 +1821,21 @@ it from receiving any pointer events or affecting the cursor. */
|
|
|
1801
1821
|
/* @tldraw/ui */
|
|
1802
1822
|
|
|
1803
1823
|
.tl-container {
|
|
1824
|
+
/*
|
|
1825
|
+
* UI z-index layers
|
|
1826
|
+
*
|
|
1827
|
+
* menu-click-capture and panels (.tlui-layout) participate in the
|
|
1828
|
+
* container-level stacking context alongside the canvas layers:
|
|
1829
|
+
* watermark (200) < canvas-in-front (250) < menu-click-capture (250) < panels (300)
|
|
1830
|
+
*
|
|
1831
|
+
* menus, toasts, header-footer, etc. are children of .tlui-layout
|
|
1832
|
+
* (which creates its own stacking context at z-index 300), so their
|
|
1833
|
+
* z-indices are relative to the layout, not the container.
|
|
1834
|
+
*
|
|
1835
|
+
* cursor and following-indicator are rendered inside canvas-in-front
|
|
1836
|
+
* (stacking context at z-index 250), so their z-indices are relative
|
|
1837
|
+
* to that context.
|
|
1838
|
+
*/
|
|
1804
1839
|
--tl-layer-above: 1;
|
|
1805
1840
|
--tl-layer-focused-input: 10;
|
|
1806
1841
|
--tl-layer-menu-click-capture: 250;
|
|
@@ -2323,6 +2358,52 @@ it from receiving any pointer events or affecting the cursor. */
|
|
|
2323
2358
|
}
|
|
2324
2359
|
}
|
|
2325
2360
|
|
|
2361
|
+
/* --------------------- Select --------------------- */
|
|
2362
|
+
|
|
2363
|
+
/* Trigger extends .tlui-button with space-between layout */
|
|
2364
|
+
.tlui-select__trigger {
|
|
2365
|
+
justify-content: space-between;
|
|
2366
|
+
gap: var(--tl-space-3);
|
|
2367
|
+
}
|
|
2368
|
+
|
|
2369
|
+
.tlui-select__trigger[data-state='open']::after {
|
|
2370
|
+
opacity: 1;
|
|
2371
|
+
}
|
|
2372
|
+
|
|
2373
|
+
.tlui-select__value {
|
|
2374
|
+
display: flex;
|
|
2375
|
+
align-items: center;
|
|
2376
|
+
gap: var(--tl-space-2);
|
|
2377
|
+
}
|
|
2378
|
+
|
|
2379
|
+
.tlui-select__chevron {
|
|
2380
|
+
flex-shrink: 0;
|
|
2381
|
+
color: var(--tl-color-text-2);
|
|
2382
|
+
}
|
|
2383
|
+
|
|
2384
|
+
/* Content extends .tlui-menu with Radix-aware sizing */
|
|
2385
|
+
.tlui-select__content {
|
|
2386
|
+
min-width: var(--radix-select-trigger-width);
|
|
2387
|
+
max-height: var(--radix-select-content-available-height);
|
|
2388
|
+
}
|
|
2389
|
+
|
|
2390
|
+
.tlui-select__viewport {
|
|
2391
|
+
padding: 4px 0;
|
|
2392
|
+
}
|
|
2393
|
+
|
|
2394
|
+
/* Item extends .tlui-button__checkbox with left-aligned text */
|
|
2395
|
+
.tlui-select__item {
|
|
2396
|
+
justify-content: flex-start;
|
|
2397
|
+
}
|
|
2398
|
+
|
|
2399
|
+
.tlui-select__item-indicator {
|
|
2400
|
+
visibility: hidden;
|
|
2401
|
+
}
|
|
2402
|
+
|
|
2403
|
+
.tlui-select__item[data-state='checked'] .tlui-select__item-indicator {
|
|
2404
|
+
visibility: visible;
|
|
2405
|
+
}
|
|
2406
|
+
|
|
2326
2407
|
/* ----------------------- Kbd ---------------------- */
|
|
2327
2408
|
|
|
2328
2409
|
.tlui-kbd {
|