Skip to content

Commit d2144f1

Browse files
committed
Update vscode.proposed.d.ts
1 parent 6393821 commit d2144f1

File tree

1 file changed

+53
-1
lines changed

1 file changed

+53
-1
lines changed

vscode.proposed.d.ts

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1613,10 +1613,51 @@ declare module 'vscode' {
16131613
resolveKernel?(kernel: T, document: NotebookDocument, webview: NotebookCommunication, token: CancellationToken): ProviderResult<void>;
16141614
}
16151615

1616+
/**
1617+
* Represents the alignment of status bar items.
1618+
*/
1619+
export enum NotebookCellStatusBarAlignment {
1620+
1621+
/**
1622+
* Aligned to the left side.
1623+
*/
1624+
Left = 1,
1625+
1626+
/**
1627+
* Aligned to the right side.
1628+
*/
1629+
Right = 2
1630+
}
1631+
1632+
export interface NotebookCellStatusBarItem {
1633+
readonly cell: NotebookCell;
1634+
readonly alignment: NotebookCellStatusBarAlignment;
1635+
readonly priority?: number;
1636+
text: string;
1637+
tooltip: string | undefined;
1638+
command: string | Command | undefined;
1639+
accessibilityInformation?: AccessibilityInformation;
1640+
show(): void;
1641+
hide(): void;
1642+
dispose(): void;
1643+
}
1644+
16161645
export namespace notebook {
16171646
export function registerNotebookContentProvider(
16181647
notebookType: string,
1619-
provider: NotebookContentProvider
1648+
provider: NotebookContentProvider,
1649+
options?: {
1650+
/**
1651+
* Controls if outputs change will trigger notebook document content change and if it will be used in the diff editor
1652+
* Default to false. If the content provider doesn't persisit the outputs in the file document, this should be set to true.
1653+
*/
1654+
transientOutputs: boolean;
1655+
/**
1656+
* Controls if a meetadata property change will trigger notebook document content change and if it will be used in the diff editor
1657+
* Default to false. If the content provider doesn't persisit a metadata property in the file document, it should be set to true.
1658+
*/
1659+
transientMetadata: { [K in keyof NotebookCellMetadata]?: boolean }
1660+
}
16201661
): Disposable;
16211662

16221663
export function registerNotebookKernelProvider(
@@ -1658,6 +1699,17 @@ declare module 'vscode' {
16581699
export function createConcatTextDocument(notebook: NotebookDocument, selector?: DocumentSelector): NotebookConcatTextDocument;
16591700

16601701
export const onDidChangeActiveNotebookKernel: Event<{ document: NotebookDocument, kernel: NotebookKernel | undefined }>;
1702+
1703+
/**
1704+
* Creates a notebook cell status bar [item](#NotebookCellStatusBarItem).
1705+
* It will be disposed automatically when the notebook document is closed or the cell is deleted.
1706+
*
1707+
* @param cell The cell on which this item should be shown.
1708+
* @param alignment The alignment of the item.
1709+
* @param priority The priority of the item. Higher values mean the item should be shown more to the left.
1710+
* @return A new status bar item.
1711+
*/
1712+
export function createCellStatusBarItem(cell: NotebookCell, alignment?: NotebookCellStatusBarAlignment, priority?: number): NotebookCellStatusBarItem;
16611713
}
16621714

16631715
//#endregion

0 commit comments

Comments
 (0)