@@ -48,15 +48,16 @@ define([
4848 /**
4949 *
5050 * @param {* } initialData
51- * @param {* } extensionType extension type: notebook/colab/lab
51+ * @param {* } extensionType extension type: notebook/colab/lab/lite
5252 */
5353 constructor ( extensionType = 'notebook' , initialData = { } ) {
5454 // initial mode
55+ this . isReady = false ;
5556 this . extensionType = extensionType ;
5657 this . parentSelector = 'body' ;
5758 if ( extensionType === 'notebook' ) {
5859 this . parentSelector = '#site' ;
59- } else if ( extensionType === 'colab' || extensionType === 'lab' ) {
60+ } else if ( extensionType === 'colab' || extensionType === 'lab' || extensionType === 'lite' ) {
6061 // this.parentSelector = '.notebook-horizontal';
6162 this . parentSelector = 'body' ;
6263 }
@@ -463,8 +464,8 @@ define([
463464 // not mounted
464465 reject ( 'Colab Drive is not mounted!' ) ;
465466 } )
466- } else if ( that . extensionType === 'lab' ) {
467- // CHROME : edited to use .visualpython files
467+ } else if ( that . extensionType === 'lab' || that . extensionType === 'lite' ) {
468+ // LAB : edited to use .visualpython files
468469 that . _readFromLab ( '' , configKey ) . then ( function ( result ) {
469470 resolve ( result ) ;
470471 } ) . catch ( function ( err ) {
@@ -526,7 +527,7 @@ define([
526527 // not mounted
527528 reject ( 'Colab Drive is not mounted!' ) ;
528529 } )
529- } else if ( that . extensionType === 'lab' ) {
530+ } else if ( that . extensionType === 'lab' || that . extensionType === 'lite' ) {
530531 // LAB: use local .visualpython files
531532 that . _readFromLab ( configKey ) . then ( function ( result ) {
532533 let data = result ;
@@ -604,7 +605,7 @@ define([
604605 reject ( ) ;
605606 } ) ;
606607 } ) ;
607- } else if ( that . extensionType === 'lab' ) {
608+ } else if ( that . extensionType === 'lab' || that . extensionType === 'lite' ) {
608609 // LAB: use .visualpython files
609610 that . getData ( '' , configKey ) . then ( function ( data ) {
610611 let newDataObj = { } ;
@@ -649,7 +650,7 @@ define([
649650 } ) . catch ( function ( err ) {
650651 reject ( false ) ;
651652 } )
652- } else if ( that . extensionType === 'lab' ) {
653+ } else if ( that . extensionType === 'lab' || that . extensionType === 'lite' ) {
653654 // LAB: use .visualpython files
654655 that . getData ( '' , configKey ) . then ( function ( data ) {
655656 let dataObj = data ;
@@ -838,7 +839,7 @@ define([
838839 let that = this ;
839840 let nowVersion = this . getVpInstalledVersion ( ) ;
840841 let packageName = 'visualpython' ;
841- if ( this . extensionType === 'lab' ) {
842+ if ( this . extensionType === 'lab' || this . extensionType === 'lite' ) {
842843 packageName = 'jupyterlab-visualpython' ;
843844 }
844845 this . getPackageVersion ( packageName ) . then ( function ( latestVersion ) {
@@ -908,6 +909,16 @@ define([
908909 ] ;
909910 com_interface . insertCell ( 'markdown' , info . join ( '\n' ) ) ;
910911 com_interface . insertCell ( 'code' , '!pip install jupyterlab-visualpython --upgrade' ) ;
912+ } else if ( that . extensionType === 'lite' ) {
913+ // LITE: update lab extension on lite
914+ let info = [
915+ '## Visual Python Upgrade' ,
916+ 'NOTE: ' ,
917+ '- Refresh your web browser to start a new version.' ,
918+ '- Save VP Note before refreshing the page.'
919+ ] ;
920+ com_interface . insertCell ( 'markdown' , info . join ( '\n' ) ) ;
921+ com_interface . insertCell ( 'code' , "import piplite\npiplite.install('jupyterlab-visualpython==" + latestVersion + "')" ) ;
911922 }
912923
913924 // update version_timestamp
0 commit comments