@codingame/monaco-vscode-notebook-service-override 25.1.2 → 26.0.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.
Files changed (94) hide show
  1. package/index.js +2 -2
  2. package/package.json +3 -3
  3. package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js +112 -94
  4. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.js +95 -96
  5. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticEditorContrib.js +28 -19
  6. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticsActions.js +15 -9
  7. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.js +22 -17
  8. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/contributedStatusBarItemController.js +25 -10
  9. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +37 -44
  10. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +211 -115
  11. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookBreakpoints.js +16 -18
  12. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookCellPausing.js +5 -8
  13. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookDebugDecorations.js +57 -49
  14. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.js +24 -11
  15. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +78 -76
  16. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/execute/executionEditorProgress.js +14 -15
  17. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +43 -28
  18. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +65 -34
  19. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +19 -16
  20. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/kernelDetection/notebookKernelDetection.js +6 -10
  21. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.js +15 -17
  22. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider.js +28 -16
  23. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.js +211 -170
  24. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookSelectionHighlight.js +11 -11
  25. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +158 -156
  26. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookInlineVariables.js +109 -105
  27. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableContextKeys.js +1 -1
  28. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.js +28 -22
  29. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.js +26 -17
  30. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.js +23 -16
  31. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.js +72 -40
  32. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +233 -186
  33. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.js +22 -18
  34. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +239 -151
  35. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +85 -86
  36. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/undoRedo/notebookUndoRedo.js +25 -11
  37. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/viewportWarmup/viewportWarmup.js +13 -10
  38. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/apiActions.js +8 -5
  39. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +218 -196
  40. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +258 -255
  41. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +106 -98
  42. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/notebookIndentationActions.js +63 -49
  43. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.js +55 -64
  44. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/variablesActions.js +21 -25
  45. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +149 -129
  46. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.d.ts +57 -0
  47. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.js +286 -0
  48. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.d.ts +22 -0
  49. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.js +82 -0
  50. package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +452 -363
  51. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityHelp.js +44 -61
  52. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibleView.js +9 -11
  53. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.js +203 -207
  54. package/vscode/src/vs/workbench/contrib/notebook/browser/outputEditor/notebookOutputEditor.js +148 -104
  55. package/vscode/src/vs/workbench/contrib/notebook/browser/outputEditor/notebookOutputEditorInput.js +19 -11
  56. package/vscode/src/vs/workbench/contrib/notebook/browser/replEditorAccessibleView.js +9 -11
  57. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookCellStatusBarServiceImpl.js +9 -6
  58. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +34 -22
  59. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.js +29 -18
  60. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.js +70 -52
  61. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +31 -19
  62. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js +78 -41
  63. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +37 -27
  64. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.js +9 -6
  65. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookRendererMessagingServiceImpl.js +8 -7
  66. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +214 -119
  67. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.js +38 -36
  68. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineDataSource.js +24 -25
  69. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineDataSourceFactory.js +2 -6
  70. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +26 -15
  71. package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.js +35 -15
  72. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +468 -258
  73. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.d.ts +33 -0
  74. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.js +113 -0
  75. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +74 -58
  76. package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.d.ts +1 -1
  77. package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.js +7 -10
  78. package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookCellMatching.js +72 -16
  79. package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookWebWorker.js +70 -51
  80. package/vscode/src/vs/workbench/contrib/replNotebook/browser/repl.contribution.js +195 -149
  81. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorAccessibilityHelp.js +60 -81
  82. package/vscode/src/vs/workbench/services/workingCopy/common/abstractFileWorkingCopyManager.js +7 -12
  83. package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +104 -66
  84. package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +115 -77
  85. package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.js +42 -26
  86. package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopyManager.js +19 -12
  87. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.d.ts +0 -7
  88. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +0 -198
  89. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.d.ts +0 -8
  90. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +0 -333
  91. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.d.ts +0 -2
  92. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +0 -7
  93. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.d.ts +0 -13
  94. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +0 -261
@@ -8,235 +8,235 @@ import { Extensions } from '@codingame/monaco-vscode-api/vscode/vs/workbench/ser
8
8
  import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/registry/common/platform';
9
9
 
10
10
  const NotebookEditorContribution = ( Object.freeze({
11
- type: 'type',
12
- displayName: 'displayName',
13
- selector: 'selector',
14
- priority: 'priority',
11
+ type: "type",
12
+ displayName: "displayName",
13
+ selector: "selector",
14
+ priority: "priority"
15
15
  }));
16
16
  const NotebookRendererContribution = ( Object.freeze({
17
- id: 'id',
18
- displayName: 'displayName',
19
- mimeTypes: 'mimeTypes',
20
- entrypoint: 'entrypoint',
21
- hardDependencies: 'dependencies',
22
- optionalDependencies: 'optionalDependencies',
23
- requiresMessaging: 'requiresMessaging',
17
+ id: "id",
18
+ displayName: "displayName",
19
+ mimeTypes: "mimeTypes",
20
+ entrypoint: "entrypoint",
21
+ hardDependencies: "dependencies",
22
+ optionalDependencies: "optionalDependencies",
23
+ requiresMessaging: "requiresMessaging"
24
24
  }));
25
25
  const NotebookPreloadContribution = ( Object.freeze({
26
- type: 'type',
27
- entrypoint: 'entrypoint',
28
- localResourceRoots: 'localResourceRoots',
26
+ type: "type",
27
+ entrypoint: "entrypoint",
28
+ localResourceRoots: "localResourceRoots"
29
29
  }));
30
30
  const notebookProviderContribution = {
31
- description: ( localize(9621, 'Contributes notebook document provider.')),
32
- type: 'array',
33
- defaultSnippets: [{ body: [{ type: '', displayName: '', 'selector': [{ 'filenamePattern': '' }] }] }],
31
+ description: ( localize(9941, "Contributes notebook document provider.")),
32
+ type: "array",
33
+ defaultSnippets: [{
34
+ body: [{
35
+ type: "",
36
+ displayName: "",
37
+ "selector": [{
38
+ "filenamePattern": ""
39
+ }]
40
+ }]
41
+ }],
34
42
  items: {
35
- type: 'object',
43
+ type: "object",
36
44
  required: [
37
45
  NotebookEditorContribution.type,
38
46
  NotebookEditorContribution.displayName,
39
- NotebookEditorContribution.selector,
47
+ NotebookEditorContribution.selector
40
48
  ],
41
49
  properties: {
42
50
  [NotebookEditorContribution.type]: {
43
- type: 'string',
44
- description: ( localize(9622, 'Type of the notebook.')),
51
+ type: "string",
52
+ description: ( localize(9942, "Type of the notebook."))
45
53
  },
46
54
  [NotebookEditorContribution.displayName]: {
47
- type: 'string',
48
- description: ( localize(9623, 'Human readable name of the notebook.')),
55
+ type: "string",
56
+ description: ( localize(9943, "Human readable name of the notebook."))
49
57
  },
50
58
  [NotebookEditorContribution.selector]: {
51
- type: 'array',
52
- description: ( localize(9624, 'Set of globs that the notebook is for.')),
59
+ type: "array",
60
+ description: ( localize(9944, "Set of globs that the notebook is for.")),
53
61
  items: {
54
- type: 'object',
62
+ type: "object",
55
63
  properties: {
56
64
  filenamePattern: {
57
- type: 'string',
58
- description: ( localize(9625, 'Glob that the notebook is enabled for.')),
65
+ type: "string",
66
+ description: ( localize(9945, "Glob that the notebook is enabled for."))
59
67
  },
60
68
  excludeFileNamePattern: {
61
- type: 'string',
62
- description: ( localize(9626, 'Glob that the notebook is disabled for.'))
69
+ type: "string",
70
+ description: ( localize(9946, "Glob that the notebook is disabled for."))
63
71
  }
64
72
  }
65
73
  }
66
74
  },
67
75
  [NotebookEditorContribution.priority]: {
68
- type: 'string',
76
+ type: "string",
69
77
  markdownDeprecationMessage: ( localize(
70
- 9627,
71
- 'Controls if the custom editor is enabled automatically when the user opens a file. This may be overridden by users using the `workbench.editorAssociations` setting.'
78
+ 9947,
79
+ "Controls if the custom editor is enabled automatically when the user opens a file. This may be overridden by users using the `workbench.editorAssociations` setting."
72
80
  )),
73
- enum: [
74
- NotebookEditorPriority.default,
75
- NotebookEditorPriority.option,
76
- ],
77
- markdownEnumDescriptions: [
78
- ( localize(
79
- 9628,
80
- 'The editor is automatically used when the user opens a resource, provided that no other default custom editors are registered for that resource.'
81
- )),
82
- ( localize(
83
- 9629,
84
- 'The editor is not automatically used when the user opens a resource, but a user can switch to the editor using the `Reopen With` command.'
85
- )),
86
- ],
87
- default: 'default'
81
+ enum: [NotebookEditorPriority.default, NotebookEditorPriority.option],
82
+ markdownEnumDescriptions: [( localize(
83
+ 9948,
84
+ "The editor is automatically used when the user opens a resource, provided that no other default custom editors are registered for that resource."
85
+ )), ( localize(
86
+ 9949,
87
+ "The editor is not automatically used when the user opens a resource, but a user can switch to the editor using the `Reopen With` command."
88
+ ))],
89
+ default: "default"
88
90
  }
89
91
  }
90
92
  }
91
93
  };
92
- const defaultRendererSnippet = ( Object.freeze({ id: '', displayName: '', mimeTypes: [''], entrypoint: '' }));
94
+ const defaultRendererSnippet = ( Object.freeze({
95
+ id: "",
96
+ displayName: "",
97
+ mimeTypes: [""],
98
+ entrypoint: ""
99
+ }));
93
100
  const notebookRendererContribution = {
94
- description: ( localize(9630, 'Contributes notebook output renderer provider.')),
95
- type: 'array',
96
- defaultSnippets: [{ body: [defaultRendererSnippet] }],
101
+ description: ( localize(9950, "Contributes notebook output renderer provider.")),
102
+ type: "array",
103
+ defaultSnippets: [{
104
+ body: [defaultRendererSnippet]
105
+ }],
97
106
  items: {
98
- defaultSnippets: [{ body: defaultRendererSnippet }],
99
- allOf: [
100
- {
101
- type: 'object',
102
- required: [
103
- NotebookRendererContribution.id,
104
- NotebookRendererContribution.displayName,
105
- ],
106
- properties: {
107
- [NotebookRendererContribution.id]: {
108
- type: 'string',
109
- description: ( localize(9631, 'Unique identifier of the notebook output renderer.')),
107
+ defaultSnippets: [{
108
+ body: defaultRendererSnippet
109
+ }],
110
+ allOf: [{
111
+ type: "object",
112
+ required: [NotebookRendererContribution.id, NotebookRendererContribution.displayName],
113
+ properties: {
114
+ [NotebookRendererContribution.id]: {
115
+ type: "string",
116
+ description: ( localize(9951, "Unique identifier of the notebook output renderer."))
117
+ },
118
+ [NotebookRendererContribution.displayName]: {
119
+ type: "string",
120
+ description: ( localize(9952, "Human readable name of the notebook output renderer."))
121
+ },
122
+ [NotebookRendererContribution.hardDependencies]: {
123
+ type: "array",
124
+ uniqueItems: true,
125
+ items: {
126
+ type: "string"
110
127
  },
111
- [NotebookRendererContribution.displayName]: {
112
- type: 'string',
113
- description: ( localize(9632, 'Human readable name of the notebook output renderer.')),
114
- },
115
- [NotebookRendererContribution.hardDependencies]: {
116
- type: 'array',
117
- uniqueItems: true,
118
- items: { type: 'string' },
119
- markdownDescription: ( localize(
120
- 9633,
121
- 'List of kernel dependencies the renderer requires. If any of the dependencies are present in the `NotebookKernel.preloads`, the renderer can be used.'
122
- )),
123
- },
124
- [NotebookRendererContribution.optionalDependencies]: {
125
- type: 'array',
126
- uniqueItems: true,
127
- items: { type: 'string' },
128
- markdownDescription: ( localize(
129
- 9634,
130
- 'List of soft kernel dependencies the renderer can make use of. If any of the dependencies are present in the `NotebookKernel.preloads`, the renderer will be preferred over renderers that don\'t interact with the kernel.'
131
- )),
132
- },
133
- [NotebookRendererContribution.requiresMessaging]: {
134
- default: 'never',
135
- enum: [
136
- 'always',
137
- 'optional',
138
- 'never',
139
- ],
140
- enumDescriptions: [
141
- ( localize(
142
- 9635,
143
- 'Messaging is required. The renderer will only be used when it\'s part of an extension that can be run in an extension host.'
144
- )),
145
- ( localize(
146
- 9636,
147
- 'The renderer is better with messaging available, but it\'s not requried.'
148
- )),
149
- ( localize(9637, 'The renderer does not require messaging.')),
150
- ],
151
- description: ( localize(
152
- 9638,
153
- 'Defines how and if the renderer needs to communicate with an extension host, via `createRendererMessaging`. Renderers with stronger messaging requirements may not work in all environments.'
154
- )),
128
+ markdownDescription: ( localize(
129
+ 9953,
130
+ "List of kernel dependencies the renderer requires. If any of the dependencies are present in the `NotebookKernel.preloads`, the renderer can be used."
131
+ ))
132
+ },
133
+ [NotebookRendererContribution.optionalDependencies]: {
134
+ type: "array",
135
+ uniqueItems: true,
136
+ items: {
137
+ type: "string"
155
138
  },
139
+ markdownDescription: ( localize(
140
+ 9954,
141
+ "List of soft kernel dependencies the renderer can make use of. If any of the dependencies are present in the `NotebookKernel.preloads`, the renderer will be preferred over renderers that don't interact with the kernel."
142
+ ))
143
+ },
144
+ [NotebookRendererContribution.requiresMessaging]: {
145
+ default: "never",
146
+ enum: ["always", "optional", "never"],
147
+ enumDescriptions: [( localize(
148
+ 9955,
149
+ "Messaging is required. The renderer will only be used when it's part of an extension that can be run in an extension host."
150
+ )), ( localize(
151
+ 9956,
152
+ "The renderer is better with messaging available, but it's not requried."
153
+ )), ( localize(9957, "The renderer does not require messaging."))],
154
+ description: ( localize(
155
+ 9958,
156
+ "Defines how and if the renderer needs to communicate with an extension host, via `createRendererMessaging`. Renderers with stronger messaging requirements may not work in all environments."
157
+ ))
156
158
  }
157
- },
158
- {
159
- oneOf: [
160
- {
161
- required: [
162
- NotebookRendererContribution.entrypoint,
163
- NotebookRendererContribution.mimeTypes,
164
- ],
165
- properties: {
166
- [NotebookRendererContribution.mimeTypes]: {
167
- type: 'array',
168
- description: ( localize(9639, 'Set of globs that the notebook is for.')),
169
- items: {
170
- type: 'string'
171
- }
172
- },
173
- [NotebookRendererContribution.entrypoint]: {
174
- description: ( localize(9640, 'File to load in the webview to render the extension.')),
175
- type: 'string',
176
- },
159
+ }
160
+ }, {
161
+ oneOf: [{
162
+ required: [
163
+ NotebookRendererContribution.entrypoint,
164
+ NotebookRendererContribution.mimeTypes
165
+ ],
166
+ properties: {
167
+ [NotebookRendererContribution.mimeTypes]: {
168
+ type: "array",
169
+ description: ( localize(9959, "Set of globs that the notebook is for.")),
170
+ items: {
171
+ type: "string"
177
172
  }
178
173
  },
179
- {
180
- required: [
181
- NotebookRendererContribution.entrypoint,
182
- ],
174
+ [NotebookRendererContribution.entrypoint]: {
175
+ description: ( localize(9960, "File to load in the webview to render the extension.")),
176
+ type: "string"
177
+ }
178
+ }
179
+ }, {
180
+ required: [NotebookRendererContribution.entrypoint],
181
+ properties: {
182
+ [NotebookRendererContribution.entrypoint]: {
183
+ description: ( localize(9960, "File to load in the webview to render the extension.")),
184
+ type: "object",
185
+ required: ["extends", "path"],
183
186
  properties: {
184
- [NotebookRendererContribution.entrypoint]: {
185
- description: ( localize(9640, 'File to load in the webview to render the extension.')),
186
- type: 'object',
187
- required: ['extends', 'path'],
188
- properties: {
189
- extends: {
190
- type: 'string',
191
- description: ( localize(9641, 'Existing renderer that this one extends.')),
192
- },
193
- path: {
194
- type: 'string',
195
- description: ( localize(9640, 'File to load in the webview to render the extension.')),
196
- },
197
- }
187
+ extends: {
188
+ type: "string",
189
+ description: ( localize(9961, "Existing renderer that this one extends."))
198
190
  },
191
+ path: {
192
+ type: "string",
193
+ description: ( localize(9960, "File to load in the webview to render the extension."))
194
+ }
199
195
  }
200
196
  }
201
- ]
202
- }
203
- ]
197
+ }
198
+ }]
199
+ }]
204
200
  }
205
201
  };
206
202
  const notebookPreloadContribution = {
207
- description: ( localize(9642, 'Contributes notebook preloads.')),
208
- type: 'array',
209
- defaultSnippets: [{ body: [{ type: '', entrypoint: '' }] }],
203
+ description: ( localize(9962, "Contributes notebook preloads.")),
204
+ type: "array",
205
+ defaultSnippets: [{
206
+ body: [{
207
+ type: "",
208
+ entrypoint: ""
209
+ }]
210
+ }],
210
211
  items: {
211
- type: 'object',
212
- required: [
213
- NotebookPreloadContribution.type,
214
- NotebookPreloadContribution.entrypoint
215
- ],
212
+ type: "object",
213
+ required: [NotebookPreloadContribution.type, NotebookPreloadContribution.entrypoint],
216
214
  properties: {
217
215
  [NotebookPreloadContribution.type]: {
218
- type: 'string',
219
- description: ( localize(9643, 'Type of the notebook.')),
216
+ type: "string",
217
+ description: ( localize(9963, "Type of the notebook."))
220
218
  },
221
219
  [NotebookPreloadContribution.entrypoint]: {
222
- type: 'string',
223
- description: ( localize(9644, 'Path to file loaded in the webview.')),
220
+ type: "string",
221
+ description: ( localize(9964, "Path to file loaded in the webview."))
224
222
  },
225
223
  [NotebookPreloadContribution.localResourceRoots]: {
226
- type: 'array',
227
- items: { type: 'string' },
224
+ type: "array",
225
+ items: {
226
+ type: "string"
227
+ },
228
228
  description: ( localize(
229
- 9645,
230
- 'Paths to additional resources that should be allowed in the webview.'
231
- )),
232
- },
229
+ 9965,
230
+ "Paths to additional resources that should be allowed in the webview."
231
+ ))
232
+ }
233
233
  }
234
234
  }
235
235
  };
236
236
  const notebooksExtensionPoint = ExtensionsRegistry.registerExtensionPoint({
237
- extensionPoint: 'notebooks',
237
+ extensionPoint: "notebooks",
238
238
  jsonSchema: notebookProviderContribution,
239
- activationEventsGenerator: function* (contribs) {
239
+ activationEventsGenerator: function*(contribs) {
240
240
  for (const contrib of contribs) {
241
241
  if (contrib.type) {
242
242
  yield `onNotebookSerializer:${contrib.type}`;
@@ -245,9 +245,9 @@ const notebooksExtensionPoint = ExtensionsRegistry.registerExtensionPoint({
245
245
  }
246
246
  });
247
247
  const notebookRendererExtensionPoint = ExtensionsRegistry.registerExtensionPoint({
248
- extensionPoint: 'notebookRenderer',
248
+ extensionPoint: "notebookRenderer",
249
249
  jsonSchema: notebookRendererContribution,
250
- activationEventsGenerator: function* (contribs) {
250
+ activationEventsGenerator: function*(contribs) {
251
251
  for (const contrib of contribs) {
252
252
  if (contrib.id) {
253
253
  yield `onRenderer:${contrib.id}`;
@@ -256,13 +256,13 @@ const notebookRendererExtensionPoint = ExtensionsRegistry.registerExtensionPoint
256
256
  }
257
257
  });
258
258
  const notebookPreloadExtensionPoint = ExtensionsRegistry.registerExtensionPoint({
259
- extensionPoint: 'notebookPreload',
260
- jsonSchema: notebookPreloadContribution,
259
+ extensionPoint: "notebookPreload",
260
+ jsonSchema: notebookPreloadContribution
261
261
  });
262
262
  class NotebooksDataRenderer extends Disposable {
263
263
  constructor() {
264
264
  super(...arguments);
265
- this.type = 'table';
265
+ this.type = "table";
266
266
  }
267
267
  shouldRender(manifest) {
268
268
  return !!manifest.contributes?.notebooks;
@@ -270,33 +270,31 @@ class NotebooksDataRenderer extends Disposable {
270
270
  render(manifest) {
271
271
  const contrib = manifest.contributes?.notebooks || [];
272
272
  if (!contrib.length) {
273
- return { data: { headers: [], rows: [] }, dispose: () => { } };
273
+ return {
274
+ data: {
275
+ headers: [],
276
+ rows: []
277
+ },
278
+ dispose: () => {}
279
+ };
274
280
  }
275
- const headers = [
276
- ( localize(9646, "ID")),
277
- ( localize(9647, "Name")),
278
- ];
279
- const rows = ( contrib
280
- .sort((a, b) => a.type.localeCompare(b.type))
281
- .map(notebook => {
282
- return [
283
- notebook.type,
284
- notebook.displayName
285
- ];
281
+ const headers = [( localize(9966, "ID")), ( localize(9967, "Name"))];
282
+ const rows = ( contrib.sort((a, b) => a.type.localeCompare(b.type)).map(notebook => {
283
+ return [notebook.type, notebook.displayName];
286
284
  }));
287
285
  return {
288
286
  data: {
289
287
  headers,
290
288
  rows
291
289
  },
292
- dispose: () => { }
290
+ dispose: () => {}
293
291
  };
294
292
  }
295
293
  }
296
294
  class NotebookRenderersDataRenderer extends Disposable {
297
295
  constructor() {
298
296
  super(...arguments);
299
- this.type = 'table';
297
+ this.type = "table";
300
298
  }
301
299
  shouldRender(manifest) {
302
300
  return !!manifest.contributes?.notebookRenderer;
@@ -304,44 +302,42 @@ class NotebookRenderersDataRenderer extends Disposable {
304
302
  render(manifest) {
305
303
  const contrib = manifest.contributes?.notebookRenderer || [];
306
304
  if (!contrib.length) {
307
- return { data: { headers: [], rows: [] }, dispose: () => { } };
305
+ return {
306
+ data: {
307
+ headers: [],
308
+ rows: []
309
+ },
310
+ dispose: () => {}
311
+ };
308
312
  }
309
- const headers = [
310
- ( localize(9648, "Name")),
311
- ( localize(9649, "Mimetypes")),
312
- ];
313
- const rows = ( contrib
314
- .sort((a, b) => a.displayName.localeCompare(b.displayName))
315
- .map(notebookRenderer => {
316
- return [
317
- notebookRenderer.displayName,
318
- notebookRenderer.mimeTypes.join(',')
319
- ];
313
+ const headers = [( localize(9968, "Name")), ( localize(9969, "Mimetypes"))];
314
+ const rows = ( contrib.sort((a, b) => a.displayName.localeCompare(b.displayName)).map(notebookRenderer => {
315
+ return [notebookRenderer.displayName, notebookRenderer.mimeTypes.join(",")];
320
316
  }));
321
317
  return {
322
318
  data: {
323
319
  headers,
324
320
  rows
325
321
  },
326
- dispose: () => { }
322
+ dispose: () => {}
327
323
  };
328
324
  }
329
325
  }
330
326
  ( Registry.as(Extensions.ExtensionFeaturesRegistry)).registerExtensionFeature({
331
- id: 'notebooks',
332
- label: ( localize(9650, "Notebooks")),
327
+ id: "notebooks",
328
+ label: ( localize(9970, "Notebooks")),
333
329
  access: {
334
330
  canToggle: false
335
331
  },
336
- renderer: ( new SyncDescriptor(NotebooksDataRenderer)),
332
+ renderer: ( new SyncDescriptor(NotebooksDataRenderer))
337
333
  });
338
334
  ( Registry.as(Extensions.ExtensionFeaturesRegistry)).registerExtensionFeature({
339
- id: 'notebookRenderer',
340
- label: ( localize(9651, "Notebook Renderers")),
335
+ id: "notebookRenderer",
336
+ label: ( localize(9971, "Notebook Renderers")),
341
337
  access: {
342
338
  canToggle: false
343
339
  },
344
- renderer: ( new SyncDescriptor(NotebookRenderersDataRenderer)),
340
+ renderer: ( new SyncDescriptor(NotebookRenderersDataRenderer))
345
341
  });
346
342
 
347
343
  export { notebookPreloadExtensionPoint, notebookRendererExtensionPoint, notebooksExtensionPoint };