@lvce-editor/editor-worker 3.9.0 → 3.10.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/editorWorkerMain.js +21 -10
- package/package.json +1 -1
package/dist/editorWorkerMain.js
CHANGED
|
@@ -5189,7 +5189,8 @@ const loadContent$1 = editorId => {
|
|
|
5189
5189
|
value,
|
|
5190
5190
|
matches,
|
|
5191
5191
|
matchIndex: 0,
|
|
5192
|
-
matchCount
|
|
5192
|
+
matchCount,
|
|
5193
|
+
editorUid: editor.uid
|
|
5193
5194
|
};
|
|
5194
5195
|
};
|
|
5195
5196
|
const refresh = (state, value = state.value) => {
|
|
@@ -5321,7 +5322,8 @@ const openFind2 = async editor => {
|
|
|
5321
5322
|
x,
|
|
5322
5323
|
y,
|
|
5323
5324
|
width,
|
|
5324
|
-
height
|
|
5325
|
+
height,
|
|
5326
|
+
editorUid: editor.uid || editor.id
|
|
5325
5327
|
};
|
|
5326
5328
|
return latestState;
|
|
5327
5329
|
};
|
|
@@ -8623,7 +8625,10 @@ const widgetCommands = {
|
|
|
8623
8625
|
'FindWidget.toggleReplace': Find,
|
|
8624
8626
|
'FindWidget.handleFocus': Find,
|
|
8625
8627
|
'FindWidget.handleBlur': Find,
|
|
8626
|
-
'FindWidget.handleToggleReplaceFocus': Find
|
|
8628
|
+
'FindWidget.handleToggleReplaceFocus': Find,
|
|
8629
|
+
'FindWidget.handleInput': Find,
|
|
8630
|
+
'FindWidget.handleReplaceInput': Find,
|
|
8631
|
+
'FindWidget.handleReplaceFocus': Find
|
|
8627
8632
|
};
|
|
8628
8633
|
|
|
8629
8634
|
// TODO wrap commands globally, not per editor
|
|
@@ -9901,7 +9906,8 @@ const getIconButtonVirtualDom = iconButton => {
|
|
|
9901
9906
|
title: label,
|
|
9902
9907
|
ariaLabel: label,
|
|
9903
9908
|
childCount: 1,
|
|
9904
|
-
disabled: disabled ? true : undefined
|
|
9909
|
+
disabled: disabled ? true : undefined,
|
|
9910
|
+
onClick: iconButton.onClick
|
|
9905
9911
|
}, getIconVirtualDom(icon)];
|
|
9906
9912
|
};
|
|
9907
9913
|
|
|
@@ -10007,7 +10013,7 @@ const getFindWidgetVirtualDom = (matchCountText, replaceExpanded, findButtons, r
|
|
|
10007
10013
|
childCount: 2,
|
|
10008
10014
|
role: Group
|
|
10009
10015
|
});
|
|
10010
|
-
dom.push(...getSearchToggleButtonVirtualDom(replaceExpanded, '
|
|
10016
|
+
dom.push(...getSearchToggleButtonVirtualDom(replaceExpanded, 'handleClickToggleReplace'));
|
|
10011
10017
|
dom.push({
|
|
10012
10018
|
type: Div,
|
|
10013
10019
|
className: FindWidgetRight,
|
|
@@ -10051,24 +10057,29 @@ const renderDetails = {
|
|
|
10051
10057
|
const findButtons = [{
|
|
10052
10058
|
label: previousMatch(),
|
|
10053
10059
|
icon: ArrowUp,
|
|
10054
|
-
disabled: !buttonsEnabled
|
|
10060
|
+
disabled: !buttonsEnabled,
|
|
10061
|
+
onClick: 'handleClickPreviousMatch'
|
|
10055
10062
|
}, {
|
|
10056
10063
|
label: nextMatch(),
|
|
10057
10064
|
icon: ArrowDown,
|
|
10058
|
-
disabled: !buttonsEnabled
|
|
10065
|
+
disabled: !buttonsEnabled,
|
|
10066
|
+
onClick: 'handleClickNextMatch'
|
|
10059
10067
|
}, {
|
|
10060
10068
|
label: close(),
|
|
10061
10069
|
icon: Close,
|
|
10062
|
-
disabled: false
|
|
10070
|
+
disabled: false,
|
|
10071
|
+
onClick: 'handleClickClose'
|
|
10063
10072
|
}];
|
|
10064
10073
|
const replaceButtons = [{
|
|
10065
10074
|
label: replace(),
|
|
10066
10075
|
icon: Replace,
|
|
10067
|
-
disabled: !buttonsEnabled
|
|
10076
|
+
disabled: !buttonsEnabled,
|
|
10077
|
+
onClick: 'handleClickReplace'
|
|
10068
10078
|
}, {
|
|
10069
10079
|
label: replaceAll(),
|
|
10070
10080
|
icon: ReplaceAll,
|
|
10071
|
-
disabled: !buttonsEnabled
|
|
10081
|
+
disabled: !buttonsEnabled,
|
|
10082
|
+
onClick: 'handleClickReplaceAll'
|
|
10072
10083
|
}];
|
|
10073
10084
|
const dom = getFindWidgetVirtualDom(matchCountText, newState.replaceExpanded, findButtons, replaceButtons);
|
|
10074
10085
|
return ['Viewlet.setDom2', dom];
|