@lvce-editor/renderer-process 15.4.0 → 15.6.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/rendererProcessMain.js +22 -13
- package/package.json +1 -1
|
@@ -286,7 +286,10 @@ const Option = 64;
|
|
|
286
286
|
const Code$2 = 65;
|
|
287
287
|
const Label = 66;
|
|
288
288
|
const Dt = 67;
|
|
289
|
-
const
|
|
289
|
+
const VirtualDomElements = {
|
|
290
|
+
__proto__: null,
|
|
291
|
+
Text: Text$1};
|
|
292
|
+
const getElementTag$1 = type => {
|
|
290
293
|
switch (type) {
|
|
291
294
|
case Audio$2:
|
|
292
295
|
return Audio$1$1;
|
|
@@ -400,6 +403,13 @@ const getElementTag = type => {
|
|
|
400
403
|
throw new Error(`element tag not found ${type}`);
|
|
401
404
|
}
|
|
402
405
|
};
|
|
406
|
+
const ElementTagMap = {
|
|
407
|
+
__proto__: null,
|
|
408
|
+
getElementTag: getElementTag$1
|
|
409
|
+
};
|
|
410
|
+
const {
|
|
411
|
+
getElementTag
|
|
412
|
+
} = ElementTagMap;
|
|
403
413
|
const getEventListenerOptions$1 = (eventName, value) => {
|
|
404
414
|
if (value.passive) {
|
|
405
415
|
return {
|
|
@@ -618,6 +628,9 @@ const setProps = ($Element, props, eventMap, newEventMap) => {
|
|
|
618
628
|
setProp($Element, key, props[key], eventMap, newEventMap);
|
|
619
629
|
}
|
|
620
630
|
};
|
|
631
|
+
const {
|
|
632
|
+
Text: Text$2
|
|
633
|
+
} = VirtualDomElements;
|
|
621
634
|
const renderDomTextNode = element => {
|
|
622
635
|
return document.createTextNode(element.text);
|
|
623
636
|
};
|
|
@@ -629,7 +642,7 @@ const renderDomElement = (element, eventMap, newEventMap) => {
|
|
|
629
642
|
};
|
|
630
643
|
const render$1 = (element, eventMap, newEventMap) => {
|
|
631
644
|
switch (element.type) {
|
|
632
|
-
case Text$
|
|
645
|
+
case Text$2:
|
|
633
646
|
return renderDomTextNode(element);
|
|
634
647
|
default:
|
|
635
648
|
return renderDomElement(element, eventMap, newEventMap);
|
|
@@ -933,7 +946,7 @@ const getActiveElementInside = $Viewlet => {
|
|
|
933
946
|
return $ActiveElement;
|
|
934
947
|
};
|
|
935
948
|
const queryInputs = $Viewlet => {
|
|
936
|
-
return [...$Viewlet.querySelectorAll('input, textarea')];
|
|
949
|
+
return [...$Viewlet.querySelectorAll('input, textarea, select')];
|
|
937
950
|
};
|
|
938
951
|
const clearNode = $Node => {
|
|
939
952
|
$Node.textContent = '';
|
|
@@ -2713,8 +2726,10 @@ const measureTextBlockHeight = (text, fontSize, fontFamily, lineHeight, width) =
|
|
|
2713
2726
|
$Measure.style.left = '-9999px';
|
|
2714
2727
|
$Measure.style.fontSize = `${fontSize}px`;
|
|
2715
2728
|
$Measure.style.lineHeight = lineHeight;
|
|
2729
|
+
$Measure.style.whiteSpace = 'pre';
|
|
2716
2730
|
$Measure.textContent = text;
|
|
2717
|
-
|
|
2731
|
+
const height = getElementHeight($Measure);
|
|
2732
|
+
return height;
|
|
2718
2733
|
};
|
|
2719
2734
|
|
|
2720
2735
|
const measureTextHeight = (text, fontSize, fontFamily) => {
|
|
@@ -7690,10 +7705,8 @@ const setActionsDom$1 = (state, actions, childUid) => {
|
|
|
7690
7705
|
}
|
|
7691
7706
|
const eventMap = instance.factory.EventMap;
|
|
7692
7707
|
setComponentUid($PanelActions, childUid);
|
|
7693
|
-
const $
|
|
7694
|
-
|
|
7695
|
-
$PanelActions.replaceChildren();
|
|
7696
|
-
$PanelActions.append($NewActions);
|
|
7708
|
+
const $NewActions = rememberFocus($PanelActions, actions, eventMap, childUid);
|
|
7709
|
+
state.$PanelActions = $NewActions;
|
|
7697
7710
|
};
|
|
7698
7711
|
|
|
7699
7712
|
const ViewletPanel = {
|
|
@@ -8170,11 +8183,7 @@ const setFocused = (state, isFocused) => {
|
|
|
8170
8183
|
const {
|
|
8171
8184
|
$Viewlet
|
|
8172
8185
|
} = state;
|
|
8173
|
-
|
|
8174
|
-
$Viewlet.classList.add(activeClassName);
|
|
8175
|
-
} else {
|
|
8176
|
-
$Viewlet.classList.remove(activeClassName);
|
|
8177
|
-
}
|
|
8186
|
+
$Viewlet.classList.toggle(activeClassName, isFocused);
|
|
8178
8187
|
};
|
|
8179
8188
|
|
|
8180
8189
|
const ViewletTitleBar = {
|