mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-09 03:50:45 +08:00
Rename App to RetroApp (#122)
* Rename App to RetroApp * Rename in notebook extension * More renaming
This commit is contained in:
parent
69d145a070
commit
d1d3e031c7
@ -76,8 +76,8 @@ async function main() {
|
||||
require('@jupyterlab/vega5-extension')
|
||||
];
|
||||
|
||||
const App = require('@retrolab/application').App;
|
||||
const app = new App({ mimeExtensions });
|
||||
const RetroApp = require('@retrolab/application').RetroApp;
|
||||
const app = new RetroApp({ mimeExtensions });
|
||||
|
||||
const disabled = [];
|
||||
// TODO: formalize the way the set of initial extensions and plugins are specified
|
||||
|
@ -25,7 +25,7 @@ import { IMainMenu } from '@jupyterlab/mainmenu';
|
||||
|
||||
import { ITranslator, TranslationManager } from '@jupyterlab/translation';
|
||||
|
||||
import { App, RetroShell, IRetroShell } from '@retrolab/application';
|
||||
import { RetroApp, RetroShell, IRetroShell } from '@retrolab/application';
|
||||
|
||||
import { jupyterIcon } from '@retrolab/ui-components';
|
||||
|
||||
@ -204,7 +204,7 @@ const paths: JupyterFrontEndPlugin<JupyterFrontEnd.IPaths> = {
|
||||
autoStart: true,
|
||||
provides: JupyterFrontEnd.IPaths,
|
||||
activate: (app: JupyterFrontEnd): JupyterFrontEnd.IPaths => {
|
||||
if (!(app instanceof App)) {
|
||||
if (!(app instanceof RetroApp)) {
|
||||
throw new Error(`${paths.id} must be activated in RetroLab.`);
|
||||
}
|
||||
return app.paths;
|
||||
|
@ -19,13 +19,13 @@ import { IRetroShell, RetroShell } from './shell';
|
||||
/**
|
||||
* App is the main application class. It is instantiated once and shared.
|
||||
*/
|
||||
export class App extends JupyterFrontEnd<IRetroShell> {
|
||||
export class RetroApp extends JupyterFrontEnd<IRetroShell> {
|
||||
/**
|
||||
* Construct a new App object.
|
||||
* Construct a new RetroApp object.
|
||||
*
|
||||
* @param options The instantiation options for an application.
|
||||
*/
|
||||
constructor(options: App.IOptions = { shell: new RetroShell() }) {
|
||||
constructor(options: RetroApp.IOptions = { shell: new RetroShell() }) {
|
||||
super({
|
||||
...options,
|
||||
shell: options.shell ?? new RetroShell()
|
||||
@ -103,7 +103,7 @@ export class App extends JupyterFrontEnd<IRetroShell> {
|
||||
*
|
||||
* @param mod - The plugin module to register.
|
||||
*/
|
||||
registerPluginModule(mod: App.IPluginModule): void {
|
||||
registerPluginModule(mod: RetroApp.IPluginModule): void {
|
||||
let data = mod.default;
|
||||
// Handle commonjs exports.
|
||||
if (!Object.prototype.hasOwnProperty.call(mod, '__esModule')) {
|
||||
@ -126,7 +126,7 @@ export class App extends JupyterFrontEnd<IRetroShell> {
|
||||
*
|
||||
* @param mods - The plugin modules to register.
|
||||
*/
|
||||
registerPluginModules(mods: App.IPluginModule[]): void {
|
||||
registerPluginModules(mods: RetroApp.IPluginModule[]): void {
|
||||
mods.forEach(mod => {
|
||||
this.registerPluginModule(mod);
|
||||
});
|
||||
@ -140,7 +140,7 @@ export class App extends JupyterFrontEnd<IRetroShell> {
|
||||
/**
|
||||
* A namespace for App statics.
|
||||
*/
|
||||
export namespace App {
|
||||
export namespace RetroApp {
|
||||
/**
|
||||
* The instantiation options for an App application.
|
||||
*/
|
||||
@ -184,7 +184,7 @@ namespace Private {
|
||||
*
|
||||
* @param app The front-end application whose format is set.
|
||||
*/
|
||||
export function setFormat(app: App): void {
|
||||
export function setFormat(app: RetroApp): void {
|
||||
app.format = window.matchMedia(MOBILE_QUERY).matches ? 'mobile' : 'desktop';
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ import { IDocumentManager } from '@jupyterlab/docmanager';
|
||||
|
||||
import { NotebookPanel } from '@jupyterlab/notebook';
|
||||
|
||||
import { App, RetroShell, IRetroShell } from '@retrolab/application';
|
||||
import { RetroApp, RetroShell, IRetroShell } from '@retrolab/application';
|
||||
|
||||
import { Poll } from '@lumino/polling';
|
||||
|
||||
@ -211,7 +211,7 @@ const kernelStatus: JupyterFrontEndPlugin<void> = {
|
||||
const paths: JupyterFrontEndPlugin<JupyterFrontEnd.IPaths> = {
|
||||
id: '@retrolab/application-extension:paths',
|
||||
activate: (app: JupyterFrontEnd): JupyterFrontEnd.IPaths => {
|
||||
if (!(app instanceof App)) {
|
||||
if (!(app instanceof RetroApp)) {
|
||||
throw new Error(`${paths.id} must be activated in RetroLab.`);
|
||||
}
|
||||
return app.paths;
|
||||
|
Loading…
Reference in New Issue
Block a user