@tldraw/tldraw 3.16.0-next.fe14f1b4181f → 4.0.0

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.fe14f1b4181f",
22
+ "4.0.0",
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.fe14f1b4181f",
5
+ "4.0.0",
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.fe14f1b4181f",
4
+ "version": "4.0.0",
5
5
  "author": {
6
6
  "name": "tldraw Inc.",
7
7
  "email": "hello@tldraw.com"
@@ -48,7 +48,7 @@
48
48
  "src"
49
49
  ],
50
50
  "dependencies": {
51
- "tldraw": "3.16.0-next.fe14f1b4181f"
51
+ "tldraw": "4.0.0"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "react": "^18.2.0 || ^19.0.0",
package/tldraw.css CHANGED
@@ -693,11 +693,17 @@ input,
693
693
  }
694
694
 
695
695
  .tl-text-measure {
696
- position: absolute;
697
696
  z-index: var(--tl-layer-canvas-hidden);
697
+ opacity: 0;
698
+ visibility: hidden;
699
+
700
+ /* pointer-events: all; */
701
+ /* opacity: 1; */
702
+ /* z-index: 99999; */
703
+
704
+ position: absolute;
698
705
  top: 0px;
699
706
  left: 0px;
700
- opacity: 0;
701
707
  width: max-content;
702
708
  box-sizing: border-box;
703
709
  pointer-events: none;
@@ -708,7 +714,6 @@ input,
708
714
  border: none;
709
715
  user-select: none;
710
716
  contain: style paint;
711
- visibility: hidden;
712
717
  /* N.B. This property, while discouraged ("intended for Document Type Definition (DTD) designers") is necessary for ensuring correct mixed RTL/LTR behavior when exporting SVGs. */
713
718
  unicode-bidi: plaintext;
714
719
  -webkit-user-select: none;
@@ -1959,7 +1964,7 @@ it from receiving any pointer events or affecting the cursor. */
1959
1964
  min-height: 40px;
1960
1965
  width: 100%;
1961
1966
  gap: 8px;
1962
- margin: -4px 0px;
1967
+ margin-top: -4px;
1963
1968
  }
1964
1969
 
1965
1970
  .tlui-button__menu::after {
@@ -2285,6 +2290,10 @@ it from receiving any pointer events or affecting the cursor. */
2285
2290
  -webkit-user-select: auto !important;
2286
2291
  }
2287
2292
 
2293
+ .tlui-input::placeholder {
2294
+ color: var(--tl-color-text-3);
2295
+ }
2296
+
2288
2297
  .tlui-input__wrapper {
2289
2298
  width: 100%;
2290
2299
  height: 44px;
@@ -2369,6 +2378,12 @@ it from receiving any pointer events or affecting the cursor. */
2369
2378
  box-shadow: var(--tl-shadow-3);
2370
2379
  }
2371
2380
 
2381
+ @media (max-height: 600px) {
2382
+ .tlui-menu {
2383
+ max-height: 70vh;
2384
+ }
2385
+ }
2386
+
2372
2387
  .tlui-menu::-webkit-scrollbar {
2373
2388
  display: none;
2374
2389
  }
@@ -2778,7 +2793,7 @@ it from receiving any pointer events or affecting the cursor. */
2778
2793
  max-width: 148px;
2779
2794
  }
2780
2795
 
2781
- .tlui-style-panel[data-show-ui-labels='true'] .tlui-button[data-isactive='true'] {
2796
+ .tlui-style-panel[data-enhanced-a11y-mode='true'] .tlui-button[data-isactive='true'] {
2782
2797
  border-radius: 10px;
2783
2798
  outline: 2px solid var(--tl-color-text);
2784
2799
  outline-offset: -5px;
@@ -2798,21 +2813,48 @@ it from receiving any pointer events or affecting the cursor. */
2798
2813
  flex-direction: column;
2799
2814
  }
2800
2815
 
2801
- .tlui-style-panel__section:nth-of-type(n + 2):not(:last-child) {
2816
+ /*
2817
+ add a border to the bottom of all but the last section. we have to handle empty sections too, which
2818
+ are hidden and shouldn't be counted
2819
+ */
2820
+ .tlui-style-panel__section:not(:nth-last-child(-n + 1 of .tlui-style-panel__section:not(:empty))) {
2802
2821
  border-bottom: 1px solid var(--tl-color-divider);
2803
2822
  }
2823
+ /*
2824
+ if a section ends with a slider and we're adding a border, we need some extra space for visual
2825
+ balance. we need to handle empty sections as above. is this the most complex css selector in all of
2826
+ tldraw? probably.
2827
+ */
2828
+ .tlui-style-panel__section:has(.tlui-slider__container:last-child):not(
2829
+ :nth-last-child(-n + 1 of .tlui-style-panel__section:not(:empty))
2830
+ ) {
2831
+ margin-bottom: 7px;
2832
+ }
2804
2833
 
2805
2834
  .tlui-style-panel__section:empty {
2806
2835
  display: none;
2807
2836
  }
2808
2837
 
2838
+ /*
2839
+ * This is used in a couple places, like Align and Vertical Align.
2840
+ * It's because we have a toolbar with a Toggle Group but then an adjacent button
2841
+ * next to it that opens a popup.
2842
+ */
2843
+ .tlui-style-panel__section .tlui-toolbar:has(.tlui-toolbar) {
2844
+ flex-wrap: wrap;
2845
+ }
2846
+
2847
+ .tlui-style-panel__section .tlui-toolbar:has(.tlui-toolbar) .tlui-style-panel__subheading {
2848
+ margin-left: -2px;
2849
+ }
2850
+
2809
2851
  .tlui-style-panel__section__common:not(:only-child) {
2810
2852
  margin-bottom: 7px;
2811
2853
  border-bottom: 1px solid var(--tl-color-divider);
2812
2854
  }
2813
2855
 
2814
2856
  .tlui-style-panel__dropdown-picker:only-child {
2815
- width: 100%;
2857
+ flex: 1;
2816
2858
  }
2817
2859
 
2818
2860
  .tlui-style-panel__double-select-picker {