@jupyter-notebook/application-extension 7.6.0-alpha.4 → 7.6.0-alpha.5

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.
Files changed (2) hide show
  1. package/lib/index.js +111 -3
  2. package/package.json +14 -14
package/lib/index.js CHANGED
@@ -95,6 +95,7 @@ const dirty = {
95
95
  */
96
96
  const info = {
97
97
  id: '@jupyter-notebook/application-extension:info',
98
+ description: 'Provides application information for the current notebook app.',
98
99
  autoStart: true,
99
100
  provides: JupyterLab.IInfo,
100
101
  activate: (app) => {
@@ -181,6 +182,22 @@ const opener = {
181
182
  });
182
183
  });
183
184
  },
185
+ describedBy: {
186
+ args: {
187
+ type: 'object',
188
+ properties: {
189
+ path: {
190
+ type: 'string',
191
+ description: 'The routed URL path to handle.',
192
+ },
193
+ search: {
194
+ type: 'string',
195
+ description: 'The routed URL query string.',
196
+ },
197
+ },
198
+ required: ['path'],
199
+ },
200
+ },
184
201
  });
185
202
  router.register({ command, pattern: TREE_PATTERN });
186
203
  },
@@ -245,6 +262,12 @@ const pages = {
245
262
  execute: () => {
246
263
  window.open(URLExt.join(baseUrl, 'lab'));
247
264
  },
265
+ describedBy: {
266
+ args: {
267
+ type: 'object',
268
+ properties: {},
269
+ },
270
+ },
248
271
  });
249
272
  const page = PageConfig.getOption('notebookPage');
250
273
  app.commands.addCommand(CommandIDs.openTree, {
@@ -257,6 +280,12 @@ const pages = {
257
280
  window.open(URLExt.join(baseUrl, 'tree'));
258
281
  }
259
282
  },
283
+ describedBy: {
284
+ args: {
285
+ type: 'object',
286
+ properties: {},
287
+ },
288
+ },
260
289
  });
261
290
  if (palette) {
262
291
  palette.addItem({ command: CommandIDs.openLab, category: 'View' });
@@ -329,10 +358,30 @@ const rendermime = {
329
358
  });
330
359
  });
331
360
  },
361
+ describedBy: {
362
+ args: {
363
+ type: 'object',
364
+ properties: {
365
+ path: {
366
+ type: 'string',
367
+ description: 'The local path to open.',
368
+ },
369
+ },
370
+ required: ['path'],
371
+ },
372
+ },
332
373
  });
333
374
  }
334
375
  return new RenderMimeRegistry({
335
376
  initialFactories: standardRendererFactories,
377
+ trustHandler: {
378
+ markTrusted: (node) => {
379
+ app.commandLinker.markTrusted(node);
380
+ },
381
+ unmarkTrusted: (node) => {
382
+ app.commandLinker.unmarkTrusted(node);
383
+ },
384
+ },
336
385
  linkHandler: !docManager
337
386
  ? undefined
338
387
  : {
@@ -342,9 +391,12 @@ const rendermime = {
342
391
  if (node.tagName === 'A' && node.hasAttribute('download')) {
343
392
  return;
344
393
  }
345
- app.commandLinker.connectNode(node, CommandIDs.handleLink, {
346
- path,
347
- id,
394
+ node.addEventListener('click', (event) => {
395
+ event.preventDefault();
396
+ void app.commands.execute(CommandIDs.handleLink, {
397
+ path,
398
+ id,
399
+ });
348
400
  });
349
401
  },
350
402
  },
@@ -513,6 +565,12 @@ const title = {
513
565
  const result = await docManager.duplicate(current.context.path);
514
566
  await commands.execute('docmanager:open', { path: result.path });
515
567
  },
568
+ describedBy: {
569
+ args: {
570
+ type: 'object',
571
+ properties: {},
572
+ },
573
+ },
516
574
  });
517
575
  commands.addCommand(CommandIDs.rename, {
518
576
  label: () => trans.__('Rename…'),
@@ -553,6 +611,12 @@ const title = {
553
611
  skipRouting: true,
554
612
  });
555
613
  },
614
+ describedBy: {
615
+ args: {
616
+ type: 'object',
617
+ properties: {},
618
+ },
619
+ },
556
620
  });
557
621
  node.onclick = async () => {
558
622
  void commands.execute(CommandIDs.rename);
@@ -583,6 +647,12 @@ const topVisibility = {
583
647
  }
584
648
  },
585
649
  isToggled: () => top.isVisible,
650
+ describedBy: {
651
+ args: {
652
+ type: 'object',
653
+ properties: {},
654
+ },
655
+ },
586
656
  });
587
657
  let adjustToScreen = false;
588
658
  if (settingRegistry) {
@@ -714,6 +784,27 @@ const sidePanelVisibility = {
714
784
  }
715
785
  return false;
716
786
  },
787
+ describedBy: {
788
+ args: {
789
+ type: 'object',
790
+ properties: {
791
+ side: {
792
+ type: 'string',
793
+ enum: ['left', 'right'],
794
+ description: 'The side panel area to toggle.',
795
+ },
796
+ title: {
797
+ type: 'string',
798
+ description: 'The title shown for the side panel entry.',
799
+ },
800
+ id: {
801
+ type: 'string',
802
+ description: 'The widget id to show or hide in the side panel.',
803
+ },
804
+ },
805
+ required: ['side', 'title', 'id'],
806
+ },
807
+ },
717
808
  });
718
809
  const sidePanelMenu = {
719
810
  left: null,
@@ -852,6 +943,17 @@ const tree = {
852
943
  set.dispose();
853
944
  delegate.resolve({ browser, file: PageConfig.getOption('treePath') });
854
945
  }),
946
+ describedBy: {
947
+ args: {
948
+ type: 'object',
949
+ properties: {
950
+ search: {
951
+ type: 'string',
952
+ description: 'The routed URL query string.',
953
+ },
954
+ },
955
+ },
956
+ },
855
957
  }));
856
958
  set.add(router.register({ command: CommandIDs.resolveTree, pattern: treePattern }));
857
959
  // If a route is handled by the router without the tree command being
@@ -939,6 +1041,12 @@ const zen = {
939
1041
  toggleOff();
940
1042
  }
941
1043
  },
1044
+ describedBy: {
1045
+ args: {
1046
+ type: 'object',
1047
+ properties: {},
1048
+ },
1049
+ },
942
1050
  });
943
1051
  document.addEventListener('fullscreenchange', () => {
944
1052
  if (!document.fullscreenElement) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jupyter-notebook/application-extension",
3
- "version": "7.6.0-alpha.4",
3
+ "version": "7.6.0-alpha.5",
4
4
  "description": "Jupyter Notebook - Application Extension",
5
5
  "homepage": "https://github.com/jupyter/notebook",
6
6
  "bugs": {
@@ -38,19 +38,19 @@
38
38
  "watch": "tsc -b --watch"
39
39
  },
40
40
  "dependencies": {
41
- "@jupyter-notebook/application": "^7.6.0-alpha.4",
42
- "@jupyter-notebook/ui-components": "^7.6.0-alpha.4",
43
- "@jupyterlab/application": "~4.6.0-alpha.4",
44
- "@jupyterlab/apputils": "~4.7.0-alpha.4",
45
- "@jupyterlab/codeeditor": "~4.6.0-alpha.4",
46
- "@jupyterlab/console": "~4.6.0-alpha.4",
47
- "@jupyterlab/coreutils": "~6.6.0-alpha.4",
48
- "@jupyterlab/docmanager": "~4.6.0-alpha.4",
49
- "@jupyterlab/docregistry": "~4.6.0-alpha.4",
50
- "@jupyterlab/mainmenu": "~4.6.0-alpha.4",
51
- "@jupyterlab/rendermime": "~4.6.0-alpha.4",
52
- "@jupyterlab/settingregistry": "~4.6.0-alpha.4",
53
- "@jupyterlab/translation": "~4.6.0-alpha.4",
41
+ "@jupyter-notebook/application": "^7.6.0-alpha.5",
42
+ "@jupyter-notebook/ui-components": "^7.6.0-alpha.5",
43
+ "@jupyterlab/application": "~4.6.0-alpha.5",
44
+ "@jupyterlab/apputils": "~4.7.0-alpha.5",
45
+ "@jupyterlab/codeeditor": "~4.6.0-alpha.5",
46
+ "@jupyterlab/console": "~4.6.0-alpha.5",
47
+ "@jupyterlab/coreutils": "~6.6.0-alpha.5",
48
+ "@jupyterlab/docmanager": "~4.6.0-alpha.5",
49
+ "@jupyterlab/docregistry": "~4.6.0-alpha.5",
50
+ "@jupyterlab/mainmenu": "~4.6.0-alpha.5",
51
+ "@jupyterlab/rendermime": "~4.6.0-alpha.5",
52
+ "@jupyterlab/settingregistry": "~4.6.0-alpha.5",
53
+ "@jupyterlab/translation": "~4.6.0-alpha.5",
54
54
  "@lumino/coreutils": "^2.2.2",
55
55
  "@lumino/disposable": "^2.1.5",
56
56
  "@lumino/widgets": "^2.7.2"