@codingame/monaco-vscode-api 1.79.0-next.0 → 1.79.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/README.md +7 -5
- package/dist/activity.d.ts +8 -108
- package/dist/api.js +3 -3
- package/dist/colorRegistry.d.ts +2 -2
- package/dist/contextkey.d.ts +2 -2
- package/dist/default-extension.js +23 -0
- package/dist/editor.d.ts +4 -320
- package/dist/editorBrowser.d.ts +327 -10
- package/dist/event.d.ts +1 -1
- package/dist/{extension-tools-d0cfdea1.js → extension-tools-0c4c1ad7.js} +345 -210
- package/dist/extensions.d.ts +3 -4
- package/dist/extensions.d2.ts +1 -1
- package/dist/extensions.js +4 -37
- package/dist/extensionsRegistry.d.ts +1 -1
- package/dist/files.d.ts +2 -2
- package/dist/keybinding.d.ts +1 -1
- package/dist/languageFeatures.d.ts +6 -7
- package/dist/log.d.ts +1 -1
- package/dist/monaco-treemending.js +15 -1
- package/dist/monaco.d.ts +31 -32
- package/dist/monaco.js +62 -6
- package/dist/node_modules/rollup-plugin-styles/dist/runtime/inject-css.js +2 -0
- package/dist/override/vs/workbench/contrib/notebook/common/notebookEditorInput.js +4 -0
- package/dist/rollup-extension-directory-plugin.js +1 -2
- package/dist/rollup-vsix-plugin.js +1 -2
- package/dist/service-override/configuration.d.ts +2 -2
- package/dist/service-override/editor.d.ts +13 -0
- package/dist/service-override/{modelEditor.js → editor.js} +6 -62
- package/dist/service-override/files.d.ts +5 -5
- package/dist/service-override/files.js +14 -2
- package/dist/service-override/keybindings.js +3 -79
- package/dist/service-override/layout.js +6 -2
- package/dist/service-override/model.d.ts +7 -0
- package/dist/service-override/model.js +10 -0
- package/dist/service-override/quickaccess.d.ts +7 -0
- package/dist/service-override/quickaccess.js +80 -0
- package/dist/service-override/snippets.js +5 -1
- package/dist/service-override/textmate.js +7 -2
- package/dist/service-override/theme.d.ts +1 -1
- package/dist/service-override/tools/editor.js +73 -0
- package/dist/service-override/views.d.ts +63 -201
- package/dist/service-override/views.js +102 -8
- package/dist/services.d.ts +116 -19
- package/dist/vscode/vs/base/browser/ui/centered/centeredViewLayout.js +178 -0
- package/dist/vscode/vs/base/browser/ui/grid/grid.js +452 -0
- package/dist/vscode/vs/base/browser/ui/grid/gridview.css.js +4 -0
- package/dist/vscode/vs/base/browser/ui/grid/gridview.js +999 -0
- package/dist/vscode/vs/base/browser/ui/iconLabel/simpleIconLabel.js +14 -0
- package/dist/vscode/vs/base/browser/ui/menu/menubar.css.js +4 -0
- package/dist/vscode/vs/base/browser/ui/menu/menubar.js +1 -1
- package/dist/vscode/vs/base/browser/ui/splitview/paneview.css.js +4 -0
- package/dist/vscode/vs/base/browser/ui/splitview/paneview.js +1 -1
- package/dist/vscode/vs/platform/extensionManagement/common/extensionManagement.js +2 -1
- package/dist/vscode/vs/platform/extensionManagement/common/extensionStorage.js +1 -1
- package/dist/vscode/vs/platform/product/common/product.js +48 -0
- package/dist/vscode/vs/platform/quickinput/browser/quickPickPin.js +94 -0
- package/dist/vscode/vs/platform/terminal/common/terminal.js +3 -0
- package/dist/vscode/vs/platform/update/common/update.js +11 -1
- package/dist/vscode/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +1 -1
- package/dist/vscode/vs/workbench/api/browser/mainThreadStatusBar.js +68 -0
- package/dist/vscode/vs/workbench/api/common/extHostStatusBar.js +234 -0
- package/dist/vscode/vs/workbench/api/common/extHostTypes.js +6 -1
- package/dist/vscode/vs/workbench/browser/actions/layoutActions.js +20 -17
- package/dist/vscode/vs/workbench/browser/actions/quickAccessActions.js +204 -0
- package/dist/vscode/vs/workbench/browser/dnd.js +27 -2
- package/dist/vscode/vs/workbench/browser/editor.js +94 -0
- package/dist/vscode/vs/workbench/browser/labels.js +23 -2
- package/dist/vscode/vs/workbench/browser/media/part.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/part.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/activitybar/activitybarActions.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/activitybar/activitybarPart.js +3 -3
- package/dist/vscode/vs/workbench/browser/parts/activitybar/media/activityaction.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/activitybar/media/activitybarpart.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarActions.js +14 -26
- package/dist/vscode/vs/workbench/browser/parts/compositePart.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/editor/binaryDiffEditor.js +43 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/binaryEditor.js +55 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/breadcrumbs.js +330 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/breadcrumbsControl.js +690 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/breadcrumbsModel.js +142 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/breadcrumbsPicker.js +414 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/editor.contribution.js +800 -6
- package/dist/vscode/vs/workbench/browser/parts/editor/editor.js +56 -1
- package/dist/vscode/vs/workbench/browser/parts/editor/editorActions.js +1484 -107
- package/dist/vscode/vs/workbench/browser/parts/editor/editorCommands.js +1121 -4
- package/dist/vscode/vs/workbench/browser/parts/editor/editorDropTarget.js +499 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/editorGroupView.js +1219 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/editorGroupWatermark.js +137 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/editorPane.js +242 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/editorPanes.js +297 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/editorPart.js +841 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/editorPlaceholder.js +235 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/editorQuickAccess.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/editor/editorStatus.js +1152 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/editorWithViewState.js +139 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/editorsObserver.js +339 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/media/breadcrumbscontrol.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/media/editordroptarget.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/media/editorgroupview.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/media/editorplaceholder.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/media/editorquickaccess.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/media/editorstatus.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/media/notabstitlecontrol.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/media/sidebysideeditor.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/media/tabstitlecontrol.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/media/titlecontrol.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/noTabsTitleControl.js +243 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/sideBySideEditor.js +387 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/tabFocus.js +77 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/tabsTitleControl.js +1504 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/textCodeEditor.js +79 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/textDiffEditor.js +304 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/textEditor.js +220 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/textResourceEditor.js +149 -0
- package/dist/vscode/vs/workbench/browser/parts/editor/titleControl.js +284 -0
- package/dist/vscode/vs/workbench/browser/parts/media/compositepart.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/notifications/media/notificationsActions.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/notifications/media/notificationsCenter.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/notifications/media/notificationsList.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/notifications/media/notificationsToasts.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/notifications/notificationsActions.js +8 -8
- package/dist/vscode/vs/workbench/browser/parts/notifications/notificationsCenter.js +2 -2
- package/dist/vscode/vs/workbench/browser/parts/notifications/notificationsList.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/notifications/notificationsToasts.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/panel/media/basepanelpart.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/panel/media/panelpart.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/panel/panelActions.js +19 -5
- package/dist/vscode/vs/workbench/browser/parts/panel/panelPart.js +2 -2
- package/dist/vscode/vs/workbench/browser/parts/sidebar/media/sidebarpart.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/sidebar/sidebarPart.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/statusbar/media/statusbarpart.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/statusbar/statusbarActions.js +109 -0
- package/dist/vscode/vs/workbench/browser/parts/statusbar/statusbarItem.js +224 -0
- package/dist/vscode/vs/workbench/browser/parts/statusbar/statusbarModel.js +251 -0
- package/dist/vscode/vs/workbench/browser/parts/statusbar/statusbarPart.js +439 -0
- package/dist/vscode/vs/workbench/browser/parts/titlebar/media/menubarControl.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/titlebar/menubarControl.js +76 -3
- package/dist/vscode/vs/workbench/browser/parts/views/media/paneviewlet.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/views/media/views.css.js +4 -0
- package/dist/vscode/vs/workbench/browser/parts/views/treeView.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/views/viewPane.js +5 -5
- package/dist/vscode/vs/workbench/browser/parts/views/viewPaneContainer.js +1 -1
- package/dist/vscode/vs/workbench/browser/parts/views/viewsService.js +4 -4
- package/dist/vscode/vs/workbench/browser/quickaccess.js +6 -2
- package/dist/vscode/vs/workbench/browser/workbench.contribution.js +1108 -0
- package/dist/vscode/vs/workbench/common/contextkeys.js +34 -1
- package/dist/vscode/vs/workbench/common/editor/editorGroupModel.js +674 -0
- package/dist/vscode/vs/workbench/common/editor.js +57 -1
- package/dist/vscode/vs/workbench/common/theme.js +35 -35
- package/dist/vscode/vs/workbench/common/views.js +1 -1
- package/dist/vscode/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +4 -4
- package/dist/vscode/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +1 -1
- package/dist/vscode/vs/workbench/contrib/callHierarchy/browser/media/callHierarchy.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess.js +77 -0
- package/dist/vscode/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.js +217 -0
- package/dist/vscode/vs/workbench/contrib/codeEditor/browser/workbenchReferenceSearch.js +24 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/breakpointWidget.js +1 -1
- package/dist/vscode/vs/workbench/contrib/debug/browser/callStackEditorContribution.js +1 -1
- package/dist/vscode/vs/workbench/contrib/debug/browser/debug.contribution.js +30 -4
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugCommands.js +13 -1
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugIcons.js +77 -127
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugToolBar.js +1 -1
- package/dist/vscode/vs/workbench/contrib/debug/browser/debugViewlet.js +1 -1
- package/dist/vscode/vs/workbench/contrib/debug/browser/disassemblyView.js +620 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/exceptionWidget.js +1 -1
- package/dist/vscode/vs/workbench/contrib/debug/browser/media/breakpointWidget.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/media/callStackEditorContribution.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/media/debug.contribution.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/media/debugHover.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/media/debugToolBar.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/media/debugViewlet.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/media/exceptionWidget.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/media/repl.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/debug/browser/repl.js +1 -1
- package/dist/vscode/vs/workbench/contrib/debug/common/debug.js +2 -1
- package/dist/vscode/vs/workbench/contrib/files/browser/editors/binaryFileEditor.js +71 -0
- package/dist/vscode/vs/workbench/contrib/files/browser/editors/textFileEditor.js +225 -0
- package/dist/vscode/vs/workbench/contrib/files/browser/explorerViewlet.js +5 -4
- package/dist/vscode/vs/workbench/contrib/files/browser/fileActions.contribution.js +270 -4
- package/dist/vscode/vs/workbench/contrib/files/browser/fileActions.js +4 -1
- package/dist/vscode/vs/workbench/contrib/files/browser/fileCommands.js +24 -6
- package/dist/vscode/vs/workbench/contrib/files/browser/fileConstants.js +8 -1
- package/dist/vscode/vs/workbench/contrib/files/browser/files.contribution.js +10 -0
- package/dist/vscode/vs/workbench/contrib/files/browser/media/explorerviewlet.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/files/browser/views/media/openeditors.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/files/browser/views/openEditorsView.js +608 -0
- package/dist/vscode/vs/workbench/contrib/files/common/files.js +2 -1
- package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionInputPart.js +1 -1
- package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/interactiveSessionWidget.js +1 -1
- package/dist/vscode/vs/workbench/contrib/interactiveSession/browser/media/interactiveSession.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionContextKeys.js +9 -1
- package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionModel.js +305 -0
- package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionService.js +6 -1
- package/dist/vscode/vs/workbench/contrib/interactiveSession/common/interactiveSessionServiceImpl.js +379 -0
- package/dist/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser.js +2 -2
- package/dist/vscode/vs/workbench/contrib/quickaccess/browser/commandsQuickAccess.js +33 -1
- package/dist/vscode/vs/workbench/contrib/quickaccess/browser/quickAccess.contribution.js +130 -0
- package/dist/vscode/vs/workbench/contrib/quickaccess/browser/viewQuickAccess.js +225 -0
- package/dist/vscode/vs/workbench/contrib/remote/browser/media/tunnelView.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/remote/browser/remoteIcons.js +21 -17
- package/dist/vscode/vs/workbench/contrib/remote/browser/tunnelView.js +1 -1
- package/dist/vscode/vs/workbench/contrib/search/browser/anythingQuickAccess.js +757 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/media/anythingQuickAccess.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/search.contribution.js +428 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/symbolsQuickAccess.js +219 -0
- package/dist/vscode/vs/workbench/contrib/search/common/cacheState.js +85 -0
- package/dist/vscode/vs/workbench/contrib/search/common/constants.js +2 -0
- package/dist/vscode/vs/workbench/contrib/search/common/search.js +119 -1
- package/dist/vscode/vs/workbench/contrib/tasks/browser/taskQuickPick.js +385 -0
- package/dist/vscode/vs/workbench/contrib/tasks/browser/tasksQuickAccess.js +108 -0
- package/dist/vscode/vs/workbench/contrib/tasks/common/tasks.js +351 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminal.js +4 -0
- package/dist/vscode/vs/workbench/contrib/terminal/browser/terminalIcon.js +44 -0
- package/dist/vscode/vs/workbench/contrib/terminal/common/terminalColorRegistry.js +147 -1
- package/dist/vscode/vs/workbench/contrib/typeHierarchy/browser/media/typeHierarchy.css.js +4 -0
- package/dist/vscode/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +1 -1
- package/dist/vscode/vs/workbench/services/editor/browser/editorDropService.js +3 -0
- package/dist/vscode/vs/workbench/services/editor/browser/editorResolverService.js +619 -0
- package/dist/vscode/vs/workbench/services/editor/browser/editorService.js +720 -0
- package/dist/vscode/vs/workbench/services/editor/common/editorGroupFinder.js +116 -0
- package/dist/vscode/vs/workbench/services/editor/common/editorGroupsService.js +6 -1
- package/dist/vscode/vs/workbench/services/editor/common/editorResolverService.js +34 -1
- package/dist/vscode/vs/workbench/services/history/browser/historyService.js +1451 -0
- package/dist/vscode/vs/workbench/services/hover/browser/hoverService.js +1 -1
- package/dist/vscode/vs/workbench/services/hover/browser/media/hover.css.js +4 -0
- package/dist/vscode/vs/workbench/services/languageDetection/common/languageDetectionWorkerService.js +2 -1
- package/dist/vscode/vs/workbench/services/outline/browser/outline.js +3 -0
- package/dist/vscode/vs/workbench/services/progress/browser/progressIndicator.js +72 -1
- package/dist/vscode/vs/workbench/services/quickinput/browser/quickInputService.js +67 -0
- package/dist/vscode/vs/workbench/services/search/common/search.js +2 -112
- package/dist/vscode/vs/workbench/services/semanticSimilarity/common/semanticSimilarityService.js +54 -1
- package/dist/vscode/vs/workbench/services/statusbar/browser/statusbar.js +15 -0
- package/dist/vscode/vs/workbench/services/textMate/browser/worker/textMate.worker.js +90 -0
- package/dist/vscode/vs/workbench/services/textMate/browser/worker/textMateWorkerModel.js +133 -0
- package/dist/vscode/vs/workbench/services/untitled/common/untitledTextEditorService.js +110 -3
- package/dist/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.js +1 -1
- package/dist/vscode-services/extHost.js +12 -5
- package/dist/vscode-services/missing-services.js +117 -3
- package/dist/vscode-services/window.js +21 -2
- package/dist/vscode-services/workspace.js +2 -1
- package/dist/workbenchThemeService.d.ts +1 -1
- package/dist/workers/textMate.worker.d.ts +2 -0
- package/dist/workers/textMate.worker.js +3 -0
- package/dist/workspace.d.ts +1 -1
- package/monaco-editor-treemending.patch +784 -784
- package/package.json +42 -22
- package/dist/assets/activityaction.css +0 -224
- package/dist/assets/activitybarpart.css +0 -65
- package/dist/assets/basepanelpart.css +0 -221
- package/dist/assets/breakpointWidget.css +0 -31
- package/dist/assets/callHierarchy.css +0 -62
- package/dist/assets/callStackEditorContribution.css +0 -12
- package/dist/assets/compositepart.css +0 -17
- package/dist/assets/debug.contribution.css +0 -138
- package/dist/assets/debugHover.css +0 -80
- package/dist/assets/debugToolBar.css +0 -49
- package/dist/assets/debugViewlet.css +0 -337
- package/dist/assets/editorquickaccess.css +0 -8
- package/dist/assets/exceptionWidget.css +0 -52
- package/dist/assets/explorerviewlet.css +0 -129
- package/dist/assets/hover.css +0 -127
- package/dist/assets/interactiveSession.css +0 -340
- package/dist/assets/menubar.css +0 -111
- package/dist/assets/menubarControl.css +0 -61
- package/dist/assets/notificationsActions.css +0 -14
- package/dist/assets/notificationsCenter.css +0 -69
- package/dist/assets/notificationsList.css +0 -152
- package/dist/assets/notificationsToasts.css +0 -63
- package/dist/assets/panelpart.css +0 -75
- package/dist/assets/paneview.css +0 -148
- package/dist/assets/paneviewlet.css +0 -79
- package/dist/assets/part.css +0 -109
- package/dist/assets/repl.css +0 -145
- package/dist/assets/sidebarpart.css +0 -61
- package/dist/assets/tunnelView.css +0 -107
- package/dist/assets/typeHierarchy.css +0 -62
- package/dist/assets/views.css +0 -297
- package/dist/override/vs/workbench/browser/parts/editor/textEditor.js +0 -2
- package/dist/override/vs/workbench/contrib/files/browser/views/openEditorsView.js +0 -2
- package/dist/service-override/modelEditor.d.ts +0 -14
- package/dist/vscode/vs/workbench/contrib/notebook/common/notebookEditorInput.js +0 -249
- package/dist/vscode/vs/workbench/contrib/notebook/common/notebookService.js +0 -10
- package/dist/vscode/vs/workbench/services/search/common/searchHelpers.js +0 -72
- package/dist/vscode/vs/workbench/services/search/common/searchService.js +0 -355
package/dist/assets/views.css
DELETED
|
@@ -1,297 +0,0 @@
|
|
|
1
|
-
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
|
|
6
|
-
/* File icons in trees */
|
|
7
|
-
|
|
8
|
-
.file-icon-themable-tree.align-icons-and-twisties .monaco-tl-twistie:not(.force-twistie):not(.collapsible),
|
|
9
|
-
.file-icon-themable-tree .align-icon-with-twisty .monaco-tl-twistie:not(.force-twistie):not(.collapsible),
|
|
10
|
-
.file-icon-themable-tree.hide-arrows .monaco-tl-twistie:not(.force-twistie),
|
|
11
|
-
.file-icon-themable-tree .monaco-tl-twistie.force-no-twistie {
|
|
12
|
-
background-image: none !important;
|
|
13
|
-
width: 0 !important;
|
|
14
|
-
padding-right: 0 !important;
|
|
15
|
-
visibility: hidden;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/* Misc */
|
|
19
|
-
|
|
20
|
-
.file-icon-themable-tree .monaco-list-row .content .monaco-highlighted-label .highlight,
|
|
21
|
-
.monaco-tl-contents .monaco-highlighted-label .highlight {
|
|
22
|
-
color: unset !important;
|
|
23
|
-
background-color: var(--vscode-list-filterMatchBackground);
|
|
24
|
-
outline: 1px dotted var(--vscode-list-filterMatchBorder);
|
|
25
|
-
outline-offset: -1px;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.monaco-workbench .tree-explorer-viewlet-tree-view {
|
|
29
|
-
height: 100%;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.monaco-workbench .tree-explorer-viewlet-tree-view .message {
|
|
33
|
-
display: flex;
|
|
34
|
-
padding: 4px 12px 4px 18px;
|
|
35
|
-
user-select: text;
|
|
36
|
-
-webkit-user-select: text;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.monaco-workbench .tree-explorer-viewlet-tree-view .message p {
|
|
40
|
-
margin-top: 0px;
|
|
41
|
-
margin-bottom: 0px;
|
|
42
|
-
padding-bottom: 4px;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.monaco-workbench .tree-explorer-viewlet-tree-view .message ul {
|
|
46
|
-
padding-left: 24px;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.monaco-workbench .tree-explorer-viewlet-tree-view .message.hide {
|
|
50
|
-
display: none;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.monaco-workbench .tree-explorer-viewlet-tree-view .customview-tree {
|
|
54
|
-
height: 100%;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.monaco-workbench .tree-explorer-viewlet-tree-view .customview-tree.hide {
|
|
58
|
-
display: none;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.monaco-workbench .pane > .pane-body > .welcome-view {
|
|
62
|
-
width: 100%;
|
|
63
|
-
height: 100%;
|
|
64
|
-
box-sizing: border-box;
|
|
65
|
-
display: flex;
|
|
66
|
-
flex-direction: column;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.monaco-workbench .pane > .pane-body:not(.welcome) > .welcome-view,
|
|
70
|
-
.monaco-workbench .pane > .pane-body.welcome > :not(.welcome-view) {
|
|
71
|
-
display: none;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.monaco-workbench .pane > .pane-body .welcome-view-content {
|
|
75
|
-
display: flex;
|
|
76
|
-
flex-direction: column;
|
|
77
|
-
padding: 0 20px 1em 20px;
|
|
78
|
-
box-sizing: border-box;
|
|
79
|
-
align-items: center;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.monaco-workbench .pane > .pane-body .welcome-view-content > .button-container {
|
|
83
|
-
width: 100%;
|
|
84
|
-
max-width: 300px;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.monaco-workbench:not(.reduce-motion) .pane > .pane-body .welcome-view-content > .button-container {
|
|
88
|
-
transition: 0.2s max-width ease-out;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.monaco-workbench .pane > .pane-body .welcome-view-content.wide > .button-container {
|
|
92
|
-
max-width: 100%;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.monaco-workbench .pane > .pane-body .welcome-view-content > .button-container > .monaco-button {
|
|
96
|
-
max-width: 300px;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.monaco-workbench .pane > .pane-body .welcome-view-content > p {
|
|
100
|
-
width: 100%;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.monaco-workbench .pane > .pane-body .welcome-view-content > * {
|
|
104
|
-
margin-block-start: 1em;
|
|
105
|
-
margin-block-end: 0;
|
|
106
|
-
margin-inline-start: 0px;
|
|
107
|
-
margin-inline-end: 0px;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.customview-tree .monaco-list-row .monaco-tl-contents.align-icon-with-twisty::before {
|
|
111
|
-
display: none;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.customview-tree .monaco-list-row .monaco-tl-contents:not(.align-icon-with-twisty)::before {
|
|
115
|
-
display: inline-block;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.customview-tree .monaco-list .monaco-list-row {
|
|
119
|
-
padding-right: 12px;
|
|
120
|
-
padding-left: 0px;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.customview-tree .monaco-list .monaco-list-row .custom-view-tree-node-item {
|
|
124
|
-
display: flex;
|
|
125
|
-
height: 22px;
|
|
126
|
-
line-height: 22px;
|
|
127
|
-
flex: 1;
|
|
128
|
-
text-overflow: ellipsis;
|
|
129
|
-
overflow: hidden;
|
|
130
|
-
flex-wrap: nowrap;
|
|
131
|
-
padding-left: 3px;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.customview-tree .monaco-list .monaco-list-row.selected .custom-view-tree-node-item .custom-view-tree-node-item-checkbox {
|
|
135
|
-
background-color: var(--vscode-checkbox-selectBackground);
|
|
136
|
-
border: 1px solid var(--vscode-checkbox-selectBorder);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.customview-tree .monaco-list .monaco-list-row .custom-view-tree-node-item .custom-view-tree-node-item-checkbox {
|
|
140
|
-
width: 16px;
|
|
141
|
-
height: 16px;
|
|
142
|
-
margin: 3px 6px 3px 0px;
|
|
143
|
-
padding: 0px;
|
|
144
|
-
border: 1px solid var(--vscode-checkbox-border);
|
|
145
|
-
opacity: 1;
|
|
146
|
-
background-color: var(--vscode-checkbox-background);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.customview-tree .monaco-list .monaco-list-row .custom-view-tree-node-item .custom-view-tree-node-item-checkbox.codicon {
|
|
150
|
-
font-size: 13px;
|
|
151
|
-
line-height: 15px;
|
|
152
|
-
}
|
|
153
|
-
.customview-tree .monaco-list .monaco-list-row .custom-view-tree-node-item .monaco-inputbox {
|
|
154
|
-
line-height: normal;
|
|
155
|
-
flex: 1;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.customview-tree .monaco-list .monaco-list-row .custom-view-tree-node-item .custom-view-tree-node-item-resourceLabel {
|
|
159
|
-
flex: 1;
|
|
160
|
-
text-overflow: ellipsis;
|
|
161
|
-
overflow: hidden;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.customview-tree .monaco-list .monaco-list-row .custom-view-tree-node-item .monaco-icon-label-container::after {
|
|
165
|
-
content: '';
|
|
166
|
-
display: block;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.timeline-tree-view .monaco-list .monaco-list-row .custom-view-tree-node-item > .custom-view-tree-node-item-icon,
|
|
170
|
-
.customview-tree .monaco-list .monaco-list-row .custom-view-tree-node-item > .custom-view-tree-node-item-resourceLabel > .custom-view-tree-node-item-icon {
|
|
171
|
-
background-size: 16px;
|
|
172
|
-
background-position: left center;
|
|
173
|
-
background-repeat: no-repeat;
|
|
174
|
-
padding-right: 6px;
|
|
175
|
-
width: 16px;
|
|
176
|
-
height: 22px;
|
|
177
|
-
display: flex;
|
|
178
|
-
align-items: center;
|
|
179
|
-
justify-content: center;
|
|
180
|
-
-webkit-font-smoothing: antialiased;
|
|
181
|
-
-moz-osx-font-smoothing: grayscale;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.customview-tree .monaco-list .monaco-list-row .custom-view-tree-node-item > .custom-view-tree-node-item-resourceLabel > .custom-view-tree-node-item-icon.disabled {
|
|
185
|
-
opacity: 0.6;
|
|
186
|
-
}
|
|
187
|
-
/* makes spinning icons square */
|
|
188
|
-
.customview-tree .monaco-list .monaco-list-row .custom-view-tree-node-item > .custom-view-tree-node-item-resourceLabel > .custom-view-tree-node-item-icon.codicon.codicon-modifier-spin {
|
|
189
|
-
padding-left: 6px;
|
|
190
|
-
margin-left: -6px;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
.customview-tree .monaco-list .monaco-list-row.selected .custom-view-tree-node-item > .custom-view-tree-node-item-resourceLabel > .custom-view-tree-node-item-icon.codicon {
|
|
194
|
-
color: currentColor !important;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
.customview-tree .monaco-list .monaco-list-row .custom-view-tree-node-item .custom-view-tree-node-item-resourceLabel .monaco-icon-label-container > .monaco-icon-name-container {
|
|
198
|
-
flex: 1;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
.customview-tree .monaco-list .monaco-list-row .custom-view-tree-node-item .custom-view-tree-node-item-resourceLabel::after {
|
|
202
|
-
padding-right: 0px;
|
|
203
|
-
margin-right: 4px;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
.customview-tree .monaco-list .monaco-list-row .custom-view-tree-node-item .actions {
|
|
207
|
-
display: none;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
.customview-tree .monaco-list .monaco-list-row .custom-view-tree-node-item .actions .action-label {
|
|
211
|
-
padding: 2px;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
.customview-tree .monaco-list .monaco-list-row:hover .custom-view-tree-node-item .actions,
|
|
215
|
-
.customview-tree .monaco-list .monaco-list-row.selected .custom-view-tree-node-item .actions,
|
|
216
|
-
.customview-tree .monaco-list .monaco-list-row.focused .custom-view-tree-node-item .actions {
|
|
217
|
-
display: block;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
/* filter view pane */
|
|
221
|
-
|
|
222
|
-
.viewpane-filter-container {
|
|
223
|
-
cursor: default;
|
|
224
|
-
display: flex;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
.viewpane-filter-container.grow {
|
|
228
|
-
flex: 1;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
.viewpane-filter-container > .viewpane-filter {
|
|
232
|
-
display: flex;
|
|
233
|
-
align-items: center;
|
|
234
|
-
flex: 1;
|
|
235
|
-
position: relative;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
.viewpane-filter-container > .viewpane-filter .monaco-inputbox {
|
|
239
|
-
height: 24px;
|
|
240
|
-
font-size: 12px;
|
|
241
|
-
flex: 1;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
.pane-header .viewpane-filter-container > .viewpane-filter .monaco-inputbox .monaco-inputbox {
|
|
245
|
-
height: 20px;
|
|
246
|
-
line-height: 18px;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
.monaco-workbench.vs .viewpane-filter-container > .viewpane-filter .monaco-inputbox {
|
|
250
|
-
height: 25px;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
.viewpane-filter-container > .viewpane-filter > .viewpane-filter-controls {
|
|
254
|
-
position: absolute;
|
|
255
|
-
top: 0px;
|
|
256
|
-
bottom: 0;
|
|
257
|
-
right: 0px;
|
|
258
|
-
display: flex;
|
|
259
|
-
align-items: center;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
.viewpane-filter-container > .viewpane-filter > .viewpane-filter-controls > .viewpane-filter-badge {
|
|
263
|
-
margin: 4px 0px;
|
|
264
|
-
padding: 0px 8px;
|
|
265
|
-
border-radius: 2px;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
.viewpane-filter > .viewpane-filter-controls > .viewpane-filter-badge.hidden,
|
|
269
|
-
.viewpane-filter.small > .viewpane-filter-controls > .viewpane-filter-badge {
|
|
270
|
-
display: none;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
.viewpane-filter > .viewpane-filter-controls > .monaco-action-bar .action-item .action-label.codicon.filter {
|
|
274
|
-
padding: 2px;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
.panel > .title .monaco-action-bar .action-item.viewpane-filter-container {
|
|
278
|
-
max-width: 400px;
|
|
279
|
-
min-width: 150px;
|
|
280
|
-
margin-right: 10px;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
.pane-body .viewpane-filter-container:not(:empty) {
|
|
284
|
-
flex: 1;
|
|
285
|
-
margin: 10px 20px;
|
|
286
|
-
height: initial;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
.pane-body .viewpane-filter-container > .viewpane-filter > .viewpane-filter-controls .monaco-action-bar .action-item {
|
|
290
|
-
margin-right: 4px;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
.viewpane-filter > .viewpane-filter-controls .monaco-action-bar .action-label.codicon.codicon-filter.checked {
|
|
294
|
-
border-color: var(--vscode-inputOption-activeBorder);
|
|
295
|
-
color: var(--vscode-inputOption-activeForeground);
|
|
296
|
-
background-color: var(--vscode-inputOption-activeBackground);
|
|
297
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { I as IEditorOverrideServices } from '../standaloneServices.js';
|
|
2
|
-
import { p as IResolvedTextEditorModel, j as ICodeEditor } from '../editorBrowser.js';
|
|
3
|
-
import { c as IEditorOptions } from '../editor.js';
|
|
4
|
-
import { a as IReference } from '../event.js';
|
|
5
|
-
import '../instantiation.js';
|
|
6
|
-
import 'monaco-editor';
|
|
7
|
-
import '../uri.js';
|
|
8
|
-
import '../themables.js';
|
|
9
|
-
import 'vscode';
|
|
10
|
-
|
|
11
|
-
type OpenEditor = (modelRef: IReference<IResolvedTextEditorModel>, options: IEditorOptions | undefined, sideBySide?: boolean) => Promise<ICodeEditor | undefined>;
|
|
12
|
-
declare function getServiceOverride(openEditor: OpenEditor): IEditorOverrideServices;
|
|
13
|
-
|
|
14
|
-
export { IEditorOptions, IReference, IResolvedTextEditorModel, OpenEditor, getServiceOverride as default };
|
|
@@ -1,249 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from '../../../../../../node_modules/tslib/tslib.es6.js';
|
|
2
|
-
import * as glob from 'monaco-editor/esm/vs/base/common/glob.js';
|
|
3
|
-
import { SimpleNotebookProviderInfo, INotebookService } from './notebookService.js';
|
|
4
|
-
import { joinPath, isEqual } from 'monaco-editor/esm/vs/base/common/resources.js';
|
|
5
|
-
import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
6
|
-
import { IFileDialogService } from 'monaco-editor/esm/vs/platform/dialogs/common/dialogs.js';
|
|
7
|
-
import { INotebookEditorModelResolverService } from './notebookEditorModelResolverService.js';
|
|
8
|
-
import { ILabelService } from 'monaco-editor/esm/vs/platform/label/common/label.js';
|
|
9
|
-
import { Schemas } from 'monaco-editor/esm/vs/base/common/network.js';
|
|
10
|
-
import { IFileService } from 'monaco-editor/esm/vs/platform/files/common/files.js';
|
|
11
|
-
import { AbstractResourceEditorInput } from '../../../common/editor/resourceEditorInput.js';
|
|
12
|
-
import { onUnexpectedError } from 'monaco-editor/esm/vs/base/common/errors.js';
|
|
13
|
-
import { VSBuffer } from 'monaco-editor/esm/vs/base/common/buffer.js';
|
|
14
|
-
let NotebookEditorInput = class NotebookEditorInput extends AbstractResourceEditorInput {
|
|
15
|
-
static create(instantiationService, resource, viewType, options = {}) {
|
|
16
|
-
return instantiationService.createInstance(NotebookEditorInput, resource, viewType, options);
|
|
17
|
-
}
|
|
18
|
-
constructor(resource, viewType, options, _notebookService, _notebookModelResolverService, _fileDialogService, _instantiationService, labelService, fileService) {
|
|
19
|
-
super(resource, undefined, labelService, fileService);
|
|
20
|
-
this.viewType = viewType;
|
|
21
|
-
this.options = options;
|
|
22
|
-
this._notebookService = _notebookService;
|
|
23
|
-
this._notebookModelResolverService = _notebookModelResolverService;
|
|
24
|
-
this._fileDialogService = _fileDialogService;
|
|
25
|
-
this._instantiationService = _instantiationService;
|
|
26
|
-
this._editorModelReference = null;
|
|
27
|
-
this._defaultDirtyState = false;
|
|
28
|
-
this._defaultDirtyState = !!options.startDirty;
|
|
29
|
-
this._sideLoadedListener = _notebookService.onDidAddNotebookDocument(e => {
|
|
30
|
-
if (e.viewType === this.viewType && ( e.uri.toString()) === ( this.resource.toString())) {
|
|
31
|
-
this.resolve().catch(onUnexpectedError);
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
dispose() {
|
|
36
|
-
this._sideLoadedListener.dispose();
|
|
37
|
-
this._editorModelReference?.dispose();
|
|
38
|
-
this._editorModelReference = null;
|
|
39
|
-
super.dispose();
|
|
40
|
-
}
|
|
41
|
-
get typeId() {
|
|
42
|
-
return NotebookEditorInput.ID;
|
|
43
|
-
}
|
|
44
|
-
get editorId() {
|
|
45
|
-
return this.viewType;
|
|
46
|
-
}
|
|
47
|
-
get capabilities() {
|
|
48
|
-
let capabilities = 0 ;
|
|
49
|
-
if (this.resource.scheme === Schemas.untitled) {
|
|
50
|
-
capabilities |= 4 ;
|
|
51
|
-
}
|
|
52
|
-
if (this._editorModelReference) {
|
|
53
|
-
if (this._editorModelReference.object.isReadonly()) {
|
|
54
|
-
capabilities |= 2 ;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
if (this.fileService.hasCapability(this.resource, 2048 )) {
|
|
59
|
-
capabilities |= 2 ;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
if (!((capabilities & 2) )) {
|
|
63
|
-
capabilities |= 128 ;
|
|
64
|
-
}
|
|
65
|
-
return capabilities;
|
|
66
|
-
}
|
|
67
|
-
getDescription(verbosity = 1 ) {
|
|
68
|
-
if (!this.hasCapability(4 ) || this._editorModelReference?.object.hasAssociatedFilePath()) {
|
|
69
|
-
return super.getDescription(verbosity);
|
|
70
|
-
}
|
|
71
|
-
return undefined;
|
|
72
|
-
}
|
|
73
|
-
isDirty() {
|
|
74
|
-
if (!this._editorModelReference) {
|
|
75
|
-
return this._defaultDirtyState;
|
|
76
|
-
}
|
|
77
|
-
return this._editorModelReference.object.isDirty();
|
|
78
|
-
}
|
|
79
|
-
async save(group, options) {
|
|
80
|
-
if (this._editorModelReference) {
|
|
81
|
-
if (this.hasCapability(4 )) {
|
|
82
|
-
return this.saveAs(group, options);
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
await this._editorModelReference.object.save(options);
|
|
86
|
-
}
|
|
87
|
-
return this;
|
|
88
|
-
}
|
|
89
|
-
return undefined;
|
|
90
|
-
}
|
|
91
|
-
async saveAs(group, options) {
|
|
92
|
-
if (!this._editorModelReference) {
|
|
93
|
-
return undefined;
|
|
94
|
-
}
|
|
95
|
-
const provider = this._notebookService.getContributedNotebookType(this.viewType);
|
|
96
|
-
if (!provider) {
|
|
97
|
-
return undefined;
|
|
98
|
-
}
|
|
99
|
-
const pathCandidate = this.hasCapability(4 ) ? await this._suggestName(provider, this.labelService.getUriBasenameLabel(this.resource)) : this._editorModelReference.object.resource;
|
|
100
|
-
let target;
|
|
101
|
-
if (this._editorModelReference.object.hasAssociatedFilePath()) {
|
|
102
|
-
target = pathCandidate;
|
|
103
|
-
}
|
|
104
|
-
else {
|
|
105
|
-
target = await this._fileDialogService.pickFileToSave(pathCandidate, options?.availableFileSystems);
|
|
106
|
-
if (!target) {
|
|
107
|
-
return undefined;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
if (!provider.matches(target)) {
|
|
111
|
-
const patterns = ( provider.selectors.map(pattern => {
|
|
112
|
-
if (typeof pattern === 'string') {
|
|
113
|
-
return pattern;
|
|
114
|
-
}
|
|
115
|
-
if (glob.isRelativePattern(pattern)) {
|
|
116
|
-
return `${pattern} (base ${pattern.base})`;
|
|
117
|
-
}
|
|
118
|
-
if (pattern.exclude) {
|
|
119
|
-
return `${pattern.include} (exclude: ${pattern.exclude})`;
|
|
120
|
-
}
|
|
121
|
-
else {
|
|
122
|
-
return `${pattern.include}`;
|
|
123
|
-
}
|
|
124
|
-
})).join(', ');
|
|
125
|
-
throw new Error(`File name ${target} is not supported by ${provider.providerDisplayName}.\n\nPlease make sure the file name matches following patterns:\n${patterns}`);
|
|
126
|
-
}
|
|
127
|
-
return await this._editorModelReference.object.saveAs(target);
|
|
128
|
-
}
|
|
129
|
-
async _suggestName(provider, suggestedFilename) {
|
|
130
|
-
const firstSelector = provider.selectors[0];
|
|
131
|
-
let selectorStr = firstSelector && typeof firstSelector === 'string' ? firstSelector : undefined;
|
|
132
|
-
if (!selectorStr && firstSelector) {
|
|
133
|
-
const include = firstSelector.include;
|
|
134
|
-
if (typeof include === 'string') {
|
|
135
|
-
selectorStr = include;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
if (selectorStr) {
|
|
139
|
-
const matches = /^\*\.([A-Za-z_-]*)$/.exec(selectorStr);
|
|
140
|
-
if (matches && matches.length > 1) {
|
|
141
|
-
const fileExt = matches[1];
|
|
142
|
-
if (!suggestedFilename.endsWith(fileExt)) {
|
|
143
|
-
return joinPath(await this._fileDialogService.defaultFilePath(), suggestedFilename + '.' + fileExt);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
return joinPath(await this._fileDialogService.defaultFilePath(), suggestedFilename);
|
|
148
|
-
}
|
|
149
|
-
async rename(group, target) {
|
|
150
|
-
if (this._editorModelReference) {
|
|
151
|
-
const contributedNotebookProviders = this._notebookService.getContributedNotebookTypes(target);
|
|
152
|
-
if (contributedNotebookProviders.find(provider => provider.id === this._editorModelReference.object.viewType)) {
|
|
153
|
-
return this._move(group, target);
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
return undefined;
|
|
157
|
-
}
|
|
158
|
-
_move(_group, newResource) {
|
|
159
|
-
const editorInput = NotebookEditorInput.create(this._instantiationService, newResource, this.viewType);
|
|
160
|
-
return { editor: editorInput };
|
|
161
|
-
}
|
|
162
|
-
async revert(_group, options) {
|
|
163
|
-
if (this._editorModelReference && this._editorModelReference.object.isDirty()) {
|
|
164
|
-
await this._editorModelReference.object.revert(options);
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
async resolve(_options, perf) {
|
|
168
|
-
if (!(await this._notebookService.canResolve(this.viewType))) {
|
|
169
|
-
return null;
|
|
170
|
-
}
|
|
171
|
-
perf?.mark('extensionActivated');
|
|
172
|
-
this._sideLoadedListener.dispose();
|
|
173
|
-
if (!this._editorModelReference) {
|
|
174
|
-
const ref = await this._notebookModelResolverService.resolve(this.resource, this.viewType);
|
|
175
|
-
if (this._editorModelReference) {
|
|
176
|
-
ref.dispose();
|
|
177
|
-
return this._editorModelReference.object;
|
|
178
|
-
}
|
|
179
|
-
this._editorModelReference = ref;
|
|
180
|
-
if (this.isDisposed()) {
|
|
181
|
-
this._editorModelReference.dispose();
|
|
182
|
-
this._editorModelReference = null;
|
|
183
|
-
return null;
|
|
184
|
-
}
|
|
185
|
-
this._register(this._editorModelReference.object.onDidChangeDirty(() => this._onDidChangeDirty.fire()));
|
|
186
|
-
this._register(this._editorModelReference.object.onDidChangeReadonly(() => this._onDidChangeCapabilities.fire()));
|
|
187
|
-
if (this._editorModelReference.object.isDirty()) {
|
|
188
|
-
this._onDidChangeDirty.fire();
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
else {
|
|
192
|
-
this._editorModelReference.object.load();
|
|
193
|
-
}
|
|
194
|
-
if (this.options._backupId) {
|
|
195
|
-
const info = await this._notebookService.withNotebookDataProvider(this._editorModelReference.object.notebook.viewType);
|
|
196
|
-
if (!(info instanceof SimpleNotebookProviderInfo)) {
|
|
197
|
-
throw new Error('CANNOT open file notebook with this provider');
|
|
198
|
-
}
|
|
199
|
-
const data = await info.serializer.dataToNotebook(VSBuffer.fromString(JSON.stringify({ __webview_backup: this.options._backupId })));
|
|
200
|
-
this._editorModelReference.object.notebook.applyEdits([
|
|
201
|
-
{
|
|
202
|
-
editType: 1 ,
|
|
203
|
-
index: 0,
|
|
204
|
-
count: this._editorModelReference.object.notebook.length,
|
|
205
|
-
cells: data.cells
|
|
206
|
-
}
|
|
207
|
-
], true, undefined, () => undefined, undefined, false);
|
|
208
|
-
if (this.options._workingCopy) {
|
|
209
|
-
this.options._backupId = undefined;
|
|
210
|
-
this.options._workingCopy = undefined;
|
|
211
|
-
this.options.startDirty = undefined;
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
return this._editorModelReference.object;
|
|
215
|
-
}
|
|
216
|
-
toUntyped() {
|
|
217
|
-
return {
|
|
218
|
-
resource: this.preferredResource,
|
|
219
|
-
options: {
|
|
220
|
-
override: this.viewType
|
|
221
|
-
}
|
|
222
|
-
};
|
|
223
|
-
}
|
|
224
|
-
matches(otherInput) {
|
|
225
|
-
if (super.matches(otherInput)) {
|
|
226
|
-
return true;
|
|
227
|
-
}
|
|
228
|
-
if (otherInput instanceof NotebookEditorInput) {
|
|
229
|
-
return this.viewType === otherInput.viewType && isEqual(this.resource, otherInput.resource);
|
|
230
|
-
}
|
|
231
|
-
return false;
|
|
232
|
-
}
|
|
233
|
-
};
|
|
234
|
-
NotebookEditorInput.ID = 'workbench.input.notebook';
|
|
235
|
-
NotebookEditorInput = ( __decorate([
|
|
236
|
-
( __param(3, INotebookService)),
|
|
237
|
-
( __param(4, INotebookEditorModelResolverService)),
|
|
238
|
-
( __param(5, IFileDialogService)),
|
|
239
|
-
( __param(6, IInstantiationService)),
|
|
240
|
-
( __param(7, ILabelService)),
|
|
241
|
-
( __param(8, IFileService))
|
|
242
|
-
], NotebookEditorInput));
|
|
243
|
-
function isCompositeNotebookEditorInput(thing) {
|
|
244
|
-
return !!thing
|
|
245
|
-
&& typeof thing === 'object'
|
|
246
|
-
&& Array.isArray(thing.editorInputs)
|
|
247
|
-
&& (thing.editorInputs.every(input => input instanceof NotebookEditorInput));
|
|
248
|
-
}
|
|
249
|
-
export { NotebookEditorInput, isCompositeNotebookEditorInput };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { createDecorator } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
2
|
-
const INotebookService = ( createDecorator('notebookService'));
|
|
3
|
-
class SimpleNotebookProviderInfo {
|
|
4
|
-
constructor(viewType, serializer, extensionData) {
|
|
5
|
-
this.viewType = viewType;
|
|
6
|
-
this.serializer = serializer;
|
|
7
|
-
this.extensionData = extensionData;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
export { INotebookService, SimpleNotebookProviderInfo };
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { Range } from 'monaco-editor/esm/vs/editor/common/core/range.js';
|
|
2
|
-
import { TextSearchMatch } from './search.js';
|
|
3
|
-
function editorMatchToTextSearchResult(matches, model, previewOptions) {
|
|
4
|
-
const firstLine = matches[0].range.startLineNumber;
|
|
5
|
-
const lastLine = matches[matches.length - 1].range.endLineNumber;
|
|
6
|
-
const lineTexts = [];
|
|
7
|
-
for (let i = firstLine; i <= lastLine; i++) {
|
|
8
|
-
lineTexts.push(model.getLineContent(i));
|
|
9
|
-
}
|
|
10
|
-
return ( new TextSearchMatch(lineTexts.join('\n') + '\n', ( matches.map(m => ( new Range(
|
|
11
|
-
m.range.startLineNumber - 1,
|
|
12
|
-
m.range.startColumn - 1,
|
|
13
|
-
m.range.endLineNumber - 1,
|
|
14
|
-
m.range.endColumn - 1
|
|
15
|
-
)))), previewOptions));
|
|
16
|
-
}
|
|
17
|
-
function editorMatchesToTextSearchResults(matches, model, previewOptions) {
|
|
18
|
-
let previousEndLine = -1;
|
|
19
|
-
const groupedMatches = [];
|
|
20
|
-
let currentMatches = [];
|
|
21
|
-
matches.forEach((match) => {
|
|
22
|
-
if (match.range.startLineNumber !== previousEndLine) {
|
|
23
|
-
currentMatches = [];
|
|
24
|
-
groupedMatches.push(currentMatches);
|
|
25
|
-
}
|
|
26
|
-
currentMatches.push(match);
|
|
27
|
-
previousEndLine = match.range.endLineNumber;
|
|
28
|
-
});
|
|
29
|
-
return ( groupedMatches.map(sameLineMatches => {
|
|
30
|
-
return editorMatchToTextSearchResult(sameLineMatches, model, previewOptions);
|
|
31
|
-
}));
|
|
32
|
-
}
|
|
33
|
-
function addContextToEditorMatches(matches, model, query) {
|
|
34
|
-
const results = [];
|
|
35
|
-
let prevLine = -1;
|
|
36
|
-
for (let i = 0; i < matches.length; i++) {
|
|
37
|
-
const { start: matchStartLine, end: matchEndLine } = getMatchStartEnd(matches[i]);
|
|
38
|
-
if (typeof query.beforeContext === 'number' && query.beforeContext > 0) {
|
|
39
|
-
const beforeContextStartLine = Math.max(prevLine + 1, matchStartLine - query.beforeContext);
|
|
40
|
-
for (let b = beforeContextStartLine; b < matchStartLine; b++) {
|
|
41
|
-
results.push({
|
|
42
|
-
text: model.getLineContent(b + 1),
|
|
43
|
-
lineNumber: b
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
results.push(matches[i]);
|
|
48
|
-
const nextMatch = matches[i + 1];
|
|
49
|
-
const nextMatchStartLine = nextMatch ? getMatchStartEnd(nextMatch).start : Number.MAX_VALUE;
|
|
50
|
-
if (typeof query.afterContext === 'number' && query.afterContext > 0) {
|
|
51
|
-
const afterContextToLine = Math.min(nextMatchStartLine - 1, matchEndLine + query.afterContext, model.getLineCount() - 1);
|
|
52
|
-
for (let a = matchEndLine + 1; a <= afterContextToLine; a++) {
|
|
53
|
-
results.push({
|
|
54
|
-
text: model.getLineContent(a + 1),
|
|
55
|
-
lineNumber: a
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
prevLine = matchEndLine;
|
|
60
|
-
}
|
|
61
|
-
return results;
|
|
62
|
-
}
|
|
63
|
-
function getMatchStartEnd(match) {
|
|
64
|
-
const matchRanges = match.ranges;
|
|
65
|
-
const matchStartLine = Array.isArray(matchRanges) ? matchRanges[0].startLineNumber : matchRanges.startLineNumber;
|
|
66
|
-
const matchEndLine = Array.isArray(matchRanges) ? matchRanges[matchRanges.length - 1].endLineNumber : matchRanges.endLineNumber;
|
|
67
|
-
return {
|
|
68
|
-
start: matchStartLine,
|
|
69
|
-
end: matchEndLine
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
export { addContextToEditorMatches, editorMatchesToTextSearchResults };
|