Skip to content

Commit

Permalink
add outputarea-extension package as a stub
Browse files Browse the repository at this point in the history
  • Loading branch information
telamonian committed Feb 7, 2023
1 parent 16d7747 commit fb759ca
Show file tree
Hide file tree
Showing 13 changed files with 183 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dev_mode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
"@jupyterlab/notebook-extension": "~4.0.0-alpha.18",
"@jupyterlab/observables": "~5.0.0-alpha.18",
"@jupyterlab/outputarea": "~4.0.0-alpha.18",
"@jupyterlab/outputarea-extension": "~4.0.0-alpha.18",
"@jupyterlab/pdf-extension": "~4.0.0-alpha.18",
"@jupyterlab/property-inspector": "~4.0.0-alpha.18",
"@jupyterlab/rendermime": "~4.0.0-alpha.18",
Expand Down Expand Up @@ -165,6 +166,7 @@
"@jupyterlab/mathjax2-extension": "~4.0.0-alpha.18",
"@jupyterlab/metadataform-extension": "~4.0.0-alpha.18",
"@jupyterlab/notebook-extension": "~4.0.0-alpha.18",
"@jupyterlab/outputarea-extension": "~4.0.0-alpha.18",
"@jupyterlab/pdf-extension": "~4.0.0-alpha.18",
"@jupyterlab/rendermime-extension": "~4.0.0-alpha.18",
"@jupyterlab/running-extension": "~4.0.0-alpha.18",
Expand Down Expand Up @@ -244,6 +246,7 @@
"@jupyterlab/mathjax2-extension": "",
"@jupyterlab/metadataform-extension": "",
"@jupyterlab/notebook-extension": "",
"@jupyterlab/outputarea-extension": "",
"@jupyterlab/rendermime-extension": "",
"@jupyterlab/running-extension": "",
"@jupyterlab/settingeditor-extension": "",
Expand Down Expand Up @@ -390,6 +393,7 @@
"@jupyterlab/notebook-extension": "../packages/notebook-extension",
"@jupyterlab/observables": "../packages/observables",
"@jupyterlab/outputarea": "../packages/outputarea",
"@jupyterlab/outputarea-extension": "../packages/outputarea-extension",
"@jupyterlab/pdf-extension": "../packages/pdf-extension",
"@jupyterlab/property-inspector": "../packages/property-inspector",
"@jupyterlab/rendermime": "../packages/rendermime",
Expand Down
1 change: 1 addition & 0 deletions packages/metapackage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
"@jupyterlab/notebook-extension": "^4.0.0-alpha.18",
"@jupyterlab/observables": "^5.0.0-alpha.18",
"@jupyterlab/outputarea": "^4.0.0-alpha.18",
"@jupyterlab/outputarea-extension": "^4.0.0-alpha.18",
"@jupyterlab/pdf-extension": "^4.0.0-alpha.18",
"@jupyterlab/property-inspector": "^4.0.0-alpha.18",
"@jupyterlab/rendermime": "^4.0.0-alpha.18",
Expand Down
3 changes: 3 additions & 0 deletions packages/metapackage/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,9 @@
},
{
"path": "../vega5-extension"
},
{
"path": "../outputarea-extension"
}
]
}
3 changes: 3 additions & 0 deletions packages/metapackage/tsconfig.test.json
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,9 @@
{
"path": "../vega5-extension"
},
{
"path": "../outputarea-extension"
},
{
"path": "."
},
Expand Down
3 changes: 3 additions & 0 deletions packages/outputarea-extension/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# @jupyterlab/outputarea-extension

An extension for JupyterLab which provides an entry point, commands, and keyboard shortcuts for the [@jupyterlab/outputarea](../outputarea) package.
56 changes: 56 additions & 0 deletions packages/outputarea-extension/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"name": "@jupyterlab/outputarea-extension",
"version": "4.0.0-alpha.18",
"description": "JupyterLab - Outputarea Extension",
"homepage": "https://github.com/jupyterlab/jupyterlab",
"bugs": {
"url": "https://github.com/jupyterlab/jupyterlab/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/jupyterlab/jupyterlab.git"
},
"license": "BSD-3-Clause",
"author": "Project Jupyter",
"sideEffects": [
"style/**/*"
],
"main": "lib/index.js",
"types": "lib/index.d.ts",
"style": "style/index.css",
"directories": {
"lib": "lib/"
},
"files": [
"lib/*.d.ts",
"lib/*.js.map",
"lib/*.js",
"schema/*.json",
"style/*.css",
"style/index.js"
],
"scripts": {
"build": "tsc -b",
"clean": "rimraf lib && rimraf tsconfig.tsbuildinfo",
"docs": "typedoc src",
"watch": "tsc -b --watch"
},
"dependencies": {
"@jupyterlab/application": "^4.0.0-alpha.18",
"@jupyterlab/notebook": "^4.0.0-alpha.18",
"@jupyterlab/outputarea": "^4.0.0-alpha.18"
},
"devDependencies": {
"rimraf": "~3.0.0",
"typedoc": "~0.22.10",
"typescript": "~4.7.3"
},
"publishConfig": {
"access": "public"
},
"jupyterlab": {
"extension": true,
"schemaDir": "schema"
},
"styleModule": "style/index.js"
}
18 changes: 18 additions & 0 deletions packages/outputarea-extension/schema/tracker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"jupyter.lab.setting-icon": "ui-components:notebook",
"jupyter.lab.setting-icon-label": "Outputarea",
"jupyter.lab.shortcuts": [],
"title": "Outputarea",
"description": "Outputarea/Stdin settings",
"definitions": {},
"properties": {
"stdinHistoryPerNotebook": {
"title": "Split line history per notebook",
"description": "Split line history for Stdin inputs (eg the ipdb prompt) per notebook",
"type": "boolean",
"default": false
}
},
"additionalProperties": false,
"type": "object"
}
51 changes: 51 additions & 0 deletions packages/outputarea-extension/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
/**
* @packageDocumentation
* @module outputarea-extension
*/

import {
ILabShell,
JupyterFrontEnd,
JupyterFrontEndPlugin
} from '@jupyterlab/application';
import { INotebookTracker } from '@jupyterlab/notebook';

// import * as nbformat from '@jupyterlab/nbformat';
// import { INotebookTracker, NotebookPanel } from '@jupyterlab/notebook';

/**
* The command IDs used by the outputarea plugins.
*/
// namespace CommandIDs {
// export const histReverseStep = 'stdin:history-reverse-step';
// export const histForwardStep = 'stdin:history-forward-step';
// export const histReverseSearch = 'stdin:history-reverse-search';
// export const histForwardSearch = 'stdin:history-forward-search';
// }

/**
* The Outputarea extension.
*/
export const outputareaExtension: JupyterFrontEndPlugin<void> = {
activate: activateOAExtension,
id: '@jupyterlab/outputarea-extension:stdin',
requires: [ILabShell, INotebookTracker],
optional: [],
autoStart: true
};

function activateOAExtension(
app: JupyterFrontEnd,
labShell: ILabShell,
nbtracker: INotebookTracker
): void {
return;
}

/**
* Export the plugins as default.
*/
const plugins: JupyterFrontEndPlugin<any>[] = [outputareaExtension];
export default plugins;
9 changes: 9 additions & 0 deletions packages/outputarea-extension/style/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*-----------------------------------------------------------------------------
| Copyright (c) Jupyter Development Team.
| Distributed under the terms of the Modified BSD License.
|----------------------------------------------------------------------------*/

/* This file was auto-generated by ensurePackage() in @jupyterlab/buildutils */
@import url('~@jupyterlab/application/style/index.css');
@import url('~@jupyterlab/outputarea/style/index.css');
@import url('~@jupyterlab/notebook/style/index.css');
9 changes: 9 additions & 0 deletions packages/outputarea-extension/style/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*-----------------------------------------------------------------------------
| Copyright (c) Jupyter Development Team.
| Distributed under the terms of the Modified BSD License.
|----------------------------------------------------------------------------*/

/* This file was auto-generated by ensurePackage() in @jupyterlab/buildutils */
import '@jupyterlab/application/style/index.js';
import '@jupyterlab/outputarea/style/index.js';
import '@jupyterlab/notebook/style/index.js';
19 changes: 19 additions & 0 deletions packages/outputarea-extension/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"extends": "../../tsconfigbase",
"compilerOptions": {
"outDir": "lib",
"rootDir": "src"
},
"include": ["src/*"],
"references": [
{
"path": "../application"
},
{
"path": "../notebook"
},
{
"path": "../outputarea"
}
]
}
4 changes: 4 additions & 0 deletions packages/outputarea-extension/typedoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"out": "../../docs/api/outputarea-extension",
"theme": "../../typedoc-theme"
}
3 changes: 3 additions & 0 deletions tsconfigdoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,9 @@
{
"path": "./packages/outputarea"
},
{
"path": "./packages/outputarea-extension"
},
{
"path": "./packages/pdf-extension"
},
Expand Down

0 comments on commit fb759ca

Please sign in to comment.