@lvce-editor/editor-worker 19.47.1 → 19.48.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 +15 -10
- package/package.json +1 -1
package/dist/editorWorkerMain.js
CHANGED
|
@@ -5532,7 +5532,7 @@ const isEqual$3 = (oldState, newState) => {
|
|
|
5532
5532
|
};
|
|
5533
5533
|
|
|
5534
5534
|
const isEqual$2 = (oldState, newState) => {
|
|
5535
|
-
return oldState.breadcrumbsEnabled === newState.breadcrumbsEnabled && oldState.breakPoints === newState.breakPoints && oldState.bracketMatchInfos === newState.bracketMatchInfos && oldState.cursorInfos === newState.cursorInfos && oldState.diagnostics === newState.diagnostics && oldState.documentSymbols === newState.documentSymbols && oldState.endOfLineDecorations === newState.endOfLineDecorations && oldState.gutterDecorations === newState.gutterDecorations && oldState.highlightedLine === newState.highlightedLine && oldState.lineNumbers === newState.lineNumbers && oldState.loadError === newState.loadError && oldState.textInfos === newState.textInfos && oldState.differences === newState.differences && oldState.initial === newState.initial && oldState.selectionInfos === newState.selectionInfos && oldState.selections === newState.selections && oldState.workspaceUri === newState.workspaceUri;
|
|
5535
|
+
return oldState.breadcrumbsEnabled === newState.breadcrumbsEnabled && oldState.breakPoints === newState.breakPoints && oldState.bracketMatchInfos === newState.bracketMatchInfos && oldState.cursorInfos === newState.cursorInfos && oldState.diagnostics === newState.diagnostics && oldState.documentSymbols === newState.documentSymbols && oldState.endOfLineDecorations === newState.endOfLineDecorations && oldState.focused === newState.focused && oldState.gutterDecorations === newState.gutterDecorations && oldState.highlightedLine === newState.highlightedLine && oldState.lineNumbers === newState.lineNumbers && oldState.loadError === newState.loadError && oldState.textInfos === newState.textInfos && oldState.differences === newState.differences && oldState.initial === newState.initial && oldState.selectionInfos === newState.selectionInfos && oldState.selections === newState.selections && oldState.workspaceUri === newState.workspaceUri;
|
|
5536
5536
|
};
|
|
5537
5537
|
|
|
5538
5538
|
const isEqual$1 = (oldState, newState) => {
|
|
@@ -12552,6 +12552,7 @@ const HoverProblemMessage = 'HoverProblemMessage';
|
|
|
12552
12552
|
const IconClose = 'IconClose';
|
|
12553
12553
|
const InputBox = 'InputBox';
|
|
12554
12554
|
const MaskIcon = 'MaskIcon';
|
|
12555
|
+
const SelectionUnfocused = 'SelectionUnfocused';
|
|
12555
12556
|
const Viewlet = 'Viewlet';
|
|
12556
12557
|
|
|
12557
12558
|
const HandleBeforeInput = 1;
|
|
@@ -14961,8 +14962,9 @@ const getEditorRowsVirtualDom = (textInfos, differences, lineNumbers = true, hig
|
|
|
14961
14962
|
}, ...rowsDom];
|
|
14962
14963
|
};
|
|
14963
14964
|
|
|
14964
|
-
const getSelectionsVirtualDom = selections => {
|
|
14965
|
+
const getSelectionsVirtualDom = (selections, focused = true) => {
|
|
14965
14966
|
const dom = [];
|
|
14967
|
+
const className = focused ? EditorSelection : mergeClassNames(EditorSelection, SelectionUnfocused);
|
|
14966
14968
|
for (let i = 0; i < selections.length; i += 4) {
|
|
14967
14969
|
const x = selections[i];
|
|
14968
14970
|
const y = selections[i + 1];
|
|
@@ -14970,7 +14972,7 @@ const getSelectionsVirtualDom = selections => {
|
|
|
14970
14972
|
const height = selections[i + 3];
|
|
14971
14973
|
dom.push({
|
|
14972
14974
|
childCount: 0,
|
|
14973
|
-
className
|
|
14975
|
+
className,
|
|
14974
14976
|
height,
|
|
14975
14977
|
left: x,
|
|
14976
14978
|
top: y,
|
|
@@ -14981,8 +14983,8 @@ const getSelectionsVirtualDom = selections => {
|
|
|
14981
14983
|
return dom;
|
|
14982
14984
|
};
|
|
14983
14985
|
|
|
14984
|
-
const getEditorSelectionsVirtualDom = selectionInfos => {
|
|
14985
|
-
const selectionsDom = getSelectionsVirtualDom(selectionInfos);
|
|
14986
|
+
const getEditorSelectionsVirtualDom = (selectionInfos, focused = true) => {
|
|
14987
|
+
const selectionsDom = getSelectionsVirtualDom(selectionInfos, focused);
|
|
14986
14988
|
return [{
|
|
14987
14989
|
childCount: selectionInfos.length / 4,
|
|
14988
14990
|
className: 'Selections',
|
|
@@ -14995,8 +14997,8 @@ const editorLayersNode = {
|
|
|
14995
14997
|
className: 'EditorLayers',
|
|
14996
14998
|
type: Div
|
|
14997
14999
|
};
|
|
14998
|
-
const getEditorLayersVirtualDom = (selectionInfos, textInfos, differences, lineNumbers = true, highlightedLine = -1, cursorInfos = [], diagnostics = [], visibleLineIndices = [], endOfLineDecorations = [], bracketMatchInfos = []) => {
|
|
14999
|
-
return [editorLayersNode, ...getEditorSelectionsVirtualDom(selectionInfos), ...getEditorRowsVirtualDom(textInfos, differences, lineNumbers, highlightedLine, visibleLineIndices, endOfLineDecorations), ...getEditorCursorsVirtualDom(cursorInfos), ...getEditorDiagnosticsVirtualDom(diagnostics, bracketMatchInfos)];
|
|
15000
|
+
const getEditorLayersVirtualDom = (selectionInfos, textInfos, differences, lineNumbers = true, highlightedLine = -1, cursorInfos = [], diagnostics = [], visibleLineIndices = [], endOfLineDecorations = [], bracketMatchInfos = [], focused = true) => {
|
|
15001
|
+
return [editorLayersNode, ...getEditorSelectionsVirtualDom(selectionInfos, focused), ...getEditorRowsVirtualDom(textInfos, differences, lineNumbers, highlightedLine, visibleLineIndices, endOfLineDecorations), ...getEditorCursorsVirtualDom(cursorInfos), ...getEditorDiagnosticsVirtualDom(diagnostics, bracketMatchInfos)];
|
|
15000
15002
|
};
|
|
15001
15003
|
|
|
15002
15004
|
const getEditorScrollBarDiagnosticsVirtualDom = scrollBarDiagnostics => {
|
|
@@ -15058,6 +15060,7 @@ const getEditorContentVirtualDom = ({
|
|
|
15058
15060
|
diagnostics = [],
|
|
15059
15061
|
differences,
|
|
15060
15062
|
endOfLineDecorations = [],
|
|
15063
|
+
focused = true,
|
|
15061
15064
|
highlightedLine = -1,
|
|
15062
15065
|
lineNumbers = true,
|
|
15063
15066
|
scrollBarDiagnostics = [],
|
|
@@ -15065,7 +15068,7 @@ const getEditorContentVirtualDom = ({
|
|
|
15065
15068
|
textInfos,
|
|
15066
15069
|
visibleLineIndices = []
|
|
15067
15070
|
}) => {
|
|
15068
|
-
return [editorContentNode, ...getEditorInputVirtualDom(), ...getEditorLayersVirtualDom(selectionInfos, textInfos, differences, lineNumbers, highlightedLine, cursorInfos, diagnostics, visibleLineIndices, endOfLineDecorations, bracketMatchInfos), ...getEditorScrollBarDiagnosticsVirtualDom(scrollBarDiagnostics), ...getScrollBarVirtualDom()];
|
|
15071
|
+
return [editorContentNode, ...getEditorInputVirtualDom(), ...getEditorLayersVirtualDom(selectionInfos, textInfos, differences, lineNumbers, highlightedLine, cursorInfos, diagnostics, visibleLineIndices, endOfLineDecorations, bracketMatchInfos, focused), ...getEditorScrollBarDiagnosticsVirtualDom(scrollBarDiagnostics), ...getScrollBarVirtualDom()];
|
|
15069
15072
|
};
|
|
15070
15073
|
|
|
15071
15074
|
const getGutterInfoVirtualDom = (gutterInfo, activeLineNumber) => {
|
|
@@ -15194,6 +15197,7 @@ const getEditorVirtualDom = ({
|
|
|
15194
15197
|
differences,
|
|
15195
15198
|
documentSymbols = [],
|
|
15196
15199
|
endOfLineDecorations = [],
|
|
15200
|
+
focused = true,
|
|
15197
15201
|
gutterDecorations = [],
|
|
15198
15202
|
gutterInfos = [],
|
|
15199
15203
|
highlightedLine = -1,
|
|
@@ -15251,6 +15255,7 @@ const getEditorVirtualDom = ({
|
|
|
15251
15255
|
diagnostics,
|
|
15252
15256
|
differences,
|
|
15253
15257
|
endOfLineDecorations,
|
|
15258
|
+
focused,
|
|
15254
15259
|
highlightedLine,
|
|
15255
15260
|
lineNumbers,
|
|
15256
15261
|
scrollBarDiagnostics,
|
|
@@ -15457,10 +15462,10 @@ const renderSelections = {
|
|
|
15457
15462
|
selectionInfos = []
|
|
15458
15463
|
} = newState;
|
|
15459
15464
|
const cursorsDom = getCursorsVirtualDom(cursorInfos);
|
|
15460
|
-
const selectionsDom = getSelectionsVirtualDom(selectionInfos);
|
|
15465
|
+
const selectionsDom = getSelectionsVirtualDom(selectionInfos, newState.focused);
|
|
15461
15466
|
return [/* method */'setSelections', cursorsDom, selectionsDom];
|
|
15462
15467
|
},
|
|
15463
|
-
isEqual: (oldState, newState) => oldState.cursorInfos === newState.cursorInfos && oldState.selectionInfos === newState.selectionInfos
|
|
15468
|
+
isEqual: (oldState, newState) => oldState.cursorInfos === newState.cursorInfos && oldState.selectionInfos === newState.selectionInfos && oldState.focused === newState.focused
|
|
15464
15469
|
};
|
|
15465
15470
|
const renderCss = {
|
|
15466
15471
|
apply: renderCss$1,
|