@lvce-editor/editor-worker 3.22.0 → 3.24.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 +39 -1
- package/package.json +1 -1
package/dist/editorWorkerMain.js
CHANGED
|
@@ -2280,6 +2280,24 @@ const closeCompletion = editor => {
|
|
|
2280
2280
|
};
|
|
2281
2281
|
};
|
|
2282
2282
|
|
|
2283
|
+
const isMatchingWidget$1 = widget => {
|
|
2284
|
+
return widget.id === SourceAction;
|
|
2285
|
+
};
|
|
2286
|
+
const closeSourceAction = editor => {
|
|
2287
|
+
const {
|
|
2288
|
+
widgets
|
|
2289
|
+
} = editor;
|
|
2290
|
+
const index = widgets.findIndex(isMatchingWidget$1);
|
|
2291
|
+
if (index === -1) {
|
|
2292
|
+
return editor;
|
|
2293
|
+
}
|
|
2294
|
+
const newWidgets = [...widgets.slice(0, index), ...widgets.slice(index + 1)];
|
|
2295
|
+
return {
|
|
2296
|
+
...editor,
|
|
2297
|
+
widgets: newWidgets
|
|
2298
|
+
};
|
|
2299
|
+
};
|
|
2300
|
+
|
|
2283
2301
|
const hasWidget = (widgets, id) => {
|
|
2284
2302
|
for (const widget of widgets) {
|
|
2285
2303
|
if (widget.id === id) {
|
|
@@ -2378,7 +2396,7 @@ const FocusFindWidgetCloseButton = 48;
|
|
|
2378
2396
|
const FocusFindWidgetNextMatchButton = 49;
|
|
2379
2397
|
const FocusFindWidgetPreviousMatchButton = 50;
|
|
2380
2398
|
const FocusEditorHover = 51;
|
|
2381
|
-
const SourceActions =
|
|
2399
|
+
const SourceActions = 38;
|
|
2382
2400
|
|
|
2383
2401
|
const newStateGenerator$1 = state => {
|
|
2384
2402
|
return loadContent$3(state);
|
|
@@ -7581,6 +7599,24 @@ const toggleDetails = editor => {
|
|
|
7581
7599
|
return closeDetails(editor);
|
|
7582
7600
|
};
|
|
7583
7601
|
|
|
7602
|
+
const isMatchingWidget = widget => {
|
|
7603
|
+
return widget.id === Find;
|
|
7604
|
+
};
|
|
7605
|
+
const closeFind = editor => {
|
|
7606
|
+
const {
|
|
7607
|
+
widgets
|
|
7608
|
+
} = editor;
|
|
7609
|
+
const index = widgets.findIndex(isMatchingWidget);
|
|
7610
|
+
if (index === -1) {
|
|
7611
|
+
return editor;
|
|
7612
|
+
}
|
|
7613
|
+
const newWidgets = [...widgets.slice(0, index), ...widgets.slice(index + 1)];
|
|
7614
|
+
return {
|
|
7615
|
+
...editor,
|
|
7616
|
+
widgets: newWidgets
|
|
7617
|
+
};
|
|
7618
|
+
};
|
|
7619
|
+
|
|
7584
7620
|
const loadContent = async (editorUid, state, position) => {
|
|
7585
7621
|
const hoverInfo = await getEditorHoverInfo(editorUid, position);
|
|
7586
7622
|
if (!hoverInfo) {
|
|
@@ -8871,6 +8907,8 @@ const commandMap = {
|
|
|
8871
8907
|
'Editor.braceCompletion': braceCompletion,
|
|
8872
8908
|
'Editor.cancelSelection': cancelSelection,
|
|
8873
8909
|
'Editor.closeCompletion': closeCompletion,
|
|
8910
|
+
'Editor.closeSourceAction': closeSourceAction,
|
|
8911
|
+
'Editor.closeFind': closeFind,
|
|
8874
8912
|
'Editor.compositionEnd': compositionEnd,
|
|
8875
8913
|
'Editor.compositionStart': compositionStart,
|
|
8876
8914
|
'Editor.compositionUpdate': compositionUpdate,
|