@lvce-editor/editor-worker 7.15.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 +113 -93
- package/package.json +1 -1
package/dist/editorWorkerMain.js
CHANGED
|
@@ -1188,7 +1188,8 @@ const getPortTuple = () => {
|
|
|
1188
1188
|
|
|
1189
1189
|
const ModuleWorkerAndWorkaroundForChromeDevtoolsBug = 6;
|
|
1190
1190
|
|
|
1191
|
-
const launchWorker = async (name, url) => {
|
|
1191
|
+
const launchWorker = async (name, url, intializeCommand) => {
|
|
1192
|
+
// TODO use transferMessagePortRpc
|
|
1192
1193
|
const {
|
|
1193
1194
|
port1,
|
|
1194
1195
|
port2
|
|
@@ -1207,6 +1208,9 @@ const launchWorker = async (name, url) => {
|
|
|
1207
1208
|
isMessagePortOpen: true
|
|
1208
1209
|
});
|
|
1209
1210
|
port2.start();
|
|
1211
|
+
if (intializeCommand) {
|
|
1212
|
+
await rpc.invoke(intializeCommand);
|
|
1213
|
+
}
|
|
1210
1214
|
return rpc;
|
|
1211
1215
|
};
|
|
1212
1216
|
|
|
@@ -1314,7 +1318,7 @@ const get$4 = id => {
|
|
|
1314
1318
|
number(id);
|
|
1315
1319
|
return editors[id];
|
|
1316
1320
|
};
|
|
1317
|
-
const getKeys = () => {
|
|
1321
|
+
const getKeys$1 = () => {
|
|
1318
1322
|
return Object.keys(editors);
|
|
1319
1323
|
};
|
|
1320
1324
|
const set$6 = (id, oldEditor, newEditor) => {
|
|
@@ -2900,11 +2904,7 @@ const launchRenameWorker = async () => {
|
|
|
2900
2904
|
const name = 'Rename Worker';
|
|
2901
2905
|
const url = 'renameWorkerMain.js';
|
|
2902
2906
|
const rpc = await launchWorker(name, url);
|
|
2903
|
-
|
|
2904
|
-
await rpc.invoke('Rename.initialize');
|
|
2905
|
-
} catch {
|
|
2906
|
-
// ignore
|
|
2907
|
-
}
|
|
2907
|
+
await rpc.invoke('Rename.initialize');
|
|
2908
2908
|
return rpc;
|
|
2909
2909
|
};
|
|
2910
2910
|
|
|
@@ -5217,8 +5217,8 @@ const create$4 = () => {
|
|
|
5217
5217
|
const launchCompletionWorker = async () => {
|
|
5218
5218
|
const name = 'Completion Worker';
|
|
5219
5219
|
const url = 'completionWorkerMain.js';
|
|
5220
|
-
const
|
|
5221
|
-
await
|
|
5220
|
+
const intializeCommand = 'Completions.initialize';
|
|
5221
|
+
const rpc = await launchWorker(name, url, intializeCommand);
|
|
5222
5222
|
return rpc;
|
|
5223
5223
|
};
|
|
5224
5224
|
|
|
@@ -5389,7 +5389,6 @@ const create$2 = () => {
|
|
|
5389
5389
|
};
|
|
5390
5390
|
|
|
5391
5391
|
const newStateGenerator$1 = async (state, parentUid) => {
|
|
5392
|
-
// const editor: any = {}
|
|
5393
5392
|
const {
|
|
5394
5393
|
uid,
|
|
5395
5394
|
x,
|
|
@@ -5397,7 +5396,11 @@ const newStateGenerator$1 = async (state, parentUid) => {
|
|
|
5397
5396
|
width,
|
|
5398
5397
|
height
|
|
5399
5398
|
} = state;
|
|
5400
|
-
|
|
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);
|
|
5401
5404
|
await invoke$4('Rename.loadContent', uid);
|
|
5402
5405
|
const diff = await invoke$4('Rename.diff2', uid);
|
|
5403
5406
|
const commands = await invoke$4('Rename.render2', uid, diff);
|
|
@@ -7615,7 +7618,7 @@ const render$c = widget => {
|
|
|
7615
7618
|
return wrappedCommands;
|
|
7616
7619
|
};
|
|
7617
7620
|
const add$7 = widget => {
|
|
7618
|
-
return addWidget$1(widget, '
|
|
7621
|
+
return addWidget$1(widget, 'EditorCompletion', render$c);
|
|
7619
7622
|
};
|
|
7620
7623
|
const remove$7 = widget => {
|
|
7621
7624
|
return [['Viewlet.dispose', widget.newState.uid]];
|
|
@@ -7636,13 +7639,13 @@ const {
|
|
|
7636
7639
|
toggleDetails,
|
|
7637
7640
|
closeDetails,
|
|
7638
7641
|
handleWheel,
|
|
7639
|
-
close: close$
|
|
7642
|
+
close: close$2
|
|
7640
7643
|
} = createFns(['handleEditorType', 'focusFirst', 'focusNext', 'focusPrevious', 'focusLast', 'handleEditorDeleteLeft', 'openDetails', 'focusIndex', 'handleEditorBlur', 'handleEditorClick', 'openDetails', 'selectCurrent', 'selectIndex', 'toggleDetails', 'closeDetails', 'handleWheel', 'close'], 'Completions', Completion);
|
|
7641
7644
|
|
|
7642
7645
|
const EditorCompletionWidget = {
|
|
7643
7646
|
__proto__: null,
|
|
7644
7647
|
add: add$7,
|
|
7645
|
-
close: close$
|
|
7648
|
+
close: close$2,
|
|
7646
7649
|
closeDetails,
|
|
7647
7650
|
focusFirst,
|
|
7648
7651
|
focusIndex: focusIndex$1,
|
|
@@ -7691,7 +7694,7 @@ const remove$6 = widget => {
|
|
|
7691
7694
|
return [['Viewlet.dispose', widget.newState.uid]];
|
|
7692
7695
|
};
|
|
7693
7696
|
const {
|
|
7694
|
-
close,
|
|
7697
|
+
close: close$1,
|
|
7695
7698
|
focusCloseButton,
|
|
7696
7699
|
focusFind,
|
|
7697
7700
|
focusNext: focusNext$1,
|
|
@@ -7704,7 +7707,7 @@ const {
|
|
|
7704
7707
|
focusToggleReplace,
|
|
7705
7708
|
handleBlur,
|
|
7706
7709
|
handleFocus,
|
|
7707
|
-
handleInput,
|
|
7710
|
+
handleInput: handleInput$1,
|
|
7708
7711
|
handleReplaceFocus,
|
|
7709
7712
|
handleReplaceInput,
|
|
7710
7713
|
handleToggleReplaceFocus,
|
|
@@ -7714,7 +7717,7 @@ const {
|
|
|
7714
7717
|
const EditorFindWidget = {
|
|
7715
7718
|
__proto__: null,
|
|
7716
7719
|
add: add$6,
|
|
7717
|
-
close,
|
|
7720
|
+
close: close$1,
|
|
7718
7721
|
focusCloseButton,
|
|
7719
7722
|
focusFind,
|
|
7720
7723
|
focusNext: focusNext$1,
|
|
@@ -7727,7 +7730,7 @@ const EditorFindWidget = {
|
|
|
7727
7730
|
focusToggleReplace,
|
|
7728
7731
|
handleBlur,
|
|
7729
7732
|
handleFocus,
|
|
7730
|
-
handleInput,
|
|
7733
|
+
handleInput: handleInput$1,
|
|
7731
7734
|
handleReplaceFocus,
|
|
7732
7735
|
handleReplaceInput,
|
|
7733
7736
|
handleToggleReplaceFocus,
|
|
@@ -7943,6 +7946,46 @@ const renderHover = (oldState, newState) => {
|
|
|
7943
7946
|
return commands;
|
|
7944
7947
|
};
|
|
7945
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
|
+
|
|
7946
7989
|
const rerender = editor => {
|
|
7947
7990
|
// TODO avoid slow clone
|
|
7948
7991
|
return structuredClone(editor);
|
|
@@ -8564,13 +8607,17 @@ const getKeyBindings = () => {
|
|
|
8564
8607
|
}];
|
|
8565
8608
|
};
|
|
8566
8609
|
|
|
8610
|
+
const getKeys = () => {
|
|
8611
|
+
return getKeys$1();
|
|
8612
|
+
};
|
|
8613
|
+
|
|
8567
8614
|
const getDiagnostics = editor => {
|
|
8568
8615
|
return executeDiagnosticProvider(editor);
|
|
8569
8616
|
};
|
|
8570
8617
|
const getProblems = async () => {
|
|
8571
8618
|
// TODO maybe combine querying diagnostics for problems view with diagnostics for editor
|
|
8572
8619
|
// or query the diagnostics for the problems view directtly from the extension host worker
|
|
8573
|
-
const keys = getKeys();
|
|
8620
|
+
const keys = getKeys$1();
|
|
8574
8621
|
const editors = keys.map(key => {
|
|
8575
8622
|
const numericKey = parseInt(key);
|
|
8576
8623
|
const editor = get$4(numericKey);
|
|
@@ -9490,7 +9537,7 @@ const renderWidget = widget => {
|
|
|
9490
9537
|
}
|
|
9491
9538
|
return module.render(widget);
|
|
9492
9539
|
};
|
|
9493
|
-
const removeWidget
|
|
9540
|
+
const removeWidget = widget => {
|
|
9494
9541
|
const module = get$5(widget.id);
|
|
9495
9542
|
if (!module) {
|
|
9496
9543
|
throw new Error('unsupported widget');
|
|
@@ -9645,7 +9692,7 @@ const renderWidgets = {
|
|
|
9645
9692
|
}
|
|
9646
9693
|
const removeCommands = [];
|
|
9647
9694
|
for (const removedWidget of removedWidgets) {
|
|
9648
|
-
const childCommands = removeWidget
|
|
9695
|
+
const childCommands = removeWidget(removedWidget);
|
|
9649
9696
|
if (childCommands.length > 0) {
|
|
9650
9697
|
removeCommands.push(...childCommands);
|
|
9651
9698
|
}
|
|
@@ -9655,7 +9702,7 @@ const renderWidgets = {
|
|
|
9655
9702
|
},
|
|
9656
9703
|
multiple: true
|
|
9657
9704
|
};
|
|
9658
|
-
const render$
|
|
9705
|
+
const render$8 = [renderLines, renderSelections, renderScrollBarX, renderScrollBarY, renderFocus$1, renderDecorations, renderGutterInfo, renderWidgets];
|
|
9659
9706
|
const renderEditor = async id => {
|
|
9660
9707
|
const instance = get$4(id);
|
|
9661
9708
|
if (!instance) {
|
|
@@ -9667,7 +9714,7 @@ const renderEditor = async id => {
|
|
|
9667
9714
|
} = instance;
|
|
9668
9715
|
const commands = [];
|
|
9669
9716
|
set$6(id, newState, newState);
|
|
9670
|
-
for (const item of render$
|
|
9717
|
+
for (const item of render$8) {
|
|
9671
9718
|
if (!item.isEqual(oldState, newState)) {
|
|
9672
9719
|
const result = await item.apply(oldState, newState);
|
|
9673
9720
|
// @ts-ignore
|
|
@@ -9733,7 +9780,7 @@ const getDebugHighlight = async debugId => {
|
|
|
9733
9780
|
};
|
|
9734
9781
|
|
|
9735
9782
|
const getKey = () => {
|
|
9736
|
-
const keys = getKeys();
|
|
9783
|
+
const keys = getKeys$1();
|
|
9737
9784
|
return parseInt(keys[0]);
|
|
9738
9785
|
};
|
|
9739
9786
|
const updateDebugInfo = async debugId => {
|
|
@@ -9767,7 +9814,7 @@ const editorDiagnosticEffect = {
|
|
|
9767
9814
|
}
|
|
9768
9815
|
};
|
|
9769
9816
|
|
|
9770
|
-
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'
|
|
9771
9818
|
// 'ColorPicker.handleSliderPointerDown',
|
|
9772
9819
|
// 'ColorPicker.handleSliderPointerMove',
|
|
9773
9820
|
// 'ColorPicker.loadContent',
|
|
@@ -9856,6 +9903,7 @@ const wrapCommands = commands => {
|
|
|
9856
9903
|
|
|
9857
9904
|
const commandMap = {
|
|
9858
9905
|
'ActivateByEvent.activateByEvent': activateByEvent,
|
|
9906
|
+
'ExtensionHostManagement.activateByEvent': activateByEvent,
|
|
9859
9907
|
'CodeGenerator.accept': codeGeneratorAccept,
|
|
9860
9908
|
'ColorPicker.loadContent': loadContent$2,
|
|
9861
9909
|
'Editor.addCursorAbove': addCursorAbove,
|
|
@@ -9907,15 +9955,17 @@ const commandMap = {
|
|
|
9907
9955
|
'Editor.findAllReferences': findAllReferences,
|
|
9908
9956
|
'Editor.format': format,
|
|
9909
9957
|
'Editor.getKeyBindings': getKeyBindings,
|
|
9958
|
+
'Editor.getKeys': getKeys,
|
|
9959
|
+
'Editor.getLanguageId': getLanguageId,
|
|
9910
9960
|
'Editor.getLines2': getLines2,
|
|
9911
9961
|
'Editor.getOffsetAtCursor': getOffsetAtCursor,
|
|
9912
9962
|
'Editor.getPositionAtCursor': getPositionAtCursor,
|
|
9963
|
+
'Editor.getProblems': getProblems,
|
|
9913
9964
|
'Editor.getQuickPickMenuEntries': getQuickPickMenuEntries,
|
|
9914
9965
|
'Editor.getSelections': getSelections,
|
|
9915
9966
|
'Editor.getSelections2': getSelections2,
|
|
9916
|
-
'Editor.getLanguageId': getLanguageId,
|
|
9917
|
-
'Editor.getUri': getUri,
|
|
9918
9967
|
'Editor.getText': getText,
|
|
9968
|
+
'Editor.getUri': getUri,
|
|
9919
9969
|
'Editor.getWordAt': getWordAt$1,
|
|
9920
9970
|
'Editor.getWordAt2': getWordAt,
|
|
9921
9971
|
'Editor.getWordAtOffset2': getWordAtOffset2,
|
|
@@ -9968,7 +10018,6 @@ const commandMap = {
|
|
|
9968
10018
|
'Editor.paste': paste,
|
|
9969
10019
|
'Editor.pasteText': pasteText,
|
|
9970
10020
|
'Editor.render': renderEditor,
|
|
9971
|
-
'Editor.getProblems': getProblems,
|
|
9972
10021
|
'Editor.renderEventListeners': renderEventListeners,
|
|
9973
10022
|
'Editor.replaceRange': replaceRange,
|
|
9974
10023
|
'Editor.rerender': rerender,
|
|
@@ -10011,7 +10060,7 @@ const commandMap = {
|
|
|
10011
10060
|
'Editor.unIndent': editorUnindent,
|
|
10012
10061
|
'Editor.updateDebugInfo': updateDebugInfo,
|
|
10013
10062
|
'Editor.updateDiagnostics': updateDiagnostics,
|
|
10014
|
-
'EditorCompletion.close': close$
|
|
10063
|
+
'EditorCompletion.close': close$2,
|
|
10015
10064
|
'EditorCompletion.closeDetails': closeDetails,
|
|
10016
10065
|
'EditorCompletion.focusFirst': focusFirst,
|
|
10017
10066
|
'EditorCompletion.focusIndex': focusIndex$1,
|
|
@@ -10026,8 +10075,11 @@ const commandMap = {
|
|
|
10026
10075
|
'EditorCompletion.selectCurrent': selectCurrent,
|
|
10027
10076
|
'EditorCompletion.selectIndex': selectIndex,
|
|
10028
10077
|
'EditorCompletion.toggleDetails': toggleDetails,
|
|
10078
|
+
'EditorRename.accept': accept,
|
|
10079
|
+
'EditorRename.close': close,
|
|
10080
|
+
'EditorRename.handleInput': handleInput,
|
|
10029
10081
|
'EditorSourceActions.focusNext': focusNext,
|
|
10030
|
-
'FindWidget.close': close,
|
|
10082
|
+
'FindWidget.close': close$1,
|
|
10031
10083
|
'FindWidget.focusCloseButton': focusCloseButton,
|
|
10032
10084
|
'FindWidget.focusFind': focusFind,
|
|
10033
10085
|
'FindWidget.focusNext': focusNext$1,
|
|
@@ -10040,7 +10092,7 @@ const commandMap = {
|
|
|
10040
10092
|
'FindWidget.focusToggleReplace': focusToggleReplace,
|
|
10041
10093
|
'FindWidget.handleBlur': handleBlur,
|
|
10042
10094
|
'FindWidget.handleFocus': handleFocus,
|
|
10043
|
-
'FindWidget.handleInput': handleInput,
|
|
10095
|
+
'FindWidget.handleInput': handleInput$1,
|
|
10044
10096
|
'FindWidget.handleReplaceFocus': handleReplaceFocus,
|
|
10045
10097
|
'FindWidget.handleReplaceInput': handleReplaceInput,
|
|
10046
10098
|
'FindWidget.handleToggleReplaceFocus': handleToggleReplaceFocus,
|
|
@@ -10066,11 +10118,6 @@ const listen = async () => {
|
|
|
10066
10118
|
set$8(rpc);
|
|
10067
10119
|
};
|
|
10068
10120
|
|
|
10069
|
-
const removeWidget = widget => {
|
|
10070
|
-
// @ts-ignore
|
|
10071
|
-
return [['Viewlet.send', widget.newState.uid, 'dispose']];
|
|
10072
|
-
};
|
|
10073
|
-
|
|
10074
10121
|
const CodeGeneratorInput = 'CodeGeneratorInput';
|
|
10075
10122
|
|
|
10076
10123
|
const getCodeGeneratorVirtualDom = state => {
|
|
@@ -10124,10 +10171,10 @@ const renderFocus = {
|
|
|
10124
10171
|
return [Focus, '.CodeGeneratorInput', newState.focusSource];
|
|
10125
10172
|
}
|
|
10126
10173
|
};
|
|
10127
|
-
const render$
|
|
10174
|
+
const render$7 = [renderContent$1, renderBounds$2, renderFocus];
|
|
10128
10175
|
const renderFull$2 = (oldState, newState) => {
|
|
10129
10176
|
const commands = [];
|
|
10130
|
-
for (const item of render$
|
|
10177
|
+
for (const item of render$7) {
|
|
10131
10178
|
if (!item.isEqual(oldState, newState)) {
|
|
10132
10179
|
commands.push(item.apply(oldState, newState));
|
|
10133
10180
|
}
|
|
@@ -10135,7 +10182,7 @@ const renderFull$2 = (oldState, newState) => {
|
|
|
10135
10182
|
return commands;
|
|
10136
10183
|
};
|
|
10137
10184
|
|
|
10138
|
-
const render$
|
|
10185
|
+
const render$6 = widget => {
|
|
10139
10186
|
const commands = renderFull$2(widget.oldState, widget.newState);
|
|
10140
10187
|
const wrappedCommands = [];
|
|
10141
10188
|
const {
|
|
@@ -10151,16 +10198,16 @@ const render$7 = widget => {
|
|
|
10151
10198
|
}
|
|
10152
10199
|
return wrappedCommands;
|
|
10153
10200
|
};
|
|
10154
|
-
const add$
|
|
10155
|
-
return addWidget$1(widget, 'EditorCodeGenerator', render$
|
|
10201
|
+
const add$4 = widget => {
|
|
10202
|
+
return addWidget$1(widget, 'EditorCodeGenerator', render$6);
|
|
10156
10203
|
};
|
|
10157
|
-
const remove$
|
|
10204
|
+
const remove$4 = removeWidget$1;
|
|
10158
10205
|
|
|
10159
10206
|
const EditorCodeGeneratorWidget = {
|
|
10160
10207
|
__proto__: null,
|
|
10161
|
-
add: add$
|
|
10162
|
-
remove: remove$
|
|
10163
|
-
render: render$
|
|
10208
|
+
add: add$4,
|
|
10209
|
+
remove: remove$4,
|
|
10210
|
+
render: render$6
|
|
10164
10211
|
};
|
|
10165
10212
|
|
|
10166
10213
|
const renderFull$1 = (oldState, newState) => {
|
|
@@ -10170,7 +10217,7 @@ const renderFull$1 = (oldState, newState) => {
|
|
|
10170
10217
|
return commands;
|
|
10171
10218
|
};
|
|
10172
10219
|
|
|
10173
|
-
const render$
|
|
10220
|
+
const render$5 = widget => {
|
|
10174
10221
|
const commands = renderFull$1(widget.oldState, widget.newState);
|
|
10175
10222
|
const wrappedCommands = [];
|
|
10176
10223
|
const {
|
|
@@ -10185,18 +10232,18 @@ const render$6 = widget => {
|
|
|
10185
10232
|
}
|
|
10186
10233
|
return wrappedCommands;
|
|
10187
10234
|
};
|
|
10188
|
-
const add$
|
|
10189
|
-
return addWidget$1(widget, 'ColorPicker', render$
|
|
10235
|
+
const add$3 = widget => {
|
|
10236
|
+
return addWidget$1(widget, 'ColorPicker', render$5);
|
|
10190
10237
|
};
|
|
10191
|
-
const remove$
|
|
10238
|
+
const remove$3 = removeWidget$1;
|
|
10192
10239
|
const Commands = {};
|
|
10193
10240
|
|
|
10194
10241
|
const EditorColorPickerWidget = {
|
|
10195
10242
|
__proto__: null,
|
|
10196
10243
|
Commands,
|
|
10197
|
-
add: add$
|
|
10198
|
-
remove: remove$
|
|
10199
|
-
render: render$
|
|
10244
|
+
add: add$3,
|
|
10245
|
+
remove: remove$3,
|
|
10246
|
+
render: render$5
|
|
10200
10247
|
};
|
|
10201
10248
|
|
|
10202
10249
|
const getCompletionDetailVirtualDom = content => {
|
|
@@ -10254,9 +10301,9 @@ const renderBounds$1 = {
|
|
|
10254
10301
|
return [/* method */SetBounds, /* x */x, /* y */y, /* width */width, /* height */height];
|
|
10255
10302
|
}
|
|
10256
10303
|
};
|
|
10257
|
-
const render$
|
|
10304
|
+
const render$4 = [renderContent, renderBounds$1];
|
|
10258
10305
|
const renderFull = (oldState, newState) => {
|
|
10259
|
-
return renderParts(render$
|
|
10306
|
+
return renderParts(render$4, oldState, newState);
|
|
10260
10307
|
};
|
|
10261
10308
|
|
|
10262
10309
|
const getWidgetState = (editor, id) => {
|
|
@@ -10275,7 +10322,7 @@ const getCompletionState = editor => {
|
|
|
10275
10322
|
return getWidgetState(editor, Completion);
|
|
10276
10323
|
};
|
|
10277
10324
|
|
|
10278
|
-
const render$
|
|
10325
|
+
const render$3 = widget => {
|
|
10279
10326
|
const commands = renderFull(widget.oldState, widget.newState);
|
|
10280
10327
|
const wrappedCommands = [];
|
|
10281
10328
|
const {
|
|
@@ -10290,10 +10337,10 @@ const render$4 = widget => {
|
|
|
10290
10337
|
}
|
|
10291
10338
|
return wrappedCommands;
|
|
10292
10339
|
};
|
|
10293
|
-
const add$
|
|
10294
|
-
return addWidget$1(widget, 'EditorCompletionDetails', render$
|
|
10340
|
+
const add$2 = widget => {
|
|
10341
|
+
return addWidget$1(widget, 'EditorCompletionDetails', render$3);
|
|
10295
10342
|
};
|
|
10296
|
-
const remove$
|
|
10343
|
+
const remove$2 = removeWidget$1;
|
|
10297
10344
|
const handleEditorType = (editor, state) => {
|
|
10298
10345
|
const completionState = getCompletionState(editor);
|
|
10299
10346
|
if (!completionState) {
|
|
@@ -10325,49 +10372,22 @@ const handleEditorDeleteLeft = (editor, state) => {
|
|
|
10325
10372
|
|
|
10326
10373
|
const EditorCompletionDetailWidget = {
|
|
10327
10374
|
__proto__: null,
|
|
10328
|
-
add: add$
|
|
10375
|
+
add: add$2,
|
|
10329
10376
|
handleEditorDeleteLeft,
|
|
10330
10377
|
handleEditorType,
|
|
10331
|
-
remove: remove$3,
|
|
10332
|
-
render: render$4
|
|
10333
|
-
};
|
|
10334
|
-
|
|
10335
|
-
const render$3 = widget => {
|
|
10336
|
-
const commands = renderHover(widget.oldState, widget.newState);
|
|
10337
|
-
const wrappedCommands = [];
|
|
10338
|
-
const {
|
|
10339
|
-
uid
|
|
10340
|
-
} = widget.newState;
|
|
10341
|
-
for (const command of commands) {
|
|
10342
|
-
if (command[0] === SetDom2) {
|
|
10343
|
-
wrappedCommands.push([command[0], uid, ...command.slice(1)]);
|
|
10344
|
-
} else {
|
|
10345
|
-
wrappedCommands.push(['Viewlet.send', uid, ...command]);
|
|
10346
|
-
}
|
|
10347
|
-
}
|
|
10348
|
-
return wrappedCommands;
|
|
10349
|
-
};
|
|
10350
|
-
const add$2 = widget => {
|
|
10351
|
-
return addWidget$1(widget, 'EditorHover', render$3);
|
|
10352
|
-
};
|
|
10353
|
-
const remove$2 = removeWidget;
|
|
10354
|
-
|
|
10355
|
-
const EditorHoverWidget = {
|
|
10356
|
-
__proto__: null,
|
|
10357
|
-
add: add$2,
|
|
10358
10378
|
remove: remove$2,
|
|
10359
10379
|
render: render$3
|
|
10360
10380
|
};
|
|
10361
10381
|
|
|
10362
10382
|
const render$2 = widget => {
|
|
10363
|
-
const commands =
|
|
10383
|
+
const commands = renderHover(widget.oldState, widget.newState);
|
|
10364
10384
|
const wrappedCommands = [];
|
|
10365
10385
|
const {
|
|
10366
10386
|
uid
|
|
10367
10387
|
} = widget.newState;
|
|
10368
10388
|
for (const command of commands) {
|
|
10369
|
-
if (command[0] === SetDom2
|
|
10370
|
-
wrappedCommands.push(command);
|
|
10389
|
+
if (command[0] === SetDom2) {
|
|
10390
|
+
wrappedCommands.push([command[0], uid, ...command.slice(1)]);
|
|
10371
10391
|
} else {
|
|
10372
10392
|
wrappedCommands.push(['Viewlet.send', uid, ...command]);
|
|
10373
10393
|
}
|
|
@@ -10375,11 +10395,11 @@ const render$2 = widget => {
|
|
|
10375
10395
|
return wrappedCommands;
|
|
10376
10396
|
};
|
|
10377
10397
|
const add$1 = widget => {
|
|
10378
|
-
return addWidget$1(widget, '
|
|
10398
|
+
return addWidget$1(widget, 'EditorHover', render$2);
|
|
10379
10399
|
};
|
|
10380
|
-
const remove$1 = removeWidget;
|
|
10400
|
+
const remove$1 = removeWidget$1;
|
|
10381
10401
|
|
|
10382
|
-
const
|
|
10402
|
+
const EditorHoverWidget = {
|
|
10383
10403
|
__proto__: null,
|
|
10384
10404
|
add: add$1,
|
|
10385
10405
|
remove: remove$1,
|
|
@@ -10513,7 +10533,7 @@ const render = widget => {
|
|
|
10513
10533
|
const add = widget => {
|
|
10514
10534
|
return addWidget$1(widget, 'EditorSourceActions', render);
|
|
10515
10535
|
};
|
|
10516
|
-
const remove = removeWidget;
|
|
10536
|
+
const remove = removeWidget$1;
|
|
10517
10537
|
|
|
10518
10538
|
const EditorSourceActionWidget = {
|
|
10519
10539
|
__proto__: null,
|