@lvce-editor/editor-worker 19.62.3 → 19.63.1
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 +96 -54
- package/dist/settings.json +11 -1
- package/package.json +1 -1
package/dist/editorWorkerMain.js
CHANGED
|
@@ -3738,7 +3738,7 @@ const characterWidth = 0.75;
|
|
|
3738
3738
|
const lineHeight = 2;
|
|
3739
3739
|
const minimumViewportHeight = 20;
|
|
3740
3740
|
|
|
3741
|
-
const resize = (state, dimensions, columnWidth = state.columnWidth) => {
|
|
3741
|
+
const resize$2 = (state, dimensions, columnWidth = state.columnWidth) => {
|
|
3742
3742
|
const x = dimensions.x ?? state.x;
|
|
3743
3743
|
const y = dimensions.y ?? state.y;
|
|
3744
3744
|
const outerWidth = dimensions.width ?? state.outerWidth ?? state.width;
|
|
@@ -4442,7 +4442,7 @@ const hasSelection = editor => {
|
|
|
4442
4442
|
return editor.selections && editor.selections.length > 0;
|
|
4443
4443
|
};
|
|
4444
4444
|
const setBounds = (editor, x, y, width, height, columnWidth) => {
|
|
4445
|
-
return resize(editor, {
|
|
4445
|
+
return resize$2(editor, {
|
|
4446
4446
|
height,
|
|
4447
4447
|
width,
|
|
4448
4448
|
x,
|
|
@@ -5247,6 +5247,7 @@ const createEditor2 = (id, uri, x, y, width, height, platform, assetDir, _langua
|
|
|
5247
5247
|
height,
|
|
5248
5248
|
highlightActiveLineNumber: true,
|
|
5249
5249
|
highlightedLine: -1,
|
|
5250
|
+
hoverDelay: 200,
|
|
5250
5251
|
hoverEnabled: false,
|
|
5251
5252
|
id,
|
|
5252
5253
|
incrementalEdits: emptyIncrementalEdits,
|
|
@@ -5498,6 +5499,7 @@ const createEditor = async ({
|
|
|
5498
5499
|
formatOnSave,
|
|
5499
5500
|
height,
|
|
5500
5501
|
highlightActiveLineNumber = true,
|
|
5502
|
+
hoverDelay = 200,
|
|
5501
5503
|
hoverEnabled,
|
|
5502
5504
|
id,
|
|
5503
5505
|
isAutoClosingBracketsEnabled,
|
|
@@ -5566,6 +5568,7 @@ const createEditor = async ({
|
|
|
5566
5568
|
hasListener: false,
|
|
5567
5569
|
height,
|
|
5568
5570
|
highlightActiveLineNumber,
|
|
5571
|
+
hoverDelay,
|
|
5569
5572
|
id,
|
|
5570
5573
|
incrementalEdits: emptyIncrementalEdits,
|
|
5571
5574
|
insertSpaces: true,
|
|
@@ -5852,6 +5855,39 @@ const dispose$3 = uid => {
|
|
|
5852
5855
|
pendingSaves.delete(uid);
|
|
5853
5856
|
};
|
|
5854
5857
|
|
|
5858
|
+
const state$6 = {
|
|
5859
|
+
editor: undefined,
|
|
5860
|
+
timeout: -1,
|
|
5861
|
+
token: 0,
|
|
5862
|
+
x: 0,
|
|
5863
|
+
y: 0
|
|
5864
|
+
};
|
|
5865
|
+
const get$2 = () => {
|
|
5866
|
+
return state$6;
|
|
5867
|
+
};
|
|
5868
|
+
const set$2 = (editor, timeout, x, y, token) => {
|
|
5869
|
+
state$6.editor = editor;
|
|
5870
|
+
state$6.timeout = timeout;
|
|
5871
|
+
state$6.token = token;
|
|
5872
|
+
state$6.x = x;
|
|
5873
|
+
state$6.y = y;
|
|
5874
|
+
};
|
|
5875
|
+
const clear$1 = editorUid => {
|
|
5876
|
+
const {
|
|
5877
|
+
editor,
|
|
5878
|
+
timeout
|
|
5879
|
+
} = state$6;
|
|
5880
|
+
if (editorUid !== undefined && editor?.uid !== editorUid) {
|
|
5881
|
+
return;
|
|
5882
|
+
}
|
|
5883
|
+
if (timeout !== -1) {
|
|
5884
|
+
clearTimeout(timeout);
|
|
5885
|
+
}
|
|
5886
|
+
state$6.editor = undefined;
|
|
5887
|
+
state$6.timeout = -1;
|
|
5888
|
+
state$6.token++;
|
|
5889
|
+
};
|
|
5890
|
+
|
|
5855
5891
|
const getOffset = (lines, rowIndex, columnIndex) => {
|
|
5856
5892
|
let offset = columnIndex;
|
|
5857
5893
|
for (let i = 0; i < rowIndex; i++) {
|
|
@@ -5967,11 +6003,11 @@ const next = editorUid => {
|
|
|
5967
6003
|
revisions.set(editorUid, revision);
|
|
5968
6004
|
return revision;
|
|
5969
6005
|
};
|
|
5970
|
-
const get$
|
|
6006
|
+
const get$1 = editorUid => {
|
|
5971
6007
|
return revisions.get(editorUid) || 0;
|
|
5972
6008
|
};
|
|
5973
6009
|
const record = (editorUid, revision) => {
|
|
5974
|
-
revisions.set(editorUid, Math.max(get$
|
|
6010
|
+
revisions.set(editorUid, Math.max(get$1(editorUid), revision));
|
|
5975
6011
|
};
|
|
5976
6012
|
const dispose$1 = editorUid => {
|
|
5977
6013
|
revisions.delete(editorUid);
|
|
@@ -6027,6 +6063,7 @@ const disposeEditor = async editorUid => {
|
|
|
6027
6063
|
if (!editor) {
|
|
6028
6064
|
return [];
|
|
6029
6065
|
}
|
|
6066
|
+
clear$1(editorUid);
|
|
6030
6067
|
for (const widget of editor.widgets) {
|
|
6031
6068
|
if (widget.id === ColorPicker$2) {
|
|
6032
6069
|
await invoke$7('ColorPicker.dispose', widget.newState.uid);
|
|
@@ -6316,7 +6353,7 @@ const isFormattingError = error => {
|
|
|
6316
6353
|
return error && error instanceof Error && error.message.startsWith(expectedErrorMessage$1);
|
|
6317
6354
|
};
|
|
6318
6355
|
|
|
6319
|
-
const state$
|
|
6356
|
+
const state$5 = {
|
|
6320
6357
|
configured: false,
|
|
6321
6358
|
lastId: -1,
|
|
6322
6359
|
nextId: 0
|
|
@@ -6324,23 +6361,23 @@ const state$6 = {
|
|
|
6324
6361
|
const configure = (start, end) => {
|
|
6325
6362
|
const {
|
|
6326
6363
|
configured
|
|
6327
|
-
} = state$
|
|
6364
|
+
} = state$5;
|
|
6328
6365
|
if (configured) {
|
|
6329
6366
|
throw new Error('Component id range is already configured');
|
|
6330
6367
|
}
|
|
6331
6368
|
if (!Number.isSafeInteger(start) || !Number.isSafeInteger(end) || start <= 0 || end < start) {
|
|
6332
6369
|
throw new Error('Invalid component id range');
|
|
6333
6370
|
}
|
|
6334
|
-
state$
|
|
6335
|
-
state$
|
|
6336
|
-
state$
|
|
6371
|
+
state$5.nextId = start;
|
|
6372
|
+
state$5.lastId = end;
|
|
6373
|
+
state$5.configured = true;
|
|
6337
6374
|
};
|
|
6338
6375
|
const create$8 = () => {
|
|
6339
6376
|
const {
|
|
6340
6377
|
configured,
|
|
6341
6378
|
lastId,
|
|
6342
6379
|
nextId
|
|
6343
|
-
} = state$
|
|
6380
|
+
} = state$5;
|
|
6344
6381
|
if (!configured) {
|
|
6345
6382
|
// Compatibility with renderer versions that do not assign worker id ranges.
|
|
6346
6383
|
return Math.random();
|
|
@@ -6348,7 +6385,7 @@ const create$8 = () => {
|
|
|
6348
6385
|
if (nextId > lastId) {
|
|
6349
6386
|
throw new Error('Component id range exhausted');
|
|
6350
6387
|
}
|
|
6351
|
-
return state$
|
|
6388
|
+
return state$5.nextId++;
|
|
6352
6389
|
};
|
|
6353
6390
|
|
|
6354
6391
|
const Message = 9;
|
|
@@ -7262,7 +7299,7 @@ const addWidgetToEditor = async (widgetId, focusKey, editor, factory, newStateGe
|
|
|
7262
7299
|
if (!newState) {
|
|
7263
7300
|
return editor;
|
|
7264
7301
|
}
|
|
7265
|
-
if (get$
|
|
7302
|
+
if (get$1(editor.uid) !== widgetRevision) {
|
|
7266
7303
|
return get$8(editor.uid)?.newState || editor;
|
|
7267
7304
|
}
|
|
7268
7305
|
// @ts-ignore
|
|
@@ -7369,12 +7406,12 @@ const closeColorPicker = editor => {
|
|
|
7369
7406
|
};
|
|
7370
7407
|
};
|
|
7371
7408
|
|
|
7372
|
-
const state$
|
|
7409
|
+
const state$4 = {
|
|
7373
7410
|
compositionText: '',
|
|
7374
7411
|
isComposing: false
|
|
7375
7412
|
};
|
|
7376
7413
|
const compositionStart = (editor, event) => {
|
|
7377
|
-
state$
|
|
7414
|
+
state$4.isComposing = true;
|
|
7378
7415
|
return editor;
|
|
7379
7416
|
};
|
|
7380
7417
|
const getCompositionChanges = (selections, data) => {
|
|
@@ -7384,9 +7421,9 @@ const getCompositionChanges = (selections, data) => {
|
|
|
7384
7421
|
const selectionStartColumn = selections[i + 1];
|
|
7385
7422
|
const selectionEndRow = selections[i + 2];
|
|
7386
7423
|
const selectionEndColumn = selections[i + 3];
|
|
7387
|
-
const startColumnIndex = selectionStartColumn - state$
|
|
7424
|
+
const startColumnIndex = selectionStartColumn - state$4.compositionText.length;
|
|
7388
7425
|
changes.push({
|
|
7389
|
-
deleted: [state$
|
|
7426
|
+
deleted: [state$4.compositionText],
|
|
7390
7427
|
end: {
|
|
7391
7428
|
columnIndex: selectionEndColumn,
|
|
7392
7429
|
rowIndex: selectionEndRow
|
|
@@ -7406,7 +7443,7 @@ const compositionUpdate = (editor, data) => {
|
|
|
7406
7443
|
selections
|
|
7407
7444
|
} = editor;
|
|
7408
7445
|
const changes = getCompositionChanges(selections, data);
|
|
7409
|
-
state$
|
|
7446
|
+
state$4.compositionText = data;
|
|
7410
7447
|
return scheduleDocumentAndCursorsSelections(editor, changes);
|
|
7411
7448
|
};
|
|
7412
7449
|
const compositionEnd = (editor, data) => {
|
|
@@ -7414,8 +7451,8 @@ const compositionEnd = (editor, data) => {
|
|
|
7414
7451
|
selections
|
|
7415
7452
|
} = editor;
|
|
7416
7453
|
const changes = getCompositionChanges(selections, data);
|
|
7417
|
-
state$
|
|
7418
|
-
state$
|
|
7454
|
+
state$4.isComposing = false;
|
|
7455
|
+
state$4.compositionText = '';
|
|
7419
7456
|
return scheduleDocumentAndCursorsSelections(editor, changes);
|
|
7420
7457
|
};
|
|
7421
7458
|
|
|
@@ -9029,7 +9066,7 @@ const clear = editor => {
|
|
|
9029
9066
|
decorations: filtered
|
|
9030
9067
|
};
|
|
9031
9068
|
};
|
|
9032
|
-
const set$
|
|
9069
|
+
const set$1 = (editor, offset, length) => {
|
|
9033
9070
|
if (matches(editor, offset, length)) {
|
|
9034
9071
|
return editor;
|
|
9035
9072
|
}
|
|
@@ -9185,24 +9222,6 @@ const handleMouseDown = async (state, button, altKey, ctrlKey, x, y, detail, shi
|
|
|
9185
9222
|
};
|
|
9186
9223
|
};
|
|
9187
9224
|
|
|
9188
|
-
const state$4 = {
|
|
9189
|
-
editor: undefined,
|
|
9190
|
-
timeout: -1,
|
|
9191
|
-
token: 0,
|
|
9192
|
-
x: 0,
|
|
9193
|
-
y: 0
|
|
9194
|
-
};
|
|
9195
|
-
const get$1 = () => {
|
|
9196
|
-
return state$4;
|
|
9197
|
-
};
|
|
9198
|
-
const set$1 = (editor, timeout, x, y, token) => {
|
|
9199
|
-
state$4.editor = editor;
|
|
9200
|
-
state$4.timeout = timeout;
|
|
9201
|
-
state$4.token = token;
|
|
9202
|
-
state$4.x = x;
|
|
9203
|
-
state$4.y = y;
|
|
9204
|
-
};
|
|
9205
|
-
|
|
9206
9225
|
const RE_ALPHA_NUMERIC = /[a-zA-Z\d]/;
|
|
9207
9226
|
const isAlphaNumeric = char => {
|
|
9208
9227
|
return RE_ALPHA_NUMERIC.test(char);
|
|
@@ -9264,7 +9283,7 @@ const handleMouseMoveWithAltKey = async (editor, x, y) => {
|
|
|
9264
9283
|
if (!definition) {
|
|
9265
9284
|
return clear(editor);
|
|
9266
9285
|
}
|
|
9267
|
-
return set$
|
|
9286
|
+
return set$1(editor, wordOffset, wordLength);
|
|
9268
9287
|
} catch (error) {
|
|
9269
9288
|
if (isNoDefinitionProviderFoundError(error)) {
|
|
9270
9289
|
return clear(editor);
|
|
@@ -9560,7 +9579,7 @@ const applyHoverContent = async (editor, getNewState) => {
|
|
|
9560
9579
|
const widgetRevision = next(editor.uid);
|
|
9561
9580
|
const widget = widgets[widgetIndex];
|
|
9562
9581
|
const newState = await getNewState(widget.newState);
|
|
9563
|
-
if (get$
|
|
9582
|
+
if (get$1(editor.uid) !== widgetRevision) {
|
|
9564
9583
|
return editor;
|
|
9565
9584
|
}
|
|
9566
9585
|
if (!newState) {
|
|
@@ -9600,9 +9619,12 @@ const showHover = async (editor, position, token) => {
|
|
|
9600
9619
|
return;
|
|
9601
9620
|
}
|
|
9602
9621
|
const latestEditor = instance.newState;
|
|
9622
|
+
if (!latestEditor.hoverEnabled) {
|
|
9623
|
+
return;
|
|
9624
|
+
}
|
|
9603
9625
|
const newEditor = await showHover$1(latestEditor, position);
|
|
9604
9626
|
const latestInstance = get$8(editor.uid);
|
|
9605
|
-
if (latestEditor === newEditor || !latestInstance || latestInstance.newState !== latestEditor || get$
|
|
9627
|
+
if (latestEditor === newEditor || !latestInstance || latestInstance.newState !== latestEditor || get$2().token !== token) {
|
|
9606
9628
|
return;
|
|
9607
9629
|
}
|
|
9608
9630
|
set$8(editor.uid, latestInstance.oldState, newEditor);
|
|
@@ -9624,8 +9646,12 @@ const onHoverIdle = async token => {
|
|
|
9624
9646
|
token: latestToken,
|
|
9625
9647
|
x,
|
|
9626
9648
|
y
|
|
9627
|
-
} = get$
|
|
9628
|
-
if (latestToken !== token) {
|
|
9649
|
+
} = get$2();
|
|
9650
|
+
if (latestToken !== token || !editor) {
|
|
9651
|
+
return;
|
|
9652
|
+
}
|
|
9653
|
+
const instance = get$8(editor.uid);
|
|
9654
|
+
if (!instance || !instance.newState.hoverEnabled) {
|
|
9629
9655
|
return;
|
|
9630
9656
|
}
|
|
9631
9657
|
const position = await at(editor, x, y);
|
|
@@ -9634,8 +9660,8 @@ const onHoverIdle = async token => {
|
|
|
9634
9660
|
// Hover providers are optional and should not surface errors from an idle mouse event.
|
|
9635
9661
|
}
|
|
9636
9662
|
};
|
|
9637
|
-
const hoverDelay = 200;
|
|
9638
9663
|
const handleMouseMove = async (editor, x, y, altKey) => {
|
|
9664
|
+
clear$1();
|
|
9639
9665
|
if (altKey) {
|
|
9640
9666
|
return handleMouseMoveWithAltKey(editor, x, y);
|
|
9641
9667
|
}
|
|
@@ -9643,13 +9669,9 @@ const handleMouseMove = async (editor, x, y, altKey) => {
|
|
|
9643
9669
|
if (!editorWithoutDefinitionLink.hoverEnabled) {
|
|
9644
9670
|
return editorWithoutDefinitionLink;
|
|
9645
9671
|
}
|
|
9646
|
-
const oldState = get$1();
|
|
9647
|
-
if (oldState.timeout !== -1) {
|
|
9648
|
-
clearTimeout(oldState.timeout);
|
|
9649
|
-
}
|
|
9650
9672
|
const token = create$8();
|
|
9651
|
-
const timeout = setTimeout(onHoverIdle, hoverDelay, token);
|
|
9652
|
-
set$
|
|
9673
|
+
const timeout = setTimeout(onHoverIdle, editorWithoutDefinitionLink.hoverDelay ?? 200, token);
|
|
9674
|
+
set$2(editorWithoutDefinitionLink, timeout, x, y, token);
|
|
9653
9675
|
return editorWithoutDefinitionLink;
|
|
9654
9676
|
};
|
|
9655
9677
|
|
|
@@ -10942,12 +10964,13 @@ const {
|
|
|
10942
10964
|
handleToggleReplaceFocus,
|
|
10943
10965
|
replace,
|
|
10944
10966
|
replaceAll,
|
|
10967
|
+
resize: resize$1,
|
|
10945
10968
|
toggleMatchCase,
|
|
10946
10969
|
toggleMatchWholeWord,
|
|
10947
10970
|
togglePreserveCase,
|
|
10948
10971
|
toggleReplace,
|
|
10949
10972
|
toggleUseRegularExpression
|
|
10950
|
-
} = createFns(['close', 'focusCloseButton', 'focusFind', 'focusNext', 'focusNextMatchButton', 'focusPrevious', 'focusPreviousMatchButton', 'focusReplace', 'focusReplaceAllButton', 'focusReplaceButton', 'focusToggleReplace', 'handleBlur', 'handleClickButton', 'handleFocus', 'handleInput', 'handleReplaceFocus', 'handleReplaceInput', 'handleToggleReplaceFocus', 'replace', 'replaceAll', 'toggleMatchCase', 'toggleMatchWholeWord', 'toggleReplace', 'toggleUseRegularExpression', 'focusNextElement', 'focusPreviousElement', 'togglePreserveCase'], 'FindWidget', Find);
|
|
10973
|
+
} = createFns(['close', 'focusCloseButton', 'focusFind', 'focusNext', 'focusNextMatchButton', 'focusPrevious', 'focusPreviousMatchButton', 'focusReplace', 'focusReplaceAllButton', 'focusReplaceButton', 'focusToggleReplace', 'handleBlur', 'handleClickButton', 'handleFocus', 'handleInput', 'handleReplaceFocus', 'handleReplaceInput', 'handleToggleReplaceFocus', 'replace', 'replaceAll', 'resize', 'toggleMatchCase', 'toggleMatchWholeWord', 'toggleReplace', 'toggleUseRegularExpression', 'focusNextElement', 'focusPreviousElement', 'togglePreserveCase'], 'FindWidget', Find);
|
|
10951
10974
|
|
|
10952
10975
|
const EditorFindWidget = {
|
|
10953
10976
|
__proto__: null,
|
|
@@ -10977,6 +11000,7 @@ const EditorFindWidget = {
|
|
|
10977
11000
|
render: render$c,
|
|
10978
11001
|
replace,
|
|
10979
11002
|
replaceAll,
|
|
11003
|
+
resize: resize$1,
|
|
10980
11004
|
toggleMatchCase,
|
|
10981
11005
|
toggleMatchWholeWord,
|
|
10982
11006
|
togglePreserveCase,
|
|
@@ -14474,8 +14498,16 @@ const getMergeConflictActionsEnabled = async () => {
|
|
|
14474
14498
|
return (await get$3(kMergeConflictActions)) ?? false;
|
|
14475
14499
|
};
|
|
14476
14500
|
|
|
14501
|
+
const DEFAULT_HOVER_DELAY = 200;
|
|
14502
|
+
const getHoverDelay = value => {
|
|
14503
|
+
const delay = typeof value === 'number' ? value : Number(value);
|
|
14504
|
+
if (!Number.isFinite(delay) || delay < 0) {
|
|
14505
|
+
return DEFAULT_HOVER_DELAY;
|
|
14506
|
+
}
|
|
14507
|
+
return delay;
|
|
14508
|
+
};
|
|
14477
14509
|
const getEditorPreferences = async () => {
|
|
14478
|
-
const [diagnosticsEnabled, fontFamily, fontSize, fontWeight, formatOnSave, hoverEnabled, isAutoClosingBracketsEnabled$1, isAutoClosingQuotesEnabled$1, isAutoClosingTagsEnabled$1, isQuickSuggestionsEnabled$1, lineNumbers, highlightActiveLineNumber, rowHeight, tabSize, letterSpacing, completionTriggerCharacters, minimapEnabled, mergeConflictActionsEnabled, breadcrumbsEnabled, insertSpaces, dragAndDropEnabled, roundedSelection, combineWhitespaceTokens] = await Promise.all([get$3('editor.diagnostics'), getFontFamily(), getFontSize(), getFontWeight(), get$3('editor.formatOnSave'), get$3('editor.hover'), isAutoClosingBracketsEnabled(), isAutoClosingQuotesEnabled(), isAutoClosingTagsEnabled(), isQuickSuggestionsEnabled(), getLineNumbers(), getHighlightActiveLineNumber(), getRowHeight(), getTabSize(), getLetterSpacing(), getCompletionTriggerCharacters(), getMinimapEnabled(), getMergeConflictActionsEnabled(), get$3('breadcrumbs.enabled'), get$3('editor.insertSpaces'), get$3('editor.dragAndDrop'), get$3('editor.roundedSelection'), get$3('editor.combineWhitespaceTokens')]);
|
|
14510
|
+
const [diagnosticsEnabled, fontFamily, fontSize, fontWeight, formatOnSave, hoverEnabled, hoverDelay, isAutoClosingBracketsEnabled$1, isAutoClosingQuotesEnabled$1, isAutoClosingTagsEnabled$1, isQuickSuggestionsEnabled$1, lineNumbers, highlightActiveLineNumber, rowHeight, tabSize, letterSpacing, completionTriggerCharacters, minimapEnabled, mergeConflictActionsEnabled, breadcrumbsEnabled, insertSpaces, dragAndDropEnabled, roundedSelection, combineWhitespaceTokens] = await Promise.all([get$3('editor.diagnostics'), getFontFamily(), getFontSize(), getFontWeight(), get$3('editor.formatOnSave'), get$3('editor.hover'), get$3('editor.hoverDelay'), isAutoClosingBracketsEnabled(), isAutoClosingQuotesEnabled(), isAutoClosingTagsEnabled(), isQuickSuggestionsEnabled(), getLineNumbers(), getHighlightActiveLineNumber(), getRowHeight(), getTabSize(), getLetterSpacing(), getCompletionTriggerCharacters(), getMinimapEnabled(), getMergeConflictActionsEnabled(), get$3('breadcrumbs.enabled'), get$3('editor.insertSpaces'), get$3('editor.dragAndDrop'), get$3('editor.roundedSelection'), get$3('editor.combineWhitespaceTokens')]);
|
|
14479
14511
|
return {
|
|
14480
14512
|
breadcrumbsEnabled: breadcrumbsEnabled ?? false,
|
|
14481
14513
|
combineWhitespaceTokens: combineWhitespaceTokens ?? true,
|
|
@@ -14487,7 +14519,8 @@ const getEditorPreferences = async () => {
|
|
|
14487
14519
|
fontWeight,
|
|
14488
14520
|
formatOnSave: formatOnSave ?? false,
|
|
14489
14521
|
highlightActiveLineNumber,
|
|
14490
|
-
|
|
14522
|
+
hoverDelay: getHoverDelay(hoverDelay),
|
|
14523
|
+
hoverEnabled: hoverEnabled ?? false,
|
|
14491
14524
|
insertSpaces: insertSpaces ?? true,
|
|
14492
14525
|
isAutoClosingBracketsEnabled: isAutoClosingBracketsEnabled$1,
|
|
14493
14526
|
isAutoClosingQuotesEnabled: isAutoClosingQuotesEnabled$1,
|
|
@@ -14553,6 +14586,9 @@ const handleSettingsChanged = async state => {
|
|
|
14553
14586
|
minimapRevision: (state.minimapRevision || 0) + (minimapEnabled ? 1 : 0),
|
|
14554
14587
|
visualDecorations: diagnosticsEnabled ? state.visualDecorations : []
|
|
14555
14588
|
};
|
|
14589
|
+
if (!editorWithUpdatedSettings.hoverEnabled) {
|
|
14590
|
+
clear$1(state.uid);
|
|
14591
|
+
}
|
|
14556
14592
|
let documentSymbols = state.documentSymbols || [];
|
|
14557
14593
|
let workspaceUri = state.workspaceUri || '';
|
|
14558
14594
|
if (!breadcrumbsEnabled) {
|
|
@@ -14561,7 +14597,7 @@ const handleSettingsChanged = async state => {
|
|
|
14561
14597
|
} else if (!state.breadcrumbsEnabled) {
|
|
14562
14598
|
[documentSymbols, workspaceUri] = await Promise.all([getDocumentSymbols(editorWithUpdatedSettings), getWorkspaceUri$1(state.applicationId)]);
|
|
14563
14599
|
}
|
|
14564
|
-
const resizedEditor = resize({
|
|
14600
|
+
const resizedEditor = resize$2({
|
|
14565
14601
|
...editorWithUpdatedSettings,
|
|
14566
14602
|
documentSymbols,
|
|
14567
14603
|
workspaceUri
|
|
@@ -14850,6 +14886,7 @@ const loadContent = async (state, savedState, largeFile = false) => {
|
|
|
14850
14886
|
fontWeight,
|
|
14851
14887
|
formatOnSave,
|
|
14852
14888
|
highlightActiveLineNumber,
|
|
14889
|
+
hoverDelay,
|
|
14853
14890
|
hoverEnabled,
|
|
14854
14891
|
insertSpaces,
|
|
14855
14892
|
isAutoClosingBracketsEnabled,
|
|
@@ -14882,6 +14919,7 @@ const loadContent = async (state, savedState, largeFile = false) => {
|
|
|
14882
14919
|
fontWeight,
|
|
14883
14920
|
formatOnSave,
|
|
14884
14921
|
highlightActiveLineNumber,
|
|
14922
|
+
hoverDelay,
|
|
14885
14923
|
hoverEnabled,
|
|
14886
14924
|
insertSpaces,
|
|
14887
14925
|
isAutoClosingBracketsEnabled,
|
|
@@ -16797,6 +16835,10 @@ const wrapFocusCommand = fn => {
|
|
|
16797
16835
|
const executeViewletCommand = (uid, commandId, ...args) => {
|
|
16798
16836
|
return executeViewletCommand$1(commandMap, uid, commandId, ...args);
|
|
16799
16837
|
};
|
|
16838
|
+
const resize = async (editor, dimensions) => {
|
|
16839
|
+
const resizedEditor = resize$2(editor, dimensions, editor.columnWidth);
|
|
16840
|
+
return resize$1(resizedEditor, dimensions);
|
|
16841
|
+
};
|
|
16800
16842
|
const commandMap = {
|
|
16801
16843
|
'ActivateByEvent.activateByEvent': activateByEvent,
|
|
16802
16844
|
'CodeGenerator.accept': codeGeneratorAccept,
|
package/dist/settings.json
CHANGED
|
@@ -759,7 +759,17 @@
|
|
|
759
759
|
"heading": "Hover",
|
|
760
760
|
"id": "editor.hover",
|
|
761
761
|
"type": "boolean",
|
|
762
|
-
"value":
|
|
762
|
+
"value": false
|
|
763
|
+
},
|
|
764
|
+
{
|
|
765
|
+
"category": "text-editor",
|
|
766
|
+
"description": "Controls the delay in milliseconds after which hover information will show up",
|
|
767
|
+
"heading": "Hover Delay",
|
|
768
|
+
"id": "editor.hoverDelay",
|
|
769
|
+
"type": "number",
|
|
770
|
+
"value": 200,
|
|
771
|
+
"minimum": 0,
|
|
772
|
+
"maximum": 10000
|
|
763
773
|
},
|
|
764
774
|
{
|
|
765
775
|
"category": "text-editor",
|