@lvce-editor/editor-worker 7.14.0 → 7.16.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 +132 -97
- package/package.json +1 -2
package/dist/editorWorkerMain.js
CHANGED
|
@@ -638,7 +638,8 @@ const splitLines$1 = lines => {
|
|
|
638
638
|
return lines.split(NewLine$1);
|
|
639
639
|
};
|
|
640
640
|
const getCurrentStack = () => {
|
|
641
|
-
const
|
|
641
|
+
const stackLinesToSkip = 3;
|
|
642
|
+
const currentStack = joinLines$1(splitLines$1(new Error().stack || '').slice(stackLinesToSkip));
|
|
642
643
|
return currentStack;
|
|
643
644
|
};
|
|
644
645
|
const getNewLineIndex = (string, startIndex = undefined) => {
|
|
@@ -909,6 +910,12 @@ const invokeAndTransfer$1 = (ipc, method, ...params) => {
|
|
|
909
910
|
return invokeHelper(ipc, method, params, true);
|
|
910
911
|
};
|
|
911
912
|
|
|
913
|
+
class CommandNotFoundError extends Error {
|
|
914
|
+
constructor(command) {
|
|
915
|
+
super(`Command not found ${command}`);
|
|
916
|
+
this.name = 'CommandNotFoundError';
|
|
917
|
+
}
|
|
918
|
+
}
|
|
912
919
|
const commands = Object.create(null);
|
|
913
920
|
const register = commandMap => {
|
|
914
921
|
Object.assign(commands, commandMap);
|
|
@@ -919,7 +926,7 @@ const getCommand = key => {
|
|
|
919
926
|
const execute$1 = (command, ...args) => {
|
|
920
927
|
const fn = getCommand(command);
|
|
921
928
|
if (!fn) {
|
|
922
|
-
throw new
|
|
929
|
+
throw new CommandNotFoundError(command);
|
|
923
930
|
}
|
|
924
931
|
return fn(...args);
|
|
925
932
|
};
|
|
@@ -976,7 +983,7 @@ const listen$1 = async (module, options) => {
|
|
|
976
983
|
const ipc = module.wrap(rawIpc);
|
|
977
984
|
return ipc;
|
|
978
985
|
};
|
|
979
|
-
const create$
|
|
986
|
+
const create$e = async ({
|
|
980
987
|
commandMap,
|
|
981
988
|
messagePort,
|
|
982
989
|
isMessagePortOpen
|
|
@@ -994,7 +1001,7 @@ const create$d = async ({
|
|
|
994
1001
|
};
|
|
995
1002
|
const MessagePortRpcParent = {
|
|
996
1003
|
__proto__: null,
|
|
997
|
-
create: create$
|
|
1004
|
+
create: create$e
|
|
998
1005
|
};
|
|
999
1006
|
const create$5$1 = async ({
|
|
1000
1007
|
commandMap,
|
|
@@ -1095,6 +1102,9 @@ const ErrorWorker$1 = 3308;
|
|
|
1095
1102
|
const SyntaxHighlightingWorker$1 = 3309;
|
|
1096
1103
|
const ClipBoardWorker$1 = 3400;
|
|
1097
1104
|
const ClipBoardProcess$1 = 3401;
|
|
1105
|
+
const ExtensionDetailWorker = 3402;
|
|
1106
|
+
const ProblemsWorker = 3403;
|
|
1107
|
+
const OutputWorker = 7001;
|
|
1098
1108
|
const RpcId = {
|
|
1099
1109
|
__proto__: null,
|
|
1100
1110
|
ClipBoardProcess: ClipBoardProcess$1,
|
|
@@ -1106,11 +1116,14 @@ const RpcId = {
|
|
|
1106
1116
|
EmbedsProcess: EmbedsProcess$1,
|
|
1107
1117
|
EmbedsWorker,
|
|
1108
1118
|
ErrorWorker: ErrorWorker$1,
|
|
1119
|
+
ExtensionDetailWorker,
|
|
1109
1120
|
ExtensionHostWorker,
|
|
1110
1121
|
FileSystemProcess: FileSystemProcess$1,
|
|
1111
1122
|
FileSystemWorker: FileSystemWorker$1,
|
|
1112
1123
|
MainProcess: MainProcess$1,
|
|
1113
1124
|
MarkdownWorker: MarkdownWorker$1,
|
|
1125
|
+
OutputWorker,
|
|
1126
|
+
ProblemsWorker,
|
|
1114
1127
|
RendererProcess: RendererProcess$1,
|
|
1115
1128
|
RendererWorker: RendererWorker$1,
|
|
1116
1129
|
SearchProcess: SearchProcess$1,
|
|
@@ -1175,7 +1188,8 @@ const getPortTuple = () => {
|
|
|
1175
1188
|
|
|
1176
1189
|
const ModuleWorkerAndWorkaroundForChromeDevtoolsBug = 6;
|
|
1177
1190
|
|
|
1178
|
-
const launchWorker = async (name, url) => {
|
|
1191
|
+
const launchWorker = async (name, url, intializeCommand) => {
|
|
1192
|
+
// TODO use transferMessagePortRpc
|
|
1179
1193
|
const {
|
|
1180
1194
|
port1,
|
|
1181
1195
|
port2
|
|
@@ -1194,6 +1208,9 @@ const launchWorker = async (name, url) => {
|
|
|
1194
1208
|
isMessagePortOpen: true
|
|
1195
1209
|
});
|
|
1196
1210
|
port2.start();
|
|
1211
|
+
if (intializeCommand) {
|
|
1212
|
+
await rpc.invoke(intializeCommand);
|
|
1213
|
+
}
|
|
1197
1214
|
return rpc;
|
|
1198
1215
|
};
|
|
1199
1216
|
|
|
@@ -1301,7 +1318,7 @@ const get$4 = id => {
|
|
|
1301
1318
|
number(id);
|
|
1302
1319
|
return editors[id];
|
|
1303
1320
|
};
|
|
1304
|
-
const getKeys = () => {
|
|
1321
|
+
const getKeys$1 = () => {
|
|
1305
1322
|
return Object.keys(editors);
|
|
1306
1323
|
};
|
|
1307
1324
|
const set$6 = (id, oldEditor, newEditor) => {
|
|
@@ -2887,11 +2904,7 @@ const launchRenameWorker = async () => {
|
|
|
2887
2904
|
const name = 'Rename Worker';
|
|
2888
2905
|
const url = 'renameWorkerMain.js';
|
|
2889
2906
|
const rpc = await launchWorker(name, url);
|
|
2890
|
-
|
|
2891
|
-
await rpc.invoke('Rename.initialize');
|
|
2892
|
-
} catch {
|
|
2893
|
-
// ignore
|
|
2894
|
-
}
|
|
2907
|
+
await rpc.invoke('Rename.initialize');
|
|
2895
2908
|
return rpc;
|
|
2896
2909
|
};
|
|
2897
2910
|
|
|
@@ -3284,6 +3297,7 @@ const characterLeft = (line, columnIndex) => {
|
|
|
3284
3297
|
}
|
|
3285
3298
|
const segmenter = create$8();
|
|
3286
3299
|
const last = segmenter.at(line, columnIndex - 1);
|
|
3300
|
+
// @ts-ignore
|
|
3287
3301
|
return columnIndex - last.index;
|
|
3288
3302
|
};
|
|
3289
3303
|
const twoCharactersLeft = () => {
|
|
@@ -3295,6 +3309,7 @@ const characterRight = (line, columnIndex) => {
|
|
|
3295
3309
|
}
|
|
3296
3310
|
const segmenter = create$8();
|
|
3297
3311
|
const next = segmenter.at(line, columnIndex);
|
|
3312
|
+
// @ts-ignore
|
|
3298
3313
|
return next.segment.length;
|
|
3299
3314
|
};
|
|
3300
3315
|
const isWhitespace = char => {
|
|
@@ -5202,8 +5217,8 @@ const create$4 = () => {
|
|
|
5202
5217
|
const launchCompletionWorker = async () => {
|
|
5203
5218
|
const name = 'Completion Worker';
|
|
5204
5219
|
const url = 'completionWorkerMain.js';
|
|
5205
|
-
const
|
|
5206
|
-
await
|
|
5220
|
+
const intializeCommand = 'Completions.initialize';
|
|
5221
|
+
const rpc = await launchWorker(name, url, intializeCommand);
|
|
5207
5222
|
return rpc;
|
|
5208
5223
|
};
|
|
5209
5224
|
|
|
@@ -5374,7 +5389,6 @@ const create$2 = () => {
|
|
|
5374
5389
|
};
|
|
5375
5390
|
|
|
5376
5391
|
const newStateGenerator$1 = async (state, parentUid) => {
|
|
5377
|
-
// const editor: any = {}
|
|
5378
5392
|
const {
|
|
5379
5393
|
uid,
|
|
5380
5394
|
x,
|
|
@@ -5382,7 +5396,11 @@ const newStateGenerator$1 = async (state, parentUid) => {
|
|
|
5382
5396
|
width,
|
|
5383
5397
|
height
|
|
5384
5398
|
} = state;
|
|
5385
|
-
|
|
5399
|
+
const editor = get$4(parentUid);
|
|
5400
|
+
const {
|
|
5401
|
+
languageId
|
|
5402
|
+
} = editor;
|
|
5403
|
+
await invoke$4('Rename.create', uid, x, y, width, height, parentUid, languageId);
|
|
5386
5404
|
await invoke$4('Rename.loadContent', uid);
|
|
5387
5405
|
const diff = await invoke$4('Rename.diff2', uid);
|
|
5388
5406
|
const commands = await invoke$4('Rename.render2', uid, diff);
|
|
@@ -7600,7 +7618,7 @@ const render$c = widget => {
|
|
|
7600
7618
|
return wrappedCommands;
|
|
7601
7619
|
};
|
|
7602
7620
|
const add$7 = widget => {
|
|
7603
|
-
return addWidget$1(widget, '
|
|
7621
|
+
return addWidget$1(widget, 'EditorCompletion', render$c);
|
|
7604
7622
|
};
|
|
7605
7623
|
const remove$7 = widget => {
|
|
7606
7624
|
return [['Viewlet.dispose', widget.newState.uid]];
|
|
@@ -7621,13 +7639,13 @@ const {
|
|
|
7621
7639
|
toggleDetails,
|
|
7622
7640
|
closeDetails,
|
|
7623
7641
|
handleWheel,
|
|
7624
|
-
close: close$
|
|
7642
|
+
close: close$2
|
|
7625
7643
|
} = createFns(['handleEditorType', 'focusFirst', 'focusNext', 'focusPrevious', 'focusLast', 'handleEditorDeleteLeft', 'openDetails', 'focusIndex', 'handleEditorBlur', 'handleEditorClick', 'openDetails', 'selectCurrent', 'selectIndex', 'toggleDetails', 'closeDetails', 'handleWheel', 'close'], 'Completions', Completion);
|
|
7626
7644
|
|
|
7627
7645
|
const EditorCompletionWidget = {
|
|
7628
7646
|
__proto__: null,
|
|
7629
7647
|
add: add$7,
|
|
7630
|
-
close: close$
|
|
7648
|
+
close: close$2,
|
|
7631
7649
|
closeDetails,
|
|
7632
7650
|
focusFirst,
|
|
7633
7651
|
focusIndex: focusIndex$1,
|
|
@@ -7676,7 +7694,7 @@ const remove$6 = widget => {
|
|
|
7676
7694
|
return [['Viewlet.dispose', widget.newState.uid]];
|
|
7677
7695
|
};
|
|
7678
7696
|
const {
|
|
7679
|
-
close,
|
|
7697
|
+
close: close$1,
|
|
7680
7698
|
focusCloseButton,
|
|
7681
7699
|
focusFind,
|
|
7682
7700
|
focusNext: focusNext$1,
|
|
@@ -7689,7 +7707,7 @@ const {
|
|
|
7689
7707
|
focusToggleReplace,
|
|
7690
7708
|
handleBlur,
|
|
7691
7709
|
handleFocus,
|
|
7692
|
-
handleInput,
|
|
7710
|
+
handleInput: handleInput$1,
|
|
7693
7711
|
handleReplaceFocus,
|
|
7694
7712
|
handleReplaceInput,
|
|
7695
7713
|
handleToggleReplaceFocus,
|
|
@@ -7699,7 +7717,7 @@ const {
|
|
|
7699
7717
|
const EditorFindWidget = {
|
|
7700
7718
|
__proto__: null,
|
|
7701
7719
|
add: add$6,
|
|
7702
|
-
close,
|
|
7720
|
+
close: close$1,
|
|
7703
7721
|
focusCloseButton,
|
|
7704
7722
|
focusFind,
|
|
7705
7723
|
focusNext: focusNext$1,
|
|
@@ -7712,7 +7730,7 @@ const EditorFindWidget = {
|
|
|
7712
7730
|
focusToggleReplace,
|
|
7713
7731
|
handleBlur,
|
|
7714
7732
|
handleFocus,
|
|
7715
|
-
handleInput,
|
|
7733
|
+
handleInput: handleInput$1,
|
|
7716
7734
|
handleReplaceFocus,
|
|
7717
7735
|
handleReplaceInput,
|
|
7718
7736
|
handleToggleReplaceFocus,
|
|
@@ -7928,6 +7946,46 @@ const renderHover = (oldState, newState) => {
|
|
|
7928
7946
|
return commands;
|
|
7929
7947
|
};
|
|
7930
7948
|
|
|
7949
|
+
const removeWidget$1 = widget => {
|
|
7950
|
+
// @ts-ignore
|
|
7951
|
+
return [['Viewlet.send', widget.newState.uid, 'dispose']];
|
|
7952
|
+
};
|
|
7953
|
+
|
|
7954
|
+
const render$9 = widget => {
|
|
7955
|
+
const commands = renderFull$4(widget.oldState, widget.newState);
|
|
7956
|
+
const wrappedCommands = [];
|
|
7957
|
+
const {
|
|
7958
|
+
uid
|
|
7959
|
+
} = widget.newState;
|
|
7960
|
+
for (const command of commands) {
|
|
7961
|
+
if (command[0] === SetDom2 || command[0] === SetCss || command[0] === AppendToBody || command[0] === SetBounds2 || command[0] === RegisterEventListeners || command[0] === SetSelectionByName || command[0] === SetValueByName || command[0] === SetFocusContext || command[0] === SetUid || command[0] === 'Viewlet.focusSelector') {
|
|
7962
|
+
wrappedCommands.push(command);
|
|
7963
|
+
} else {
|
|
7964
|
+
wrappedCommands.push(['Viewlet.send', uid, ...command]);
|
|
7965
|
+
}
|
|
7966
|
+
}
|
|
7967
|
+
return wrappedCommands;
|
|
7968
|
+
};
|
|
7969
|
+
const add$5 = widget => {
|
|
7970
|
+
return addWidget$1(widget, 'EditorRename', render$9);
|
|
7971
|
+
};
|
|
7972
|
+
const remove$5 = removeWidget$1;
|
|
7973
|
+
const {
|
|
7974
|
+
handleInput,
|
|
7975
|
+
close,
|
|
7976
|
+
accept
|
|
7977
|
+
} = createFns(['handleInput', 'close', 'accept'], 'Rename', Rename);
|
|
7978
|
+
|
|
7979
|
+
const EditorRenameWidget = {
|
|
7980
|
+
__proto__: null,
|
|
7981
|
+
accept,
|
|
7982
|
+
add: add$5,
|
|
7983
|
+
close,
|
|
7984
|
+
handleInput,
|
|
7985
|
+
remove: remove$5,
|
|
7986
|
+
render: render$9
|
|
7987
|
+
};
|
|
7988
|
+
|
|
7931
7989
|
const rerender = editor => {
|
|
7932
7990
|
// TODO avoid slow clone
|
|
7933
7991
|
return structuredClone(editor);
|
|
@@ -8549,13 +8607,17 @@ const getKeyBindings = () => {
|
|
|
8549
8607
|
}];
|
|
8550
8608
|
};
|
|
8551
8609
|
|
|
8610
|
+
const getKeys = () => {
|
|
8611
|
+
return getKeys$1();
|
|
8612
|
+
};
|
|
8613
|
+
|
|
8552
8614
|
const getDiagnostics = editor => {
|
|
8553
8615
|
return executeDiagnosticProvider(editor);
|
|
8554
8616
|
};
|
|
8555
8617
|
const getProblems = async () => {
|
|
8556
8618
|
// TODO maybe combine querying diagnostics for problems view with diagnostics for editor
|
|
8557
8619
|
// or query the diagnostics for the problems view directtly from the extension host worker
|
|
8558
|
-
const keys = getKeys();
|
|
8620
|
+
const keys = getKeys$1();
|
|
8559
8621
|
const editors = keys.map(key => {
|
|
8560
8622
|
const numericKey = parseInt(key);
|
|
8561
8623
|
const editor = get$4(numericKey);
|
|
@@ -9475,7 +9537,7 @@ const renderWidget = widget => {
|
|
|
9475
9537
|
}
|
|
9476
9538
|
return module.render(widget);
|
|
9477
9539
|
};
|
|
9478
|
-
const removeWidget
|
|
9540
|
+
const removeWidget = widget => {
|
|
9479
9541
|
const module = get$5(widget.id);
|
|
9480
9542
|
if (!module) {
|
|
9481
9543
|
throw new Error('unsupported widget');
|
|
@@ -9630,7 +9692,7 @@ const renderWidgets = {
|
|
|
9630
9692
|
}
|
|
9631
9693
|
const removeCommands = [];
|
|
9632
9694
|
for (const removedWidget of removedWidgets) {
|
|
9633
|
-
const childCommands = removeWidget
|
|
9695
|
+
const childCommands = removeWidget(removedWidget);
|
|
9634
9696
|
if (childCommands.length > 0) {
|
|
9635
9697
|
removeCommands.push(...childCommands);
|
|
9636
9698
|
}
|
|
@@ -9640,7 +9702,7 @@ const renderWidgets = {
|
|
|
9640
9702
|
},
|
|
9641
9703
|
multiple: true
|
|
9642
9704
|
};
|
|
9643
|
-
const render$
|
|
9705
|
+
const render$8 = [renderLines, renderSelections, renderScrollBarX, renderScrollBarY, renderFocus$1, renderDecorations, renderGutterInfo, renderWidgets];
|
|
9644
9706
|
const renderEditor = async id => {
|
|
9645
9707
|
const instance = get$4(id);
|
|
9646
9708
|
if (!instance) {
|
|
@@ -9652,7 +9714,7 @@ const renderEditor = async id => {
|
|
|
9652
9714
|
} = instance;
|
|
9653
9715
|
const commands = [];
|
|
9654
9716
|
set$6(id, newState, newState);
|
|
9655
|
-
for (const item of render$
|
|
9717
|
+
for (const item of render$8) {
|
|
9656
9718
|
if (!item.isEqual(oldState, newState)) {
|
|
9657
9719
|
const result = await item.apply(oldState, newState);
|
|
9658
9720
|
// @ts-ignore
|
|
@@ -9718,7 +9780,7 @@ const getDebugHighlight = async debugId => {
|
|
|
9718
9780
|
};
|
|
9719
9781
|
|
|
9720
9782
|
const getKey = () => {
|
|
9721
|
-
const keys = getKeys();
|
|
9783
|
+
const keys = getKeys$1();
|
|
9722
9784
|
return parseInt(keys[0]);
|
|
9723
9785
|
};
|
|
9724
9786
|
const updateDebugInfo = async debugId => {
|
|
@@ -9752,7 +9814,7 @@ const editorDiagnosticEffect = {
|
|
|
9752
9814
|
}
|
|
9753
9815
|
};
|
|
9754
9816
|
|
|
9755
|
-
const keep = ['ActivateByEvent.activateByEvent', 'Editor.applyEdit2', 'Editor.applyEdits2', 'Editor.closeFind2', 'Editor.closeWidget2', 'Editor.create', 'Editor.getKeyBindings', 'Editor.getLines2', 'Editor.getPositionAtCursor', 'Editor.getOffsetAtCursor', 'Editor.getQuickPickMenuEntries', 'Editor.getSelections', 'Editor.getSelections2', 'Editor.getText', 'Editor.getWordAt', 'Editor.getWordAt2', 'Editor.getWordAtOffset2', 'Editor.getUri', 'Editor.getWordBefore', 'Editor.getWordBefore2', 'Editor.offsetAt', 'Editor.render', 'Editor.setSelections2', 'Editor.updateDebugInfo', 'Editor.getLanguageId', 'Editor.getProblems', 'Font.ensure', 'HandleMessagePort.handleMessagePort', 'Hover.getHoverInfo', 'Hover.handleSashPointerDown', 'Hover.handleSashPointerMove', 'Hover.handleSashPointerUp', 'Hover.loadContent', 'Hover.render', 'Initialize.initialize', 'SendMessagePortToExtensionHostWorker.sendMessagePortToExtensionHostWorker'
|
|
9817
|
+
const keep = ['ActivateByEvent.activateByEvent', 'ExtensionHostManagement.activateByEvent', 'Editor.applyEdit2', 'Editor.applyEdits2', 'Editor.closeFind2', 'Editor.closeWidget2', 'Editor.create', 'Editor.getKeyBindings', 'Editor.getLines2', 'Editor.getPositionAtCursor', 'Editor.getOffsetAtCursor', 'Editor.getQuickPickMenuEntries', 'Editor.getSelections', 'Editor.getSelections2', 'Editor.getText', 'Editor.getWordAt', 'Editor.getWordAt2', 'Editor.getWordAtOffset2', 'Editor.getUri', 'Editor.getWordBefore', 'Editor.getWordBefore2', 'Editor.offsetAt', 'Editor.render', 'Editor.setSelections2', 'Editor.updateDebugInfo', 'Editor.getLanguageId', 'Editor.getProblems', 'Editor.getKeys', 'Font.ensure', 'HandleMessagePort.handleMessagePort', 'Hover.getHoverInfo', 'Hover.handleSashPointerDown', 'Hover.handleSashPointerMove', 'Hover.handleSashPointerUp', 'Hover.loadContent', 'Hover.render', 'Initialize.initialize', 'SendMessagePortToExtensionHostWorker.sendMessagePortToExtensionHostWorker'
|
|
9756
9818
|
// 'ColorPicker.handleSliderPointerDown',
|
|
9757
9819
|
// 'ColorPicker.handleSliderPointerMove',
|
|
9758
9820
|
// 'ColorPicker.loadContent',
|
|
@@ -9841,6 +9903,7 @@ const wrapCommands = commands => {
|
|
|
9841
9903
|
|
|
9842
9904
|
const commandMap = {
|
|
9843
9905
|
'ActivateByEvent.activateByEvent': activateByEvent,
|
|
9906
|
+
'ExtensionHostManagement.activateByEvent': activateByEvent,
|
|
9844
9907
|
'CodeGenerator.accept': codeGeneratorAccept,
|
|
9845
9908
|
'ColorPicker.loadContent': loadContent$2,
|
|
9846
9909
|
'Editor.addCursorAbove': addCursorAbove,
|
|
@@ -9892,15 +9955,17 @@ const commandMap = {
|
|
|
9892
9955
|
'Editor.findAllReferences': findAllReferences,
|
|
9893
9956
|
'Editor.format': format,
|
|
9894
9957
|
'Editor.getKeyBindings': getKeyBindings,
|
|
9958
|
+
'Editor.getKeys': getKeys,
|
|
9959
|
+
'Editor.getLanguageId': getLanguageId,
|
|
9895
9960
|
'Editor.getLines2': getLines2,
|
|
9896
9961
|
'Editor.getOffsetAtCursor': getOffsetAtCursor,
|
|
9897
9962
|
'Editor.getPositionAtCursor': getPositionAtCursor,
|
|
9963
|
+
'Editor.getProblems': getProblems,
|
|
9898
9964
|
'Editor.getQuickPickMenuEntries': getQuickPickMenuEntries,
|
|
9899
9965
|
'Editor.getSelections': getSelections,
|
|
9900
9966
|
'Editor.getSelections2': getSelections2,
|
|
9901
|
-
'Editor.getLanguageId': getLanguageId,
|
|
9902
|
-
'Editor.getUri': getUri,
|
|
9903
9967
|
'Editor.getText': getText,
|
|
9968
|
+
'Editor.getUri': getUri,
|
|
9904
9969
|
'Editor.getWordAt': getWordAt$1,
|
|
9905
9970
|
'Editor.getWordAt2': getWordAt,
|
|
9906
9971
|
'Editor.getWordAtOffset2': getWordAtOffset2,
|
|
@@ -9953,7 +10018,6 @@ const commandMap = {
|
|
|
9953
10018
|
'Editor.paste': paste,
|
|
9954
10019
|
'Editor.pasteText': pasteText,
|
|
9955
10020
|
'Editor.render': renderEditor,
|
|
9956
|
-
'Editor.getProblems': getProblems,
|
|
9957
10021
|
'Editor.renderEventListeners': renderEventListeners,
|
|
9958
10022
|
'Editor.replaceRange': replaceRange,
|
|
9959
10023
|
'Editor.rerender': rerender,
|
|
@@ -9996,7 +10060,7 @@ const commandMap = {
|
|
|
9996
10060
|
'Editor.unIndent': editorUnindent,
|
|
9997
10061
|
'Editor.updateDebugInfo': updateDebugInfo,
|
|
9998
10062
|
'Editor.updateDiagnostics': updateDiagnostics,
|
|
9999
|
-
'EditorCompletion.close': close$
|
|
10063
|
+
'EditorCompletion.close': close$2,
|
|
10000
10064
|
'EditorCompletion.closeDetails': closeDetails,
|
|
10001
10065
|
'EditorCompletion.focusFirst': focusFirst,
|
|
10002
10066
|
'EditorCompletion.focusIndex': focusIndex$1,
|
|
@@ -10011,8 +10075,11 @@ const commandMap = {
|
|
|
10011
10075
|
'EditorCompletion.selectCurrent': selectCurrent,
|
|
10012
10076
|
'EditorCompletion.selectIndex': selectIndex,
|
|
10013
10077
|
'EditorCompletion.toggleDetails': toggleDetails,
|
|
10078
|
+
'EditorRename.accept': accept,
|
|
10079
|
+
'EditorRename.close': close,
|
|
10080
|
+
'EditorRename.handleInput': handleInput,
|
|
10014
10081
|
'EditorSourceActions.focusNext': focusNext,
|
|
10015
|
-
'FindWidget.close': close,
|
|
10082
|
+
'FindWidget.close': close$1,
|
|
10016
10083
|
'FindWidget.focusCloseButton': focusCloseButton,
|
|
10017
10084
|
'FindWidget.focusFind': focusFind,
|
|
10018
10085
|
'FindWidget.focusNext': focusNext$1,
|
|
@@ -10025,7 +10092,7 @@ const commandMap = {
|
|
|
10025
10092
|
'FindWidget.focusToggleReplace': focusToggleReplace,
|
|
10026
10093
|
'FindWidget.handleBlur': handleBlur,
|
|
10027
10094
|
'FindWidget.handleFocus': handleFocus,
|
|
10028
|
-
'FindWidget.handleInput': handleInput,
|
|
10095
|
+
'FindWidget.handleInput': handleInput$1,
|
|
10029
10096
|
'FindWidget.handleReplaceFocus': handleReplaceFocus,
|
|
10030
10097
|
'FindWidget.handleReplaceInput': handleReplaceInput,
|
|
10031
10098
|
'FindWidget.handleToggleReplaceFocus': handleToggleReplaceFocus,
|
|
@@ -10051,11 +10118,6 @@ const listen = async () => {
|
|
|
10051
10118
|
set$8(rpc);
|
|
10052
10119
|
};
|
|
10053
10120
|
|
|
10054
|
-
const removeWidget = widget => {
|
|
10055
|
-
// @ts-ignore
|
|
10056
|
-
return [['Viewlet.send', widget.newState.uid, 'dispose']];
|
|
10057
|
-
};
|
|
10058
|
-
|
|
10059
10121
|
const CodeGeneratorInput = 'CodeGeneratorInput';
|
|
10060
10122
|
|
|
10061
10123
|
const getCodeGeneratorVirtualDom = state => {
|
|
@@ -10109,10 +10171,10 @@ const renderFocus = {
|
|
|
10109
10171
|
return [Focus, '.CodeGeneratorInput', newState.focusSource];
|
|
10110
10172
|
}
|
|
10111
10173
|
};
|
|
10112
|
-
const render$
|
|
10174
|
+
const render$7 = [renderContent$1, renderBounds$2, renderFocus];
|
|
10113
10175
|
const renderFull$2 = (oldState, newState) => {
|
|
10114
10176
|
const commands = [];
|
|
10115
|
-
for (const item of render$
|
|
10177
|
+
for (const item of render$7) {
|
|
10116
10178
|
if (!item.isEqual(oldState, newState)) {
|
|
10117
10179
|
commands.push(item.apply(oldState, newState));
|
|
10118
10180
|
}
|
|
@@ -10120,7 +10182,7 @@ const renderFull$2 = (oldState, newState) => {
|
|
|
10120
10182
|
return commands;
|
|
10121
10183
|
};
|
|
10122
10184
|
|
|
10123
|
-
const render$
|
|
10185
|
+
const render$6 = widget => {
|
|
10124
10186
|
const commands = renderFull$2(widget.oldState, widget.newState);
|
|
10125
10187
|
const wrappedCommands = [];
|
|
10126
10188
|
const {
|
|
@@ -10136,16 +10198,16 @@ const render$7 = widget => {
|
|
|
10136
10198
|
}
|
|
10137
10199
|
return wrappedCommands;
|
|
10138
10200
|
};
|
|
10139
|
-
const add$
|
|
10140
|
-
return addWidget$1(widget, 'EditorCodeGenerator', render$
|
|
10201
|
+
const add$4 = widget => {
|
|
10202
|
+
return addWidget$1(widget, 'EditorCodeGenerator', render$6);
|
|
10141
10203
|
};
|
|
10142
|
-
const remove$
|
|
10204
|
+
const remove$4 = removeWidget$1;
|
|
10143
10205
|
|
|
10144
10206
|
const EditorCodeGeneratorWidget = {
|
|
10145
10207
|
__proto__: null,
|
|
10146
|
-
add: add$
|
|
10147
|
-
remove: remove$
|
|
10148
|
-
render: render$
|
|
10208
|
+
add: add$4,
|
|
10209
|
+
remove: remove$4,
|
|
10210
|
+
render: render$6
|
|
10149
10211
|
};
|
|
10150
10212
|
|
|
10151
10213
|
const renderFull$1 = (oldState, newState) => {
|
|
@@ -10155,7 +10217,7 @@ const renderFull$1 = (oldState, newState) => {
|
|
|
10155
10217
|
return commands;
|
|
10156
10218
|
};
|
|
10157
10219
|
|
|
10158
|
-
const render$
|
|
10220
|
+
const render$5 = widget => {
|
|
10159
10221
|
const commands = renderFull$1(widget.oldState, widget.newState);
|
|
10160
10222
|
const wrappedCommands = [];
|
|
10161
10223
|
const {
|
|
@@ -10170,18 +10232,18 @@ const render$6 = widget => {
|
|
|
10170
10232
|
}
|
|
10171
10233
|
return wrappedCommands;
|
|
10172
10234
|
};
|
|
10173
|
-
const add$
|
|
10174
|
-
return addWidget$1(widget, 'ColorPicker', render$
|
|
10235
|
+
const add$3 = widget => {
|
|
10236
|
+
return addWidget$1(widget, 'ColorPicker', render$5);
|
|
10175
10237
|
};
|
|
10176
|
-
const remove$
|
|
10238
|
+
const remove$3 = removeWidget$1;
|
|
10177
10239
|
const Commands = {};
|
|
10178
10240
|
|
|
10179
10241
|
const EditorColorPickerWidget = {
|
|
10180
10242
|
__proto__: null,
|
|
10181
10243
|
Commands,
|
|
10182
|
-
add: add$
|
|
10183
|
-
remove: remove$
|
|
10184
|
-
render: render$
|
|
10244
|
+
add: add$3,
|
|
10245
|
+
remove: remove$3,
|
|
10246
|
+
render: render$5
|
|
10185
10247
|
};
|
|
10186
10248
|
|
|
10187
10249
|
const getCompletionDetailVirtualDom = content => {
|
|
@@ -10239,9 +10301,9 @@ const renderBounds$1 = {
|
|
|
10239
10301
|
return [/* method */SetBounds, /* x */x, /* y */y, /* width */width, /* height */height];
|
|
10240
10302
|
}
|
|
10241
10303
|
};
|
|
10242
|
-
const render$
|
|
10304
|
+
const render$4 = [renderContent, renderBounds$1];
|
|
10243
10305
|
const renderFull = (oldState, newState) => {
|
|
10244
|
-
return renderParts(render$
|
|
10306
|
+
return renderParts(render$4, oldState, newState);
|
|
10245
10307
|
};
|
|
10246
10308
|
|
|
10247
10309
|
const getWidgetState = (editor, id) => {
|
|
@@ -10260,7 +10322,7 @@ const getCompletionState = editor => {
|
|
|
10260
10322
|
return getWidgetState(editor, Completion);
|
|
10261
10323
|
};
|
|
10262
10324
|
|
|
10263
|
-
const render$
|
|
10325
|
+
const render$3 = widget => {
|
|
10264
10326
|
const commands = renderFull(widget.oldState, widget.newState);
|
|
10265
10327
|
const wrappedCommands = [];
|
|
10266
10328
|
const {
|
|
@@ -10275,10 +10337,10 @@ const render$4 = widget => {
|
|
|
10275
10337
|
}
|
|
10276
10338
|
return wrappedCommands;
|
|
10277
10339
|
};
|
|
10278
|
-
const add$
|
|
10279
|
-
return addWidget$1(widget, 'EditorCompletionDetails', render$
|
|
10340
|
+
const add$2 = widget => {
|
|
10341
|
+
return addWidget$1(widget, 'EditorCompletionDetails', render$3);
|
|
10280
10342
|
};
|
|
10281
|
-
const remove$
|
|
10343
|
+
const remove$2 = removeWidget$1;
|
|
10282
10344
|
const handleEditorType = (editor, state) => {
|
|
10283
10345
|
const completionState = getCompletionState(editor);
|
|
10284
10346
|
if (!completionState) {
|
|
@@ -10310,49 +10372,22 @@ const handleEditorDeleteLeft = (editor, state) => {
|
|
|
10310
10372
|
|
|
10311
10373
|
const EditorCompletionDetailWidget = {
|
|
10312
10374
|
__proto__: null,
|
|
10313
|
-
add: add$
|
|
10375
|
+
add: add$2,
|
|
10314
10376
|
handleEditorDeleteLeft,
|
|
10315
10377
|
handleEditorType,
|
|
10316
|
-
remove: remove$3,
|
|
10317
|
-
render: render$4
|
|
10318
|
-
};
|
|
10319
|
-
|
|
10320
|
-
const render$3 = widget => {
|
|
10321
|
-
const commands = renderHover(widget.oldState, widget.newState);
|
|
10322
|
-
const wrappedCommands = [];
|
|
10323
|
-
const {
|
|
10324
|
-
uid
|
|
10325
|
-
} = widget.newState;
|
|
10326
|
-
for (const command of commands) {
|
|
10327
|
-
if (command[0] === SetDom2) {
|
|
10328
|
-
wrappedCommands.push([command[0], uid, ...command.slice(1)]);
|
|
10329
|
-
} else {
|
|
10330
|
-
wrappedCommands.push(['Viewlet.send', uid, ...command]);
|
|
10331
|
-
}
|
|
10332
|
-
}
|
|
10333
|
-
return wrappedCommands;
|
|
10334
|
-
};
|
|
10335
|
-
const add$2 = widget => {
|
|
10336
|
-
return addWidget$1(widget, 'EditorHover', render$3);
|
|
10337
|
-
};
|
|
10338
|
-
const remove$2 = removeWidget;
|
|
10339
|
-
|
|
10340
|
-
const EditorHoverWidget = {
|
|
10341
|
-
__proto__: null,
|
|
10342
|
-
add: add$2,
|
|
10343
10378
|
remove: remove$2,
|
|
10344
10379
|
render: render$3
|
|
10345
10380
|
};
|
|
10346
10381
|
|
|
10347
10382
|
const render$2 = widget => {
|
|
10348
|
-
const commands =
|
|
10383
|
+
const commands = renderHover(widget.oldState, widget.newState);
|
|
10349
10384
|
const wrappedCommands = [];
|
|
10350
10385
|
const {
|
|
10351
10386
|
uid
|
|
10352
10387
|
} = widget.newState;
|
|
10353
10388
|
for (const command of commands) {
|
|
10354
|
-
if (command[0] === SetDom2
|
|
10355
|
-
wrappedCommands.push(command);
|
|
10389
|
+
if (command[0] === SetDom2) {
|
|
10390
|
+
wrappedCommands.push([command[0], uid, ...command.slice(1)]);
|
|
10356
10391
|
} else {
|
|
10357
10392
|
wrappedCommands.push(['Viewlet.send', uid, ...command]);
|
|
10358
10393
|
}
|
|
@@ -10360,11 +10395,11 @@ const render$2 = widget => {
|
|
|
10360
10395
|
return wrappedCommands;
|
|
10361
10396
|
};
|
|
10362
10397
|
const add$1 = widget => {
|
|
10363
|
-
return addWidget$1(widget, '
|
|
10398
|
+
return addWidget$1(widget, 'EditorHover', render$2);
|
|
10364
10399
|
};
|
|
10365
|
-
const remove$1 = removeWidget;
|
|
10400
|
+
const remove$1 = removeWidget$1;
|
|
10366
10401
|
|
|
10367
|
-
const
|
|
10402
|
+
const EditorHoverWidget = {
|
|
10368
10403
|
__proto__: null,
|
|
10369
10404
|
add: add$1,
|
|
10370
10405
|
remove: remove$1,
|
|
@@ -10498,7 +10533,7 @@ const render = widget => {
|
|
|
10498
10533
|
const add = widget => {
|
|
10499
10534
|
return addWidget$1(widget, 'EditorSourceActions', render);
|
|
10500
10535
|
};
|
|
10501
|
-
const remove = removeWidget;
|
|
10536
|
+
const remove = removeWidget$1;
|
|
10502
10537
|
|
|
10503
10538
|
const EditorSourceActionWidget = {
|
|
10504
10539
|
__proto__: null,
|