@@ -96,7 +96,7 @@ declare module 'vscode' {
96
96
97
97
export interface NotebookCellMetadata {
98
98
/**
99
- * Controls if the content of a cell is editable or not .
99
+ * Controls whether a cell's editor is editable/readonly .
100
100
*/
101
101
editable ?: boolean ;
102
102
@@ -245,10 +245,16 @@ declare module 'vscode' {
245
245
contains ( uri : Uri ) : boolean
246
246
}
247
247
248
+ export interface WorkspaceEdit {
249
+ replaceCells ( uri : Uri , start : number , end : number , cells : NotebookCellData [ ] , metadata ?: WorkspaceEditEntryMetadata ) : void ;
250
+ replaceCellOutput ( uri : Uri , index : number , outputs : CellOutput [ ] , metadata ?: WorkspaceEditEntryMetadata ) : void ;
251
+ replaceCellMetadata ( uri : Uri , index : number , cellMetadata : NotebookCellMetadata , metadata ?: WorkspaceEditEntryMetadata ) : void ;
252
+ }
253
+
248
254
export interface NotebookEditorCellEdit {
249
255
250
- replaceCells ( from : number , to : number , cells : NotebookCellData [ ] ) : void ;
251
- replaceOutputs ( index : number , outputs : CellOutput [ ] ) : void ;
256
+ replaceCells ( start : number , end : number , cells : NotebookCellData [ ] ) : void ;
257
+ replaceOutput ( index : number , outputs : CellOutput [ ] ) : void ;
252
258
replaceMetadata ( index : number , metadata : NotebookCellMetadata ) : void ;
253
259
254
260
/** @deprecated */
@@ -523,6 +529,35 @@ declare module 'vscode' {
523
529
resolveKernel ?( kernel : T , document : NotebookDocument , webview : NotebookCommunication , token : CancellationToken ) : ProviderResult < void > ;
524
530
}
525
531
532
+ /**
533
+ * Represents the alignment of status bar items.
534
+ */
535
+ export enum NotebookCellStatusBarAlignment {
536
+
537
+ /**
538
+ * Aligned to the left side.
539
+ */
540
+ Left = 1 ,
541
+
542
+ /**
543
+ * Aligned to the right side.
544
+ */
545
+ Right = 2
546
+ }
547
+
548
+ export interface NotebookCellStatusBarItem {
549
+ readonly cell : NotebookCell ;
550
+ readonly alignment : NotebookCellStatusBarAlignment ;
551
+ readonly priority ?: number ;
552
+ text : string ;
553
+ tooltip : string | undefined ;
554
+ command : string | Command | undefined ;
555
+ accessibilityInformation ?: AccessibilityInformation ;
556
+ show ( ) : void ;
557
+ hide ( ) : void ;
558
+ dispose ( ) : void ;
559
+ }
560
+
526
561
export namespace notebook {
527
562
export function registerNotebookContentProvider (
528
563
notebookType : string ,
@@ -580,6 +615,17 @@ declare module 'vscode' {
580
615
export function createConcatTextDocument ( notebook : NotebookDocument , selector ?: DocumentSelector ) : NotebookConcatTextDocument ;
581
616
582
617
export const onDidChangeActiveNotebookKernel : Event < { document : NotebookDocument , kernel : NotebookKernel | undefined } > ;
618
+
619
+ /**
620
+ * Creates a notebook cell status bar [item](#NotebookCellStatusBarItem).
621
+ * It will be disposed automatically when the notebook document is closed or the cell is deleted.
622
+ *
623
+ * @param cell The cell on which this item should be shown.
624
+ * @param alignment The alignment of the item.
625
+ * @param priority The priority of the item. Higher values mean the item should be shown more to the left.
626
+ * @return A new status bar item.
627
+ */
628
+ export function createCellStatusBarItem ( cell : NotebookCell , alignment ?: NotebookCellStatusBarAlignment , priority ?: number ) : NotebookCellStatusBarItem ;
583
629
}
584
630
585
631
//#endregion
0 commit comments