@lvce-editor/renderer-process 21.11.0 → 21.13.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.
|
@@ -116,8 +116,8 @@ const execCopy = async () => {
|
|
|
116
116
|
await writeText(text);
|
|
117
117
|
};
|
|
118
118
|
|
|
119
|
-
const
|
|
120
|
-
return confirm(message);
|
|
119
|
+
const confirm = message => {
|
|
120
|
+
return window.confirm(message);
|
|
121
121
|
};
|
|
122
122
|
|
|
123
123
|
const state$9 = {
|
|
@@ -660,6 +660,9 @@ const renderDomElement = (element, eventMap, newEventMap) => {
|
|
|
660
660
|
};
|
|
661
661
|
const renderReferenceNode = element => {
|
|
662
662
|
const instance = get$1$1(element.uid);
|
|
663
|
+
if (!instance || !instance.state) {
|
|
664
|
+
return document.createTextNode('Reference node not found');
|
|
665
|
+
}
|
|
663
666
|
const $Node = instance.state.$Viewlet;
|
|
664
667
|
return $Node;
|
|
665
668
|
};
|
|
@@ -2905,12 +2908,15 @@ const measureTextBlockHeight = (text, fontSize, fontFamily, lineHeight, width) =
|
|
|
2905
2908
|
const $Measure = document.createElement('textarea');
|
|
2906
2909
|
$Measure.style.width = `${width}px`;
|
|
2907
2910
|
$Measure.style.contain = 'content';
|
|
2911
|
+
// @ts-ignore
|
|
2912
|
+
$Measure.style.fieldSizing = 'content';
|
|
2908
2913
|
$Measure.style.position = 'absolute';
|
|
2909
2914
|
$Measure.style.top = '-9999px';
|
|
2910
2915
|
$Measure.style.left = '-9999px';
|
|
2911
2916
|
$Measure.style.fontSize = `${fontSize}px`;
|
|
2912
2917
|
$Measure.style.lineHeight = lineHeight;
|
|
2913
2918
|
$Measure.value = text;
|
|
2919
|
+
$Measure.name = 'measureTextBlockHeight';
|
|
2914
2920
|
const height = getElementHeight($Measure);
|
|
2915
2921
|
return height;
|
|
2916
2922
|
};
|
|
@@ -9810,7 +9816,7 @@ const commandMap = {
|
|
|
9810
9816
|
'ClipBoard.write': write$1,
|
|
9811
9817
|
'ClipBoard.writeImage': writeImage,
|
|
9812
9818
|
'ClipBoard.writeText': writeText,
|
|
9813
|
-
'ConfirmPrompt.prompt':
|
|
9819
|
+
'ConfirmPrompt.prompt': confirm,
|
|
9814
9820
|
'Css.addCssStyleSheet': addCssStyleSheet,
|
|
9815
9821
|
'Css.getSelectionText': getSelectionText,
|
|
9816
9822
|
'Developer.showState': showState,
|