@lvce-editor/editor-worker 19.53.0 → 19.54.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 +18 -0
- package/package.json +1 -1
package/dist/editorWorkerMain.js
CHANGED
|
@@ -5435,6 +5435,9 @@ const get$3 = async key => {
|
|
|
5435
5435
|
const value = await getPreference(key);
|
|
5436
5436
|
return value;
|
|
5437
5437
|
};
|
|
5438
|
+
const update = async settings => {
|
|
5439
|
+
await invoke$a('Preferences.update', settings);
|
|
5440
|
+
};
|
|
5438
5441
|
|
|
5439
5442
|
const createEditor = async ({
|
|
5440
5443
|
assetDir,
|
|
@@ -8337,6 +8340,7 @@ const ToggleBlockComment = 'Toggle Block Comment';
|
|
|
8337
8340
|
const ToggleBreakpoint = 'Toggle Breakpoint';
|
|
8338
8341
|
const Undo = 'Undo';
|
|
8339
8342
|
const Unfold = 'Editor: Unfold';
|
|
8343
|
+
const ViewToggleMinimap = 'View: Toggle Minimap';
|
|
8340
8344
|
|
|
8341
8345
|
const goToDefinition$1 = () => {
|
|
8342
8346
|
return i18nString(GoToDefinition);
|
|
@@ -8474,6 +8478,9 @@ const editorOpenColorPicker = () => {
|
|
|
8474
8478
|
const editorCloseColorPicker = () => {
|
|
8475
8479
|
return i18nString(EditorCloseColorPicker);
|
|
8476
8480
|
};
|
|
8481
|
+
const viewToggleMinimap = () => {
|
|
8482
|
+
return i18nString(ViewToggleMinimap);
|
|
8483
|
+
};
|
|
8477
8484
|
const editorCopyLineDown = () => {
|
|
8478
8485
|
return i18nString(EditorCopyLineDown);
|
|
8479
8486
|
};
|
|
@@ -13843,6 +13850,9 @@ const getQuickPickMenuEntries = () => {
|
|
|
13843
13850
|
}, {
|
|
13844
13851
|
id: 'Editor.showSourceActions2',
|
|
13845
13852
|
label: sourceAction()
|
|
13853
|
+
}, {
|
|
13854
|
+
id: 'Editor.toggleMinimap',
|
|
13855
|
+
label: viewToggleMinimap()
|
|
13846
13856
|
}];
|
|
13847
13857
|
};
|
|
13848
13858
|
|
|
@@ -15998,6 +16008,13 @@ const setDebugEnabled = (state, enabled) => {
|
|
|
15998
16008
|
return state;
|
|
15999
16009
|
};
|
|
16000
16010
|
|
|
16011
|
+
const toggleMinimap = async () => {
|
|
16012
|
+
const minimapEnabled = await getMinimapEnabled();
|
|
16013
|
+
await update({
|
|
16014
|
+
'editor.minimap.enabled': !minimapEnabled
|
|
16015
|
+
});
|
|
16016
|
+
};
|
|
16017
|
+
|
|
16001
16018
|
/**
|
|
16002
16019
|
* Unregister a listener for editor events
|
|
16003
16020
|
* @param listenerType - The type of event to stop listening for
|
|
@@ -16511,6 +16528,7 @@ const commandMap = {
|
|
|
16511
16528
|
'Editor.toggleBreakpoint': wrapCommand(toggleBreakpoint),
|
|
16512
16529
|
'Editor.toggleComment': wrapCommand(toggleComment),
|
|
16513
16530
|
'Editor.toggleLineComment': wrapCommand(editorToggleLineComment),
|
|
16531
|
+
'Editor.toggleMinimap': toggleMinimap,
|
|
16514
16532
|
'Editor.type': wrapCommand(type, true),
|
|
16515
16533
|
'Editor.typeWithAutoClosing': wrapCommand(typeWithAutoClosing, true),
|
|
16516
16534
|
'Editor.undo': wrapCommand(undo),
|