-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Move token to its own file * Add factory token * Add doc and lint
- Loading branch information
1 parent
866db0c
commit e8dedca
Showing
6 changed files
with
196 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { IWidgetTracker } from '@jupyterlab/apputils'; | ||
import { Token } from '@lumino/coreutils'; | ||
import { ISignal } from '@lumino/signaling'; | ||
import type { RisePreview } from './preview'; | ||
|
||
/** | ||
* A class that tracks Rise Preview widgets. | ||
*/ | ||
// eslint-disable-next-line @typescript-eslint/no-empty-interface | ||
export interface IRisePreviewTracker extends IWidgetTracker<RisePreview> {} | ||
|
||
/** | ||
* The Rise Preview tracker token. | ||
*/ | ||
export const IRisePreviewTracker = new Token<IRisePreviewTracker>( | ||
'jupyterlab-rise:IRisePreviewTracker', | ||
'Adds a tracker for RISE slides preview widgets.' | ||
); | ||
|
||
/** | ||
* RISE Preview document factory interface | ||
*/ | ||
export interface IRisePreviewFactory { | ||
/** | ||
* Signal emitted when a RISE preview is created. | ||
*/ | ||
readonly widgetCreated: ISignal<IRisePreviewFactory, RisePreview>; | ||
/** | ||
* Add a new file type to the RISE preview factory. | ||
* | ||
* #### Notes | ||
* Useful to add file types for jupytext. | ||
* | ||
* @param ft File type | ||
*/ | ||
addFileType(ft: string): void; | ||
} | ||
|
||
/** | ||
* RISE Preview factory token. | ||
*/ | ||
export const IRisePreviewFactory = new Token<IRisePreviewFactory>( | ||
'jupyterlab-rise:IRisePreviewFactory', | ||
'Customize the RISE slides preview factory.' | ||
); |
Oops, something went wrong.