@codingame/monaco-vscode-api 37.1.0 → 37.2.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/missing-services.js +6 -26
- package/package.json +8 -8
- package/services.d.ts +1 -1
- package/services.js +3 -3
- package/tools.d.ts +4 -0
- package/tools.js +24 -1
- package/vscode/src/vs/platform/product/common/product.js +1 -1
- package/vscode/src/vs/platform/webWorker/browser/webWorkerServiceImpl.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.d.ts +63 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.js +305 -0
- package/vscode/src/vs/workbench/api/common/extHost.protocol.d.ts +2 -2
- package/vscode/src/vs/workbench/api/common/extHostLanguageModelTools.js +1 -2
- package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +1 -1
- package/vscode/src/vs/workbench/browser/media/code-icon.svg +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatConstants.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatConstants.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsBanner.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsBanner.js +39 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/attachments/chatVariableEntries.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/attachments/chatVariables.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatImageBuffer.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatImageBuffer.js +29 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatService.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/customizationHarnessService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginRepositoryService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginRepositoryService.service.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginInstallService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginInstallService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.service.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginSource.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/requestParser/chatParserTypes.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/toolIds.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/toolIds.js +7 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookBrowser.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorInput.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionStateService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/AISearch/aiSearchModel.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/notebookSearch/notebookSearchModel.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/notebookSearch/notebookSearchModelBase.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/searchTreeModel/folderMatch.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/searchTreeModel/searchTreeCommon.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/searchView.js +4 -3
- package/vscode/src/vs/workbench/contrib/welcomeAgentSessions/browser/agentSessionsWelcomeInput.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/welcomeAgentSessions/browser/agentSessionsWelcomeInput.js +72 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedInput.d.ts +44 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedInput.js +96 -0
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/media/gettingStarted.css +1148 -0
- package/vscode/src/vs/workbench/contrib/welcomeOnboarding/common/onboardingTypes.d.ts +81 -0
- package/vscode/src/vs/workbench/contrib/welcomeOnboarding/common/onboardingTypes.js +97 -0
- package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.d.ts +32 -0
- package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.js +45 -0
- package/vscode/src/vs/platform/agentHost/common/agentHostEnablementService.d.ts +0 -7
- package/vscode/src/vs/platform/agentHost/common/agentHostEnablementService.js +0 -92
- package/vscode/src/vs/platform/layout/browser/zIndexRegistry.d.ts +0 -12
- package/vscode/src/vs/platform/layout/browser/zIndexRegistry.js +0 -64
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel.d.ts +0 -262
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel.js +0 -865
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatDynamicVariables.d.ts +0 -57
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatDynamicVariables.js +0 -311
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.d.ts +0 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.js +0 -80
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionDescription.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionDescription.js +0 -57
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +0 -231
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +0 -1850
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.d.ts +0 -109
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +0 -85
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.d.ts +0 -140
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.js +0 -186
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatDynamicVariablesConstant.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatDynamicVariablesConstant.js +0 -5
- package/vscode/src/vs/workbench/contrib/chat/common/attachments/chatVariables.d.ts +0 -46
- package/vscode/src/vs/workbench/contrib/chat/common/attachments/chatVariables.js +0 -17
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.d.ts +0 -253
- package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.js +0 -20
- package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.d.ts +0 -34
- package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.js +0 -194
- package/vscode/src/vs/workbench/contrib/chat/common/chatSelectedModel.d.ts +0 -87
- package/vscode/src/vs/workbench/contrib/chat/common/chatSelectedModel.js +0 -69
- package/vscode/src/vs/workbench/contrib/chat/common/customizationHarnessService.d.ts +0 -300
- package/vscode/src/vs/workbench/contrib/chat/common/customizationHarnessService.js +0 -272
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginEnablement.d.ts +0 -25
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginEnablement.js +0 -178
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +0 -78
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.js +0 -51
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.d.ts +0 -67
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.js +0 -195
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.d.ts +0 -67
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.js +0 -294
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +0 -212
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +0 -955
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/strictKnownMarketplaces.d.ts +0 -31
- package/vscode/src/vs/workbench/contrib/chat/common/plugins/strictKnownMarketplaces.js +0 -122
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.d.ts +0 -65
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.js +0 -697
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/config/config.d.ts +0 -150
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/config/config.js +0 -142
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.d.ts +0 -50
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.js +0 -77
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.d.ts +0 -77
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.js +0 -120
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.js +0 -23
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/extensionPromptFileService.d.ts +0 -92
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/extensionPromptFileService.js +0 -335
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +0 -235
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +0 -1673
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +0 -202
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +0 -872
- package/vscode/src/vs/workbench/contrib/chat/common/requestParser/chatRequestParser.d.ts +0 -35
- package/vscode/src/vs/workbench/contrib/chat/common/requestParser/chatRequestParser.js +0 -289
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/askQuestionsTool.d.ts +0 -72
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/askQuestionsTool.js +0 -600
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/confirmationTool.d.ts +0 -36
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/confirmationTool.js +0 -239
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/editFileTool.d.ts +0 -22
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/editFileTool.js +0 -143
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/manageTodoListTool.d.ts +0 -24
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/manageTodoListTool.js +0 -298
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/reviewPlanTool.d.ts +0 -25
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/reviewPlanTool.js +0 -177
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.d.ts +0 -73
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.js +0 -577
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactRulesTool.d.ts +0 -11
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactRulesTool.js +0 -90
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactsTool.d.ts +0 -16
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactsTool.js +0 -130
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/taskCompleteTool.d.ts +0 -12
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/taskCompleteTool.js +0 -53
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/toolHelpers.d.ts +0 -5
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/toolHelpers.js +0 -12
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/tools.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/tools.js +0 -92
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.d.ts +0 -38
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +0 -518
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsParametersSchema.d.ts +0 -6
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsParametersSchema.js +0 -231
- package/vscode/src/vs/workbench/contrib/chat/common/tools/terminalToolIds.d.ts +0 -20
- package/vscode/src/vs/workbench/contrib/chat/common/tools/terminalToolIds.js +0 -17
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOutputActions.d.ts +0 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOutputActions.js +0 -283
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/coreActions.d.ts +0 -91
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/coreActions.js +0 -340
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/foldingController.d.ts +0 -17
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/foldingController.js +0 -272
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebook.css +0 -686
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellChat.css +0 -348
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellEditorHint.css +0 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellInsertToolbar.css +0 -92
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellOutput.css +0 -119
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellStatusBar.css +0 -79
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellTitleToolbar.css +0 -61
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookChatEditController.css +0 -55
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookChatEditorOverlay.css +0 -63
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookDnd.css +0 -79
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookEditorStickyScroll.css +0 -63
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookFocusIndicator.css +0 -92
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookFolding.css +0 -79
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookKernelActionViewItem.css +0 -24
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookOutline.css +0 -61
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookToolbar.css +0 -102
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityProvider.d.ts +0 -27
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityProvider.js +0 -131
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookCellLayoutManager.d.ts +0 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookCellLayoutManager.js +0 -92
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.d.ts +0 -105
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.js +0 -673
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorExtensions.d.ts +0 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorExtensions.js +0 -37
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.d.ts +0 -354
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +0 -2926
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookIcons.d.ts +0 -29
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookIcons.js +0 -36
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookLogger.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookLogger.js +0 -19
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookOptions.d.ts +0 -200
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookOptions.js +0 -591
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookViewEvents.d.ts +0 -56
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookViewEvents.js +0 -30
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellPart.d.ts +0 -99
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellPart.js +0 -131
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView.d.ts +0 -30
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView.js +0 -115
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellComments.d.ts +0 -28
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellComments.js +0 -158
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys.d.ts +0 -40
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys.js +0 -183
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDecorations.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDecorations.js +0 -66
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDnd.d.ts +0 -52
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDnd.js +0 -429
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDragRenderer.d.ts +0 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDragRenderer.js +0 -108
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.d.ts +0 -36
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.js +0 -221
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellExecution.d.ts +0 -17
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellExecution.js +0 -142
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocus.d.ts +0 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocus.js +0 -23
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocusIndicator.d.ts +0 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocusIndicator.js +0 -104
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput.d.ts +0 -92
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput.js +0 -762
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellProgressBar.d.ts +0 -15
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellProgressBar.js +0 -58
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellStatusPart.d.ts +0 -36
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellStatusPart.js +0 -357
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbarStickyScroll.d.ts +0 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbarStickyScroll.js +0 -32
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.d.ts +0 -47
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.js +0 -260
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellWidgets.d.ts +0 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellWidgets.js +0 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatPart.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatPart.js +0 -24
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.d.ts +0 -182
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.js +0 -796
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon.d.ts +0 -13
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon.js +0 -79
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.d.ts +0 -30
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.js +0 -126
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellInput.d.ts +0 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellInput.js +0 -32
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellOutput.d.ts +0 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellOutput.js +0 -50
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint.d.ts +0 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint.js +0 -119
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/markupCell.d.ts +0 -57
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/markupCell.js +0 -443
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellAnchor.d.ts +0 -20
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellAnchor.js +0 -56
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellEditorPool.d.ts +0 -24
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellEditorPool.js +0 -121
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.d.ts +0 -152
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.js +0 -1288
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellListView.d.ts +0 -59
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellListView.js +0 -287
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookRenderingCommon.d.ts +0 -117
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookRenderingCommon.js +0 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.d.ts +0 -222
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.js +0 -1840
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.d.ts +0 -63
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.js +0 -449
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewMessages.d.ts +0 -432
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.d.ts +0 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.js +0 -2546
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewThemeMapping.d.ts +0 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewThemeMapping.js +0 -105
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.d.ts +0 -137
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.js +0 -646
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellEditorOptions.d.ts +0 -21
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellEditorOptions.js +0 -101
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellOutputTextHelper.d.ts +0 -13
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellOutputTextHelper.js +0 -111
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellOutputViewModel.d.ts +0 -30
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellOutputViewModel.js +0 -65
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellSelectionCollection.d.ts +0 -13
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellSelectionCollection.js +0 -49
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.d.ts +0 -89
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.js +0 -472
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/eventDispatcher.d.ts +0 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/eventDispatcher.js +0 -34
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/foldingModel.d.ts +0 -33
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/foldingModel.js +0 -275
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/markupCellViewModel.d.ts +0 -69
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/markupCellViewModel.js +0 -269
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModelImpl.d.ts +0 -125
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModelImpl.js +0 -958
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/viewContext.d.ts +0 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/viewContext.js +0 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookCellOverlays.d.ts +0 -20
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookCellOverlays.js +0 -101
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.d.ts +0 -65
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.js +0 -458
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar.d.ts +0 -80
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar.js +0 -708
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorWidgetContextKeys.d.ts +0 -37
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorWidgetContextKeys.js +0 -193
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookHorizontalTracker.d.ts +0 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookHorizontalTracker.js +0 -62
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelQuickPickStrategy.d.ts +0 -108
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelQuickPickStrategy.js +0 -717
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.d.ts +0 -23
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.js +0 -183
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookOverviewRuler.d.ts +0 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookOverviewRuler.js +0 -134
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookTopCellToolbar.d.ts +0 -20
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookTopCellToolbar.js +0 -135
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookViewZones.d.ts +0 -27
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookViewZones.js +0 -213
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellOutputTextModel.d.ts +0 -27
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellOutputTextModel.js +0 -104
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellTextModel.d.ts +0 -115
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellTextModel.js +0 -480
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.d.ts +0 -87
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.js +0 -352
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionStateService.d.ts +0 -81
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionStateService.js +0 -9
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookPerformance.d.ts +0 -10
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookPerformance.js +0 -19
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { IBaseCellEditorOptions } from "../notebookBrowser.js";
|
|
2
|
-
import { NotebookEventDispatcher } from "./eventDispatcher.js";
|
|
3
|
-
import { NotebookOptions } from "../notebookOptions.js";
|
|
4
|
-
export declare class ViewContext {
|
|
5
|
-
readonly notebookOptions: NotebookOptions;
|
|
6
|
-
readonly eventDispatcher: NotebookEventDispatcher;
|
|
7
|
-
readonly getBaseCellEditorOptions: (language: string) => IBaseCellEditorOptions;
|
|
8
|
-
constructor(notebookOptions: NotebookOptions, eventDispatcher: NotebookEventDispatcher, getBaseCellEditorOptions: (language: string) => IBaseCellEditorOptions);
|
|
9
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
class ViewContext {
|
|
4
|
-
constructor(notebookOptions, eventDispatcher, getBaseCellEditorOptions) {
|
|
5
|
-
this.notebookOptions = notebookOptions;
|
|
6
|
-
this.eventDispatcher = eventDispatcher;
|
|
7
|
-
this.getBaseCellEditorOptions = getBaseCellEditorOptions;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export { ViewContext };
|
package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookCellOverlays.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { FastDomNode } from "../../../../../base/browser/fastDomNode.js";
|
|
2
|
-
import { Disposable } from "../../../../../base/common/lifecycle.js";
|
|
3
|
-
import { INotebookCellOverlayChangeAccessor, INotebookViewCellsUpdateEvent } from "../notebookBrowser.js";
|
|
4
|
-
import { NotebookCellListView } from "../view/notebookCellListView.js";
|
|
5
|
-
import { CellViewModel } from "../viewModel/notebookViewModelImpl.js";
|
|
6
|
-
export declare class NotebookCellOverlays extends Disposable {
|
|
7
|
-
private readonly listView;
|
|
8
|
-
private _lastOverlayId;
|
|
9
|
-
domNode: FastDomNode<HTMLElement>;
|
|
10
|
-
private _overlays;
|
|
11
|
-
constructor(listView: NotebookCellListView<CellViewModel>);
|
|
12
|
-
changeCellOverlays(callback: (changeAccessor: INotebookCellOverlayChangeAccessor) => void): boolean;
|
|
13
|
-
onCellsChanged(e: INotebookViewCellsUpdateEvent): void;
|
|
14
|
-
onHiddenRangesChange(): void;
|
|
15
|
-
layout(): void;
|
|
16
|
-
private _addOverlay;
|
|
17
|
-
private _removeOverlay;
|
|
18
|
-
private _layoutOverlay;
|
|
19
|
-
private _isInHiddenRanges;
|
|
20
|
-
}
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { createElement } from '../../../../../base/browser/dom.js';
|
|
3
|
-
import { createFastDomNode } from '../../../../../base/browser/fastDomNode.js';
|
|
4
|
-
import { Disposable } from '../../../../../base/common/lifecycle.js';
|
|
5
|
-
|
|
6
|
-
class NotebookCellOverlays extends Disposable {
|
|
7
|
-
constructor(listView) {
|
|
8
|
-
super();
|
|
9
|
-
this.listView = listView;
|
|
10
|
-
this._lastOverlayId = 0;
|
|
11
|
-
this._overlays = Object.create(null);
|
|
12
|
-
this.domNode = createFastDomNode(createElement('div'));
|
|
13
|
-
this.domNode.setClassName('cell-overlays');
|
|
14
|
-
this.domNode.setPosition('absolute');
|
|
15
|
-
this.domNode.setAttribute('role', 'presentation');
|
|
16
|
-
this.domNode.setAttribute('aria-hidden', 'true');
|
|
17
|
-
this.domNode.setWidth('100%');
|
|
18
|
-
this.listView.containerDomNode.appendChild(this.domNode.domNode);
|
|
19
|
-
}
|
|
20
|
-
changeCellOverlays(callback) {
|
|
21
|
-
let overlaysHaveChanged = false;
|
|
22
|
-
const changeAccessor = {
|
|
23
|
-
addOverlay: (overlay) => {
|
|
24
|
-
overlaysHaveChanged = true;
|
|
25
|
-
return this._addOverlay(overlay);
|
|
26
|
-
},
|
|
27
|
-
removeOverlay: (id) => {
|
|
28
|
-
overlaysHaveChanged = true;
|
|
29
|
-
this._removeOverlay(id);
|
|
30
|
-
},
|
|
31
|
-
layoutOverlay: (id) => {
|
|
32
|
-
overlaysHaveChanged = true;
|
|
33
|
-
this._layoutOverlay(id);
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
callback(changeAccessor);
|
|
37
|
-
return overlaysHaveChanged;
|
|
38
|
-
}
|
|
39
|
-
onCellsChanged(e) {
|
|
40
|
-
this.layout();
|
|
41
|
-
}
|
|
42
|
-
onHiddenRangesChange() {
|
|
43
|
-
this.layout();
|
|
44
|
-
}
|
|
45
|
-
layout() {
|
|
46
|
-
for (const id in this._overlays) {
|
|
47
|
-
this._layoutOverlay(id);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
_addOverlay(overlay) {
|
|
51
|
-
const overlayId = `${++this._lastOverlayId}`;
|
|
52
|
-
const overlayWidget = {
|
|
53
|
-
overlayId,
|
|
54
|
-
overlay,
|
|
55
|
-
domNode: createFastDomNode(overlay.domNode)
|
|
56
|
-
};
|
|
57
|
-
this._overlays[overlayId] = overlayWidget;
|
|
58
|
-
overlayWidget.domNode.setClassName('cell-overlay');
|
|
59
|
-
overlayWidget.domNode.setPosition('absolute');
|
|
60
|
-
this.domNode.appendChild(overlayWidget.domNode);
|
|
61
|
-
return overlayId;
|
|
62
|
-
}
|
|
63
|
-
_removeOverlay(id) {
|
|
64
|
-
const overlay = this._overlays[id];
|
|
65
|
-
if (overlay) {
|
|
66
|
-
try {
|
|
67
|
-
this.domNode.removeChild(overlay.domNode);
|
|
68
|
-
}
|
|
69
|
-
catch {
|
|
70
|
-
}
|
|
71
|
-
delete this._overlays[id];
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
_layoutOverlay(id) {
|
|
75
|
-
const overlay = this._overlays[id];
|
|
76
|
-
if (!overlay) {
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
const isInHiddenRanges = this._isInHiddenRanges(overlay);
|
|
80
|
-
if (isInHiddenRanges) {
|
|
81
|
-
overlay.domNode.setDisplay('none');
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
overlay.domNode.setDisplay('block');
|
|
85
|
-
const index = this.listView.indexOf(overlay.overlay.cell);
|
|
86
|
-
if (index === -1) {
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
const top = this.listView.elementTop(index);
|
|
90
|
-
overlay.domNode.setTop(top);
|
|
91
|
-
}
|
|
92
|
-
_isInHiddenRanges(zone) {
|
|
93
|
-
const index = this.listView.indexOf(zone.overlay.cell);
|
|
94
|
-
if (index === -1) {
|
|
95
|
-
return true;
|
|
96
|
-
}
|
|
97
|
-
return false;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export { NotebookCellOverlays };
|
package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.d.ts
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { Event } from "../../../../../base/common/event.js";
|
|
2
|
-
import { Disposable } from "../../../../../base/common/lifecycle.js";
|
|
3
|
-
import { IContextMenuService } from "../../../../../platform/contextview/browser/contextView.service.js";
|
|
4
|
-
import { INotebookEditor } from "../notebookBrowser.js";
|
|
5
|
-
import { INotebookCellList } from "../view/notebookRenderingCommon.js";
|
|
6
|
-
import { OutlineEntry } from "@codingame/monaco-vscode-notebook-service-override/vscode/vs/workbench/contrib/notebook/browser/viewModel/OutlineEntry";
|
|
7
|
-
import { IInstantiationService } from "../../../../../platform/instantiation/common/instantiation.js";
|
|
8
|
-
export declare class NotebookStickyLine extends Disposable {
|
|
9
|
-
readonly element: HTMLElement;
|
|
10
|
-
readonly foldingIcon: StickyFoldingIcon;
|
|
11
|
-
readonly header: HTMLElement;
|
|
12
|
-
readonly entry: OutlineEntry;
|
|
13
|
-
readonly notebookEditor: INotebookEditor;
|
|
14
|
-
constructor(element: HTMLElement, foldingIcon: StickyFoldingIcon, header: HTMLElement, entry: OutlineEntry, notebookEditor: INotebookEditor);
|
|
15
|
-
private toggleFoldRange;
|
|
16
|
-
private focusCell;
|
|
17
|
-
static getParentCount(entry: OutlineEntry): number;
|
|
18
|
-
}
|
|
19
|
-
declare class StickyFoldingIcon {
|
|
20
|
-
isCollapsed: boolean;
|
|
21
|
-
dimension: number;
|
|
22
|
-
domNode: HTMLElement;
|
|
23
|
-
constructor(isCollapsed: boolean, dimension: number);
|
|
24
|
-
setVisible(visible: boolean): void;
|
|
25
|
-
}
|
|
26
|
-
export declare class NotebookStickyScroll extends Disposable {
|
|
27
|
-
private readonly domNode;
|
|
28
|
-
private readonly notebookEditor;
|
|
29
|
-
private readonly notebookCellList;
|
|
30
|
-
private readonly layoutFn;
|
|
31
|
-
private readonly _contextMenuService;
|
|
32
|
-
private readonly instantiationService;
|
|
33
|
-
private readonly _disposables;
|
|
34
|
-
private currentStickyLines;
|
|
35
|
-
private readonly _onDidChangeNotebookStickyScroll;
|
|
36
|
-
readonly onDidChangeNotebookStickyScroll: Event<number>;
|
|
37
|
-
private notebookCellOutlineReference?;
|
|
38
|
-
private readonly _layoutDisposableStore;
|
|
39
|
-
getDomNode(): HTMLElement;
|
|
40
|
-
getCurrentStickyHeight(): number;
|
|
41
|
-
private setCurrentStickyLines;
|
|
42
|
-
private compareStickyLineMaps;
|
|
43
|
-
constructor(domNode: HTMLElement, notebookEditor: INotebookEditor, notebookCellList: INotebookCellList, layoutFn: (delta: number) => void, _contextMenuService: IContextMenuService, instantiationService: IInstantiationService);
|
|
44
|
-
private onContextMenu;
|
|
45
|
-
private updateConfig;
|
|
46
|
-
private init;
|
|
47
|
-
private disposeStickyLineMap;
|
|
48
|
-
static getVisibleOutlineEntry(visibleIndex: number, notebookOutlineEntries: OutlineEntry[]): OutlineEntry | undefined;
|
|
49
|
-
private updateContent;
|
|
50
|
-
private updateDisplay;
|
|
51
|
-
static computeStickyHeight(entry: OutlineEntry): number;
|
|
52
|
-
static checkCollapsedStickyLines(entry: OutlineEntry | undefined, numLinesToRender: number, notebookEditor: INotebookEditor): Map<OutlineEntry, {
|
|
53
|
-
line: NotebookStickyLine;
|
|
54
|
-
rendered: boolean;
|
|
55
|
-
}>;
|
|
56
|
-
private renderStickyLines;
|
|
57
|
-
static createStickyElement(entry: OutlineEntry, notebookEditor: INotebookEditor): NotebookStickyLine;
|
|
58
|
-
private disposeCurrentStickyLines;
|
|
59
|
-
dispose(): void;
|
|
60
|
-
}
|
|
61
|
-
export declare function computeContent(notebookEditor: INotebookEditor, notebookCellList: INotebookCellList, notebookOutlineEntries: OutlineEntry[], renderedStickyHeight: number): Map<OutlineEntry, {
|
|
62
|
-
line: NotebookStickyLine;
|
|
63
|
-
rendered: boolean;
|
|
64
|
-
}>;
|
|
65
|
-
export {};
|
package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.js
DELETED
|
@@ -1,458 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { __decorate, __param } from '../../../../../../../../external/tslib/tslib.es6.js';
|
|
3
|
-
import { addDisposableListener, EventType, createElement, getWindow, clearNode, scheduleAtNextAnimationFrame } from '../../../../../base/browser/dom.js';
|
|
4
|
-
import '../../../../../base/browser/touch.js';
|
|
5
|
-
import { CancellationToken } from '../../../../../base/common/cancellation.js';
|
|
6
|
-
import { StandardMouseEvent } from '../../../../../base/browser/mouseEvent.js';
|
|
7
|
-
import { Emitter } from '../../../../../base/common/event.js';
|
|
8
|
-
import { Disposable, DisposableStore } from '../../../../../base/common/lifecycle.js';
|
|
9
|
-
import { MenuId } from '../../../../../platform/actions/common/actions.js';
|
|
10
|
-
import { IContextMenuService } from '../../../../../platform/contextview/browser/contextView.service.js';
|
|
11
|
-
import { CellFoldingState } from '../notebookBrowser.js';
|
|
12
|
-
import { CellKind } from '../../common/notebookCommon.js';
|
|
13
|
-
import { Delayer } from '../../../../../base/common/async.js';
|
|
14
|
-
import { ThemeIcon } from '../../../../../base/common/themables.js';
|
|
15
|
-
import { foldingCollapsedIcon, foldingExpandedIcon } from '../../../../../editor/contrib/folding/browser/foldingDecorations.js';
|
|
16
|
-
import { FoldingController } from '../controller/foldingController.js';
|
|
17
|
-
import { IInstantiationService } from '../../../../../platform/instantiation/common/instantiation.js';
|
|
18
|
-
import { INotebookCellOutlineDataSourceFactory } from '../viewModel/notebookOutlineDataSourceFactory.service.js';
|
|
19
|
-
|
|
20
|
-
var NotebookStickyScroll_1;
|
|
21
|
-
class NotebookStickyLine extends Disposable {
|
|
22
|
-
constructor(element, foldingIcon, header, entry, notebookEditor) {
|
|
23
|
-
super();
|
|
24
|
-
this.element = element;
|
|
25
|
-
this.foldingIcon = foldingIcon;
|
|
26
|
-
this.header = header;
|
|
27
|
-
this.entry = entry;
|
|
28
|
-
this.notebookEditor = notebookEditor;
|
|
29
|
-
this._register(
|
|
30
|
-
addDisposableListener(this.header, EventType.CLICK, () => {
|
|
31
|
-
this.focusCell();
|
|
32
|
-
})
|
|
33
|
-
);
|
|
34
|
-
this._register(addDisposableListener(
|
|
35
|
-
this.foldingIcon.domNode,
|
|
36
|
-
EventType.CLICK,
|
|
37
|
-
() => {
|
|
38
|
-
if (this.entry.cell.cellKind === CellKind.Markup) {
|
|
39
|
-
const currentFoldingState = this.entry.cell.foldingState;
|
|
40
|
-
this.toggleFoldRange(currentFoldingState);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
));
|
|
44
|
-
}
|
|
45
|
-
toggleFoldRange(currentState) {
|
|
46
|
-
const foldingController = this.notebookEditor.getContribution(FoldingController.id);
|
|
47
|
-
const index = this.entry.index;
|
|
48
|
-
const headerLevel = this.entry.level;
|
|
49
|
-
const newFoldingState = (currentState === CellFoldingState.Collapsed) ? CellFoldingState.Expanded : CellFoldingState.Collapsed;
|
|
50
|
-
foldingController.setFoldingStateDown(index, newFoldingState, headerLevel);
|
|
51
|
-
this.focusCell();
|
|
52
|
-
}
|
|
53
|
-
focusCell() {
|
|
54
|
-
this.notebookEditor.focusNotebookCell(this.entry.cell, "container");
|
|
55
|
-
const cellScrollTop = this.notebookEditor.getAbsoluteTopOfElement(this.entry.cell);
|
|
56
|
-
const parentCount = NotebookStickyLine.getParentCount(this.entry);
|
|
57
|
-
this.notebookEditor.setScrollTop(cellScrollTop - (parentCount + 1.1) * 22);
|
|
58
|
-
}
|
|
59
|
-
static getParentCount(entry) {
|
|
60
|
-
let count = 0;
|
|
61
|
-
while (entry.parent) {
|
|
62
|
-
count++;
|
|
63
|
-
entry = entry.parent;
|
|
64
|
-
}
|
|
65
|
-
return count;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
class StickyFoldingIcon {
|
|
69
|
-
constructor(isCollapsed, dimension) {
|
|
70
|
-
this.isCollapsed = isCollapsed;
|
|
71
|
-
this.dimension = dimension;
|
|
72
|
-
this.domNode = createElement("div");
|
|
73
|
-
this.domNode.style.width = `${dimension}px`;
|
|
74
|
-
this.domNode.style.height = `${dimension}px`;
|
|
75
|
-
this.domNode.className = ThemeIcon.asClassName(isCollapsed ? foldingCollapsedIcon : foldingExpandedIcon);
|
|
76
|
-
}
|
|
77
|
-
setVisible(visible) {
|
|
78
|
-
this.domNode.style.cursor = visible ? "pointer" : "default";
|
|
79
|
-
this.domNode.style.opacity = visible ? "1" : "0";
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
let NotebookStickyScroll = NotebookStickyScroll_1 = class NotebookStickyScroll extends Disposable {
|
|
83
|
-
getDomNode() {
|
|
84
|
-
return this.domNode;
|
|
85
|
-
}
|
|
86
|
-
getCurrentStickyHeight() {
|
|
87
|
-
let height = 0;
|
|
88
|
-
this.currentStickyLines.forEach(value => {
|
|
89
|
-
if (value.rendered) {
|
|
90
|
-
height += 22;
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
return height;
|
|
94
|
-
}
|
|
95
|
-
setCurrentStickyLines(newStickyLines) {
|
|
96
|
-
this.currentStickyLines = newStickyLines;
|
|
97
|
-
}
|
|
98
|
-
compareStickyLineMaps(mapA, mapB) {
|
|
99
|
-
if (mapA.size !== mapB.size) {
|
|
100
|
-
return false;
|
|
101
|
-
}
|
|
102
|
-
for (const [key, value] of mapA) {
|
|
103
|
-
const otherValue = mapB.get(key);
|
|
104
|
-
if (!otherValue || value.rendered !== otherValue.rendered) {
|
|
105
|
-
return false;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
return true;
|
|
109
|
-
}
|
|
110
|
-
constructor(
|
|
111
|
-
domNode,
|
|
112
|
-
notebookEditor,
|
|
113
|
-
notebookCellList,
|
|
114
|
-
layoutFn,
|
|
115
|
-
_contextMenuService,
|
|
116
|
-
instantiationService
|
|
117
|
-
) {
|
|
118
|
-
super();
|
|
119
|
-
this.domNode = domNode;
|
|
120
|
-
this.notebookEditor = notebookEditor;
|
|
121
|
-
this.notebookCellList = notebookCellList;
|
|
122
|
-
this.layoutFn = layoutFn;
|
|
123
|
-
this._contextMenuService = _contextMenuService;
|
|
124
|
-
this.instantiationService = instantiationService;
|
|
125
|
-
this._disposables = ( new DisposableStore());
|
|
126
|
-
this.currentStickyLines = ( new Map());
|
|
127
|
-
this._onDidChangeNotebookStickyScroll = this._register(( new Emitter()));
|
|
128
|
-
this.onDidChangeNotebookStickyScroll = this._onDidChangeNotebookStickyScroll.event;
|
|
129
|
-
this._layoutDisposableStore = this._register(( new DisposableStore()));
|
|
130
|
-
if (this.notebookEditor.notebookOptions.getDisplayOptions().stickyScrollEnabled) {
|
|
131
|
-
this.init().catch(console.error);
|
|
132
|
-
}
|
|
133
|
-
this._register(this.notebookEditor.notebookOptions.onDidChangeOptions(e => {
|
|
134
|
-
if (e.stickyScrollEnabled || e.stickyScrollMode) {
|
|
135
|
-
this.updateConfig(e);
|
|
136
|
-
}
|
|
137
|
-
}));
|
|
138
|
-
this._register(
|
|
139
|
-
addDisposableListener(this.domNode, EventType.CONTEXT_MENU, async event => {
|
|
140
|
-
this.onContextMenu(event);
|
|
141
|
-
})
|
|
142
|
-
);
|
|
143
|
-
this._register(addDisposableListener(this.domNode, EventType.WHEEL, event => {
|
|
144
|
-
this.notebookCellList.triggerScrollFromMouseWheelEvent(event);
|
|
145
|
-
}));
|
|
146
|
-
}
|
|
147
|
-
onContextMenu(e) {
|
|
148
|
-
const event = ( new StandardMouseEvent(getWindow(this.domNode), e));
|
|
149
|
-
const selectedElement = event.target.parentElement;
|
|
150
|
-
const selectedOutlineEntry = Array.from(( this.currentStickyLines.values())).find(entry => entry.line.element.contains(selectedElement))?.line.entry;
|
|
151
|
-
if (!selectedOutlineEntry) {
|
|
152
|
-
return;
|
|
153
|
-
}
|
|
154
|
-
const args = {
|
|
155
|
-
outlineEntry: selectedOutlineEntry,
|
|
156
|
-
notebookEditor: this.notebookEditor
|
|
157
|
-
};
|
|
158
|
-
this._contextMenuService.showContextMenu({
|
|
159
|
-
menuId: MenuId.NotebookStickyScrollContext,
|
|
160
|
-
getAnchor: () => event,
|
|
161
|
-
menuActionOptions: {
|
|
162
|
-
shouldForwardArgs: true,
|
|
163
|
-
arg: args,
|
|
164
|
-
renderShortTitle: true
|
|
165
|
-
}
|
|
166
|
-
});
|
|
167
|
-
}
|
|
168
|
-
updateConfig(e) {
|
|
169
|
-
if (e.stickyScrollEnabled) {
|
|
170
|
-
if (this.notebookEditor.notebookOptions.getDisplayOptions().stickyScrollEnabled) {
|
|
171
|
-
this.init().catch(console.error);
|
|
172
|
-
} else {
|
|
173
|
-
this._disposables.clear();
|
|
174
|
-
this.notebookCellOutlineReference?.dispose();
|
|
175
|
-
this.disposeCurrentStickyLines();
|
|
176
|
-
clearNode(this.domNode);
|
|
177
|
-
this.updateDisplay();
|
|
178
|
-
}
|
|
179
|
-
} else if (e.stickyScrollMode && this.notebookEditor.notebookOptions.getDisplayOptions().stickyScrollEnabled && this.notebookCellOutlineReference?.object) {
|
|
180
|
-
this.updateContent(computeContent(
|
|
181
|
-
this.notebookEditor,
|
|
182
|
-
this.notebookCellList,
|
|
183
|
-
this.notebookCellOutlineReference?.object?.entries,
|
|
184
|
-
this.getCurrentStickyHeight()
|
|
185
|
-
));
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
async init() {
|
|
189
|
-
const {
|
|
190
|
-
object: notebookCellOutline
|
|
191
|
-
} = this.notebookCellOutlineReference = this.instantiationService.invokeFunction(
|
|
192
|
-
accessor => accessor.get(INotebookCellOutlineDataSourceFactory).getOrCreate(this.notebookEditor)
|
|
193
|
-
);
|
|
194
|
-
this._register(this.notebookCellOutlineReference);
|
|
195
|
-
await notebookCellOutline.computeFullSymbols(CancellationToken.None);
|
|
196
|
-
const computed = computeContent(
|
|
197
|
-
this.notebookEditor,
|
|
198
|
-
this.notebookCellList,
|
|
199
|
-
notebookCellOutline.entries,
|
|
200
|
-
this.getCurrentStickyHeight()
|
|
201
|
-
);
|
|
202
|
-
this.updateContent(computed);
|
|
203
|
-
this._disposables.add(notebookCellOutline.onDidChange(() => {
|
|
204
|
-
const computed = computeContent(
|
|
205
|
-
this.notebookEditor,
|
|
206
|
-
this.notebookCellList,
|
|
207
|
-
notebookCellOutline.entries,
|
|
208
|
-
this.getCurrentStickyHeight()
|
|
209
|
-
);
|
|
210
|
-
if (!this.compareStickyLineMaps(computed, this.currentStickyLines)) {
|
|
211
|
-
this.updateContent(computed);
|
|
212
|
-
} else {
|
|
213
|
-
this.disposeStickyLineMap(computed);
|
|
214
|
-
}
|
|
215
|
-
}));
|
|
216
|
-
this._disposables.add(this.notebookEditor.onDidAttachViewModel(async () => {
|
|
217
|
-
await notebookCellOutline.computeFullSymbols(CancellationToken.None);
|
|
218
|
-
const computed = computeContent(
|
|
219
|
-
this.notebookEditor,
|
|
220
|
-
this.notebookCellList,
|
|
221
|
-
notebookCellOutline.entries,
|
|
222
|
-
this.getCurrentStickyHeight()
|
|
223
|
-
);
|
|
224
|
-
this.updateContent(computed);
|
|
225
|
-
}));
|
|
226
|
-
this._disposables.add(this.notebookEditor.onDidScroll(() => {
|
|
227
|
-
const d = ( new Delayer(100));
|
|
228
|
-
d.trigger(() => {
|
|
229
|
-
d.dispose();
|
|
230
|
-
const computed = computeContent(
|
|
231
|
-
this.notebookEditor,
|
|
232
|
-
this.notebookCellList,
|
|
233
|
-
notebookCellOutline.entries,
|
|
234
|
-
this.getCurrentStickyHeight()
|
|
235
|
-
);
|
|
236
|
-
if (!this.compareStickyLineMaps(computed, this.currentStickyLines)) {
|
|
237
|
-
this.updateContent(computed);
|
|
238
|
-
} else {
|
|
239
|
-
this.disposeStickyLineMap(computed);
|
|
240
|
-
}
|
|
241
|
-
});
|
|
242
|
-
}));
|
|
243
|
-
}
|
|
244
|
-
disposeStickyLineMap(map) {
|
|
245
|
-
map.forEach(value => {
|
|
246
|
-
if (value.line) {
|
|
247
|
-
value.line.dispose();
|
|
248
|
-
}
|
|
249
|
-
});
|
|
250
|
-
}
|
|
251
|
-
static getVisibleOutlineEntry(visibleIndex, notebookOutlineEntries) {
|
|
252
|
-
let left = 0;
|
|
253
|
-
let right = notebookOutlineEntries.length - 1;
|
|
254
|
-
while (left <= right) {
|
|
255
|
-
const mid = Math.floor((left + right) / 2);
|
|
256
|
-
if (notebookOutlineEntries[mid].index === visibleIndex) {
|
|
257
|
-
const rootEntry = notebookOutlineEntries[mid];
|
|
258
|
-
const flatList = [];
|
|
259
|
-
rootEntry.asFlatList(flatList);
|
|
260
|
-
return flatList.find(entry => entry.index === visibleIndex);
|
|
261
|
-
} else if (notebookOutlineEntries[mid].index < visibleIndex) {
|
|
262
|
-
left = mid + 1;
|
|
263
|
-
} else {
|
|
264
|
-
right = mid - 1;
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
if (right >= 0) {
|
|
268
|
-
const rootEntry = notebookOutlineEntries[right];
|
|
269
|
-
const flatList = [];
|
|
270
|
-
rootEntry.asFlatList(flatList);
|
|
271
|
-
return flatList.find(entry => entry.index === visibleIndex);
|
|
272
|
-
}
|
|
273
|
-
return undefined;
|
|
274
|
-
}
|
|
275
|
-
updateContent(newMap) {
|
|
276
|
-
clearNode(this.domNode);
|
|
277
|
-
this.disposeCurrentStickyLines();
|
|
278
|
-
this.renderStickyLines(newMap, this.domNode);
|
|
279
|
-
const oldStickyHeight = this.getCurrentStickyHeight();
|
|
280
|
-
this.setCurrentStickyLines(newMap);
|
|
281
|
-
const sizeDelta = this.getCurrentStickyHeight() - oldStickyHeight;
|
|
282
|
-
if (sizeDelta !== 0) {
|
|
283
|
-
this._onDidChangeNotebookStickyScroll.fire(sizeDelta);
|
|
284
|
-
const d = this._layoutDisposableStore.add(scheduleAtNextAnimationFrame(getWindow(this.getDomNode()), () => {
|
|
285
|
-
this.layoutFn(sizeDelta);
|
|
286
|
-
this.updateDisplay();
|
|
287
|
-
this._layoutDisposableStore.delete(d);
|
|
288
|
-
}));
|
|
289
|
-
} else {
|
|
290
|
-
this.updateDisplay();
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
updateDisplay() {
|
|
294
|
-
const hasSticky = this.getCurrentStickyHeight() > 0;
|
|
295
|
-
if (!hasSticky) {
|
|
296
|
-
this.domNode.style.display = "none";
|
|
297
|
-
} else {
|
|
298
|
-
this.domNode.style.display = "block";
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
static computeStickyHeight(entry) {
|
|
302
|
-
let height = 0;
|
|
303
|
-
if (entry.cell.cellKind === CellKind.Markup && entry.level < 7) {
|
|
304
|
-
height += 22;
|
|
305
|
-
}
|
|
306
|
-
while (entry.parent) {
|
|
307
|
-
height += 22;
|
|
308
|
-
entry = entry.parent;
|
|
309
|
-
}
|
|
310
|
-
return height;
|
|
311
|
-
}
|
|
312
|
-
static checkCollapsedStickyLines(entry, numLinesToRender, notebookEditor) {
|
|
313
|
-
let currentEntry = entry;
|
|
314
|
-
const newMap = ( new Map());
|
|
315
|
-
const elementsToRender = [];
|
|
316
|
-
while (currentEntry) {
|
|
317
|
-
if (currentEntry.level >= 7) {
|
|
318
|
-
currentEntry = currentEntry.parent;
|
|
319
|
-
continue;
|
|
320
|
-
}
|
|
321
|
-
const lineToRender = NotebookStickyScroll_1.createStickyElement(currentEntry, notebookEditor);
|
|
322
|
-
newMap.set(currentEntry, {
|
|
323
|
-
line: lineToRender,
|
|
324
|
-
rendered: false
|
|
325
|
-
});
|
|
326
|
-
elementsToRender.unshift(lineToRender);
|
|
327
|
-
currentEntry = currentEntry.parent;
|
|
328
|
-
}
|
|
329
|
-
for (let i = 0; i < elementsToRender.length; i++) {
|
|
330
|
-
if (i >= numLinesToRender) {
|
|
331
|
-
break;
|
|
332
|
-
}
|
|
333
|
-
newMap.set(elementsToRender[i].entry, {
|
|
334
|
-
line: elementsToRender[i],
|
|
335
|
-
rendered: true
|
|
336
|
-
});
|
|
337
|
-
}
|
|
338
|
-
return newMap;
|
|
339
|
-
}
|
|
340
|
-
renderStickyLines(stickyMap, containerElement) {
|
|
341
|
-
const reversedEntries = Array.from(stickyMap.entries()).reverse();
|
|
342
|
-
for (const [, value] of reversedEntries) {
|
|
343
|
-
if (!value.rendered) {
|
|
344
|
-
continue;
|
|
345
|
-
}
|
|
346
|
-
containerElement.append(value.line.element);
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
static createStickyElement(entry, notebookEditor) {
|
|
350
|
-
const stickyElement = createElement("div");
|
|
351
|
-
stickyElement.classList.add("notebook-sticky-scroll-element");
|
|
352
|
-
const indentMode = notebookEditor.notebookOptions.getLayoutConfiguration().stickyScrollMode;
|
|
353
|
-
if (indentMode === "indented") {
|
|
354
|
-
stickyElement.style.paddingLeft = NotebookStickyLine.getParentCount(entry) * 10 + "px";
|
|
355
|
-
}
|
|
356
|
-
let isCollapsed = false;
|
|
357
|
-
if (entry.cell.cellKind === CellKind.Markup) {
|
|
358
|
-
isCollapsed = entry.cell.foldingState === CellFoldingState.Collapsed;
|
|
359
|
-
}
|
|
360
|
-
const stickyFoldingIcon = ( new StickyFoldingIcon(isCollapsed, 16));
|
|
361
|
-
stickyFoldingIcon.domNode.classList.add("notebook-sticky-scroll-folding-icon");
|
|
362
|
-
stickyFoldingIcon.setVisible(true);
|
|
363
|
-
const stickyHeader = createElement("div");
|
|
364
|
-
stickyHeader.classList.add("notebook-sticky-scroll-header");
|
|
365
|
-
stickyHeader.innerText = entry.label;
|
|
366
|
-
stickyElement.append(stickyFoldingIcon.domNode, stickyHeader);
|
|
367
|
-
return ( new NotebookStickyLine(stickyElement, stickyFoldingIcon, stickyHeader, entry, notebookEditor));
|
|
368
|
-
}
|
|
369
|
-
disposeCurrentStickyLines() {
|
|
370
|
-
this.currentStickyLines.forEach(value => {
|
|
371
|
-
value.line.dispose();
|
|
372
|
-
});
|
|
373
|
-
}
|
|
374
|
-
dispose() {
|
|
375
|
-
this._disposables.dispose();
|
|
376
|
-
this.disposeCurrentStickyLines();
|
|
377
|
-
this.notebookCellOutlineReference?.dispose();
|
|
378
|
-
super.dispose();
|
|
379
|
-
}
|
|
380
|
-
};
|
|
381
|
-
NotebookStickyScroll = NotebookStickyScroll_1 = ( __decorate([( __param(4, IContextMenuService)), ( __param(5, IInstantiationService))], NotebookStickyScroll));
|
|
382
|
-
function computeContent(
|
|
383
|
-
notebookEditor,
|
|
384
|
-
notebookCellList,
|
|
385
|
-
notebookOutlineEntries,
|
|
386
|
-
renderedStickyHeight
|
|
387
|
-
) {
|
|
388
|
-
const editorScrollTop = notebookEditor.scrollTop - renderedStickyHeight;
|
|
389
|
-
const visibleRange = notebookEditor.visibleRanges[0];
|
|
390
|
-
if (!visibleRange) {
|
|
391
|
-
return ( new Map());
|
|
392
|
-
}
|
|
393
|
-
if (visibleRange.start === 0) {
|
|
394
|
-
const firstCell = notebookEditor.cellAt(0);
|
|
395
|
-
const firstCellEntry = NotebookStickyScroll.getVisibleOutlineEntry(0, notebookOutlineEntries);
|
|
396
|
-
if (firstCell && firstCellEntry && firstCell.cellKind === CellKind.Markup && firstCellEntry.level < 7) {
|
|
397
|
-
if (notebookEditor.scrollTop > 22) {
|
|
398
|
-
const newMap = NotebookStickyScroll.checkCollapsedStickyLines(firstCellEntry, 100, notebookEditor);
|
|
399
|
-
return newMap;
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
let cell;
|
|
404
|
-
let cellEntry;
|
|
405
|
-
const startIndex = visibleRange.start - 1;
|
|
406
|
-
for (let currentIndex = startIndex; currentIndex < visibleRange.end; currentIndex++) {
|
|
407
|
-
cell = notebookEditor.cellAt(currentIndex);
|
|
408
|
-
if (!cell) {
|
|
409
|
-
return ( new Map());
|
|
410
|
-
}
|
|
411
|
-
cellEntry = NotebookStickyScroll.getVisibleOutlineEntry(currentIndex, notebookOutlineEntries);
|
|
412
|
-
if (!cellEntry) {
|
|
413
|
-
continue;
|
|
414
|
-
}
|
|
415
|
-
const nextCell = notebookEditor.cellAt(currentIndex + 1);
|
|
416
|
-
if (!nextCell) {
|
|
417
|
-
const sectionBottom = notebookEditor.getLayoutInfo().scrollHeight;
|
|
418
|
-
const linesToRender = Math.floor(sectionBottom / 22);
|
|
419
|
-
const newMap = NotebookStickyScroll.checkCollapsedStickyLines(cellEntry, linesToRender, notebookEditor);
|
|
420
|
-
return newMap;
|
|
421
|
-
}
|
|
422
|
-
const nextCellEntry = NotebookStickyScroll.getVisibleOutlineEntry(currentIndex + 1, notebookOutlineEntries);
|
|
423
|
-
if (!nextCellEntry) {
|
|
424
|
-
continue;
|
|
425
|
-
}
|
|
426
|
-
if (nextCell.cellKind === CellKind.Markup && nextCellEntry.level < 7) {
|
|
427
|
-
const sectionBottom = notebookCellList.getCellViewScrollTop(nextCell);
|
|
428
|
-
const currentSectionStickyHeight = NotebookStickyScroll.computeStickyHeight(cellEntry);
|
|
429
|
-
const nextSectionStickyHeight = NotebookStickyScroll.computeStickyHeight(nextCellEntry);
|
|
430
|
-
if (editorScrollTop + currentSectionStickyHeight < sectionBottom) {
|
|
431
|
-
const linesToRender = Math.floor((sectionBottom - editorScrollTop) / 22);
|
|
432
|
-
const newMap = NotebookStickyScroll.checkCollapsedStickyLines(cellEntry, linesToRender, notebookEditor);
|
|
433
|
-
return newMap;
|
|
434
|
-
}
|
|
435
|
-
else if (nextSectionStickyHeight >= currentSectionStickyHeight) {
|
|
436
|
-
const newMap = NotebookStickyScroll.checkCollapsedStickyLines(nextCellEntry, 100, notebookEditor);
|
|
437
|
-
return newMap;
|
|
438
|
-
}
|
|
439
|
-
else if (nextSectionStickyHeight < currentSectionStickyHeight) {
|
|
440
|
-
const availableSpace = sectionBottom - editorScrollTop;
|
|
441
|
-
if (availableSpace >= nextSectionStickyHeight) {
|
|
442
|
-
const linesToRender = Math.floor(availableSpace / 22);
|
|
443
|
-
const newMap = NotebookStickyScroll.checkCollapsedStickyLines(cellEntry, linesToRender, notebookEditor);
|
|
444
|
-
return newMap;
|
|
445
|
-
} else {
|
|
446
|
-
const newMap = NotebookStickyScroll.checkCollapsedStickyLines(nextCellEntry, 100, notebookEditor);
|
|
447
|
-
return newMap;
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
const sectionBottom = notebookEditor.getLayoutInfo().scrollHeight;
|
|
453
|
-
const linesToRender = Math.floor((sectionBottom - editorScrollTop) / 22);
|
|
454
|
-
const newMap = NotebookStickyScroll.checkCollapsedStickyLines(cellEntry, linesToRender, notebookEditor);
|
|
455
|
-
return newMap;
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
export { NotebookStickyLine, NotebookStickyScroll, computeContent };
|