Skip to content

Commit 32a376d

Browse files
committed
Remove voila-dashboards dependency
1 parent cb27947 commit 32a376d

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

packages/widgets-manager/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@
4343
"@jupyterlab/application": "^4.0.0",
4444
"@jupyterlab/coreutils": "^6.0.5",
4545
"@jupyterlab/rendermime": "^4.0.0",
46-
"@jupyterlab/services": "^7.0.0",
47-
"@voila-dashboards/voila": "^0.5"
46+
"@jupyterlab/services": "^7.0.0"
4847
},
4948
"devDependencies": {
5049
"@babel/core": "^7.10.2",

packages/widgets-manager/src/index.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ import {
3232
IWidgetRegistryData
3333
} from '@jupyter-widgets/base';
3434

35-
import { VoilaApp } from '@voila-dashboards/voila';
36-
3735
const WIDGET_MIMETYPE = 'application/vnd.jupyter.widget-view+json';
3836

3937
/**
@@ -49,7 +47,7 @@ export const widgetManagerPlugin: JupyterFrontEndPlugin<IJupyterWidgetRegistry>
4947
app: JupyterFrontEnd,
5048
rendermime: IRenderMimeRegistry
5149
): Promise<IJupyterWidgetRegistry> => {
52-
if (!(app instanceof VoilaApp)) {
50+
if (app.name !== 'Voila') {
5351
throw Error(
5452
'The Voila Widget Manager plugin must be activated in a VoilaApp'
5553
);
@@ -68,7 +66,7 @@ export const widgetManagerPlugin: JupyterFrontEndPlugin<IJupyterWidgetRegistry>
6866
}
6967
const kernel = new KernelConnection({ model, serverSettings });
7068
const manager = new KernelWidgetManager(kernel, rendermime);
71-
app.widgetManager = manager;
69+
(app as any).widgetManager = manager;
7270

7371
rendermime.removeMimeType(WIDGET_MIMETYPE);
7472
rendermime.addFactory(
@@ -95,7 +93,7 @@ export const widgetManagerPlugin: JupyterFrontEndPlugin<IJupyterWidgetRegistry>
9593

9694
return {
9795
registerWidget: async (data: IWidgetRegistryData) => {
98-
const manager = await app.widgetManagerPromise.promise;
96+
const manager = await (app as any).widgetManagerPromise.promise;
9997

10098
manager.register(data);
10199
}

yarn.lock

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5448,7 +5448,7 @@ __metadata:
54485448
languageName: unknown
54495449
linkType: soft
54505450

5451-
"@voila-dashboards/voila@^0.5, @voila-dashboards/voila@workspace:packages/voila":
5451+
"@voila-dashboards/voila@workspace:packages/voila":
54525452
version: 0.0.0-use.local
54535453
resolution: "@voila-dashboards/voila@workspace:packages/voila"
54545454
dependencies:
@@ -5529,7 +5529,6 @@ __metadata:
55295529
"@jupyterlab/rendermime": ^4.0.0
55305530
"@jupyterlab/services": ^7.0.0
55315531
"@jupyterlab/testutils": ^4.0.0
5532-
"@voila-dashboards/voila": ^0.5
55335532
npm-run-all: ^4.1.5
55345533
rimraf: ^2.6.1
55355534
source-map-loader: ~1.0.2

0 commit comments

Comments
 (0)