Skip to content

Commit b197d77

Browse files
committed
moved more types not needed in common
Signed-off-by: Jonah Iden <[email protected]>
1 parent bb03411 commit b197d77

File tree

5 files changed

+29
-28
lines changed

5 files changed

+29
-28
lines changed

packages/notebook/src/browser/notebook-types.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,3 +164,9 @@ export interface CellPartialInternalMetadataEditByHandle {
164164
handle: number;
165165
internalMetadata: NullablePartialNotebookCellInternalMetadata;
166166
}
167+
168+
export interface NotebookCellOutputsSplice {
169+
start: number;
170+
deleteCount: number;
171+
newOutputs: CellOutput[];
172+
};

packages/notebook/src/browser/view-model/notebook-cell-model.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ import { ContextKeyChangeEvent } from '@theia/core/lib/browser/context-key-servi
2424
import { MonacoEditorModel } from '@theia/monaco/lib/browser/monaco-editor-model';
2525
import { MonacoTextModelService } from '@theia/monaco/lib/browser/monaco-text-model-service';
2626
import {
27-
CellInternalMetadataChangedEvent, CellKind, NotebookCellCollapseState, NotebookCellInternalMetadata,
28-
NotebookCellMetadata, NotebookCellOutputsSplice, CellOutput, CellData, CellOutputItem
27+
CellKind, NotebookCellCollapseState, NotebookCellInternalMetadata,
28+
NotebookCellMetadata, CellOutput, CellData, CellOutputItem
2929
} from '../../common';
30+
import { NotebookCellOutputsSplice } from '../notebook-types';
3031
import { NotebookCellOutputModel } from './notebook-cell-output-model';
3132

3233
export const NotebookCellModelFactory = Symbol('NotebookModelFactory');
@@ -51,6 +52,10 @@ interface NotebookCellContextManager {
5152
onDidChangeContext: Event<ContextKeyChangeEvent>;
5253
}
5354

55+
export interface CellInternalMetadataChangedEvent {
56+
readonly lastRunSuccessChanged?: boolean;
57+
}
58+
5459
export interface NotebookCell {
5560
readonly uri: URI;
5661
handle: number;

packages/notebook/src/common/notebook-common.ts

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
1515
// *****************************************************************************
1616

17-
import { CancellationToken, Command, Event, URI } from '@theia/core';
17+
import { Command, URI } from '@theia/core';
1818
import { MarkdownString } from '@theia/core/lib/common/markdown-rendering/markdown-string';
1919
import { BinaryBuffer } from '@theia/core/lib/common/buffer';
2020
import { UriComponents } from '@theia/core/lib/common/uri';
@@ -115,27 +115,6 @@ export interface NotebookContributionData {
115115
exclusive: boolean;
116116
}
117117

118-
export interface NotebookCellStatusBarItemList {
119-
items: NotebookCellStatusBarItem[];
120-
dispose?(): void;
121-
}
122-
123-
export interface NotebookCellStatusBarItemProvider {
124-
viewType: string;
125-
onDidChangeStatusBarItems?: Event<void>;
126-
provideCellStatusBarItems(uri: UriComponents, index: number, token: CancellationToken): Promise<NotebookCellStatusBarItemList | undefined>;
127-
}
128-
129-
export interface NotebookCellOutputsSplice {
130-
start: number /* start */;
131-
deleteCount: number /* delete count */;
132-
newOutputs: CellOutput[];
133-
};
134-
135-
export interface CellInternalMetadataChangedEvent {
136-
readonly lastRunSuccessChanged?: boolean;
137-
}
138-
139118
export interface NotebookCellTextModelSplice<T> {
140119
start: number,
141120
deleteCount: number,

packages/plugin-ext/src/main/browser/notebooks/notebooks-main.ts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
1515
// *****************************************************************************
1616

17-
import { CancellationToken, DisposableCollection, Emitter } from '@theia/core';
17+
import { CancellationToken, DisposableCollection, Emitter, Event } from '@theia/core';
1818
import { BinaryBuffer } from '@theia/core/lib/common/buffer';
19-
import { NotebookCellStatusBarItemList, NotebookCellStatusBarItemProvider, NotebookData, TransientOptions } from '@theia/notebook/lib/common';
19+
import { NotebookCellStatusBarItem, NotebookData, TransientOptions } from '@theia/notebook/lib/common';
2020
import { NotebookService } from '@theia/notebook/lib/browser';
2121
import { Disposable } from '@theia/plugin';
2222
import { MAIN_RPC_CONTEXT, NotebooksExt, NotebooksMain } from '../../../common';
@@ -25,6 +25,17 @@ import { NotebookDto } from './notebook-dto';
2525
import { UriComponents } from '@theia/core/lib/common/uri';
2626
import { HostedPluginSupport } from '../../../hosted/browser/hosted-plugin';
2727

28+
export interface NotebookCellStatusBarItemList {
29+
items: NotebookCellStatusBarItem[];
30+
dispose?(): void;
31+
}
32+
33+
export interface NotebookCellStatusBarItemProvider {
34+
viewType: string;
35+
onDidChangeStatusBarItems?: Event<void>;
36+
provideCellStatusBarItems(uri: UriComponents, index: number, token: CancellationToken): Promise<NotebookCellStatusBarItemList | undefined>;
37+
}
38+
2839
export class NotebooksMainImpl implements NotebooksMain {
2940

3041
private readonly disposables = new DisposableCollection();

packages/plugin-ext/src/main/browser/notebooks/renderers/cell-output-webview.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@
2020

2121
import * as React from '@theia/core/shared/react';
2222
import { inject, injectable, interfaces, postConstruct } from '@theia/core/shared/inversify';
23-
import { NotebookRendererMessagingService, CellOutputWebview, NotebookRendererRegistry, NotebookEditorWidgetService } from '@theia/notebook/lib/browser';
23+
import { NotebookRendererMessagingService, CellOutputWebview, NotebookRendererRegistry, NotebookEditorWidgetService, NotebookCellOutputsSplice } from '@theia/notebook/lib/browser';
2424
import { v4 } from 'uuid';
2525
import { NotebookCellModel } from '@theia/notebook/lib/browser/view-model/notebook-cell-model';
2626
import { WebviewWidget } from '../../webview/webview';
2727
import { Message, WidgetManager } from '@theia/core/lib/browser';
2828
import { outputWebviewPreload, PreloadContext } from './output-webview-internal';
2929
import { WorkspaceTrustService } from '@theia/workspace/lib/browser';
3030
import { ChangePreferredMimetypeMessage, FromWebviewMessage, OutputChangedMessage } from './webview-communication';
31-
import { CellUri, NotebookCellOutputsSplice } from '@theia/notebook/lib/common';
31+
import { CellUri } from '@theia/notebook/lib/common';
3232
import { Disposable, DisposableCollection, nls, QuickPickService } from '@theia/core';
3333
import { NotebookCellOutputModel } from '@theia/notebook/lib/browser/view-model/notebook-cell-output-model';
3434

0 commit comments

Comments
 (0)