@lvce-editor/renderer-process 30.82.0 → 30.82.2

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.
@@ -2743,6 +2743,13 @@ const unwrapItemFile = async item => {
2743
2743
  const nativeFile = item.getAsFile();
2744
2744
  // @ts-ignore
2745
2745
  const fileHandle = await item.getAsFileSystemHandle();
2746
+ if (!fileHandle) {
2747
+ return {
2748
+ kind: 'file-legacy',
2749
+ type: item.type,
2750
+ value: nativeFile
2751
+ };
2752
+ }
2746
2753
  return {
2747
2754
  file: nativeFile,
2748
2755
  kind: 'file',
@@ -11271,6 +11278,7 @@ const measureTextBlockHeight = (text, fontSize, fontFamily, lineHeight, width) =
11271
11278
  string(lineHeight);
11272
11279
  const $Measure = document.createElement('textarea');
11273
11280
  $Measure.style.width = `${width}px`;
11281
+ $Measure.style.boxSizing = 'border-box';
11274
11282
  $Measure.style.contain = 'content';
11275
11283
  // @ts-ignore
11276
11284
  $Measure.style.fieldSizing = 'content';
@@ -11278,7 +11286,11 @@ const measureTextBlockHeight = (text, fontSize, fontFamily, lineHeight, width) =
11278
11286
  $Measure.style.top = '-9999px';
11279
11287
  $Measure.style.left = '-9999px';
11280
11288
  $Measure.style.fontSize = `${fontSize}px`;
11289
+ $Measure.style.fontFamily = fontFamily;
11281
11290
  $Measure.style.lineHeight = lineHeight;
11291
+ $Measure.style.margin = '0';
11292
+ $Measure.style.padding = '0';
11293
+ $Measure.style.border = '0';
11282
11294
  $Measure.value = text;
11283
11295
  $Measure.name = 'measureTextBlockHeight';
11284
11296
  const height = getElementHeight($Measure);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/renderer-process",
3
- "version": "30.82.0",
3
+ "version": "30.82.2",
4
4
  "keywords": [
5
5
  "lvce-editor",
6
6
  "renderer-process"