@lvce-editor/renderer-process 19.3.0 → 20.1.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.
@@ -785,7 +785,7 @@ const applyDragInfoMaybe = event => {
785
785
  }
786
786
  };
787
787
  const PointerMove$1 = 'pointermove';
788
- const PointerUp$1 = 'pointerup';
788
+ const lostpointercapture = 'lostpointercapture';
789
789
  let ignore = false;
790
790
  const startIgnore = () => {
791
791
  ignore = true;
@@ -904,8 +904,7 @@ const applyPointerTrackMaybe = (info, map, event) => {
904
904
  target.setPointerCapture(pointerId);
905
905
  const [pointerMoveKey, pointerUpKey] = trackPointerEvents;
906
906
  target.addEventListener(PointerMove$1, map[pointerMoveKey]);
907
- // TODO use pointerlost event instead
908
- target.addEventListener(PointerUp$1, map[pointerUpKey]);
907
+ target.addEventListener(lostpointercapture, map[pointerUpKey]);
909
908
  };
910
909
  const createFn = (info, map) => {
911
910
  const fn = event => {
@@ -2749,7 +2748,7 @@ const measureTextBlockHeight = (text, fontSize, fontFamily, lineHeight, width) =
2749
2748
  string(fontFamily);
2750
2749
  number(width);
2751
2750
  string(lineHeight);
2752
- const $Measure = document.createElement('div');
2751
+ const $Measure = document.createElement('textarea');
2753
2752
  $Measure.style.width = `${width}px`;
2754
2753
  $Measure.style.contain = 'content';
2755
2754
  $Measure.style.position = 'absolute';
@@ -2757,8 +2756,7 @@ const measureTextBlockHeight = (text, fontSize, fontFamily, lineHeight, width) =
2757
2756
  $Measure.style.left = '-9999px';
2758
2757
  $Measure.style.fontSize = `${fontSize}px`;
2759
2758
  $Measure.style.lineHeight = lineHeight;
2760
- $Measure.style.whiteSpace = 'pre';
2761
- $Measure.textContent = text;
2759
+ $Measure.value = text;
2762
2760
  const height = getElementHeight($Measure);
2763
2761
  return height;
2764
2762
  };
@@ -6618,6 +6616,7 @@ const Minus$1 = '-';
6618
6616
  const Period$1 = '.';
6619
6617
  const Slash$1 = '/';
6620
6618
  const Backquote$1 = '`';
6619
+ const Backquote2 = 'Backquote';
6621
6620
  const BracketLeft$1 = '[';
6622
6621
  const Backslash$1 = '\\';
6623
6622
  const BracketRight$1 = ']';
@@ -6881,6 +6880,7 @@ const getKeyCode = key => {
6881
6880
  case Slash$1:
6882
6881
  return Slash;
6883
6882
  case Backquote$1:
6883
+ case Backquote2:
6884
6884
  return Backquote;
6885
6885
  case BracketLeft$1:
6886
6886
  return BracketLeft;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/renderer-process",
3
- "version": "19.3.0",
3
+ "version": "20.1.0",
4
4
  "keywords": [
5
5
  "lvce-editor",
6
6
  "renderer-process"