Skip to content

Commit

Permalink
Voilite POC
Browse files Browse the repository at this point in the history
  • Loading branch information
trungleduc authored and martinRenou committed Oct 27, 2022
1 parent 20caacc commit a552320
Show file tree
Hide file tree
Showing 27 changed files with 2,227 additions and 49 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ share/jupyter/voila/templates/reveal/static/materialcolors.css
lib

voila/labextension
voila/voilite/static/voila/**/*

tsconfig.tsbuildinfo

ui-tests/playwright-report
Expand Down
2 changes: 1 addition & 1 deletion packages/voila/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
export * from './app';
export * from './manager';
export * from './shell';

export * from './output';
import * as plugins from './plugins';

export { plugins };
92 changes: 92 additions & 0 deletions packages/voilite/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
{
"name": "@voila-dashboards/voilite",
"version": "0.4.0-beta.0",
"description": "The Voilite Frontend",
"author": "Voilà contributors",
"license": "BSD-3-Clause",
"main": "lib/index.js",
"browserslist": ">0.8%, not ie 11, not op_mini all, not dead",
"dependencies": {
"@jupyter-widgets/base": "^6.0.1",
"@jupyter-widgets/controls": "^5.0.1",
"@jupyter-widgets/jupyterlab-manager": "^5.0.3",
"@jupyter-widgets/output": "^6.0.1",
"@jupyterlab/application": "^3.0.0",
"@jupyterlab/apputils": "^3.0.0",
"@jupyterlab/apputils-extension": "^3.4.8",
"@jupyterlab/coreutils": "^5.0.0",
"@jupyterlab/docregistry": "^3.0.0",
"@jupyterlab/json-extension": "^3.0.0",
"@jupyterlab/logconsole": "^3.0.0",
"@jupyterlab/mainmenu": "^3.0.0",
"@jupyterlab/markdownviewer-extension": "^3.0.0",
"@jupyterlab/mathjax2-extension": "^3.0.0",
"@jupyterlab/nbconvert-css": "^3.4.8",
"@jupyterlab/nbformat": "^3.0.0",
"@jupyterlab/notebook": "^3.0.0",
"@jupyterlab/outputarea": "^3.0.0",
"@jupyterlab/rendermime": "^3.0.0",
"@jupyterlab/rendermime-extension": "^3.0.0",
"@jupyterlab/services": "^6.1.8",
"@jupyterlab/settingregistry": "^3.0.0",
"@jupyterlab/theme-dark-extension": "^3.4.8",
"@jupyterlab/theme-light-extension": "^3.4.8",
"@jupyterlab/translation": "^3.0.0",
"@jupyterlab/ui-components": "^3.0.0",
"@jupyterlite/iframe-extension": "^0.1.0-beta.13",
"@jupyterlite/pyolite-kernel-extension": "^0.1.0-beta.13",
"@jupyterlite/server": "^0.1.0-beta.13",
"@jupyterlite/server-extension": "^0.1.0-beta.13",
"@lumino/algorithm": "^1.6.2",
"@lumino/commands": "^1.15.2",
"@lumino/coreutils": "^1.8.2",
"@lumino/disposable": "^1.7.2",
"@lumino/domutils": "^1.5.2",
"@lumino/dragdrop": "^1.10.2",
"@lumino/messaging": "^1.7.2",
"@lumino/properties": "^1.5.2",
"@lumino/signaling": "^1.7.2",
"@lumino/virtualdom": "^1.11.2",
"@lumino/widgets": "^1.26.2",
"react": "^17.0.1"
},
"devDependencies": {
"@babel/core": "^7.2.2",
"@babel/preset-env": "^7.3.1",
"@jupyterlab/builder": "^3.0.0",
"@types/node": "^18.8.3",
"babel-loader": "^8.0.5",
"css-loader": "~5.0.2",
"file-loader": "^6.2.0",
"fs-extra": "^9.1.0",
"glob": "~7.1.6",
"ignore-loader": "^0.1.2",
"json-loader": "^0.5.7",
"mini-css-extract-plugin": "~0.9.0",
"npm-run-all": "^4.1.5",
"p-limit": "^2.2.2",
"raw-loader": "^4.0.2",
"rimraf": "^3.0.2",
"style-loader": "^2.0.0",
"svg-url-loader": "^7.1.1",
"typescript": "~4.1.3",
"url-loader": "^4.1.1",
"watch": "^1.0.2",
"webpack": "^5.24.1",
"webpack-bundle-analyzer": "^4.4.0",
"webpack-cli": "^4.5.0",
"webpack-merge": "^5.7.3",
"whatwg-fetch": "^3.0.0"
},
"scripts": {
"build": "npm run build:lib && webpack --mode=development",
"build:lib": "tsc",
"build:prod": "npm run build:lib && webpack --mode=production",
"clean": "jlpm run clean:lib && rimraf build",
"clean:lib": "rimraf lib tsconfig.tsbuildinfo",
"test": "echo \"Error: no test specified\" && exit 1",
"watch": "npm-run-all -p watch:*",
"watch:lib": "tsc -w",
"watch:bundle": "webpack --watch --mode=development"
}
}
37 changes: 37 additions & 0 deletions packages/voilite/publicpath.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.

// We dynamically set the webpack public path based on the page config
// settings from the JupyterLab app. We copy some of the pageconfig parsing
// logic in @jupyterlab/coreutils below, since this must run before any other
// files are loaded (including @jupyterlab/coreutils).

/**
* Get global configuration data for the Jupyter application.
*
* @param name - The name of the configuration option.
*
* @returns The config value or an empty string if not found.
*
* #### Notes
* All values are treated as strings.
* For browser based applications, it is assumed that the page HTML
* includes a script tag with the id `jupyter-config-data` containing the
* configuration as valid JSON. In order to support the classic Notebook,
* we fall back on checking for `body` data of the given `name`.
*/
function getOption(name) {
let configData = Object.create(null);
// Use script tag if available.
if (typeof document !== 'undefined' && document) {
const el = document.getElementById('jupyter-config-data');

if (el) {
configData = JSON.parse(el.textContent || '{}');
}
}
return configData[name] || '';
}

// eslint-disable-next-line no-undef
__webpack_public_path__ = getOption('fullStaticUrl') + '/';
Loading

0 comments on commit a552320

Please sign in to comment.