@tldraw/tldraw 3.16.0-next.282b7be564ae → 3.16.0-next.4337ae1ab96d

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 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
- "3.16.0-next.282b7be564ae",
22
+ "3.16.0-next.4337ae1ab96d",
23
23
  "cjs"
24
24
  );
25
25
  //# sourceMappingURL=index.js.map
@@ -2,7 +2,7 @@ import { registerTldrawLibraryVersion } from "tldraw";
2
2
  export * from "tldraw";
3
3
  registerTldrawLibraryVersion(
4
4
  "@tldraw/tldraw",
5
- "3.16.0-next.282b7be564ae",
5
+ "3.16.0-next.4337ae1ab96d",
6
6
  "esm"
7
7
  );
8
8
  //# sourceMappingURL=index.mjs.map
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": "3.16.0-next.282b7be564ae",
4
+ "version": "3.16.0-next.4337ae1ab96d",
5
5
  "author": {
6
6
  "name": "tldraw Inc.",
7
7
  "email": "hello@tldraw.com"
@@ -27,9 +27,9 @@
27
27
  ],
28
28
  "main": "dist-cjs/index.js",
29
29
  "scripts": {
30
- "test-ci": "lazy inherit",
31
- "test": "yarn run -T jest",
32
- "test-coverage": "lazy inherit",
30
+ "test-ci": "yarn run -T vitest run --passWithNoTests",
31
+ "test": "yarn run -T vitest --passWithNoTests",
32
+ "test-coverage": "yarn run -T vitest run --coverage --passWithNoTests",
33
33
  "predev": "node ./scripts/copy-css-files.mjs",
34
34
  "dev": "chokidar '../tldraw/tldraw.css' -c 'node ./scripts/copy-css-files.mjs'",
35
35
  "prebuild": "node ./scripts/copy-css-files.mjs",
@@ -38,7 +38,8 @@
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"
41
+ "lint": "yarn run -T tsx ../../internal/scripts/lint.ts",
42
+ "context": "yarn run -T tsx ../../internal/scripts/context.ts"
42
43
  },
43
44
  "files": [
44
45
  "tldraw.css",
@@ -47,7 +48,7 @@
47
48
  "src"
48
49
  ],
49
50
  "dependencies": {
50
- "tldraw": "3.16.0-next.282b7be564ae"
51
+ "tldraw": "3.16.0-next.4337ae1ab96d"
51
52
  },
52
53
  "peerDependencies": {
53
54
  "react": "^18.2.0 || ^19.0.0",
@@ -60,27 +61,6 @@
60
61
  "react": "^18.3.1",
61
62
  "react-dom": "^18.3.1"
62
63
  },
63
- "jest": {
64
- "preset": "../../internal/config/jest/node/jest-preset.js",
65
- "testEnvironment": "../../../packages/utils/patchedJestJsDom.js",
66
- "fakeTimers": {
67
- "enableGlobally": true
68
- },
69
- "testPathIgnorePatterns": [
70
- "^.+\\.*.css$"
71
- ],
72
- "moduleNameMapper": {
73
- "^~(.*)": "<rootDir>/src/$1",
74
- "\\.(css|less|scss|sass)$": "identity-obj-proxy"
75
- },
76
- "setupFiles": [
77
- "raf/polyfill",
78
- "jest-canvas-mock"
79
- ],
80
- "setupFilesAfterEnv": [
81
- "../../internal/config/setupJest.ts"
82
- ]
83
- },
84
64
  "module": "dist-esm/index.mjs",
85
65
  "source": "src/index.ts",
86
66
  "exports": {
package/tldraw.css CHANGED
@@ -33,6 +33,7 @@
33
33
  --tl-layer-watermark: 200;
34
34
  --tl-layer-canvas-shapes: 300;
35
35
  --tl-layer-canvas-overlays: 500;
36
+ --tl-layer-canvas-in-front: 600;
36
37
  --tl-layer-canvas-blocker: 10000;
37
38
 
38
39
  /* Canvas overlays z-index */
@@ -301,6 +302,13 @@ input,
301
302
  contain: strict;
302
303
  }
303
304
 
305
+ .tl-canvas__in-front {
306
+ position: absolute;
307
+ inset: 0;
308
+ pointer-events: none;
309
+ z-index: var(--tl-layer-canvas-in-front);
310
+ }
311
+
304
312
  .tl-shapes {
305
313
  position: relative;
306
314
  z-index: var(--tl-layer-canvas-shapes);
@@ -2790,9 +2798,23 @@ it from receiving any pointer events or affecting the cursor. */
2790
2798
  flex-direction: column;
2791
2799
  }
2792
2800
 
2793
- .tlui-style-panel__section:nth-of-type(n + 2):not(:last-child) {
2801
+ /*
2802
+ add a border to the bottom of all but the last section. we have to handle empty sections too, which
2803
+ are hidden and shouldn't be counted
2804
+ */
2805
+ .tlui-style-panel__section:not(:nth-last-child(-n + 1 of .tlui-style-panel__section:not(:empty))) {
2794
2806
  border-bottom: 1px solid var(--tl-color-divider);
2795
2807
  }
2808
+ /*
2809
+ if a section ends with a slider and we're adding a border, we need some extra space for visual
2810
+ balance. we need to handle empty sections as above. is this the most complex css selector in all of
2811
+ tldraw? probably.
2812
+ */
2813
+ .tlui-style-panel__section:has(.tlui-slider__container:last-child):not(
2814
+ :nth-last-child(-n + 1 of .tlui-style-panel__section:not(:empty))
2815
+ ) {
2816
+ margin-bottom: 7px;
2817
+ }
2796
2818
 
2797
2819
  .tlui-style-panel__section:empty {
2798
2820
  display: none;
@@ -2804,7 +2826,7 @@ it from receiving any pointer events or affecting the cursor. */
2804
2826
  }
2805
2827
 
2806
2828
  .tlui-style-panel__dropdown-picker:only-child {
2807
- width: 100%;
2829
+ flex: 1;
2808
2830
  }
2809
2831
 
2810
2832
  .tlui-style-panel__double-select-picker {
@@ -2830,6 +2852,9 @@ it from receiving any pointer events or affecting the cursor. */
2830
2852
  }
2831
2853
 
2832
2854
  @media (hover: hover) {
2855
+ .tlui-style-panel .tlui-button[aria-expanded='true'] {
2856
+ background: none;
2857
+ }
2833
2858
  .tlui-style-panel .tlui-button[data-state='open']:not(:hover)::after {
2834
2859
  opacity: 1;
2835
2860
  background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);