@codingame/monaco-vscode-api 33.0.3 → 33.0.4

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.
Files changed (52) hide show
  1. package/package.json +9 -9
  2. package/services.js +3 -3
  3. package/vscode/src/vs/platform/product/common/product.js +1 -1
  4. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.d.ts +0 -26
  5. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +0 -746
  6. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.d.ts +0 -13
  7. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +0 -300
  8. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.d.ts +0 -8
  9. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.js +0 -55
  10. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.d.ts +0 -273
  11. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +0 -1963
  12. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.d.ts +0 -50
  13. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +0 -314
  14. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.d.ts +0 -258
  15. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +0 -886
  16. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.d.ts +0 -41
  17. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.js +0 -118
  18. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.d.ts +0 -17
  19. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.js +0 -71
  20. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.d.ts +0 -27
  21. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.js +0 -40
  22. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.d.ts +0 -23
  23. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.js +0 -313
  24. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.d.ts +0 -51
  25. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.js +0 -265
  26. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.d.ts +0 -24
  27. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.js +0 -185
  28. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.d.ts +0 -28
  29. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.js +0 -104
  30. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.d.ts +0 -10
  31. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.js +0 -43
  32. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.d.ts +0 -21
  33. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.js +0 -41
  34. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.d.ts +0 -25
  35. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.js +0 -69
  36. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiff.css +0 -469
  37. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.d.ts +0 -149
  38. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +0 -933
  39. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.d.ts +0 -180
  40. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +0 -32
  41. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.d.ts +0 -102
  42. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +0 -643
  43. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.d.ts +0 -30
  44. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.js +0 -197
  45. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.d.ts +0 -75
  46. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.js +0 -539
  47. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.d.ts +0 -13
  48. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.js +0 -39
  49. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.d.ts +0 -19
  50. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.js +0 -90
  51. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.d.ts +0 -26
  52. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.js +0 -92
@@ -1,13 +0,0 @@
1
- import { IAction2Options } from "../../../../../platform/actions/common/actions.js";
2
- import { ServicesAccessor } from "../../../../../platform/instantiation/common/instantiation.js";
3
- import { INotebookActionContext, NotebookAction } from "./coreActions.js";
4
- import { CellViewModel } from "../viewModel/notebookViewModelImpl.js";
5
- import { CellKind } from "../../common/notebookCommon.js";
6
- export declare function insertNewCell(accessor: ServicesAccessor, context: INotebookActionContext, kind: CellKind, direction: "above" | "below", focusEditor: boolean): CellViewModel | null;
7
- export declare abstract class InsertCellCommand extends NotebookAction {
8
- private kind;
9
- private direction;
10
- private focusEditor;
11
- constructor(desc: Readonly<IAction2Options>, kind: CellKind, direction: "above" | "below", focusEditor: boolean);
12
- runWithContext(accessor: ServicesAccessor, context: INotebookActionContext): Promise<void>;
13
- }
@@ -1,300 +0,0 @@
1
-
2
- import { Codicon } from '../../../../../base/common/codicons.js';
3
- import { KeyMod as KeyMod$1, KeyCode } from '../../../../../base/common/keyCodes.js';
4
- import { ILanguageService } from '../../../../../editor/common/languages/language.service.js';
5
- import { localize } from '../../../../../nls.js';
6
- import { registerAction2, MenuId, MenuRegistry } from '../../../../../platform/actions/common/actions.js';
7
- import { ContextKeyExpr } from '../../../../../platform/contextkey/common/contextkey.js';
8
- import { InputFocusedContext } from '../../../../../platform/contextkey/common/contextkeys.js';
9
- import { KeybindingWeight } from '../../../../../platform/keybinding/common/keybindingsRegistry.js';
10
- import { insertCell } from './cellOperations.js';
11
- import { NotebookAction } from './coreActions.js';
12
- import { NOTEBOOK_CELL_LIST_FOCUSED, NOTEBOOK_EDITOR_EDITABLE } from '../../common/notebookContextKeys.js';
13
- import { CellKind, NotebookSetting } from '../../common/notebookCommon.js';
14
- import { INotebookKernelHistoryService } from '../../common/notebookKernelService.service.js';
15
-
16
- const INSERT_CODE_CELL_ABOVE_COMMAND_ID = "notebook.cell.insertCodeCellAbove";
17
- const INSERT_CODE_CELL_BELOW_COMMAND_ID = "notebook.cell.insertCodeCellBelow";
18
- const INSERT_CODE_CELL_ABOVE_AND_FOCUS_CONTAINER_COMMAND_ID = "notebook.cell.insertCodeCellAboveAndFocusContainer";
19
- const INSERT_CODE_CELL_BELOW_AND_FOCUS_CONTAINER_COMMAND_ID = "notebook.cell.insertCodeCellBelowAndFocusContainer";
20
- const INSERT_CODE_CELL_AT_TOP_COMMAND_ID = "notebook.cell.insertCodeCellAtTop";
21
- const INSERT_MARKDOWN_CELL_ABOVE_COMMAND_ID = "notebook.cell.insertMarkdownCellAbove";
22
- const INSERT_MARKDOWN_CELL_BELOW_COMMAND_ID = "notebook.cell.insertMarkdownCellBelow";
23
- const INSERT_MARKDOWN_CELL_AT_TOP_COMMAND_ID = "notebook.cell.insertMarkdownCellAtTop";
24
- function insertNewCell(accessor, context, kind, direction, focusEditor) {
25
- let newCell = null;
26
- if (context.ui) {
27
- context.notebookEditor.focus();
28
- }
29
- const languageService = accessor.get(ILanguageService);
30
- const kernelHistoryService = accessor.get(INotebookKernelHistoryService);
31
- if (context.cell) {
32
- const idx = context.notebookEditor.getCellIndex(context.cell);
33
- newCell = insertCell(
34
- languageService,
35
- context.notebookEditor,
36
- idx,
37
- kind,
38
- direction,
39
- undefined,
40
- true,
41
- kernelHistoryService
42
- );
43
- } else {
44
- const focusRange = context.notebookEditor.getFocus();
45
- const next = Math.max(focusRange.end - 1, 0);
46
- newCell = insertCell(
47
- languageService,
48
- context.notebookEditor,
49
- next,
50
- kind,
51
- direction,
52
- undefined,
53
- true,
54
- kernelHistoryService
55
- );
56
- }
57
- return newCell;
58
- }
59
- class InsertCellCommand extends NotebookAction {
60
- constructor(desc, kind, direction, focusEditor) {
61
- super(desc);
62
- this.kind = kind;
63
- this.direction = direction;
64
- this.focusEditor = focusEditor;
65
- }
66
- async runWithContext(accessor, context) {
67
- const newCell = await insertNewCell(accessor, context, this.kind, this.direction);
68
- if (newCell) {
69
- await context.notebookEditor.focusNotebookCell(newCell, this.focusEditor ? "editor" : "container");
70
- }
71
- }
72
- }
73
- registerAction2(class InsertCodeCellAboveAction extends InsertCellCommand {
74
- constructor() {
75
- super({
76
- id: INSERT_CODE_CELL_ABOVE_COMMAND_ID,
77
- title: ( localize(11737, "Insert Code Cell Above")),
78
- keybinding: {
79
- primary: KeyMod$1.CtrlCmd | KeyMod$1.Shift | KeyCode.Enter,
80
- when: ( ContextKeyExpr.and(NOTEBOOK_CELL_LIST_FOCUSED, ( InputFocusedContext.toNegated()))),
81
- weight: KeybindingWeight.WorkbenchContrib
82
- },
83
- menu: {
84
- id: MenuId.NotebookCellInsert,
85
- order: 0
86
- }
87
- }, CellKind.Code, "above", true);
88
- }
89
- });
90
- registerAction2(
91
- class InsertCodeCellAboveAndFocusContainerAction extends InsertCellCommand {
92
- constructor() {
93
- super({
94
- id: INSERT_CODE_CELL_ABOVE_AND_FOCUS_CONTAINER_COMMAND_ID,
95
- title: ( localize(11738, "Insert Code Cell Above and Focus Container"))
96
- }, CellKind.Code, "above", false);
97
- }
98
- }
99
- );
100
- registerAction2(class InsertCodeCellBelowAction extends InsertCellCommand {
101
- constructor() {
102
- super({
103
- id: INSERT_CODE_CELL_BELOW_COMMAND_ID,
104
- title: ( localize(11739, "Insert Code Cell Below")),
105
- keybinding: {
106
- primary: KeyMod$1.CtrlCmd | KeyCode.Enter,
107
- when: ( ContextKeyExpr.and(NOTEBOOK_CELL_LIST_FOCUSED, ( InputFocusedContext.toNegated()))),
108
- weight: KeybindingWeight.WorkbenchContrib
109
- },
110
- menu: {
111
- id: MenuId.NotebookCellInsert,
112
- order: 1
113
- }
114
- }, CellKind.Code, "below", true);
115
- }
116
- });
117
- registerAction2(
118
- class InsertCodeCellBelowAndFocusContainerAction extends InsertCellCommand {
119
- constructor() {
120
- super({
121
- id: INSERT_CODE_CELL_BELOW_AND_FOCUS_CONTAINER_COMMAND_ID,
122
- title: ( localize(11740, "Insert Code Cell Below and Focus Container"))
123
- }, CellKind.Code, "below", false);
124
- }
125
- }
126
- );
127
- registerAction2(class InsertMarkdownCellAboveAction extends InsertCellCommand {
128
- constructor() {
129
- super({
130
- id: INSERT_MARKDOWN_CELL_ABOVE_COMMAND_ID,
131
- title: ( localize(11741, "Insert Markdown Cell Above")),
132
- menu: {
133
- id: MenuId.NotebookCellInsert,
134
- order: 2
135
- }
136
- }, CellKind.Markup, "above", true);
137
- }
138
- });
139
- registerAction2(class InsertMarkdownCellBelowAction extends InsertCellCommand {
140
- constructor() {
141
- super({
142
- id: INSERT_MARKDOWN_CELL_BELOW_COMMAND_ID,
143
- title: ( localize(11742, "Insert Markdown Cell Below")),
144
- menu: {
145
- id: MenuId.NotebookCellInsert,
146
- order: 3
147
- }
148
- }, CellKind.Markup, "below", true);
149
- }
150
- });
151
- registerAction2(class InsertCodeCellAtTopAction extends NotebookAction {
152
- constructor() {
153
- super({
154
- id: INSERT_CODE_CELL_AT_TOP_COMMAND_ID,
155
- title: ( localize(11743, "Add Code Cell At Top")),
156
- f1: false
157
- });
158
- }
159
- async run(accessor, context) {
160
- context = context ?? this.getEditorContextFromArgsOrActive(accessor);
161
- if (context) {
162
- this.runWithContext(accessor, context);
163
- }
164
- }
165
- async runWithContext(accessor, context) {
166
- const languageService = accessor.get(ILanguageService);
167
- const kernelHistoryService = accessor.get(INotebookKernelHistoryService);
168
- const newCell = insertCell(
169
- languageService,
170
- context.notebookEditor,
171
- 0,
172
- CellKind.Code,
173
- "above",
174
- undefined,
175
- true,
176
- kernelHistoryService
177
- );
178
- if (newCell) {
179
- await context.notebookEditor.focusNotebookCell(newCell, "editor");
180
- }
181
- }
182
- });
183
- registerAction2(class InsertMarkdownCellAtTopAction extends NotebookAction {
184
- constructor() {
185
- super({
186
- id: INSERT_MARKDOWN_CELL_AT_TOP_COMMAND_ID,
187
- title: ( localize(11744, "Add Markdown Cell At Top")),
188
- f1: false
189
- });
190
- }
191
- async run(accessor, context) {
192
- context = context ?? this.getEditorContextFromArgsOrActive(accessor);
193
- if (context) {
194
- this.runWithContext(accessor, context);
195
- }
196
- }
197
- async runWithContext(accessor, context) {
198
- const languageService = accessor.get(ILanguageService);
199
- const kernelHistoryService = accessor.get(INotebookKernelHistoryService);
200
- const newCell = insertCell(
201
- languageService,
202
- context.notebookEditor,
203
- 0,
204
- CellKind.Markup,
205
- "above",
206
- undefined,
207
- true,
208
- kernelHistoryService
209
- );
210
- if (newCell) {
211
- await context.notebookEditor.focusNotebookCell(newCell, "editor");
212
- }
213
- }
214
- });
215
- MenuRegistry.appendMenuItem(MenuId.NotebookCellBetween, {
216
- command: {
217
- id: INSERT_CODE_CELL_BELOW_COMMAND_ID,
218
- title: "$(add) " + ( localize(11745, "Code")),
219
- tooltip: ( localize(11746, "Add Code Cell"))
220
- },
221
- order: 0,
222
- group: "inline",
223
- when: ( ContextKeyExpr.and(( NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)), ( ContextKeyExpr.notEquals("config.notebook.experimental.insertToolbarAlignment", "left"))))
224
- });
225
- MenuRegistry.appendMenuItem(MenuId.NotebookCellBetween, {
226
- command: {
227
- id: INSERT_CODE_CELL_BELOW_COMMAND_ID,
228
- title: ( localize(11747, "Add Code")),
229
- icon: Codicon.add,
230
- tooltip: ( localize(11746, "Add Code Cell"))
231
- },
232
- order: 0,
233
- group: "inline",
234
- when: ( ContextKeyExpr.and(( NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)), ( ContextKeyExpr.equals("config.notebook.experimental.insertToolbarAlignment", "left"))))
235
- });
236
- MenuRegistry.appendMenuItem(MenuId.NotebookToolbar, {
237
- command: {
238
- id: INSERT_CODE_CELL_BELOW_COMMAND_ID,
239
- icon: Codicon.add,
240
- title: ( localize(11748, "Code")),
241
- tooltip: ( localize(11746, "Add Code Cell"))
242
- },
243
- order: -5,
244
- group: "navigation/add",
245
- when: ( ContextKeyExpr.and(( NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)), ( ContextKeyExpr.notEquals("config.notebook.insertToolbarLocation", "betweenCells")), ( ContextKeyExpr.notEquals("config.notebook.insertToolbarLocation", "hidden"))))
246
- });
247
- MenuRegistry.appendMenuItem(MenuId.NotebookCellListTop, {
248
- command: {
249
- id: INSERT_CODE_CELL_AT_TOP_COMMAND_ID,
250
- title: "$(add) " + ( localize(11745, "Code")),
251
- tooltip: ( localize(11746, "Add Code Cell"))
252
- },
253
- order: 0,
254
- group: "inline",
255
- when: ( ContextKeyExpr.and(( NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)), ( ContextKeyExpr.notEquals("config.notebook.experimental.insertToolbarAlignment", "left"))))
256
- });
257
- MenuRegistry.appendMenuItem(MenuId.NotebookCellListTop, {
258
- command: {
259
- id: INSERT_CODE_CELL_AT_TOP_COMMAND_ID,
260
- title: ( localize(11749, "Add Code")),
261
- icon: Codicon.add,
262
- tooltip: ( localize(11746, "Add Code Cell"))
263
- },
264
- order: 0,
265
- group: "inline",
266
- when: ( ContextKeyExpr.and(( NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)), ( ContextKeyExpr.equals("config.notebook.experimental.insertToolbarAlignment", "left"))))
267
- });
268
- MenuRegistry.appendMenuItem(MenuId.NotebookCellBetween, {
269
- command: {
270
- id: INSERT_MARKDOWN_CELL_BELOW_COMMAND_ID,
271
- title: "$(add) " + ( localize(11750, "Markdown")),
272
- tooltip: ( localize(11751, "Add Markdown Cell"))
273
- },
274
- order: 1,
275
- group: "inline",
276
- when: ( ContextKeyExpr.and(( NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)), ( ContextKeyExpr.notEquals("config.notebook.experimental.insertToolbarAlignment", "left"))))
277
- });
278
- MenuRegistry.appendMenuItem(MenuId.NotebookToolbar, {
279
- command: {
280
- id: INSERT_MARKDOWN_CELL_BELOW_COMMAND_ID,
281
- icon: Codicon.add,
282
- title: ( localize(11752, "Markdown")),
283
- tooltip: ( localize(11751, "Add Markdown Cell"))
284
- },
285
- order: -5,
286
- group: "navigation/add",
287
- when: ( ContextKeyExpr.and(( NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)), ( ContextKeyExpr.notEquals("config.notebook.insertToolbarLocation", "betweenCells")), ( ContextKeyExpr.notEquals("config.notebook.insertToolbarLocation", "hidden")), ( ContextKeyExpr.notEquals(`config.${NotebookSetting.globalToolbarShowLabel}`, false)), ( ContextKeyExpr.notEquals(`config.${NotebookSetting.globalToolbarShowLabel}`, "never"))))
288
- });
289
- MenuRegistry.appendMenuItem(MenuId.NotebookCellListTop, {
290
- command: {
291
- id: INSERT_MARKDOWN_CELL_AT_TOP_COMMAND_ID,
292
- title: "$(add) " + ( localize(11750, "Markdown")),
293
- tooltip: ( localize(11751, "Add Markdown Cell"))
294
- },
295
- order: 1,
296
- group: "inline",
297
- when: ( ContextKeyExpr.and(( NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)), ( ContextKeyExpr.notEquals("config.notebook.experimental.insertToolbarAlignment", "left"))))
298
- });
299
-
300
- export { InsertCellCommand, insertNewCell };
@@ -1,8 +0,0 @@
1
- import { IDiffEditorConstructionOptions } from "../../../../../editor/browser/editorBrowser.js";
2
- import { IEditorOptions } from "../../../../../editor/common/config/editorOptions.js";
3
- export declare function getEditorPadding(lineCount: number): {
4
- top: number;
5
- bottom: number;
6
- };
7
- export declare const fixedEditorOptions: IEditorOptions;
8
- export declare const fixedDiffEditorOptions: IDiffEditorConstructionOptions;
@@ -1,55 +0,0 @@
1
-
2
-
3
- const fixedEditorPaddingSingleLineCells = {
4
- top: 24,
5
- bottom: 24
6
- };
7
- const fixedEditorPadding = {
8
- top: 12,
9
- bottom: 12
10
- };
11
- function getEditorPadding(lineCount) {
12
- return lineCount === 1 ? fixedEditorPaddingSingleLineCells : fixedEditorPadding;
13
- }
14
- const fixedEditorOptions = {
15
- padding: fixedEditorPadding,
16
- scrollBeyondLastLine: false,
17
- scrollbar: {
18
- verticalScrollbarSize: 14,
19
- horizontal: 'auto',
20
- vertical: 'auto',
21
- useShadows: true,
22
- verticalHasArrows: false,
23
- horizontalHasArrows: false,
24
- alwaysConsumeMouseWheel: false,
25
- },
26
- renderLineHighlightOnlyWhenFocus: true,
27
- overviewRulerLanes: 0,
28
- overviewRulerBorder: false,
29
- selectOnLineNumbers: false,
30
- wordWrap: 'off',
31
- lineNumbers: 'off',
32
- glyphMargin: true,
33
- fixedOverflowWidgets: true,
34
- minimap: { enabled: false },
35
- renderValidationDecorations: 'on',
36
- renderLineHighlight: 'none',
37
- readOnly: true
38
- };
39
- const fixedDiffEditorOptions = {
40
- ...fixedEditorOptions,
41
- glyphMargin: true,
42
- enableSplitViewResizing: false,
43
- renderIndicators: true,
44
- renderMarginRevertIcon: false,
45
- readOnly: false,
46
- isInEmbeddedEditor: true,
47
- renderOverviewRuler: false,
48
- wordWrap: 'off',
49
- diffWordWrap: 'off',
50
- diffAlgorithm: 'advanced',
51
- renderSideBySide: true,
52
- useInlineViewWhenSpaceIsLimited: false
53
- };
54
-
55
- export { fixedDiffEditorOptions, fixedEditorOptions, getEditorPadding };
@@ -1,273 +0,0 @@
1
- import { Disposable, DisposableStore } from "../../../../../base/common/lifecycle.js";
2
- import { IInstantiationService } from "../../../../../platform/instantiation/common/instantiation.js";
3
- import { DiffElementCellViewModelBase, PropertyFoldingState, SideBySideDiffElementViewModel, SingleSideDiffElementViewModel, DiffElementPlaceholderViewModel, IDiffElementViewModelBase, NotebookDocumentMetadataViewModel } from "./diffElementViewModel.js";
4
- import { CellDiffSideBySideRenderTemplate, CellDiffSingleSideRenderTemplate, INotebookTextDiffEditor, CellDiffPlaceholderRenderTemplate, IDiffCellMarginOverlay, NotebookDocumentDiffElementRenderTemplate } from "./notebookDiffEditorBrowser.js";
5
- import { CodeEditorWidget, ICodeEditorWidgetOptions } from "../../../../../editor/browser/widget/codeEditor/codeEditorWidget.js";
6
- import { IModelService } from "../../../../../editor/common/services/model.service.js";
7
- import { ILanguageService } from "../../../../../editor/common/languages/language.service.js";
8
- import { ToolBar } from "../../../../../base/browser/ui/toolbar/toolbar.js";
9
- import { IContextMenuService } from "../../../../../platform/contextview/browser/contextView.service.js";
10
- import { IMenu, MenuId } from "../../../../../platform/actions/common/actions.js";
11
- import { IMenuService } from "../../../../../platform/actions/common/actions.service.js";
12
- import { IKeybindingService } from "../../../../../platform/keybinding/common/keybinding.service.js";
13
- import { INotificationService } from "../../../../../platform/notification/common/notification.service.js";
14
- import { IContextKey } from "../../../../../platform/contextkey/common/contextkey.js";
15
- import { IContextKeyService } from "../../../../../platform/contextkey/common/contextkey.service.js";
16
- import { OutputContainer } from "./diffElementOutputs.js";
17
- import { ITextModelService } from "../../../../../editor/common/services/resolverService.service.js";
18
- import { IConfigurationService } from "../../../../../platform/configuration/common/configuration.service.js";
19
- import { IThemeService } from "../../../../../platform/theme/common/themeService.service.js";
20
- import { WorkbenchToolBar } from "../../../../../platform/actions/browser/toolbar.js";
21
- import { ITelemetryService } from "../../../../../platform/telemetry/common/telemetry.service.js";
22
- import { IAccessibilityService } from "../../../../../platform/accessibility/common/accessibility.service.js";
23
- import { DiffEditorWidget } from "../../../../../editor/browser/widget/diffEditor/diffEditorWidget.js";
24
- import { ICommandService } from "../../../../../platform/commands/common/commands.service.js";
25
- import { DiffNestedCellViewModel } from "./diffNestedCellViewModel.js";
26
- import { ITextResourceConfigurationService } from "../../../../../editor/common/services/textResourceConfiguration.service.js";
27
- export declare function getOptimizedNestedCodeEditorWidgetOptions(): ICodeEditorWidgetOptions;
28
- export declare class CellDiffPlaceholderElement extends Disposable {
29
- constructor(placeholder: DiffElementPlaceholderViewModel, templateData: CellDiffPlaceholderRenderTemplate);
30
- }
31
- declare class PropertyHeader extends Disposable {
32
- readonly cell: IDiffElementViewModelBase;
33
- readonly propertyHeaderContainer: HTMLElement;
34
- readonly notebookEditor: INotebookTextDiffEditor;
35
- readonly accessor: {
36
- updateInfoRendering: (renderOutput: boolean) => void;
37
- checkIfModified: () => false | {
38
- reason: string | undefined;
39
- };
40
- getFoldingState: () => PropertyFoldingState;
41
- updateFoldingState: (newState: PropertyFoldingState) => void;
42
- unChangedLabel: string;
43
- changedLabel: string;
44
- prefix: string;
45
- menuId: MenuId;
46
- };
47
- private readonly contextMenuService;
48
- private readonly keybindingService;
49
- private readonly commandService;
50
- private readonly notificationService;
51
- private readonly menuService;
52
- private readonly contextKeyService;
53
- private readonly themeService;
54
- private readonly telemetryService;
55
- private readonly accessibilityService;
56
- protected _foldingIndicator: HTMLElement;
57
- protected _statusSpan: HTMLElement;
58
- protected _description: HTMLElement;
59
- protected _toolbar: WorkbenchToolBar;
60
- protected _menu: IMenu;
61
- protected _propertyExpanded?: IContextKey<boolean>;
62
- protected _propertyChanged?: IContextKey<boolean>;
63
- constructor(cell: IDiffElementViewModelBase, propertyHeaderContainer: HTMLElement, notebookEditor: INotebookTextDiffEditor, accessor: {
64
- updateInfoRendering: (renderOutput: boolean) => void;
65
- checkIfModified: () => false | {
66
- reason: string | undefined;
67
- };
68
- getFoldingState: () => PropertyFoldingState;
69
- updateFoldingState: (newState: PropertyFoldingState) => void;
70
- unChangedLabel: string;
71
- changedLabel: string;
72
- prefix: string;
73
- menuId: MenuId;
74
- }, contextMenuService: IContextMenuService, keybindingService: IKeybindingService, commandService: ICommandService, notificationService: INotificationService, menuService: IMenuService, contextKeyService: IContextKeyService, themeService: IThemeService, telemetryService: ITelemetryService, accessibilityService: IAccessibilityService);
75
- buildHeader(): void;
76
- refresh(): void;
77
- private updateMenu;
78
- private _updateFoldingIcon;
79
- }
80
- interface IDiffElementLayoutState {
81
- outerWidth?: boolean;
82
- editorHeight?: boolean;
83
- metadataEditor?: boolean;
84
- metadataHeight?: boolean;
85
- outputTotalHeight?: boolean;
86
- }
87
- export declare class NotebookDocumentMetadataElement extends Disposable {
88
- readonly notebookEditor: INotebookTextDiffEditor;
89
- readonly viewModel: NotebookDocumentMetadataViewModel;
90
- readonly templateData: NotebookDocumentDiffElementRenderTemplate;
91
- private readonly instantiationService;
92
- private readonly textModelService;
93
- private readonly menuService;
94
- private readonly contextKeyService;
95
- private readonly textConfigurationService;
96
- private readonly configurationService;
97
- private readonly _editor;
98
- private _editorViewStateChanged;
99
- private _toolbar;
100
- private readonly _cellHeaderContainer;
101
- private readonly _editorContainer;
102
- private _cellHeader;
103
- private _diffEditorContainer;
104
- constructor(notebookEditor: INotebookTextDiffEditor, viewModel: NotebookDocumentMetadataViewModel, templateData: NotebookDocumentDiffElementRenderTemplate, instantiationService: IInstantiationService, textModelService: ITextModelService, menuService: IMenuService, contextKeyService: IContextKeyService, textConfigurationService: ITextResourceConfigurationService, configurationService: IConfigurationService);
105
- buildBody(): void;
106
- protected layoutNotebookCell(): void;
107
- updateBorders(): void;
108
- updateSourceEditor(): void;
109
- private _initializeSourceDiffEditor;
110
- private updateEditorOptionsForWhitespace;
111
- layout(state: IDiffElementLayoutState): void;
112
- dispose(): void;
113
- }
114
- declare abstract class AbstractElementRenderer extends Disposable {
115
- readonly notebookEditor: INotebookTextDiffEditor;
116
- readonly cell: DiffElementCellViewModelBase;
117
- readonly templateData: CellDiffSingleSideRenderTemplate | CellDiffSideBySideRenderTemplate;
118
- readonly style: "left" | "right" | "full";
119
- protected readonly instantiationService: IInstantiationService;
120
- protected readonly languageService: ILanguageService;
121
- protected readonly modelService: IModelService;
122
- protected readonly textModelService: ITextModelService;
123
- protected readonly contextMenuService: IContextMenuService;
124
- protected readonly keybindingService: IKeybindingService;
125
- protected readonly notificationService: INotificationService;
126
- protected readonly menuService: IMenuService;
127
- protected readonly contextKeyService: IContextKeyService;
128
- protected readonly configurationService: IConfigurationService;
129
- protected readonly textConfigurationService: ITextResourceConfigurationService;
130
- protected readonly _metadataLocalDisposable: DisposableStore;
131
- protected readonly _outputLocalDisposable: DisposableStore;
132
- protected _ignoreMetadata: boolean;
133
- protected _ignoreOutputs: boolean;
134
- protected _cellHeaderContainer: HTMLElement;
135
- protected _editorContainer: HTMLElement;
136
- protected _cellHeader: PropertyHeader;
137
- protected _metadataHeaderContainer: HTMLElement;
138
- protected _metadataHeader: PropertyHeader;
139
- protected _metadataInfoContainer: HTMLElement;
140
- protected _metadataEditorContainer?: HTMLElement;
141
- protected readonly _metadataEditorDisposeStore: DisposableStore;
142
- protected _metadataEditor?: CodeEditorWidget | DiffEditorWidget;
143
- protected _outputHeaderContainer: HTMLElement;
144
- protected _outputHeader: PropertyHeader;
145
- protected _outputInfoContainer: HTMLElement;
146
- protected _outputEditorContainer?: HTMLElement;
147
- protected _outputViewContainer?: HTMLElement;
148
- protected _outputLeftContainer?: HTMLElement;
149
- protected _outputRightContainer?: HTMLElement;
150
- protected _outputMetadataContainer?: HTMLElement;
151
- protected _outputEmptyElement?: HTMLElement;
152
- protected _outputLeftView?: OutputContainer;
153
- protected _outputRightView?: OutputContainer;
154
- protected readonly _outputEditorDisposeStore: DisposableStore;
155
- protected _outputEditor?: CodeEditorWidget | DiffEditorWidget;
156
- protected _outputMetadataEditor?: DiffEditorWidget;
157
- protected _diffEditorContainer: HTMLElement;
158
- protected _diagonalFill?: HTMLElement;
159
- protected _isDisposed: boolean;
160
- constructor(notebookEditor: INotebookTextDiffEditor, cell: DiffElementCellViewModelBase, templateData: CellDiffSingleSideRenderTemplate | CellDiffSideBySideRenderTemplate, style: "left" | "right" | "full", instantiationService: IInstantiationService, languageService: ILanguageService, modelService: IModelService, textModelService: ITextModelService, contextMenuService: IContextMenuService, keybindingService: IKeybindingService, notificationService: INotificationService, menuService: IMenuService, contextKeyService: IContextKeyService, configurationService: IConfigurationService, textConfigurationService: ITextResourceConfigurationService);
161
- abstract init(): void;
162
- abstract styleContainer(container: HTMLElement): void;
163
- abstract _buildOutput(): void;
164
- abstract _disposeOutput(): void;
165
- abstract _buildMetadata(): void;
166
- abstract _disposeMetadata(): void;
167
- buildBody(): void;
168
- updateMetadataRendering(): void;
169
- updateOutputRendering(renderRichOutput: boolean): void;
170
- private _buildOutputRawContainer;
171
- private _showOutputsRaw;
172
- private _showOutputsEmptyView;
173
- protected _hideOutputsRaw(): void;
174
- protected _hideOutputsEmptyView(): void;
175
- abstract _buildOutputRendererContainer(): void;
176
- abstract _hideOutputsRenderer(): void;
177
- abstract _showOutputsRenderer(): void;
178
- private _applySanitizedMetadataChanges;
179
- private _buildMetadataEditor;
180
- private _buildOutputEditor;
181
- protected layoutNotebookCell(): void;
182
- updateBorders(): void;
183
- dispose(): void;
184
- abstract updateSourceEditor(): void;
185
- abstract layout(state: IDiffElementLayoutState): void;
186
- }
187
- declare abstract class SingleSideDiffElement extends AbstractElementRenderer {
188
- protected _editor: CodeEditorWidget;
189
- readonly cell: SingleSideDiffElementViewModel;
190
- readonly templateData: CellDiffSingleSideRenderTemplate;
191
- abstract get nestedCellViewModel(): DiffNestedCellViewModel;
192
- abstract get readonly(): boolean;
193
- constructor(notebookEditor: INotebookTextDiffEditor, cell: SingleSideDiffElementViewModel, templateData: CellDiffSingleSideRenderTemplate, style: "left" | "right" | "full", instantiationService: IInstantiationService, languageService: ILanguageService, modelService: IModelService, textModelService: ITextModelService, contextMenuService: IContextMenuService, keybindingService: IKeybindingService, notificationService: INotificationService, menuService: IMenuService, contextKeyService: IContextKeyService, configurationService: IConfigurationService, textConfigurationService: ITextResourceConfigurationService);
194
- init(): void;
195
- buildBody(): void;
196
- updateSourceEditor(): void;
197
- protected calculateDiagonalFillHeight(): number;
198
- private _initializeSourceDiffEditor;
199
- _disposeMetadata(): void;
200
- _buildMetadata(): void;
201
- _buildOutput(): void;
202
- _disposeOutput(): void;
203
- }
204
- export declare class DeletedElement extends SingleSideDiffElement {
205
- constructor(notebookEditor: INotebookTextDiffEditor, cell: SingleSideDiffElementViewModel, templateData: CellDiffSingleSideRenderTemplate, languageService: ILanguageService, modelService: IModelService, textModelService: ITextModelService, instantiationService: IInstantiationService, contextMenuService: IContextMenuService, keybindingService: IKeybindingService, notificationService: INotificationService, menuService: IMenuService, contextKeyService: IContextKeyService, configurationService: IConfigurationService, textConfigurationService: ITextResourceConfigurationService);
206
- get nestedCellViewModel(): DiffNestedCellViewModel;
207
- get readonly(): boolean;
208
- styleContainer(container: HTMLElement): void;
209
- layout(state: IDiffElementLayoutState): void;
210
- _buildOutputRendererContainer(): void;
211
- _decorate(): void;
212
- _showOutputsRenderer(): void;
213
- _hideOutputsRenderer(): void;
214
- dispose(): void;
215
- }
216
- export declare class InsertElement extends SingleSideDiffElement {
217
- constructor(notebookEditor: INotebookTextDiffEditor, cell: SingleSideDiffElementViewModel, templateData: CellDiffSingleSideRenderTemplate, instantiationService: IInstantiationService, languageService: ILanguageService, modelService: IModelService, textModelService: ITextModelService, contextMenuService: IContextMenuService, keybindingService: IKeybindingService, notificationService: INotificationService, menuService: IMenuService, contextKeyService: IContextKeyService, configurationService: IConfigurationService, textConfigurationService: ITextResourceConfigurationService);
218
- get nestedCellViewModel(): DiffNestedCellViewModel;
219
- get readonly(): boolean;
220
- styleContainer(container: HTMLElement): void;
221
- _buildOutputRendererContainer(): void;
222
- _decorate(): void;
223
- _showOutputsRenderer(): void;
224
- _hideOutputsRenderer(): void;
225
- layout(state: IDiffElementLayoutState): void;
226
- dispose(): void;
227
- }
228
- export declare class ModifiedElement extends AbstractElementRenderer {
229
- private _editor?;
230
- private _editorViewStateChanged;
231
- protected _toolbar: ToolBar;
232
- protected _menu: IMenu;
233
- readonly cell: SideBySideDiffElementViewModel;
234
- readonly templateData: CellDiffSideBySideRenderTemplate;
235
- constructor(notebookEditor: INotebookTextDiffEditor, cell: SideBySideDiffElementViewModel, templateData: CellDiffSideBySideRenderTemplate, instantiationService: IInstantiationService, languageService: ILanguageService, modelService: IModelService, textModelService: ITextModelService, contextMenuService: IContextMenuService, keybindingService: IKeybindingService, notificationService: INotificationService, menuService: IMenuService, contextKeyService: IContextKeyService, configurationService: IConfigurationService, textConfigurationService: ITextResourceConfigurationService);
236
- init(): void;
237
- styleContainer(container: HTMLElement): void;
238
- buildBody(): void;
239
- _disposeMetadata(): void;
240
- _buildMetadata(): void;
241
- _disposeOutput(): void;
242
- _buildOutput(): void;
243
- _buildOutputRendererContainer(): void;
244
- _decorate(): void;
245
- _showOutputsRenderer(): void;
246
- _hideOutputsRenderer(): void;
247
- updateSourceEditor(): void;
248
- private _initializeSourceDiffEditor;
249
- private updateEditorOptionsForWhitespace;
250
- layout(state: IDiffElementLayoutState): void;
251
- dispose(): void;
252
- }
253
- export declare class CollapsedCellOverlayWidget extends Disposable implements IDiffCellMarginOverlay {
254
- private readonly container;
255
- private readonly _nodes;
256
- private readonly _action;
257
- readonly onAction: import("../../../../../base/common/event.js").Event<void>;
258
- constructor(container: HTMLElement);
259
- show(): void;
260
- hide(): void;
261
- dispose(): void;
262
- }
263
- export declare class UnchangedCellOverlayWidget extends Disposable implements IDiffCellMarginOverlay {
264
- private readonly container;
265
- private readonly _nodes;
266
- private readonly _action;
267
- readonly onAction: import("../../../../../base/common/event.js").Event<void>;
268
- constructor(container: HTMLElement);
269
- show(): void;
270
- hide(): void;
271
- dispose(): void;
272
- }
273
- export {};