jupyter-specta 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -69,6 +69,7 @@ Specta can be configured using the typicall JupyterLite configuration file: `jup
69
69
  The following options are available:
70
70
 
71
71
  - `defaultLayout`: The default layout when opening a file.
72
+ - `executionDelay`: Delay (in miliseconds) before executing cells.
72
73
  - `hideTopbar`: Boolean flag to show or hide the top bar.
73
74
  - `topBar`: Configuration for the top bar.
74
75
  - `slidesTheme`: The theme for the slides layout. The list of available themes can be found [here](https://revealjs.com/themes/).
@@ -20,7 +20,15 @@ export class AppWidget extends Panel {
20
20
  // Not a specta app, add spinner
21
21
  this.addSpinner();
22
22
  }
23
- this._model.initialize().then(() => {
23
+ this._model.initialize().then(async () => {
24
+ let waitTime = this._spectaAppConfig.executionDelay;
25
+ if (!waitTime) {
26
+ waitTime = 100;
27
+ }
28
+ else {
29
+ console.log(`Waiting for ${waitTime}ms`);
30
+ }
31
+ await new Promise(resolve => setTimeout(resolve, parseInt(waitTime + '')));
24
32
  this.render().catch(console.error).then(emitResizeEvent);
25
33
  });
26
34
  this._layoutRegistry.selectedLayoutChanged.connect(this._onSelectedLayoutChanged, this);
package/lib/token.d.ts CHANGED
@@ -50,6 +50,7 @@ export interface ISpectaAppConfig {
50
50
  hideTopbar?: boolean;
51
51
  slidesTheme?: string;
52
52
  loadingName?: string;
53
+ executionDelay?: number;
53
54
  labConfig?: {
54
55
  setSingleMode?: boolean;
55
56
  hideLeftPanel?: boolean;
package/lib/tool.js CHANGED
@@ -187,7 +187,6 @@ export async function configLabLayout(options) {
187
187
  if (!config) {
188
188
  return;
189
189
  }
190
- console.log('vvvvvvvvvvv', config);
191
190
  const { setSingleMode, hideLeftPanel, hideRightPanel, hideStatusbar, hideHeader } = config;
192
191
  if (setSingleMode) {
193
192
  await commands.execute('application:set-mode', {
@@ -213,9 +212,7 @@ export async function configLabLayout(options) {
213
212
  }
214
213
  if (hideStatusbar) {
215
214
  const statusBar = document.getElementById('jp-main-statusbar');
216
- console.log('statusBar.clientHeight', statusBar === null || statusBar === void 0 ? void 0 : statusBar.clientHeight);
217
215
  if (statusBar && !statusBar.classList.contains('lm-mod-hidden')) {
218
- console.log('toggle status');
219
216
  await commands.execute('statusbar:toggle');
220
217
  }
221
218
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jupyter-specta",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "homepage": "https://github.com/trungleduc/specta",