Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notebook Readonly #313

Merged
merged 14 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@datalayer/jupyter-react",
"version": "0.18.6",
"version": "0.18.7",
"description": "Jupyter React - React.js components 100% compatible with Jupyter.",
"license": "MIT",
"main": "lib/index.js",
Expand Down Expand Up @@ -260,7 +260,7 @@
}
}
},
"extension": "./lib/jupyter/lab/index.js",
"extension": "./lib/jupyter/lab/plugin.js",
"outputDir": "jupyter_react/labextension",
"schemaDir": "schema",
"webpackConfig": "./webpack.lab-config.js"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
* MIT License
*/

export type ColorMode = 'light' | 'dark';
export * from './Button';
10 changes: 10 additions & 0 deletions packages/react/src/components/cell/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*
* Copyright (c) 2021-2023 Datalayer, Inc.
*
* MIT License
*/

export * from './Cell';
export * from './CellAdapter';
export * from './CellCommands';
export * from './CellState';
9 changes: 9 additions & 0 deletions packages/react/src/components/codemirror/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* Copyright (c) 2021-2023 Datalayer, Inc.
*
* MIT License
*/

export * from './CodeMirrorEditor';
export * from './CodeMirrorOutputToolbar';
export * from './CodeMirrorTheme';
8 changes: 8 additions & 0 deletions packages/react/src/components/commands/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
* Copyright (c) 2021-2023 Datalayer, Inc.
*
* MIT License
*/

export * from './Commands';
export * from './CommandsAdapter';
9 changes: 9 additions & 0 deletions packages/react/src/components/console/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* Copyright (c) 2021-2023 Datalayer, Inc.
*
* MIT License
*/

export * from './Console';
export * from './ConsoleAdapter';
export * from './ConsoleState';
8 changes: 8 additions & 0 deletions packages/react/src/components/dialog/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
* Copyright (c) 2021-2023 Datalayer, Inc.
*
* MIT License
*/

export * from './Dialog';
export * from './DialogAdapter';
7 changes: 7 additions & 0 deletions packages/react/src/components/environment/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* Copyright (c) 2021-2023 Datalayer, Inc.
*
* MIT License
*/

export * from './Environment';
7 changes: 7 additions & 0 deletions packages/react/src/components/filebrowser/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* Copyright (c) 2021-2023 Datalayer, Inc.
*
* MIT License
*/

export * from './FileBrowser';
8 changes: 8 additions & 0 deletions packages/react/src/components/filemanager/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
* Copyright (c) 2021-2023 Datalayer, Inc.
*
* MIT License
*/

export * from './FileManagerJupyterLab';
export * from './lab';
7 changes: 7 additions & 0 deletions packages/react/src/components/filemanager/lab/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* Copyright (c) 2021-2023 Datalayer, Inc.
*
* MIT License
*/

export * from './FileManagerAdapter';
24 changes: 24 additions & 0 deletions packages/react/src/components/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright (c) 2021-2023 Datalayer, Inc.
*
* MIT License
*/

export * from './button';
export * from './cell';
export * from './codemirror';
export * from './commands';
export * from './console';
export * from './dialog';
export * from './environment';
export * from './filebrowser';
export * from './filemanager';
export * from './jupyterlab';
export * from './kernel';
export * from './lumino';
export * from './notebook';
export * from './output';
export * from './settings';
export * from './terminal';
export * from './textinput';
export * from './viewer';
4 changes: 2 additions & 2 deletions packages/react/src/components/jupyterlab/JupyterLabApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { PageConfig } from '@jupyterlab/coreutils';
import { IRenderMime } from '@jupyterlab/rendermime-interfaces';
import { ServiceManager } from '@jupyterlab/services';
import { useJupyter } from '../../jupyter/JupyterContext';
import { ColorMode } from '../../jupyter/lab/JupyterLabColorMode';
import { Colormode } from '../../theme/JupyterLabColormode';
import { JupyterLabAppCorePlugins } from './JupyterLabAppPlugins';
import JupyterLabAppAdapter from './JupyterLabAppAdapter';
import JupyterLabAppCss from './JupyterLabAppCss';
Expand Down Expand Up @@ -39,7 +39,7 @@ export type JupyterLabAppProps = {
serverless: boolean;
serviceManager: ServiceManager.IManager;
startDefaultKernel: boolean;
theme: ColorMode;
theme: Colormode;
width: string | number;
};

Expand Down
4 changes: 2 additions & 2 deletions packages/react/src/components/jupyterlab/JupyterLabAppCss.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import { useEffect } from 'react';
import { ColorMode } from '../../jupyter/lab/JupyterLabColorMode';
import { Colormode } from '../../theme/JupyterLabColormode';

import '@jupyterlab/application-extension/style/index.js';
import '@jupyterlab/apputils-extension/style/index.js';
Expand All @@ -31,7 +31,7 @@ import '@jupyterlab/translation-extension/style/index.js';
import '@jupyterlab/ui-components-extension/style/index.js';

type Props = {
theme?: ColorMode;
theme?: Colormode;
};

export const JupyterLabAppCss = (props: Props) => {
Expand Down
9 changes: 9 additions & 0 deletions packages/react/src/components/jupyterlab/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* Copyright (c) 2021-2023 Datalayer, Inc.
*
* MIT License
*/

export * from './JupyterLabApp';
export * from './JupyterLabAppAdapter';
export * from './JupyterLabAppPlugins';
2 changes: 2 additions & 0 deletions packages/react/src/components/kernel/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ export * from './KernelSelector';
export * from './Kernelndicator';
export * from './KernelUsage';
export * from './KernelVariables';
export * from './inspector';
export * from './variables';
8 changes: 8 additions & 0 deletions packages/react/src/components/kernel/inspector/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
* Copyright (c) 2021-2023 Datalayer, Inc.
*
* MIT License
*/

export * from './model';
export * from './widget';
13 changes: 13 additions & 0 deletions packages/react/src/components/kernel/variables/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* Copyright (c) 2021-2023 Datalayer, Inc.
*
* MIT License
*/

export * from './handler';
export * from './inspectorscripts';
export * from './kernelconnector';
export * from './manager';
export * from './tokens';
export * from './variablesinspector';
export * from './widget';
12 changes: 8 additions & 4 deletions packages/react/src/components/lumino/Lumino.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,23 @@ export const Lumino = (props: LuminoProps) => {
}
} catch (e) {
// no-op.
// console.debug('Exception while detaching Lumino widget.', e);
// console.debug('Exception while detaching Lumino widget.', e);
}
};
}
}, [ref, children]);
return (
<div ref={ref} id={id} style={{ height: height, minHeight: height }}></div>
<div
id={id}
ref={ref}
style={{ height: height, minHeight: height }}
/>
);
};
}

Lumino.defaultProps = {
id: 'lumino-id',
height: '100%',
};
}

export default Lumino;
15 changes: 0 additions & 15 deletions packages/react/src/components/lumino/LuminoRedux.ts

This file was deleted.

11 changes: 11 additions & 0 deletions packages/react/src/components/lumino/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
* Copyright (c) 2021-2023 Datalayer, Inc.
*
* MIT License
*/

export * from './Lumino';
export * from './LuminoBox';
export * from './LuminoDetached';
export * from './LuminoObservable';
export * from './ReactPortalWidget';
Loading
Loading