@lvce-editor/editor-worker 16.9.0 → 17.0.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.
@@ -1174,7 +1174,7 @@ const ExtensionManagementWorker = 9006;
1174
1174
  const IconThemeWorker = 7009;
1175
1175
  const MarkdownWorker = 300;
1176
1176
  const OpenerWorker = 4561;
1177
- const RendererWorker$2 = 1;
1177
+ const RendererWorker$1 = 1;
1178
1178
  const TextMeasurementWorker = 7011;
1179
1179
 
1180
1180
  const FocusEditorText$1 = 12;
@@ -1275,7 +1275,7 @@ const {
1275
1275
  invokeAndTransfer: invokeAndTransfer$1,
1276
1276
  registerMockRpc,
1277
1277
  set: set$b
1278
- } = create$9(RendererWorker$2);
1278
+ } = create$9(RendererWorker$1);
1279
1279
  const searchFileHtml = async uri => {
1280
1280
  return invoke$d('ExtensionHost.searchFileWithHtml', uri);
1281
1281
  };
@@ -1576,7 +1576,7 @@ const refreshOutput = async () => {
1576
1576
  await invoke$d('Output.refresh');
1577
1577
  };
1578
1578
 
1579
- const RendererWorker$1 = {
1579
+ const RendererWorker = {
1580
1580
  __proto__: null,
1581
1581
  activateByEvent: activateByEvent$1,
1582
1582
  applyBulkReplacement,
@@ -3122,7 +3122,7 @@ const splitLines = lines => {
3122
3122
  };
3123
3123
 
3124
3124
  const {
3125
- invoke: invoke$8} = RendererWorker$1;
3125
+ invoke: invoke$8} = RendererWorker;
3126
3126
 
3127
3127
  const notifyTabModifiedStatusChange = async uri => {
3128
3128
  try {
@@ -9975,61 +9975,8 @@ const getDiagnostics$1 = async editorUid => {
9975
9975
  return diagnostics;
9976
9976
  };
9977
9977
 
9978
- const pending = Object.create(null);
9979
- const loaded = Object.create(null);
9980
- const setPending = (id, promise) => {
9981
- pending[id] = promise;
9982
- };
9983
- const getPending = id => {
9984
- return pending[id];
9985
- };
9986
- const hasPending = id => {
9987
- return id in pending;
9988
- };
9989
- const removePending = id => {
9990
- delete pending[id];
9991
- };
9992
- const setLoaded = id => {
9993
- loaded[id] = true;
9994
- };
9995
- const isLoaded = id => {
9996
- return loaded[id];
9997
- };
9998
-
9999
- const getFonts = () => {
10000
- // @ts-ignore
10001
- return globalThis.fonts || document.fonts;
10002
- };
10003
-
10004
- const loadFont = async (fontName, fontUrl) => {
10005
- try {
10006
- string(fontName);
10007
- string(fontUrl);
10008
- if (fontName.startsWith("'")) {
10009
- throw new Error('font name is not allowed start with quotes');
10010
- }
10011
- const fontFace = new FontFace(fontName, fontUrl, {});
10012
- await fontFace.load();
10013
- const fonts = getFonts();
10014
- // @ts-ignore
10015
- fonts.add(fontFace);
10016
- } catch (error) {
10017
- throw new VError(error, `Failed to load font ${fontName}`);
10018
- }
10019
- };
10020
-
10021
9978
  const ensure = async (fontName, fontUrl) => {
10022
- if (isLoaded(fontName)) {
10023
- return;
10024
- }
10025
- if (hasPending(fontName)) {
10026
- return getPending(fontName);
10027
- }
10028
- const promise = loadFont(fontName, fontUrl);
10029
- setPending(fontName, promise);
10030
- await promise;
10031
- removePending(fontName);
10032
- setLoaded(fontName);
9979
+ await invoke$7('TextMeasurement.ensureFont', fontName, fontUrl);
10033
9980
  };
10034
9981
 
10035
9982
  const getKeyBindings = () => {
@@ -10799,8 +10746,7 @@ const initializeSyntaxHighlighting = async (syntaxHighlightingEnabled, syncIncre
10799
10746
  };
10800
10747
 
10801
10748
  const send$1 = port => {
10802
- // @ts-ignore
10803
- return RendererWorker.sendMessagePortToTextMeasurementWorker(port);
10749
+ return sendMessagePortToTextMeasurementWorker(port);
10804
10750
  };
10805
10751
  const initializeTextMeasurementWorker = async () => {
10806
10752
  try {
@@ -11293,33 +11239,6 @@ const updateDebugInfo = async debugId => {
11293
11239
  await invoke$d('Editor.rerender', key);
11294
11240
  };
11295
11241
 
11296
- const keep = ['ActivateByEvent.activateByEvent', 'ExtensionHostManagement.activateByEvent', 'Editor.applyEdit2', 'Editor.applyEdits2', 'Editor.closeFind2', 'Editor.closeWidget2', 'Editor.create', 'Editor.getKeyBindings', 'Editor.getSourceActions', 'Editor.getLines2', 'Editor.getPositionAtCursor', 'Editor.getOffsetAtCursor', 'Editor.getQuickPickMenuEntries', 'Editor.getSelections', 'Editor.hotReload', 'Editor.getSelections2', 'Editor.getDiagnostics', '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', 'Editor.getMenuIds', 'Editor.getMenuEntries', 'Editor.getMenuEntries2', 'Font.ensure', 'HandleMessagePort.handleMessagePort', 'Hover.getHoverInfo', 'Hover.handleSashPointerDown', 'Hover.handleSashPointerMove', 'Hover.handleSashPointerUp', 'Hover.loadContent', 'Hover.render', 'Initialize.initialize', 'SendMessagePortToExtensionHostWorker.sendMessagePortToExtensionHostWorker'
11297
- // 'ColorPicker.handleSliderPointerDown',
11298
- // 'ColorPicker.handleSliderPointerMove',
11299
- // 'ColorPicker.loadContent',
11300
- // 'ColorPicker.render',
11301
- ];
11302
-
11303
- const wrapWidgetCommand = (widgetId, fn) => {
11304
- const isWidget = widget => {
11305
- return widget.id === widgetId;
11306
- };
11307
- const wrapped = async (editor, ...args) => {
11308
- const childIndex = editor.widgets.findIndex(isWidget);
11309
- // TODO scroll up/down if necessary
11310
- const childWidget = editor.widgets[childIndex];
11311
- const newState = await fn(childWidget.newState, ...args);
11312
- const newEditor = updateWidget(editor, widgetId, newState);
11313
- return newEditor;
11314
- };
11315
- return wrapped;
11316
- };
11317
-
11318
- const widgetCommands = {
11319
- 'ColorPicker.handleSliderPointerDown': ColorPicker$1,
11320
- 'ColorPicker.handleSliderPointerMove': ColorPicker$1
11321
- };
11322
-
11323
11242
  // TODO wrap commands globally, not per editor
11324
11243
  // TODO only store editor state in editor worker, not in renderer worker also
11325
11244
 
@@ -11341,72 +11260,61 @@ const wrapCommand = fn => async (editorUid, ...args) => {
11341
11260
  commands
11342
11261
  };
11343
11262
  };
11344
- const wrapCommands = commands => {
11345
- for (const [key, value] of Object.entries(commands)) {
11346
- if (keep.includes(key)) {
11347
- continue;
11348
- }
11349
- // TODO avoid wrapping functions twice
11350
- const innerWrappedWidgetId = widgetCommands[key];
11351
- const innerWrappedFn = innerWrappedWidgetId ? wrapWidgetCommand(innerWrappedWidgetId, value) : value;
11352
- commands[key] = wrapCommand(innerWrappedFn);
11353
- }
11354
- };
11355
11263
 
11356
11264
  const commandMap = {
11357
11265
  'ActivateByEvent.activateByEvent': activateByEvent,
11358
11266
  'CodeGenerator.accept': codeGeneratorAccept,
11359
11267
  'ColorPicker.loadContent': loadContent$2,
11360
- 'Editor.addCursorAbove': addCursorAbove,
11361
- 'Editor.addCursorBelow': addCursorBelow,
11362
- 'Editor.applyDocumentEdits': applyDocumentEdits,
11363
- 'Editor.applyEdit': applyEdit,
11268
+ 'Editor.addCursorAbove': wrapCommand(addCursorAbove),
11269
+ 'Editor.addCursorBelow': wrapCommand(addCursorBelow),
11270
+ 'Editor.applyDocumentEdits': wrapCommand(applyDocumentEdits),
11271
+ 'Editor.applyEdit': wrapCommand(applyEdit),
11364
11272
  'Editor.applyEdit2': applyEdits2,
11365
- 'Editor.applyWorkspaceEdit': applyWorkspaceEdit,
11366
- 'Editor.braceCompletion': braceCompletion,
11367
- 'Editor.cancelSelection': cancelSelection,
11368
- 'Editor.closeCodeGenerator': closeCodeGenerator,
11369
- 'Editor.closeFind': closeFind,
11273
+ 'Editor.applyWorkspaceEdit': wrapCommand(applyWorkspaceEdit),
11274
+ 'Editor.braceCompletion': wrapCommand(braceCompletion),
11275
+ 'Editor.cancelSelection': wrapCommand(cancelSelection),
11276
+ 'Editor.closeCodeGenerator': wrapCommand(closeCodeGenerator),
11277
+ 'Editor.closeFind': wrapCommand(closeFind),
11370
11278
  'Editor.closeFind2': closeFind2,
11371
- 'Editor.closeRename': closeRename,
11372
- 'Editor.closeSourceAction': closeSourceAction,
11279
+ 'Editor.closeRename': wrapCommand(closeRename),
11280
+ 'Editor.closeSourceAction': wrapCommand(closeSourceAction),
11373
11281
  'Editor.closeWidget2': closeWidget2,
11374
- 'Editor.compositionEnd': compositionEnd,
11375
- 'Editor.compositionStart': compositionStart,
11376
- 'Editor.compositionUpdate': compositionUpdate,
11377
- 'Editor.contextMenu': handleContextMenu,
11378
- 'Editor.copy': copy$1,
11379
- 'Editor.copyLineDown': copyLineDown,
11380
- 'Editor.copyLineUp': copyLineUp,
11282
+ 'Editor.compositionEnd': wrapCommand(compositionEnd),
11283
+ 'Editor.compositionStart': wrapCommand(compositionStart),
11284
+ 'Editor.compositionUpdate': wrapCommand(compositionUpdate),
11285
+ 'Editor.contextMenu': wrapCommand(handleContextMenu),
11286
+ 'Editor.copy': wrapCommand(copy$1),
11287
+ 'Editor.copyLineDown': wrapCommand(copyLineDown),
11288
+ 'Editor.copyLineUp': wrapCommand(copyLineUp),
11381
11289
  'Editor.create': createEditor,
11382
- 'Editor.cursorCharacterLeft': cursorCharacterLeft,
11383
- 'Editor.cursorCharacterRight': cursorCharacterRight,
11384
- 'Editor.cursorDown': cursorDown,
11385
- 'Editor.cursorEnd': cursorEnd,
11386
- 'Editor.cursorHome': cursorHome,
11387
- 'Editor.cursorLeft': cursorCharacterLeft,
11388
- 'Editor.cursorRight': cursorCharacterRight,
11389
- 'Editor.cursorSet': cursorSet,
11390
- 'Editor.cursorUp': cursorUp,
11391
- 'Editor.cursorWordLeft': cursorWordLeft,
11392
- 'Editor.cursorWordPartLeft': cursorWordPartLeft,
11393
- 'Editor.cursorWordPartRight': cursorWordPartRight,
11394
- 'Editor.cursorWordRight': cursorWordRight,
11395
- 'Editor.cut': cut$1,
11396
- 'Editor.deleteAllLeft': deleteAllLeft,
11397
- 'Editor.deleteAllRight': deleteAllRight,
11398
- 'Editor.deleteCharacterLeft': deleteCharacterLeft,
11399
- 'Editor.deleteCharacterRight': deleteCharacterRight,
11400
- 'Editor.deleteHorizontalRight': editorDeleteHorizontalRight,
11401
- 'Editor.deleteLeft': deleteCharacterLeft,
11402
- 'Editor.deleteRight': deleteCharacterRight,
11403
- 'Editor.deleteWordLeft': deleteWordLeft,
11404
- 'Editor.deleteWordPartLeft': deleteWordPartLeft,
11405
- 'Editor.deleteWordPartRight': deleteWordPartRight,
11406
- 'Editor.deleteWordRight': deleteWordRight,
11407
- 'Editor.executeWidgetCommand': executeWidgetCommand,
11408
- 'Editor.findAllReferences': findAllReferences$1,
11409
- 'Editor.format': format,
11290
+ 'Editor.cursorCharacterLeft': wrapCommand(cursorCharacterLeft),
11291
+ 'Editor.cursorCharacterRight': wrapCommand(cursorCharacterRight),
11292
+ 'Editor.cursorDown': wrapCommand(cursorDown),
11293
+ 'Editor.cursorEnd': wrapCommand(cursorEnd),
11294
+ 'Editor.cursorHome': wrapCommand(cursorHome),
11295
+ 'Editor.cursorLeft': wrapCommand(cursorCharacterLeft),
11296
+ 'Editor.cursorRight': wrapCommand(cursorCharacterRight),
11297
+ 'Editor.cursorSet': wrapCommand(cursorSet),
11298
+ 'Editor.cursorUp': wrapCommand(cursorUp),
11299
+ 'Editor.cursorWordLeft': wrapCommand(cursorWordLeft),
11300
+ 'Editor.cursorWordPartLeft': wrapCommand(cursorWordPartLeft),
11301
+ 'Editor.cursorWordPartRight': wrapCommand(cursorWordPartRight),
11302
+ 'Editor.cursorWordRight': wrapCommand(cursorWordRight),
11303
+ 'Editor.cut': wrapCommand(cut$1),
11304
+ 'Editor.deleteAllLeft': wrapCommand(deleteAllLeft),
11305
+ 'Editor.deleteAllRight': wrapCommand(deleteAllRight),
11306
+ 'Editor.deleteCharacterLeft': wrapCommand(deleteCharacterLeft),
11307
+ 'Editor.deleteCharacterRight': wrapCommand(deleteCharacterRight),
11308
+ 'Editor.deleteHorizontalRight': wrapCommand(editorDeleteHorizontalRight),
11309
+ 'Editor.deleteLeft': wrapCommand(deleteCharacterLeft),
11310
+ 'Editor.deleteRight': wrapCommand(deleteCharacterRight),
11311
+ 'Editor.deleteWordLeft': wrapCommand(deleteWordLeft),
11312
+ 'Editor.deleteWordPartLeft': wrapCommand(deleteWordPartLeft),
11313
+ 'Editor.deleteWordPartRight': wrapCommand(deleteWordPartRight),
11314
+ 'Editor.deleteWordRight': wrapCommand(deleteWordRight),
11315
+ 'Editor.executeWidgetCommand': wrapCommand(executeWidgetCommand),
11316
+ 'Editor.findAllReferences': wrapCommand(findAllReferences$1),
11317
+ 'Editor.format': wrapCommand(format),
11410
11318
  'Editor.getDiagnostics': getDiagnostics$1,
11411
11319
  'Editor.getKeyBindings': getKeyBindings,
11412
11320
  'Editor.getKeys': getKeys,
@@ -11429,98 +11337,98 @@ const commandMap = {
11429
11337
  'Editor.getWordAtOffset2': getWordAtOffset2,
11430
11338
  'Editor.getWordBefore': getWordBefore,
11431
11339
  'Editor.getWordBefore2': getWordBefore2,
11432
- 'Editor.goToDefinition': goToDefinition,
11433
- 'Editor.goToTypeDefinition': goToTypeDefinition,
11434
- 'Editor.handleBeforeInput': handleBeforeInput,
11435
- 'Editor.handleBeforeInputFromContentEditable': handleBeforeInputFromContentEditable,
11436
- 'Editor.handleBlur': handleBlur$1,
11340
+ 'Editor.goToDefinition': wrapCommand(goToDefinition),
11341
+ 'Editor.goToTypeDefinition': wrapCommand(goToTypeDefinition),
11342
+ 'Editor.handleBeforeInput': wrapCommand(handleBeforeInput),
11343
+ 'Editor.handleBeforeInputFromContentEditable': wrapCommand(handleBeforeInputFromContentEditable),
11344
+ 'Editor.handleBlur': wrapCommand(handleBlur$1),
11437
11345
  'Editor.handleClickAtPosition': handleClickAtPosition,
11438
- 'Editor.handleContextMenu': handleContextMenu,
11439
- 'Editor.handleDoubleClick': handleDoubleClick,
11440
- 'Editor.handleFocus': handleFocus$1,
11441
- 'Editor.handleMouseDown': handleMouseDown,
11442
- 'Editor.handleMouseMove': handleMouseMove,
11443
- 'Editor.handleMouseMoveWithAltKey': handleMouseMoveWithAltKey,
11346
+ 'Editor.handleContextMenu': wrapCommand(handleContextMenu),
11347
+ 'Editor.handleDoubleClick': wrapCommand(handleDoubleClick),
11348
+ 'Editor.handleFocus': wrapCommand(handleFocus$1),
11349
+ 'Editor.handleMouseDown': wrapCommand(handleMouseDown),
11350
+ 'Editor.handleMouseMove': wrapCommand(handleMouseMove),
11351
+ 'Editor.handleMouseMoveWithAltKey': wrapCommand(handleMouseMoveWithAltKey),
11444
11352
  'Editor.handleNativeSelectionChange': editorHandleNativeSelectionChange,
11445
- 'Editor.handlePointerCaptureLost': handlePointerCaptureLost,
11353
+ 'Editor.handlePointerCaptureLost': wrapCommand(handlePointerCaptureLost),
11446
11354
  'Editor.handleScrollBarClick': handleScrollBarPointerDown,
11447
- 'Editor.handleScrollBarHorizontalMove': handleScrollBarHorizontalMove,
11448
- 'Editor.handleScrollBarHorizontalPointerDown': handleScrollBarHorizontalPointerDown,
11449
- 'Editor.handleScrollBarMove': handleScrollBarMove,
11450
- 'Editor.handleScrollBarPointerDown': handleScrollBarPointerDown,
11451
- 'Editor.handleScrollBarVerticalMove': handleScrollBarVerticalPointerMove,
11452
- 'Editor.handleScrollBarVerticalPointerDown': handleScrollBarPointerDown,
11453
- 'Editor.handleScrollBarVerticalPointerMove': handleScrollBarVerticalPointerMove,
11454
- 'Editor.handleSingleClick': handleSingleClick,
11455
- 'Editor.handleTab': handleTab,
11456
- 'Editor.handleTouchEnd': handleTouchEnd,
11457
- 'Editor.handleTouchMove': handleTouchMove,
11458
- 'Editor.handleTouchStart': handleTouchStart,
11459
- 'Editor.handleTripleClick': handleTripleClick,
11355
+ 'Editor.handleScrollBarHorizontalMove': wrapCommand(handleScrollBarHorizontalMove),
11356
+ 'Editor.handleScrollBarHorizontalPointerDown': wrapCommand(handleScrollBarHorizontalPointerDown),
11357
+ 'Editor.handleScrollBarMove': wrapCommand(handleScrollBarMove),
11358
+ 'Editor.handleScrollBarPointerDown': wrapCommand(handleScrollBarPointerDown),
11359
+ 'Editor.handleScrollBarVerticalMove': wrapCommand(handleScrollBarVerticalPointerMove),
11360
+ 'Editor.handleScrollBarVerticalPointerDown': wrapCommand(handleScrollBarPointerDown),
11361
+ 'Editor.handleScrollBarVerticalPointerMove': wrapCommand(handleScrollBarVerticalPointerMove),
11362
+ 'Editor.handleSingleClick': wrapCommand(handleSingleClick),
11363
+ 'Editor.handleTab': wrapCommand(handleTab),
11364
+ 'Editor.handleTouchEnd': wrapCommand(handleTouchEnd),
11365
+ 'Editor.handleTouchMove': wrapCommand(handleTouchMove),
11366
+ 'Editor.handleTouchStart': wrapCommand(handleTouchStart),
11367
+ 'Editor.handleTripleClick': wrapCommand(handleTripleClick),
11460
11368
  'Editor.hotReload': hotReload,
11461
- 'Editor.indendLess': indentLess,
11462
- 'Editor.indentMore': indentMore,
11463
- 'Editor.insertLineBreak': insertLineBreak,
11464
- 'Editor.moveLineDown': moveLineDown,
11465
- 'Editor.moveLineUp': moveLineUp,
11466
- 'Editor.moveRectangleSelection': moveRectangleSelection,
11467
- 'Editor.moveRectangleSelectionPx': moveRectangleSelectionPx,
11468
- 'Editor.moveSelection': editorMoveSelection,
11469
- 'Editor.moveSelectionPx': moveSelectionPx,
11369
+ 'Editor.indendLess': wrapCommand(indentLess),
11370
+ 'Editor.indentMore': wrapCommand(indentMore),
11371
+ 'Editor.insertLineBreak': wrapCommand(insertLineBreak),
11372
+ 'Editor.moveLineDown': wrapCommand(moveLineDown),
11373
+ 'Editor.moveLineUp': wrapCommand(moveLineUp),
11374
+ 'Editor.moveRectangleSelection': wrapCommand(moveRectangleSelection),
11375
+ 'Editor.moveRectangleSelectionPx': wrapCommand(moveRectangleSelectionPx),
11376
+ 'Editor.moveSelection': wrapCommand(editorMoveSelection),
11377
+ 'Editor.moveSelectionPx': wrapCommand(moveSelectionPx),
11470
11378
  'Editor.offsetAt': offsetAt,
11471
- 'Editor.openCodeGenerator': openCodeGenerator,
11472
- 'Editor.openColorPicker': openColorPicker,
11473
- 'Editor.openCompletion': openCompletion,
11474
- 'Editor.openFind': openFind,
11475
- 'Editor.openFind2': openFind2,
11476
- 'Editor.openRename': openRename,
11477
- 'Editor.organizeImports': organizeImports,
11478
- 'Editor.paste': paste,
11479
- 'Editor.pasteText': pasteText,
11379
+ 'Editor.openCodeGenerator': wrapCommand(openCodeGenerator),
11380
+ 'Editor.openColorPicker': wrapCommand(openColorPicker),
11381
+ 'Editor.openCompletion': wrapCommand(openCompletion),
11382
+ 'Editor.openFind': wrapCommand(openFind),
11383
+ 'Editor.openFind2': wrapCommand(openFind2),
11384
+ 'Editor.openRename': wrapCommand(openRename),
11385
+ 'Editor.organizeImports': wrapCommand(organizeImports),
11386
+ 'Editor.paste': wrapCommand(paste),
11387
+ 'Editor.pasteText': wrapCommand(pasteText),
11480
11388
  'Editor.render': renderEditor,
11481
11389
  'Editor.renderEventListeners': renderEventListeners,
11482
- 'Editor.replaceRange': replaceRange,
11483
- 'Editor.rerender': rerender,
11484
- 'Editor.save': save,
11485
- 'Editor.selectAll': selectAll,
11486
- 'Editor.selectAllLeft': editorSelectAllLeft,
11487
- 'Editor.selectAllOccurrences': selectAllOccurrences,
11488
- 'Editor.selectAllRight': editorSelectAllRight,
11489
- 'Editor.selectCharacterLeft': selectCharacterLeft,
11490
- 'Editor.selectCharacterRight': selectCharacterRight,
11491
- 'Editor.selectDown': selectDown,
11492
- 'Editor.selectInsideString': selectInsideString,
11493
- 'Editor.selectionGrow': selectionGrow,
11494
- 'Editor.selectLine': selectLine,
11495
- 'Editor.selectNextOccurrence': selectNextOccurrence,
11496
- 'Editor.selectPreviousOccurrence': selectPreviousOccurrence,
11497
- 'Editor.selectUp': selectUp,
11498
- 'Editor.selectWord': selectWord,
11499
- 'Editor.selectWordLeft': selectWordLeft,
11500
- 'Editor.selectWordRight': selectWordRight,
11501
- 'Editor.setDebugEnabled': setDebugEnabled,
11502
- 'Editor.setDecorations': setDecorations,
11503
- 'Editor.setDelta': setDelta,
11504
- 'Editor.setDeltaY': setDeltaY,
11505
- 'Editor.setLanguageId': setLanguageId,
11506
- 'Editor.setSelections': setSelections,
11390
+ 'Editor.replaceRange': wrapCommand(replaceRange),
11391
+ 'Editor.rerender': wrapCommand(rerender),
11392
+ 'Editor.save': wrapCommand(save),
11393
+ 'Editor.selectAll': wrapCommand(selectAll),
11394
+ 'Editor.selectAllLeft': wrapCommand(editorSelectAllLeft),
11395
+ 'Editor.selectAllOccurrences': wrapCommand(selectAllOccurrences),
11396
+ 'Editor.selectAllRight': wrapCommand(editorSelectAllRight),
11397
+ 'Editor.selectCharacterLeft': wrapCommand(selectCharacterLeft),
11398
+ 'Editor.selectCharacterRight': wrapCommand(selectCharacterRight),
11399
+ 'Editor.selectDown': wrapCommand(selectDown),
11400
+ 'Editor.selectInsideString': wrapCommand(selectInsideString),
11401
+ 'Editor.selectionGrow': wrapCommand(selectionGrow),
11402
+ 'Editor.selectLine': wrapCommand(selectLine),
11403
+ 'Editor.selectNextOccurrence': wrapCommand(selectNextOccurrence),
11404
+ 'Editor.selectPreviousOccurrence': wrapCommand(selectPreviousOccurrence),
11405
+ 'Editor.selectUp': wrapCommand(selectUp),
11406
+ 'Editor.selectWord': wrapCommand(selectWord),
11407
+ 'Editor.selectWordLeft': wrapCommand(selectWordLeft),
11408
+ 'Editor.selectWordRight': wrapCommand(selectWordRight),
11409
+ 'Editor.setDebugEnabled': wrapCommand(setDebugEnabled),
11410
+ 'Editor.setDecorations': wrapCommand(setDecorations),
11411
+ 'Editor.setDelta': wrapCommand(setDelta),
11412
+ 'Editor.setDeltaY': wrapCommand(setDeltaY),
11413
+ 'Editor.setLanguageId': wrapCommand(setLanguageId),
11414
+ 'Editor.setSelections': wrapCommand(setSelections),
11507
11415
  'Editor.setSelections2': setSelections2,
11508
11416
  'Editor.showHover': showHover,
11509
11417
  'Editor.showHover2': showHover3,
11510
11418
  'Editor.showSourceActions': showSourceActions,
11511
11419
  'Editor.showSourceActions2': showSourceActions,
11512
11420
  'Editor.showSourceActions3': showSourceActions,
11513
- 'Editor.sortLinesAscending': sortLinesAscending,
11514
- 'Editor.tabCompletion': tabCompletion,
11515
- 'Editor.toggleBlockComment': toggleBlockComment,
11516
- 'Editor.toggleComment': toggleComment,
11517
- 'Editor.toggleLineComment': editorToggleLineComment,
11518
- 'Editor.type': type,
11519
- 'Editor.typeWithAutoClosing': typeWithAutoClosing,
11520
- 'Editor.undo': undo,
11521
- 'Editor.unIndent': editorUnindent,
11421
+ 'Editor.sortLinesAscending': wrapCommand(sortLinesAscending),
11422
+ 'Editor.tabCompletion': wrapCommand(tabCompletion),
11423
+ 'Editor.toggleBlockComment': wrapCommand(toggleBlockComment),
11424
+ 'Editor.toggleComment': wrapCommand(toggleComment),
11425
+ 'Editor.toggleLineComment': wrapCommand(editorToggleLineComment),
11426
+ 'Editor.type': wrapCommand(type),
11427
+ 'Editor.typeWithAutoClosing': wrapCommand(typeWithAutoClosing),
11428
+ 'Editor.undo': wrapCommand(undo),
11429
+ 'Editor.unIndent': wrapCommand(editorUnindent),
11522
11430
  'Editor.updateDebugInfo': updateDebugInfo,
11523
- 'Editor.updateDiagnostics': updateDiagnostics,
11431
+ 'Editor.updateDiagnostics': wrapCommand(updateDiagnostics),
11524
11432
  'EditorCompletion.close': close$4,
11525
11433
  'EditorCompletion.closeDetails': closeDetails$1,
11526
11434
  'EditorCompletion.focusFirst': focusFirst$1,
@@ -11592,7 +11500,6 @@ const commandMap = {
11592
11500
  'Initialize.initialize': intialize,
11593
11501
  'SendMessagePortToExtensionHostWorker.sendMessagePortToExtensionHostWorker': sendMessagePortToExtensionHostWorker2
11594
11502
  };
11595
- wrapCommands(commandMap);
11596
11503
 
11597
11504
  const send = port => {
11598
11505
  // @ts-ignore
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/editor-worker",
3
- "version": "16.9.0",
3
+ "version": "17.0.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git@github.com:lvce-editor/editor-worker.git"