jupyterlab-plugin.js 569 B

12345678910111213141516171819202122
  1. import { IJupyterWidgetRegistry } from "@jupyter-widgets/base";
  2. import { MODULE_NAME, MODULE_VERSION } from "./version";
  3. /**
  4. * Activate the widget extension.
  5. */
  6. function activateWidgetExtension(app, registry) {
  7. registry.registerWidget({
  8. name: MODULE_NAME,
  9. version: MODULE_VERSION,
  10. exports: () => import("./index"),
  11. });
  12. }
  13. /**
  14. * The widget plugin.
  15. */
  16. const widgetPlugin = {
  17. id: "jupyterlab-plotly",
  18. requires: [IJupyterWidgetRegistry],
  19. activate: activateWidgetExtension,
  20. autoStart: true,
  21. };
  22. export default widgetPlugin;