@theia/plugin-ext 1.40.1 → 1.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/common/collections.d.ts +4 -0
- package/lib/common/collections.d.ts.map +1 -1
- package/lib/common/collections.js +17 -1
- package/lib/common/collections.js.map +1 -1
- package/lib/common/errors.d.ts +14 -0
- package/lib/common/errors.d.ts.map +1 -1
- package/lib/common/errors.js +17 -1
- package/lib/common/errors.js.map +1 -1
- package/lib/common/plugin-api-rpc.d.ts +286 -6
- package/lib/common/plugin-api-rpc.d.ts.map +1 -1
- package/lib/common/plugin-api-rpc.js +20 -1
- package/lib/common/plugin-api-rpc.js.map +1 -1
- package/lib/common/plugin-protocol.d.ts +27 -5
- package/lib/common/plugin-protocol.d.ts.map +1 -1
- package/lib/common/plugin-protocol.js.map +1 -1
- package/lib/hosted/browser/hosted-plugin.d.ts +5 -2
- package/lib/hosted/browser/hosted-plugin.d.ts.map +1 -1
- package/lib/hosted/browser/hosted-plugin.js +21 -12
- package/lib/hosted/browser/hosted-plugin.js.map +1 -1
- package/lib/hosted/node/hosted-plugin-deployer-handler.js +1 -1
- package/lib/hosted/node/hosted-plugin-deployer-handler.js.map +1 -1
- package/lib/hosted/node/plugin-reader.d.ts +1 -1
- package/lib/hosted/node/plugin-reader.d.ts.map +1 -1
- package/lib/hosted/node/plugin-reader.js +1 -1
- package/lib/hosted/node/plugin-reader.js.map +1 -1
- package/lib/hosted/node/scanners/grammars-reader.d.ts +1 -1
- package/lib/hosted/node/scanners/grammars-reader.d.ts.map +1 -1
- package/lib/hosted/node/scanners/grammars-reader.js +5 -5
- package/lib/hosted/node/scanners/grammars-reader.js.map +1 -1
- package/lib/hosted/node/scanners/scanner-theia.d.ts +6 -6
- package/lib/hosted/node/scanners/scanner-theia.d.ts.map +1 -1
- package/lib/hosted/node/scanners/scanner-theia.js +54 -41
- package/lib/hosted/node/scanners/scanner-theia.js.map +1 -1
- package/lib/main/browser/custom-editors/custom-editor-widget.d.ts +1 -1
- package/lib/main/browser/custom-editors/custom-editor-widget.d.ts.map +1 -1
- package/lib/main/browser/custom-editors/custom-editor-widget.js +1 -1
- package/lib/main/browser/custom-editors/custom-editor-widget.js.map +1 -1
- package/lib/main/browser/custom-editors/custom-editors-main.d.ts +1 -1
- package/lib/main/browser/custom-editors/custom-editors-main.d.ts.map +1 -1
- package/lib/main/browser/custom-editors/custom-editors-main.js +1 -1
- package/lib/main/browser/custom-editors/custom-editors-main.js.map +1 -1
- package/lib/main/browser/editors-and-documents-main.d.ts.map +1 -1
- package/lib/main/browser/editors-and-documents-main.js +1 -0
- package/lib/main/browser/editors-and-documents-main.js.map +1 -1
- package/lib/main/browser/languages-main.d.ts.map +1 -1
- package/lib/main/browser/languages-main.js +6 -4
- package/lib/main/browser/languages-main.js.map +1 -1
- package/lib/main/browser/main-context.d.ts.map +1 -1
- package/lib/main/browser/main-context.js +18 -0
- package/lib/main/browser/main-context.js.map +1 -1
- package/lib/main/browser/menus/menus-contribution-handler.d.ts.map +1 -1
- package/lib/main/browser/menus/menus-contribution-handler.js +6 -3
- package/lib/main/browser/menus/menus-contribution-handler.js.map +1 -1
- package/lib/main/browser/notebooks/notebook-documents-and-editors-main.d.ts +50 -0
- package/lib/main/browser/notebooks/notebook-documents-and-editors-main.d.ts.map +1 -0
- package/lib/main/browser/notebooks/notebook-documents-and-editors-main.js +189 -0
- package/lib/main/browser/notebooks/notebook-documents-and-editors-main.js.map +1 -0
- package/lib/main/browser/notebooks/notebook-documents-main.d.ts +22 -0
- package/lib/main/browser/notebooks/notebook-documents-main.d.ts.map +1 -0
- package/lib/main/browser/notebooks/notebook-documents-main.js +133 -0
- package/lib/main/browser/notebooks/notebook-documents-main.js.map +1 -0
- package/lib/main/browser/notebooks/notebook-dto.d.ts +15 -0
- package/lib/main/browser/notebooks/notebook-dto.d.ts.map +1 -0
- package/lib/main/browser/notebooks/notebook-dto.js +138 -0
- package/lib/main/browser/notebooks/notebook-dto.js.map +1 -0
- package/lib/main/browser/notebooks/notebook-editors-main.d.ts +20 -0
- package/lib/main/browser/notebooks/notebook-editors-main.d.ts.map +1 -0
- package/lib/main/browser/notebooks/notebook-editors-main.js +58 -0
- package/lib/main/browser/notebooks/notebook-editors-main.js.map +1 -0
- package/lib/main/browser/notebooks/notebook-kernels-main.d.ts +42 -0
- package/lib/main/browser/notebooks/notebook-kernels-main.d.ts.map +1 -0
- package/lib/main/browser/notebooks/notebook-kernels-main.js +230 -0
- package/lib/main/browser/notebooks/notebook-kernels-main.js.map +1 -0
- package/lib/main/browser/notebooks/notebook-renderers-main.d.ts +12 -0
- package/lib/main/browser/notebooks/notebook-renderers-main.d.ts.map +1 -0
- package/lib/main/browser/notebooks/notebook-renderers-main.js +39 -0
- package/lib/main/browser/notebooks/notebook-renderers-main.js.map +1 -0
- package/lib/main/browser/notebooks/notebooks-main.d.ts +20 -0
- package/lib/main/browser/notebooks/notebooks-main.d.ts.map +1 -0
- package/lib/main/browser/notebooks/notebooks-main.js +103 -0
- package/lib/main/browser/notebooks/notebooks-main.js.map +1 -0
- package/lib/main/browser/notebooks/renderers/cell-output-webview.d.ts +35 -0
- package/lib/main/browser/notebooks/renderers/cell-output-webview.d.ts.map +1 -0
- package/lib/main/browser/notebooks/renderers/cell-output-webview.js +204 -0
- package/lib/main/browser/notebooks/renderers/cell-output-webview.js.map +1 -0
- package/lib/main/browser/notebooks/renderers/output-webview-internal.d.ts +13 -0
- package/lib/main/browser/notebooks/renderers/output-webview-internal.d.ts.map +1 -0
- package/lib/main/browser/notebooks/renderers/output-webview-internal.js +375 -0
- package/lib/main/browser/notebooks/renderers/output-webview-internal.js.map +1 -0
- package/lib/main/browser/notebooks/renderers/webview-communication.d.ts +52 -0
- package/lib/main/browser/notebooks/renderers/webview-communication.d.ts.map +1 -0
- package/{src/typings/index.d.ts → lib/main/browser/notebooks/renderers/webview-communication.js} +8 -11
- package/lib/main/browser/notebooks/renderers/webview-communication.js.map +1 -0
- package/lib/main/browser/plugin-contribution-handler.d.ts +3 -0
- package/lib/main/browser/plugin-contribution-handler.d.ts.map +1 -1
- package/lib/main/browser/plugin-contribution-handler.js +31 -3
- package/lib/main/browser/plugin-contribution-handler.js.map +1 -1
- package/lib/main/browser/plugin-ext-frontend-module.d.ts.map +1 -1
- package/lib/main/browser/plugin-ext-frontend-module.js +3 -2
- package/lib/main/browser/plugin-ext-frontend-module.js.map +1 -1
- package/lib/main/browser/plugin-icon-theme-service.d.ts.map +1 -1
- package/lib/main/browser/plugin-icon-theme-service.js +6 -0
- package/lib/main/browser/plugin-icon-theme-service.js.map +1 -1
- package/lib/main/browser/plugin-shared-style.d.ts.map +1 -1
- package/lib/main/browser/plugin-shared-style.js +2 -1
- package/lib/main/browser/plugin-shared-style.js.map +1 -1
- package/lib/main/browser/tasks-main.js +2 -2
- package/lib/main/browser/tasks-main.js.map +1 -1
- package/lib/main/browser/terminal-main.d.ts +2 -2
- package/lib/main/browser/terminal-main.d.ts.map +1 -1
- package/lib/main/browser/terminal-main.js +4 -4
- package/lib/main/browser/terminal-main.js.map +1 -1
- package/lib/main/browser/view/tree-view-widget.d.ts +3 -1
- package/lib/main/browser/view/tree-view-widget.d.ts.map +1 -1
- package/lib/main/browser/view/tree-view-widget.js +32 -1
- package/lib/main/browser/view/tree-view-widget.js.map +1 -1
- package/lib/main/browser/view/tree-views-main.d.ts +2 -1
- package/lib/main/browser/view/tree-views-main.d.ts.map +1 -1
- package/lib/main/browser/view/tree-views-main.js +10 -0
- package/lib/main/browser/view/tree-views-main.js.map +1 -1
- package/lib/main/browser/webview/webview.d.ts +1 -0
- package/lib/main/browser/webview/webview.d.ts.map +1 -1
- package/lib/main/browser/webview/webview.js +5 -0
- package/lib/main/browser/webview/webview.js.map +1 -1
- package/lib/main/node/errors.spec.d.ts +2 -0
- package/lib/main/node/errors.spec.d.ts.map +1 -0
- package/lib/main/node/errors.spec.js +36 -0
- package/lib/main/node/errors.spec.js.map +1 -0
- package/lib/main/node/handlers/plugin-theia-directory-handler.d.ts +5 -2
- package/lib/main/node/handlers/plugin-theia-directory-handler.d.ts.map +1 -1
- package/lib/main/node/handlers/plugin-theia-directory-handler.js +14 -8
- package/lib/main/node/handlers/plugin-theia-directory-handler.js.map +1 -1
- package/lib/main/node/handlers/plugin-theia-file-handler.d.ts +2 -1
- package/lib/main/node/handlers/plugin-theia-file-handler.d.ts.map +1 -1
- package/lib/main/node/handlers/plugin-theia-file-handler.js +13 -5
- package/lib/main/node/handlers/plugin-theia-file-handler.js.map +1 -1
- package/lib/main/node/paths/plugin-paths-service.d.ts.map +1 -1
- package/lib/main/node/paths/plugin-paths-service.js +4 -9
- package/lib/main/node/paths/plugin-paths-service.js.map +1 -1
- package/lib/main/node/plugin-deployer-directory-handler-context-impl.js +8 -8
- package/lib/main/node/plugin-deployer-directory-handler-context-impl.js.map +1 -1
- package/lib/main/node/plugin-deployer-entry-impl.d.ts +2 -2
- package/lib/main/node/plugin-deployer-entry-impl.d.ts.map +1 -1
- package/lib/main/node/plugin-deployer-entry-impl.js +9 -7
- package/lib/main/node/plugin-deployer-entry-impl.js.map +1 -1
- package/lib/main/node/plugin-deployer-impl.d.ts +2 -2
- package/lib/main/node/plugin-deployer-impl.d.ts.map +1 -1
- package/lib/main/node/plugin-deployer-impl.js +16 -24
- package/lib/main/node/plugin-deployer-impl.js.map +1 -1
- package/lib/main/node/plugin-deployer-proxy-entry-impl.d.ts +2 -2
- package/lib/main/node/plugin-deployer-proxy-entry-impl.d.ts.map +1 -1
- package/lib/main/node/plugin-ext-backend-module.js +3 -3
- package/lib/main/node/plugin-ext-backend-module.js.map +1 -1
- package/lib/main/node/plugin-github-resolver.d.ts.map +1 -1
- package/lib/main/node/plugin-github-resolver.js +14 -6
- package/lib/main/node/plugin-github-resolver.js.map +1 -1
- package/lib/main/node/plugin-http-resolver.d.ts.map +1 -1
- package/lib/main/node/plugin-http-resolver.js +14 -6
- package/lib/main/node/plugin-http-resolver.js.map +1 -1
- package/lib/main/node/{plugin-localization-backend-contribution.d.ts → plugin-localization-server.d.ts} +3 -3
- package/lib/main/node/plugin-localization-server.d.ts.map +1 -0
- package/lib/main/node/{plugin-localization-backend-contribution.js → plugin-localization-server.js} +8 -8
- package/lib/main/node/plugin-localization-server.js.map +1 -0
- package/lib/main/node/temp-dir-util.d.ts +1 -0
- package/lib/main/node/temp-dir-util.d.ts.map +1 -1
- package/lib/main/node/temp-dir-util.js +12 -3
- package/lib/main/node/temp-dir-util.js.map +1 -1
- package/lib/plugin/editors-and-documents.d.ts +1 -1
- package/lib/plugin/editors-and-documents.d.ts.map +1 -1
- package/lib/plugin/editors-and-documents.js +1 -1
- package/lib/plugin/editors-and-documents.js.map +1 -1
- package/lib/plugin/notebook/notebook-document.d.ts +62 -0
- package/lib/plugin/notebook/notebook-document.d.ts.map +1 -0
- package/lib/plugin/notebook/notebook-document.js +373 -0
- package/lib/plugin/notebook/notebook-document.js.map +1 -0
- package/lib/plugin/notebook/notebook-documents.d.ts +17 -0
- package/lib/plugin/notebook/notebook-documents.d.ts.map +1 -0
- package/lib/plugin/notebook/notebook-documents.js +48 -0
- package/lib/plugin/notebook/notebook-documents.js.map +1 -0
- package/lib/plugin/notebook/notebook-editor.d.ts +21 -0
- package/lib/plugin/notebook/notebook-editor.d.ts.map +1 -0
- package/lib/plugin/notebook/notebook-editor.js +99 -0
- package/lib/plugin/notebook/notebook-editor.js.map +1 -0
- package/lib/plugin/notebook/notebook-editors.d.ts +14 -0
- package/lib/plugin/notebook/notebook-editors.d.ts.map +1 -0
- package/lib/plugin/notebook/notebook-editors.js +65 -0
- package/lib/plugin/notebook/notebook-editors.js.map +1 -0
- package/lib/plugin/notebook/notebook-kernels.d.ts +37 -0
- package/lib/plugin/notebook/notebook-kernels.d.ts.map +1 -0
- package/lib/plugin/notebook/notebook-kernels.js +516 -0
- package/lib/plugin/notebook/notebook-kernels.js.map +1 -0
- package/lib/plugin/notebook/notebook-renderers.d.ts +14 -0
- package/lib/plugin/notebook/notebook-renderers.d.ts.map +1 -0
- package/lib/plugin/notebook/notebook-renderers.js +63 -0
- package/lib/plugin/notebook/notebook-renderers.js.map +1 -0
- package/lib/plugin/notebook/notebooks.d.ts +57 -0
- package/lib/plugin/notebook/notebooks.d.ts.map +1 -0
- package/lib/plugin/notebook/notebooks.js +295 -0
- package/lib/plugin/notebook/notebooks.js.map +1 -0
- package/lib/plugin/plugin-context.d.ts +2 -2
- package/lib/plugin/plugin-context.d.ts.map +1 -1
- package/lib/plugin/plugin-context.js +80 -59
- package/lib/plugin/plugin-context.js.map +1 -1
- package/lib/plugin/plugin-manager.d.ts +2 -0
- package/lib/plugin/plugin-manager.d.ts.map +1 -1
- package/lib/plugin/plugin-manager.js +9 -1
- package/lib/plugin/plugin-manager.js.map +1 -1
- package/lib/plugin/quick-open.d.ts.map +1 -1
- package/lib/plugin/quick-open.js +1 -0
- package/lib/plugin/quick-open.js.map +1 -1
- package/lib/plugin/stubs/tests-api.d.ts +1 -0
- package/lib/plugin/stubs/tests-api.d.ts.map +1 -1
- package/lib/plugin/stubs/tests-api.js +3 -1
- package/lib/plugin/stubs/tests-api.js.map +1 -1
- package/lib/plugin/tasks/task-provider.d.ts +2 -2
- package/lib/plugin/tasks/task-provider.d.ts.map +1 -1
- package/lib/plugin/tasks/task-provider.js +7 -10
- package/lib/plugin/tasks/task-provider.js.map +1 -1
- package/lib/plugin/tasks/tasks.d.ts +3 -2
- package/lib/plugin/tasks/tasks.d.ts.map +1 -1
- package/lib/plugin/tasks/tasks.js +18 -13
- package/lib/plugin/tasks/tasks.js.map +1 -1
- package/lib/plugin/terminal-ext.d.ts +3 -0
- package/lib/plugin/terminal-ext.d.ts.map +1 -1
- package/lib/plugin/terminal-ext.js +11 -1
- package/lib/plugin/terminal-ext.js.map +1 -1
- package/lib/plugin/tree/tree-views.d.ts +15 -5
- package/lib/plugin/tree/tree-views.d.ts.map +1 -1
- package/lib/plugin/tree/tree-views.js +52 -3
- package/lib/plugin/tree/tree-views.js.map +1 -1
- package/lib/plugin/type-converters.d.ts +60 -0
- package/lib/plugin/type-converters.d.ts.map +1 -1
- package/lib/plugin/type-converters.js +374 -14
- package/lib/plugin/type-converters.js.map +1 -1
- package/lib/plugin/types-impl.d.ts +68 -29
- package/lib/plugin/types-impl.d.ts.map +1 -1
- package/lib/plugin/types-impl.js +123 -44
- package/lib/plugin/types-impl.js.map +1 -1
- package/package.json +31 -29
- package/src/common/collections.ts +17 -0
- package/src/common/errors.ts +26 -0
- package/src/common/plugin-api-rpc.ts +340 -5
- package/src/common/plugin-protocol.ts +23 -5
- package/src/hosted/browser/hosted-plugin.ts +21 -14
- package/src/hosted/node/hosted-plugin-deployer-handler.ts +1 -1
- package/src/hosted/node/plugin-reader.ts +1 -1
- package/src/hosted/node/scanners/grammars-reader.ts +6 -5
- package/src/hosted/node/scanners/scanner-theia.ts +55 -41
- package/src/main/browser/custom-editors/custom-editor-widget.ts +1 -1
- package/src/main/browser/custom-editors/custom-editors-main.ts +1 -1
- package/src/main/browser/editors-and-documents-main.ts +1 -0
- package/src/main/browser/languages-main.ts +7 -4
- package/src/main/browser/main-context.ts +19 -0
- package/src/main/browser/menus/menus-contribution-handler.ts +7 -4
- package/src/main/browser/notebooks/notebook-documents-and-editors-main.ts +238 -0
- package/src/main/browser/notebooks/notebook-documents-main.ts +166 -0
- package/src/main/browser/notebooks/notebook-dto.ts +141 -0
- package/src/main/browser/notebooks/notebook-editors-main.ts +70 -0
- package/src/main/browser/notebooks/notebook-kernels-main.ts +291 -0
- package/src/main/browser/notebooks/notebook-renderers-main.ts +47 -0
- package/src/main/browser/notebooks/notebooks-main.ts +124 -0
- package/src/main/browser/notebooks/renderers/cell-output-webview.tsx +198 -0
- package/src/main/browser/notebooks/renderers/output-webview-internal.ts +476 -0
- package/src/main/browser/notebooks/renderers/webview-communication.ts +79 -0
- package/src/main/browser/plugin-contribution-handler.ts +36 -3
- package/src/main/browser/plugin-ext-frontend-module.ts +7 -3
- package/src/main/browser/plugin-icon-theme-service.ts +6 -0
- package/src/main/browser/plugin-shared-style.ts +2 -1
- package/src/main/browser/tasks-main.ts +4 -4
- package/src/main/browser/terminal-main.ts +5 -5
- package/src/main/browser/view/tree-view-widget.tsx +36 -2
- package/src/main/browser/view/tree-views-main.ts +8 -0
- package/src/main/browser/webview/webview.ts +6 -0
- package/src/main/node/errors.spec.ts +37 -0
- package/src/main/node/handlers/plugin-theia-directory-handler.ts +18 -8
- package/src/main/node/handlers/plugin-theia-file-handler.ts +18 -6
- package/src/main/node/paths/plugin-paths-service.ts +5 -10
- package/src/main/node/plugin-deployer-directory-handler-context-impl.ts +8 -8
- package/src/main/node/plugin-deployer-entry-impl.ts +9 -7
- package/src/main/node/plugin-deployer-impl.ts +20 -28
- package/src/main/node/plugin-deployer-proxy-entry-impl.ts +2 -2
- package/src/main/node/plugin-ext-backend-module.ts +3 -3
- package/src/main/node/plugin-github-resolver.ts +15 -8
- package/src/main/node/plugin-http-resolver.ts +15 -8
- package/src/main/node/{plugin-localization-backend-contribution.ts → plugin-localization-server.ts} +2 -2
- package/src/main/node/temp-dir-util.ts +11 -2
- package/src/plugin/editors-and-documents.ts +1 -1
- package/src/plugin/notebook/notebook-document.ts +438 -0
- package/src/plugin/notebook/notebook-documents.ts +58 -0
- package/src/plugin/notebook/notebook-editor.ts +116 -0
- package/src/plugin/notebook/notebook-editors.ts +71 -0
- package/src/plugin/notebook/notebook-kernels.ts +616 -0
- package/src/plugin/notebook/notebook-renderers.ts +72 -0
- package/src/plugin/notebook/notebooks.ts +385 -0
- package/src/plugin/plugin-context.ts +80 -71
- package/src/plugin/plugin-manager.ts +9 -1
- package/src/plugin/quick-open.ts +1 -0
- package/src/plugin/stubs/tests-api.ts +4 -0
- package/src/plugin/tasks/task-provider.ts +9 -12
- package/src/plugin/tasks/tasks.ts +18 -13
- package/src/plugin/terminal-ext.ts +13 -1
- package/src/plugin/tree/tree-views.ts +57 -7
- package/src/plugin/type-converters.ts +372 -13
- package/src/plugin/types-impl.ts +162 -58
- package/lib/main/browser/custom-editors/undo-redo-service.d.ts +0 -24
- package/lib/main/browser/custom-editors/undo-redo-service.d.ts.map +0 -1
- package/lib/main/browser/custom-editors/undo-redo-service.js +0 -111
- package/lib/main/browser/custom-editors/undo-redo-service.js.map +0 -1
- package/lib/main/node/plugin-localization-backend-contribution.d.ts.map +0 -1
- package/lib/main/node/plugin-localization-backend-contribution.js.map +0 -1
- package/src/main/browser/custom-editors/undo-redo-service.ts +0 -120
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
16
|
// *****************************************************************************
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.
|
|
19
|
-
exports.DataTransfer = exports.DataTransferItem = exports.InlayHintKind = exports.pluginToPluginInfo = exports.pathOrURIToURI = exports.ViewColumn = exports.ThemableDecorationAttachmentRenderOptions = exports.ThemableDecorationRenderOptions = exports.DecorationRangeBehavior = exports.DecorationRenderOptions = exports.convertToTransferQuickPickItems = exports.fromColorPresentation = exports.toColor = exports.fromColor = exports.fromFoldingRangeKind = exports.fromFoldingRange = exports.fromSelectionRange = exports.toSymbolInformation = exports.fromSymbolInformation = exports.getShellExecutionOptions = exports.getShellArgs = exports.getCustomExecution = exports.getShellExecution = exports.getProcessExecution = exports.fromCustomExecution = exports.fromShellExecution = exports.fromProcessExecution = exports.toTask = exports.fromTask = exports.toWorkspaceFolder = exports.toTypeHierarchyItem = exports.fromTypeHierarchyItem = exports.isModelTypeHierarchyItem = exports.toCallHierarchyOutgoingCall = exports.toCallHierarchyIncomingCall = exports.toCallHierarchyItem = void 0;
|
|
18
|
+
exports.fromHierarchyItem = exports.toLocation = exports.isModelCallHierarchyOutgoingCall = exports.isModelCallHierarchyIncomingCall = exports.isModelCallHierarchyItem = exports.isUriComponents = exports.isModelRange = exports.isModelLocation = exports.toSymbolTag = exports.fromSymbolTag = exports.toDocumentSymbol = exports.fromDocumentSymbol = exports.toCodeActionTriggerKind = exports.SymbolKind = exports.fromWorkspaceEdit = exports.SignatureHelp = exports.SignatureInformation = exports.ParameterInformation = exports.fromDocumentHighlight = exports.fromDocumentHighlightKind = exports.DocumentLink = exports.fromDefinitionLink = exports.fromTextDocumentShowOptions = exports.fromLocation = exports.toInlineValueContext = exports.fromInlineValue = exports.fromEvaluatableExpression = exports.fromHover = exports.convertCode = exports.convertDiagnosticToMarkerData = exports.fromTextEdit = exports.toCompletionItemKind = exports.fromCompletionItemKind = exports.fromGlobPattern = exports.fromDocumentSelector = exports.toMarkdown = exports.fromMarkdownOrString = exports.fromMarkdown = exports.fromManyMarkdown = exports.fromRangeOrRangeWithMessage = exports.isDecorationOptionsArr = exports.toPosition = exports.fromPosition = exports.fromRange = exports.toRange = exports.fromSelection = exports.toSelection = exports.toWebviewPanelShowOptions = exports.fromViewColumn = exports.toViewColumn = void 0;
|
|
19
|
+
exports.NotebookDto = exports.NotebookKernelSourceAction = exports.NotebookRange = exports.NotebookCellExecutionSummary = exports.NotebookCellOutputConverter = exports.NotebookCellOutputItem = exports.NotebookCellOutput = exports.NotebookCellKind = exports.NotebookCellData = exports.NotebookData = exports.NotebookStatusBarItem = exports.NotebookDocumentContentOptions = exports.DataTransfer = exports.DataTransferItem = exports.InlayHintKind = exports.pluginToPluginInfo = exports.pathOrURIToURI = exports.ViewColumn = exports.ThemableDecorationAttachmentRenderOptions = exports.ThemableDecorationRenderOptions = exports.DecorationRangeBehavior = exports.DecorationRenderOptions = exports.convertToTransferQuickPickItems = exports.fromColorPresentation = exports.toColor = exports.fromColor = exports.fromFoldingRangeKind = exports.fromFoldingRange = exports.fromSelectionRange = exports.toSymbolInformation = exports.fromSymbolInformation = exports.getShellExecutionOptions = exports.getShellArgs = exports.getCustomExecution = exports.getShellExecution = exports.getProcessExecution = exports.fromCustomExecution = exports.fromShellExecution = exports.fromProcessExecution = exports.toTask = exports.fromTask = exports.toWorkspaceFolder = exports.toTypeHierarchyItem = exports.fromTypeHierarchyItem = exports.isModelTypeHierarchyItem = exports.toCallHierarchyOutgoingCall = exports.toCallHierarchyIncomingCall = exports.toCallHierarchyItem = exports.fromCallHierarchyItem = void 0;
|
|
20
20
|
const lstypes = require("@theia/core/shared/vscode-languageserver-protocol");
|
|
21
21
|
const types_impl_1 = require("./types-impl");
|
|
22
22
|
const rpc = require("../common/plugin-api-rpc");
|
|
@@ -27,6 +27,9 @@ const types = require("./types-impl");
|
|
|
27
27
|
const arrays_1 = require("../common/arrays");
|
|
28
28
|
const markdown_rendering_1 = require("@theia/core/lib/common/markdown-rendering");
|
|
29
29
|
const common_1 = require("@theia/core/lib/common");
|
|
30
|
+
const notebooks = require("@theia/notebook/lib/common");
|
|
31
|
+
const buffer_1 = require("@theia/core/lib/common/buffer");
|
|
32
|
+
const common_2 = require("@theia/notebook/lib/common");
|
|
30
33
|
const SIDE_GROUP = -2;
|
|
31
34
|
const ACTIVE_GROUP = -1;
|
|
32
35
|
function toViewColumn(ep) {
|
|
@@ -196,6 +199,18 @@ function fromMarkdown(markup) {
|
|
|
196
199
|
}
|
|
197
200
|
}
|
|
198
201
|
exports.fromMarkdown = fromMarkdown;
|
|
202
|
+
function fromMarkdownOrString(value) {
|
|
203
|
+
if (value === undefined) {
|
|
204
|
+
return undefined;
|
|
205
|
+
}
|
|
206
|
+
else if (typeof value === 'string') {
|
|
207
|
+
return value;
|
|
208
|
+
}
|
|
209
|
+
else {
|
|
210
|
+
return fromMarkdown(value);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
exports.fromMarkdownOrString = fromMarkdownOrString;
|
|
199
214
|
function toMarkdown(value) {
|
|
200
215
|
const implemented = new markdown_string_1.MarkdownString(value.value, value.supportThemeIcons);
|
|
201
216
|
implemented.isTrusted = value.isTrusted;
|
|
@@ -567,28 +582,50 @@ function fromWorkspaceEdit(value, documents) {
|
|
|
567
582
|
edits: []
|
|
568
583
|
};
|
|
569
584
|
for (const entry of value._allEntries()) {
|
|
570
|
-
|
|
571
|
-
if (Array.isArray(uriOrEdits)) {
|
|
585
|
+
if ((entry === null || entry === void 0 ? void 0 : entry._type) === 2 /* Text */) {
|
|
572
586
|
// text edits
|
|
573
|
-
const doc = documents ? documents.getDocument(uri.toString()) : undefined;
|
|
587
|
+
const doc = documents ? documents.getDocument(entry.uri.toString()) : undefined;
|
|
574
588
|
const workspaceTextEditDto = {
|
|
575
|
-
resource: uri,
|
|
589
|
+
resource: entry.uri,
|
|
576
590
|
modelVersionId: doc === null || doc === void 0 ? void 0 : doc.version,
|
|
577
|
-
textEdit:
|
|
578
|
-
metadata: entry
|
|
591
|
+
textEdit: (entry.edit instanceof types.TextEdit) ? fromTextEdit(entry.edit) : fromSnippetTextEdit(entry.edit),
|
|
592
|
+
metadata: entry.metadata
|
|
579
593
|
};
|
|
580
594
|
result.edits.push(workspaceTextEditDto);
|
|
581
595
|
}
|
|
582
|
-
else {
|
|
596
|
+
else if ((entry === null || entry === void 0 ? void 0 : entry._type) === 1 /* File */) {
|
|
583
597
|
// resource edits
|
|
584
598
|
const workspaceFileEditDto = {
|
|
585
|
-
oldResource:
|
|
586
|
-
newResource:
|
|
587
|
-
options: entry
|
|
588
|
-
metadata: entry
|
|
599
|
+
oldResource: entry.from,
|
|
600
|
+
newResource: entry.to,
|
|
601
|
+
options: entry.options,
|
|
602
|
+
metadata: entry.metadata
|
|
589
603
|
};
|
|
590
604
|
result.edits.push(workspaceFileEditDto);
|
|
591
605
|
}
|
|
606
|
+
else if ((entry === null || entry === void 0 ? void 0 : entry._type) === 3 /* Cell */) {
|
|
607
|
+
// cell edit
|
|
608
|
+
if (entry.edit) {
|
|
609
|
+
result.edits.push({
|
|
610
|
+
metadata: entry.metadata,
|
|
611
|
+
resource: entry.uri,
|
|
612
|
+
cellEdit: entry.edit,
|
|
613
|
+
});
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
else if ((entry === null || entry === void 0 ? void 0 : entry._type) === 5 /* CellReplace */) {
|
|
617
|
+
// cell replace
|
|
618
|
+
result.edits.push({
|
|
619
|
+
metadata: entry.metadata,
|
|
620
|
+
resource: entry.uri,
|
|
621
|
+
cellEdit: {
|
|
622
|
+
editType: 1 /* Replace */,
|
|
623
|
+
index: entry.index,
|
|
624
|
+
count: entry.count,
|
|
625
|
+
cells: entry.cells.map(NotebookCellData.from)
|
|
626
|
+
}
|
|
627
|
+
});
|
|
628
|
+
}
|
|
592
629
|
}
|
|
593
630
|
return result;
|
|
594
631
|
}
|
|
@@ -1107,11 +1144,12 @@ function convertToTransferQuickPickItems(items) {
|
|
|
1107
1144
|
return { type: 'separator', label: item.label, handle: index };
|
|
1108
1145
|
}
|
|
1109
1146
|
else {
|
|
1110
|
-
const { label, description, detail, picked, alwaysShow, buttons } = item;
|
|
1147
|
+
const { label, description, iconPath, detail, picked, alwaysShow, buttons } = item;
|
|
1111
1148
|
return {
|
|
1112
1149
|
type: 'item',
|
|
1113
1150
|
label,
|
|
1114
1151
|
description,
|
|
1152
|
+
iconPath,
|
|
1115
1153
|
detail,
|
|
1116
1154
|
picked,
|
|
1117
1155
|
alwaysShow,
|
|
@@ -1321,4 +1359,326 @@ var DataTransfer;
|
|
|
1321
1359
|
}
|
|
1322
1360
|
DataTransfer.toDataTransfer = toDataTransfer;
|
|
1323
1361
|
})(DataTransfer = exports.DataTransfer || (exports.DataTransfer = {}));
|
|
1362
|
+
var NotebookDocumentContentOptions;
|
|
1363
|
+
(function (NotebookDocumentContentOptions) {
|
|
1364
|
+
function from(options) {
|
|
1365
|
+
var _a, _b, _c;
|
|
1366
|
+
return {
|
|
1367
|
+
transientOutputs: (_a = options === null || options === void 0 ? void 0 : options.transientOutputs) !== null && _a !== void 0 ? _a : false,
|
|
1368
|
+
transientCellMetadata: (_b = options === null || options === void 0 ? void 0 : options.transientCellMetadata) !== null && _b !== void 0 ? _b : {},
|
|
1369
|
+
transientDocumentMetadata: (_c = options === null || options === void 0 ? void 0 : options.transientDocumentMetadata) !== null && _c !== void 0 ? _c : {},
|
|
1370
|
+
};
|
|
1371
|
+
}
|
|
1372
|
+
NotebookDocumentContentOptions.from = from;
|
|
1373
|
+
})(NotebookDocumentContentOptions = exports.NotebookDocumentContentOptions || (exports.NotebookDocumentContentOptions = {}));
|
|
1374
|
+
var NotebookStatusBarItem;
|
|
1375
|
+
(function (NotebookStatusBarItem) {
|
|
1376
|
+
function from(item, commandsConverter, disposables) {
|
|
1377
|
+
const command = typeof item.command === 'string' ? { title: '', command: item.command } : item.command;
|
|
1378
|
+
return {
|
|
1379
|
+
alignment: item.alignment === types.NotebookCellStatusBarAlignment.Left ? 1 /* Left */ : 2 /* Right */,
|
|
1380
|
+
command: commandsConverter.toSafeCommand(command, disposables),
|
|
1381
|
+
text: item.text,
|
|
1382
|
+
tooltip: item.tooltip,
|
|
1383
|
+
priority: item.priority
|
|
1384
|
+
};
|
|
1385
|
+
}
|
|
1386
|
+
NotebookStatusBarItem.from = from;
|
|
1387
|
+
})(NotebookStatusBarItem = exports.NotebookStatusBarItem || (exports.NotebookStatusBarItem = {}));
|
|
1388
|
+
var NotebookData;
|
|
1389
|
+
(function (NotebookData) {
|
|
1390
|
+
function from(data) {
|
|
1391
|
+
var _a;
|
|
1392
|
+
const res = {
|
|
1393
|
+
metadata: (_a = data.metadata) !== null && _a !== void 0 ? _a : Object.create(null),
|
|
1394
|
+
cells: [],
|
|
1395
|
+
};
|
|
1396
|
+
for (const cell of data.cells) {
|
|
1397
|
+
// types.NotebookCellData.validate(cell);
|
|
1398
|
+
res.cells.push(NotebookCellData.from(cell));
|
|
1399
|
+
}
|
|
1400
|
+
return res;
|
|
1401
|
+
}
|
|
1402
|
+
NotebookData.from = from;
|
|
1403
|
+
function to(data) {
|
|
1404
|
+
const res = new types.NotebookData(data.cells.map(NotebookCellData.to));
|
|
1405
|
+
if (!(0, common_1.isEmptyObject)(data.metadata)) {
|
|
1406
|
+
res.metadata = data.metadata;
|
|
1407
|
+
}
|
|
1408
|
+
return res;
|
|
1409
|
+
}
|
|
1410
|
+
NotebookData.to = to;
|
|
1411
|
+
})(NotebookData = exports.NotebookData || (exports.NotebookData = {}));
|
|
1412
|
+
var NotebookCellData;
|
|
1413
|
+
(function (NotebookCellData) {
|
|
1414
|
+
function from(data) {
|
|
1415
|
+
return {
|
|
1416
|
+
cellKind: NotebookCellKind.from(data.kind),
|
|
1417
|
+
language: data.languageId,
|
|
1418
|
+
source: data.value,
|
|
1419
|
+
// metadata: data.metadata,
|
|
1420
|
+
// internalMetadata: NotebookCellExecutionSummary.from(data.executionSummary ?? {}),
|
|
1421
|
+
outputs: data.outputs ? data.outputs.map(NotebookCellOutputConverter.from) : []
|
|
1422
|
+
};
|
|
1423
|
+
}
|
|
1424
|
+
NotebookCellData.from = from;
|
|
1425
|
+
function to(data) {
|
|
1426
|
+
return new types.NotebookCellData(NotebookCellKind.to(data.cellKind), data.source, data.language, data.outputs ? data.outputs.map(NotebookCellOutput.to) : undefined, data.metadata, data.internalMetadata ? NotebookCellExecutionSummary.to(data.internalMetadata) : undefined);
|
|
1427
|
+
}
|
|
1428
|
+
NotebookCellData.to = to;
|
|
1429
|
+
})(NotebookCellData = exports.NotebookCellData || (exports.NotebookCellData = {}));
|
|
1430
|
+
var NotebookCellKind;
|
|
1431
|
+
(function (NotebookCellKind) {
|
|
1432
|
+
function from(data) {
|
|
1433
|
+
switch (data) {
|
|
1434
|
+
case types.NotebookCellKind.Markup:
|
|
1435
|
+
return notebooks.CellKind.Markup;
|
|
1436
|
+
case types.NotebookCellKind.Code:
|
|
1437
|
+
default:
|
|
1438
|
+
return notebooks.CellKind.Code;
|
|
1439
|
+
}
|
|
1440
|
+
}
|
|
1441
|
+
NotebookCellKind.from = from;
|
|
1442
|
+
function to(data) {
|
|
1443
|
+
switch (data) {
|
|
1444
|
+
case notebooks.CellKind.Markup:
|
|
1445
|
+
return types.NotebookCellKind.Markup;
|
|
1446
|
+
case notebooks.CellKind.Code:
|
|
1447
|
+
default:
|
|
1448
|
+
return types.NotebookCellKind.Code;
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1451
|
+
NotebookCellKind.to = to;
|
|
1452
|
+
})(NotebookCellKind = exports.NotebookCellKind || (exports.NotebookCellKind = {}));
|
|
1453
|
+
var NotebookCellOutput;
|
|
1454
|
+
(function (NotebookCellOutput) {
|
|
1455
|
+
function from(output) {
|
|
1456
|
+
return {
|
|
1457
|
+
outputId: output.outputId,
|
|
1458
|
+
items: output.items.map(NotebookCellOutputItem.from),
|
|
1459
|
+
metadata: output.metadata
|
|
1460
|
+
};
|
|
1461
|
+
}
|
|
1462
|
+
NotebookCellOutput.from = from;
|
|
1463
|
+
function to(output) {
|
|
1464
|
+
const items = output.items.map(NotebookCellOutputItem.to);
|
|
1465
|
+
return new types.NotebookCellOutput(items, output.outputId, output.metadata);
|
|
1466
|
+
}
|
|
1467
|
+
NotebookCellOutput.to = to;
|
|
1468
|
+
})(NotebookCellOutput = exports.NotebookCellOutput || (exports.NotebookCellOutput = {}));
|
|
1469
|
+
var NotebookCellOutputItem;
|
|
1470
|
+
(function (NotebookCellOutputItem) {
|
|
1471
|
+
function from(item) {
|
|
1472
|
+
return {
|
|
1473
|
+
mime: item.mime,
|
|
1474
|
+
valueBytes: buffer_1.BinaryBuffer.wrap(item.data),
|
|
1475
|
+
};
|
|
1476
|
+
}
|
|
1477
|
+
NotebookCellOutputItem.from = from;
|
|
1478
|
+
function to(item) {
|
|
1479
|
+
return new types.NotebookCellOutputItem(item.valueBytes.buffer, item.mime);
|
|
1480
|
+
}
|
|
1481
|
+
NotebookCellOutputItem.to = to;
|
|
1482
|
+
})(NotebookCellOutputItem = exports.NotebookCellOutputItem || (exports.NotebookCellOutputItem = {}));
|
|
1483
|
+
var NotebookCellOutputConverter;
|
|
1484
|
+
(function (NotebookCellOutputConverter) {
|
|
1485
|
+
function from(output) {
|
|
1486
|
+
return {
|
|
1487
|
+
outputId: output.outputId,
|
|
1488
|
+
items: output.items.map(NotebookCellOutputItem.from),
|
|
1489
|
+
metadata: output.metadata
|
|
1490
|
+
};
|
|
1491
|
+
}
|
|
1492
|
+
NotebookCellOutputConverter.from = from;
|
|
1493
|
+
function to(output) {
|
|
1494
|
+
const items = output.items.map(NotebookCellOutputItem.to);
|
|
1495
|
+
return new types.NotebookCellOutput(items, output.outputId, output.metadata);
|
|
1496
|
+
}
|
|
1497
|
+
NotebookCellOutputConverter.to = to;
|
|
1498
|
+
function ensureUniqueMimeTypes(items, warn = false) {
|
|
1499
|
+
const seen = new Set();
|
|
1500
|
+
const removeIdx = new Set();
|
|
1501
|
+
for (let i = 0; i < items.length; i++) {
|
|
1502
|
+
const item = items[i];
|
|
1503
|
+
// We can have multiple text stream mime types in the same output.
|
|
1504
|
+
if (!seen.has(item.mime) || (0, common_2.isTextStreamMime)(item.mime)) {
|
|
1505
|
+
seen.add(item.mime);
|
|
1506
|
+
continue;
|
|
1507
|
+
}
|
|
1508
|
+
// duplicated mime types... first has won
|
|
1509
|
+
removeIdx.add(i);
|
|
1510
|
+
if (warn) {
|
|
1511
|
+
console.warn(`DUPLICATED mime type '${item.mime}' will be dropped`);
|
|
1512
|
+
}
|
|
1513
|
+
}
|
|
1514
|
+
if (removeIdx.size === 0) {
|
|
1515
|
+
return items;
|
|
1516
|
+
}
|
|
1517
|
+
return items.filter((_, index) => !removeIdx.has(index));
|
|
1518
|
+
}
|
|
1519
|
+
NotebookCellOutputConverter.ensureUniqueMimeTypes = ensureUniqueMimeTypes;
|
|
1520
|
+
})(NotebookCellOutputConverter = exports.NotebookCellOutputConverter || (exports.NotebookCellOutputConverter = {}));
|
|
1521
|
+
var NotebookCellExecutionSummary;
|
|
1522
|
+
(function (NotebookCellExecutionSummary) {
|
|
1523
|
+
function to(data) {
|
|
1524
|
+
return {
|
|
1525
|
+
timing: typeof data.runStartTime === 'number' && typeof data.runEndTime === 'number' ? { startTime: data.runStartTime, endTime: data.runEndTime } : undefined,
|
|
1526
|
+
executionOrder: data.executionOrder,
|
|
1527
|
+
success: data.lastRunSuccess
|
|
1528
|
+
};
|
|
1529
|
+
}
|
|
1530
|
+
NotebookCellExecutionSummary.to = to;
|
|
1531
|
+
function from(data) {
|
|
1532
|
+
var _a, _b;
|
|
1533
|
+
return {
|
|
1534
|
+
lastRunSuccess: data.success,
|
|
1535
|
+
runStartTime: (_a = data.timing) === null || _a === void 0 ? void 0 : _a.startTime,
|
|
1536
|
+
runEndTime: (_b = data.timing) === null || _b === void 0 ? void 0 : _b.endTime,
|
|
1537
|
+
executionOrder: data.executionOrder
|
|
1538
|
+
};
|
|
1539
|
+
}
|
|
1540
|
+
NotebookCellExecutionSummary.from = from;
|
|
1541
|
+
})(NotebookCellExecutionSummary = exports.NotebookCellExecutionSummary || (exports.NotebookCellExecutionSummary = {}));
|
|
1542
|
+
var NotebookRange;
|
|
1543
|
+
(function (NotebookRange) {
|
|
1544
|
+
function from(range) {
|
|
1545
|
+
return { start: range.start, end: range.end };
|
|
1546
|
+
}
|
|
1547
|
+
NotebookRange.from = from;
|
|
1548
|
+
function to(range) {
|
|
1549
|
+
return new types.NotebookRange(range.start, range.end);
|
|
1550
|
+
}
|
|
1551
|
+
NotebookRange.to = to;
|
|
1552
|
+
})(NotebookRange = exports.NotebookRange || (exports.NotebookRange = {}));
|
|
1553
|
+
var NotebookKernelSourceAction;
|
|
1554
|
+
(function (NotebookKernelSourceAction) {
|
|
1555
|
+
function from(item, commandsConverter, disposables) {
|
|
1556
|
+
const command = typeof item.command === 'string' ? { title: '', command: item.command } : item.command;
|
|
1557
|
+
return {
|
|
1558
|
+
command: commandsConverter.toSafeCommand(command, disposables),
|
|
1559
|
+
label: item.label,
|
|
1560
|
+
description: item.description,
|
|
1561
|
+
detail: item.detail,
|
|
1562
|
+
documentation: item.documentation
|
|
1563
|
+
};
|
|
1564
|
+
}
|
|
1565
|
+
NotebookKernelSourceAction.from = from;
|
|
1566
|
+
})(NotebookKernelSourceAction = exports.NotebookKernelSourceAction || (exports.NotebookKernelSourceAction = {}));
|
|
1567
|
+
var NotebookDto;
|
|
1568
|
+
(function (NotebookDto) {
|
|
1569
|
+
function toNotebookOutputItemDto(item) {
|
|
1570
|
+
return {
|
|
1571
|
+
mime: item.mime,
|
|
1572
|
+
valueBytes: item.data
|
|
1573
|
+
};
|
|
1574
|
+
}
|
|
1575
|
+
NotebookDto.toNotebookOutputItemDto = toNotebookOutputItemDto;
|
|
1576
|
+
function toNotebookOutputDto(output) {
|
|
1577
|
+
return {
|
|
1578
|
+
outputId: output.outputId,
|
|
1579
|
+
metadata: output.metadata,
|
|
1580
|
+
items: output.outputs.map(toNotebookOutputItemDto)
|
|
1581
|
+
};
|
|
1582
|
+
}
|
|
1583
|
+
NotebookDto.toNotebookOutputDto = toNotebookOutputDto;
|
|
1584
|
+
function toNotebookCellDataDto(cell) {
|
|
1585
|
+
return {
|
|
1586
|
+
cellKind: cell.cellKind,
|
|
1587
|
+
language: cell.language,
|
|
1588
|
+
source: cell.source,
|
|
1589
|
+
internalMetadata: cell.internalMetadata,
|
|
1590
|
+
metadata: cell.metadata,
|
|
1591
|
+
outputs: cell.outputs.map(toNotebookOutputDto)
|
|
1592
|
+
};
|
|
1593
|
+
}
|
|
1594
|
+
NotebookDto.toNotebookCellDataDto = toNotebookCellDataDto;
|
|
1595
|
+
// export function toNotebookDataDto(data: NotebookData): rpc.NotebookDataDto {
|
|
1596
|
+
// return {
|
|
1597
|
+
// metadata: data.metadata,
|
|
1598
|
+
// cells: data.cells.map(toNotebookCellDataDto)
|
|
1599
|
+
// };
|
|
1600
|
+
// }
|
|
1601
|
+
function fromNotebookOutputItemDto(item) {
|
|
1602
|
+
return {
|
|
1603
|
+
mime: item.mime,
|
|
1604
|
+
data: item.valueBytes
|
|
1605
|
+
};
|
|
1606
|
+
}
|
|
1607
|
+
NotebookDto.fromNotebookOutputItemDto = fromNotebookOutputItemDto;
|
|
1608
|
+
function fromNotebookOutputDto(output) {
|
|
1609
|
+
return {
|
|
1610
|
+
outputId: output.outputId,
|
|
1611
|
+
metadata: output.metadata,
|
|
1612
|
+
outputs: output.items.map(fromNotebookOutputItemDto)
|
|
1613
|
+
};
|
|
1614
|
+
}
|
|
1615
|
+
NotebookDto.fromNotebookOutputDto = fromNotebookOutputDto;
|
|
1616
|
+
function fromNotebookCellDataDto(cell) {
|
|
1617
|
+
return {
|
|
1618
|
+
cellKind: cell.cellKind,
|
|
1619
|
+
language: cell.language,
|
|
1620
|
+
source: cell.source,
|
|
1621
|
+
outputs: cell.outputs.map(fromNotebookOutputDto),
|
|
1622
|
+
metadata: cell.metadata,
|
|
1623
|
+
internalMetadata: cell.internalMetadata
|
|
1624
|
+
};
|
|
1625
|
+
}
|
|
1626
|
+
NotebookDto.fromNotebookCellDataDto = fromNotebookCellDataDto;
|
|
1627
|
+
// export function fromNotebookDataDto(data: rpc.NotebookDataDto): NotebookData {
|
|
1628
|
+
// return {
|
|
1629
|
+
// metadata: data.metadata,
|
|
1630
|
+
// cells: data.cells.map(fromNotebookCellDataDto)
|
|
1631
|
+
// };
|
|
1632
|
+
// }
|
|
1633
|
+
// export function toNotebookCellDto(cell: Cell): rpc.NotebookCellDto {
|
|
1634
|
+
// return {
|
|
1635
|
+
// handle: cell.handle,
|
|
1636
|
+
// uri: cell.uri,
|
|
1637
|
+
// source: cell.textBuffer.getLinesContent(),
|
|
1638
|
+
// eol: cell.textBuffer.getEOL(),
|
|
1639
|
+
// language: cell.language,
|
|
1640
|
+
// cellKind: cell.cellKind,
|
|
1641
|
+
// outputs: cell.outputs.map(toNotebookOutputDto),
|
|
1642
|
+
// metadata: cell.metadata,
|
|
1643
|
+
// internalMetadata: cell.internalMetadata,
|
|
1644
|
+
// };
|
|
1645
|
+
// }
|
|
1646
|
+
function fromCellExecuteUpdateDto(data) {
|
|
1647
|
+
if (data.editType === common_2.CellExecutionUpdateType.Output) {
|
|
1648
|
+
return {
|
|
1649
|
+
editType: data.editType,
|
|
1650
|
+
cellHandle: data.cellHandle,
|
|
1651
|
+
append: data.append,
|
|
1652
|
+
outputs: data.outputs.map(fromNotebookOutputDto)
|
|
1653
|
+
};
|
|
1654
|
+
}
|
|
1655
|
+
else if (data.editType === common_2.CellExecutionUpdateType.OutputItems) {
|
|
1656
|
+
return {
|
|
1657
|
+
editType: data.editType,
|
|
1658
|
+
append: data.append,
|
|
1659
|
+
items: data.items.map(fromNotebookOutputItemDto)
|
|
1660
|
+
};
|
|
1661
|
+
}
|
|
1662
|
+
else {
|
|
1663
|
+
return data;
|
|
1664
|
+
}
|
|
1665
|
+
}
|
|
1666
|
+
NotebookDto.fromCellExecuteUpdateDto = fromCellExecuteUpdateDto;
|
|
1667
|
+
function fromCellExecuteCompleteDto(data) {
|
|
1668
|
+
return data;
|
|
1669
|
+
}
|
|
1670
|
+
NotebookDto.fromCellExecuteCompleteDto = fromCellExecuteCompleteDto;
|
|
1671
|
+
// export function fromCellEditOperationDto(edit: rpc.CellEditOperationDto): CellEditOperation {
|
|
1672
|
+
// if (edit.editType === CellEditType.Replace) {
|
|
1673
|
+
// return {
|
|
1674
|
+
// editType: edit.editType,
|
|
1675
|
+
// index: edit.index,
|
|
1676
|
+
// count: edit.count,
|
|
1677
|
+
// cells: edit.cells.map(fromNotebookCellDataDto)
|
|
1678
|
+
// };
|
|
1679
|
+
// } else {
|
|
1680
|
+
// return edit;
|
|
1681
|
+
// }
|
|
1682
|
+
// }
|
|
1683
|
+
})(NotebookDto = exports.NotebookDto || (exports.NotebookDto = {}));
|
|
1324
1684
|
//# sourceMappingURL=type-converters.js.map
|