Giter Site home page Giter Site logo

quantstack / jupyterlab-drawio Goto Github PK

View Code? Open in Web Editor NEW
595.0 28.0 74.0 10.82 MB

A standalone embedding of the FOSS drawio / mxgraph package into jupyterlab

License: BSD 3-Clause "New" or "Revised" License

JavaScript 98.86% TypeScript 0.64% CSS 0.35% HTML 0.12% Python 0.04%
jupyterlab-extension

jupyterlab-drawio's People

Contributors

bollwyvl avatar consideratio avatar dependabot[bot] avatar hbcarlos avatar jasongrout avatar jeyremy avatar johanmabille avatar jtpio avatar kmader avatar marimeireles avatar martinrenou avatar sylvaincorlay avatar timkpaine avatar vidartf avatar wolfv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jupyterlab-drawio's Issues

"http://localhost:8888/src/css/common.css" was blocked

When the drawio extension is enabled the following files are requested over the network:
http://localhost:8888/src/css/common.css

But in JupyterLab 2.1.1 I get the following error in the web-console of Firefox:
The resource of "http://localhost:8888/src/css/common.css" was blocked because of a MIME type conflict ("text/html") (X-Content-Type-Options: nosniff)

Import or Paste images into diagram

Would be great to be able to paste images into a diagram, like you can with the standalone Draw.io app, or in other places (like Confluence) where Draw.io is embedded.

Pages menu at the bottom missing

Create plugin! I wonder if I am missing something. When using draq.io I have at the bottom a pages menu.
grafik

I don't have it with the plugin. It would be helpful for me.

403 : Forbidden when export a diagram

I got a 403 error when I am trying to export a diagram to png file

The first request curl was copied from chrome:


curl 'http://localhost:8888/export' \
  -H 'Connection: keep-alive' \
  -H 'Cache-Control: max-age=0' \
  -H 'DNT: 1' \
  -H 'Upgrade-Insecure-Requests: 1' \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36' \
  -H 'Origin: http://localhost:8888' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' \
  -H 'Sec-Fetch-Site: same-origin' \
  -H 'Sec-Fetch-Mode: navigate' \
  -H 'Sec-Fetch-User: ?1' \
  -H 'Sec-Fetch-Dest: document' \
  -H 'Referer: http://localhost:8888/lab' \
  -H 'Accept-Language: zh-CN,zh;q=0.9,zh-TW;q=0.8,en;q=0.7' \
  -H 'Cookie: _xsrf=2|48ea477d|7a175aefda3c783b7b6deadb94499252|1589959578; username-localhost-8888="2|1:0|10:1590583362|23:username-localhost-8888|44:MjEyOGJhNmQyYWYxNDgxNTg3NjZiZGZiOGRmZDNjYjM=|eb7077058e78efb32d875dd7b0607e6e60c2e9a4f635c088ab94a97a85c1b3e9"' \
  --data 'format=png&filename=Drawing1.png&bg=%23ffffff&w=121&h=61&xml=%253Coutput%253E%253Cfontfamily%2520family%253D%2522Arial%252CHelvetica%2522%252F%253E%253Cfontsize%2520size%253D%252211%2522%252F%253E%253Cshadowcolor%2520color%253D%2522%2523000000%2522%252F%253E%253Cshadowalpha%2520alpha%253D%25220.25%2522%252F%253E%253Cshadowoffset%2520dx%253D%25222%2522%2520dy%253D%25223%2522%252F%253E%253Ctranslate%2520dx%253D%2522-754%2522%2520dy%253D%2522-1071%2522%252F%253E%253Cscale%2520scale%253D%25221%2522%252F%253E%253Csave%252F%253E%253Cscale%2520scale%253D%25221%2522%252F%253E%253Cfillcolor%2520color%253D%2522%2523ffffff%2522%252F%253E%253Cstrokecolor%2520color%253D%2522%2523000000%2522%252F%253E%253Croundrect%2520x%253D%2522754%2522%2520y%253D%25221071%2522%2520w%253D%2522120%2522%2520h%253D%252260%2522%2520dx%253D%25229%2522%2520dy%253D%25229%2522%252F%253E%253Cfillstroke%252F%253E%253Crestore%252F%253E%253C%252Foutput%253E' \
  --compressed

And response looks like:
image

Automatically creating alternative document formats from .drawio files

A recent release (10.7.5) of draw.io adds command line support that looks as if it lets you run export commands from the command line.

Picking up on Jupytext, which uses the Jupyter content manager to maintain "paired" equivalents of documents (for example, an .ipynb notebook file and a markdown equivalent of it), I wonder if it would be useful to support a similar sort of behaviour for jupyterlab-drawio in which saving a drawio file also results in the automatic creation of an SVG exported version of it, for example?

To keep things tidy,, Jupytext allows you to set watchers on different directory paths so that files of a particular type updated in a specified directory are automatically dualled by equivalent documents of other file types in other directories (mwouts/jupytext#180). In the drawio case, this might mean providing an svg directory into which .svg equivalent filed are automatically exported whenever a drawio file is saved?

Shifted tooltip location

While trying out this cool extension for the first time I saw that the tooltips were pointing at the wrong place.
Screen Shot 2019-06-18 at 10 36 51 AM
If I collapsed the file browser the tooltip would get closer but it was still shifted.

jupyterlab-drawio 0.5.0
jupyterlab 0.35.4

JupyterLab 0.33 support

I'm about to upgrade to the latest JupyterLab and it would be great if the drawio extension would work with that

0.35.0 support

Is this yet available on jupyterLab 0.35.0. I have upgraded from 0.34 and in 0.35 it is not yet supported.

Conflicting Dependencies problem when installing jupyterlab-drawio

Hello.I tried to install jupyterlab-drawio with the following command
jupyter labextension install jupyterlab-drawio

I got following error.How can I fix this?

Errored, use --debug for full output:
ValueError:
"[email protected]" is not compatible with the current JupyterLab
Conflicting Dependencies:
JupyterLab Extension Package

=0.15.4-0 <0.16.0-0 >=0.16.2-0 <0.17.0-0 @jupyterlab/application
=0.15.4-0 <0.16.0-0 >=0.16.2-0 <0.17.0-0 @jupyterlab/apputils
=0.15.4-0 <0.16.0-0 >=0.16.2-0 <0.17.0-0 @jupyterlab/filebrowser
=0.15.4-0 <0.16.0-0 >=0.16.2-0 <0.17.0-0 @jupyterlab/launcher

Embed into a Jupyter Notebook

Hi!
Thanks for a great plugin.

I have a request -
I know it's possible to export and to embed the PNG, but it'd be great to embed the diagram itself which may be editable inside the notebook or that will open the editor on double-click.

Thanks!

'_xsrf' argument missing from POST

Environment:

  • Ubuntu 16.04
  • Jupyter 4.4.0
  • jupyterlab 0.32.1
  • notebook 5.5.0
  • jupyterlab-drawio v0.2.0

Phenomenon

When export .dio file to other format, '_xsrf' argument missing from POST error occurs in new tab http://localhost:8888/export

Installation stuck on "Resolving packages"

Great addition to the Jupyter toolset, but I haven't had success in getting it to work. The installation seems stuck on the step below. This seems to result in an unfinished installation.

OS: macOS 10.13, Python 3.6.5, Jupyter Lab 0.32.1

 ~$…  sudo jupyter labextension install jupyterlab-drawio                                                                                                                                                                                                                                                                                                                                                                    2687ms < Tue Jul 31 11:57:47 2018
                                               
> /usr/local/bin/npm pack jupyterlab-drawio
jupyterlab-drawio-0.2.0.tgz


   ╭─────────────────────────────────────╮
   │                                     │
   │   Update available 5.6.0 → 6.2.0    │
   │       Run npm i npm to update       │
   │                                     │
   ╰─────────────────────────────────────╯

> node /usr/local/lib/python3.6/site-packages/jupyterlab/staging/yarn.js install
yarn install v1.5.1
(node:48326) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
info No lockfile found.
[1/4] 🔍  Resolving packages...
⠁ jupyterlab-drawio@file:../extensions/jupyterlab-drawio-0.2.0.tgz

JupyterLab 0.33 breaks jupyterlab-drawio

Work computer got re-imaged, rebuilding everything. This lovely package seems to be giving me some grief though (was working perfectly before):

$ jupyter labextension install jupyterlab-drawio --debug
...
ValueError: This extension does not yet support the current version of JupyterLab.


Conflicting Dependencies:
JupyterLab              Extension        Package
>=0.17.2 <0.18.0        >=0.16.2 <0.17.0 @jupyterlab/application
>=0.17.2 <0.18.0        >=0.16.2 <0.17.0 @jupyterlab/apputils
>=2.0.2 <3.0.0          >=1.1.2 <2.0.0   @jupyterlab/coreutils
>=0.17.2 <0.18.0        >=0.16.2 <0.17.0 @jupyterlab/filebrowser
>=0.17.2 <0.18.0        >=0.16.2 <0.17.0 @jupyterlab/launcher

FWIW, I also have:

$ jupyter lab --version
0.33.0

$ jupyter --version
4.4.0

Any suggestions greatly appreciated.

EDIT
I fixed this by downgrading to to jupyterlab 0.32, but I'm going to leave this open for the moment as turns out that 0.33 just made it to PyPi and also seems to break jupyterlab-drawio

Compatibility with jupyterlab 2.x?

Our notebook images are based on dockerstacks which now uses jupyterlab 2.0.1 -- however, when installing drawio, there's a version incompatability.

I don't know enough about the API differences between jupyterlab 1.x and 2.x versions -- is this a simple fix?

Installation hangs on MacOS

I am on MacOS 10.13.4. Here are my settings.

  • npm 6.0.1
  • node 10.0.0
  • python 3.6.4
  • conda 4.5.3
  • pip 10.0.1
  • jupyter 4.4.0 (from jupyter --version)
  • jupyter 1.0.0 (from pip list | grep jupyter)
  • jupyterlab 0.32.1 (pip list)

I followed the installation instructions jupyter labextension install jupyterlab-drawio and the for development (clone the repository, then npm install, ....). However, I seem to always get stuck on downloading or processing some tgz file. I have no idea what this file is. Using the dev installation method, which I thought would avoid downloading anything since I think it's building from source, it hangs here

> node /anaconda3/lib/python3.6/site-packages/jupyterlab/staging/yarn.js install
yarn install v1.5.1
(node:33466) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
info No lockfile found.
[1/4] 🔍  Resolving packages...
jupyterlab-drawio@file:../extensions/jupyterlab-drawio-0.2.0-a7d7cd7f765d8eac5a336096fb87e35a8d84185f.tgz

If I hit ctrl-c to break out of this, then I see the following, which is not helpful either.

Traceback (most recent call last):
  File "/anaconda3/bin/jupyter-labextension", line 11, in <module>
    sys.exit(main())
  File "/anaconda3/lib/python3.6/site-packages/jupyter_core/application.py", line 266, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/anaconda3/lib/python3.6/site-packages/traitlets/config/application.py", line 658, in launch_instance
    app.start()
  File "/anaconda3/lib/python3.6/site-packages/jupyterlab/labextensions.py", line 213, in start
    super(LabExtensionApp, self).start()
  File "/anaconda3/lib/python3.6/site-packages/jupyter_core/application.py", line 255, in start
    self.subapp.start()
  File "/anaconda3/lib/python3.6/site-packages/jupyterlab/labextensions.py", line 75, in start
    logger=self.log, command=command)
  File "/anaconda3/lib/python3.6/site-packages/jupyterlab/commands.py", line 259, in build
    command=command, clean_staging=clean_staging)
  File "/anaconda3/lib/python3.6/site-packages/jupyterlab/commands.py", line 400, in build
    self._run(['node', YARN_PATH, 'install'], cwd=staging)
  File "/anaconda3/lib/python3.6/site-packages/jupyterlab/commands.py", line 1278, in _run
    return proc.wait()
  File "/anaconda3/lib/python3.6/site-packages/jupyterlab/process.py", line 108, in wait
    time.sleep(1.)
KeyboardInterrupt

I cleared the pip and npm caches.

  • rm -fr ~/Library/Caches/pip/wheels
  • rm -fr ~/Library/Caches/pip/http
  • npm cache clean --force

None of this helped.

Any ideas on what's going wrong here?

Additional libraries

Is there now, or will there be a way to enable additional draw.io libraries? I suspect this is in the works already, just opening an issue so I can keep up with updates. This is an awesome addition to jupyterlab, thanks for your work on it!

Jupyterlab file browser view is broken after installing jupyterlab-drawio

I have a jupyterhub 1.0.0 running with jupyterlab 1.0.2.
After installing jupyterlab-drawio all entries in the file browser in jupyterlab are invisible. The gray background while hovering over a line with the mouse is about 1/3 of the original line height.
Clicking on different parts switches to the next folder or opens the selected file. Just the visibility is gone.

Cannot integrate with Jupyter lab

I am not sure if it is caused by this extension.
I just installed Anaconda. AFter launching Jupyterlab, and install this extension successfully, a popup window says : Need to rebuild Jupyter. After rebuilding successfully, and reload the page, the popup window comes again...

Install error: list index out of range

When I run "jupyter labextension install jupyterlab-drawio". It says IndexError: list index out of range. Is there anybody has the solution to this error?

$ jupyter labextension install jupyterlab-drawio
npm.cmd pack jupyterlab-drawio
'npm.cmd' ▒▒▒▒▒ڲ▒▒▒▒ⲿ▒▒▒Ҳ▒▒▒ǿ▒▒▒▒еij▒▒▒
▒▒▒▒▒▒▒▒▒ļ▒▒▒
Traceback (most recent call last):
File "C:\Users\anqit\AppData\Local\Continuum\anaconda3\Scripts\jupyter-labextension-script.py", line 10, in
sys.exit(main())
File "C:\Users\anqit\AppData\Local\Continuum\anaconda3\lib\site-packages\jupyter_core\application.py", line 267, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "C:\Users\anqit\AppData\Local\Continuum\anaconda3\lib\site-packages\traitlets\config\application.py", line 658, in launch_instance
app.start()
File "C:\Users\anqit\AppData\Local\Continuum\anaconda3\lib\site-packages\jupyterlab\labextensions.py", line 168, in start
super(LabExtensionApp, self).start()
File "C:\Users\anqit\AppData\Local\Continuum\anaconda3\lib\site-packages\jupyter_core\application.py", line 256, in start
self.subapp.start()
File "C:\Users\anqit\AppData\Local\Continuum\anaconda3\lib\site-packages\jupyterlab\labextensions.py", line 58, in start
for arg in self.extra_args]
File "C:\Users\anqit\AppData\Local\Continuum\anaconda3\lib\site-packages\jupyterlab\labextensions.py", line 58, in
for arg in self.extra_args]
File "C:\Users\anqit\AppData\Local\Continuum\anaconda3\lib\site-packages\jupyterlab\commands.py", line 100, in install_extension
return IOLoop.instance().run_sync(func)
File "C:\Users\anqit\AppData\Local\Continuum\anaconda3\lib\site-packages\tornado\ioloop.py", line 458, in run_sync
return future_cell[0].result()
File "C:\Users\anqit\AppData\Local\Continuum\anaconda3\lib\site-packages\tornado\concurrent.py", line 238, in result
raise_exc_info(self._exc_info)
File "", line 4, in raise_exc_info
File "C:\Users\anqit\AppData\Local\Continuum\anaconda3\lib\site-packages\tornado\gen.py", line 1069, in run
yielded = self.gen.send(value)
File "C:\Users\anqit\AppData\Local\Continuum\anaconda3\lib\site-packages\jupyterlab\commands.py", line 140, in install_extension_async
fname = os.path.basename(glob.glob(pjoin(target, '.'))[0])
IndexError: list index out of range

v0.7.0 does not yet support JupyterLab 3

The current version of this extension cannot be installed with Jupyterlab 3

call conda create --name jl3-test --channel conda-forge --yes jupyterlab=3 python=3.8 nodejs=14
call conda activate jl3-test
jupyter labextension install jupyterlab-drawio
An error occured.
ValueError: The extension "jupyterlab-drawio" does not yet support the current version of JupyterLab.


Conflicting Dependencies:
JupyterLab              Extension      Package
>=3.0.0 <3.1.0          >=2.0.0 <3.0.0 @jupyterlab/application
>=3.0.0 <3.1.0          >=2.0.0 <3.0.0 @jupyterlab/apputils
>=5.0.0 <5.1.0          >=4.0.0 <5.0.0 @jupyterlab/coreutils
>=3.0.0 <3.1.0          >=2.0.0 <3.0.0 @jupyterlab/filebrowser
>=3.0.0 <3.1.0          >=2.0.0 <3.0.0 @jupyterlab/launcher
>=3.0.0 <3.1.0          >=2.0.0 <3.0.0 @jupyterlab/mainmenu

Feature request: Link shape to object in kernel

Vision:
Developer/Data Scientists want to document a complex task in a graphical way. After they wrote their code, they open the draw.io extension and select the running kernel. Now they can draw a shape and link it to an object in the kernel (Probably identified by the object name and/or type). The logic link is maybe indicated by a small green check mark at one corner of the box. Now they can sketch their pipeline/process with several objects.
When an object is removed from the code and not present in the kernel anymore (Probably after a kernel restart) a red cross in the shape indicates the absence of the object, signalling the users that their sketched pipeline is not consistent anymore, forcing them to review their code or to adapt their sketch.

Needed components:

  • A dropdown to select a running kernel
  • A dropdown in the shape properties to select the object
  • Checkboxes to check for object properties (Name, Object type, ...[attributes?])
  • Visual indication at shape whether object with properties is found in kernel.

Notes:
The general absence of a graphical sanity check and documentation tool is a big weakness of the jupyter workflow. I think draw.io could pretty easily carve out this niche with their existing tools and make a really big difference to data scientists workflows.

File - Import dialog doesn't work

editor.ts loads files from https://raw.githubusercontent.com/:

let web_path = "https://raw.githubusercontent.com/jgraph/mxgraph/master/javascript/examples/grapheditor/www/";

This fails when you open the File -> Import dialog. Firefox web console:

GET
https://raw.githubusercontent.com/jgraph/mxgraph/master/javascript/examples/grapheditor/www/open.html

Load denied by X-Frame-Options: https://raw.githubusercontent.com/jgraph/mxgraph/master/javascript/examples/grapheditor/www/open.html does not permit framing.

Content Security Policy: Ignoring ‘x-frame-options’ because of ‘frame-ancestors’ directive.

Firefox: 60.0, Mac OS X 10.13.4
jupyterlab-drawio installed in Docker (base image jupyter/scipy-notebook:5811dcb711ba)

Can't save or export on MacOSX

I just installed drawio on a MacOSX High Sierra
the installation was straight forward but saving or exporting a diagram doesn't seem to work. A new tab http://localhost:8888/export opens up with the following error message:

403 : Forbidden
The error was:
'_xsrf' argument missing from POST

can't build in win10

when i use the "jupyter labextension install jupyterlab-drawio" to install drawio in my compyter with win10, it shows that:
图片
how can i install it?
thanks

Support JupyterLab 2.0.0

JupyterLab 2.0.0 is out, and this extension have conflicting dependencies with its core packages.

Conflicting Dependencies:
JupyterLab              Extension      Package
>=2.0.0 <2.1.0          >=1.0.0 <2.0.0 @jupyterlab/application
>=2.0.0 <2.1.0          >=1.0.0 <2.0.0 @jupyterlab/apputils
>=4.0.0 <4.1.0          >=3.0.0 <4.0.0 @jupyterlab/coreutils
>=2.0.0 <2.1.0          >=1.0.0 <2.0.0 @jupyterlab/filebrowser
>=2.0.0 <2.1.0          >=1.0.0 <2.0.0 @jupyterlab/launcher

References

jupyter install failure docker container build

i am attempting to build a Docker container with jupyterlab + notebook + r + this drawio extension. It is based on the Dockerfile for anaconda3 from hub.docker.com.

NodeJS 10.15.2
Npm 5.8.0

(these are both installed with current jupyterlab apparently)

$ jupyter -v

jupyter core     : 4.5.0
jupyter-notebook : 6.0.1
qtconsole        : 4.5.5
ipython          : 7.8.0
ipykernel        : 5.1.2
jupyter client   : 5.3.3
jupyter lab      : 1.1.4
nbconvert        : 5.6.0
ipywidgets       : 7.5.1
nbformat         : 4.4.0
traitlets        : 4.3.3

Failure message as follows:

jupyter labextension install jupyterlab-drawio
Building jupyterlab assets (build:prod:minimize)
An error occured.
RuntimeError: JupyterLab failed to build
See the log file for details:  /tmp/jupyterlab-debug-3uijdxha.log

/tmp/jupyterlab-debug-3uijdxha.log contains:

Building jupyterlab assets (build:prod:minimize)
> node /opt/conda/lib/python3.7/site-packages/jupyterlab/staging/yarn.js install --non-interactive
yarn install v1.15.2
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
[5/5] Building fresh packages...
success Saved lockfile.
Done in 11.36s.

> node /opt/conda/lib/python3.7/site-packages/jupyterlab/staging/yarn.js yarn-deduplicate -s fewer
yarn run v1.15.2
$ /opt/conda/share/jupyter/lab/staging/node_modules/.bin/yarn-deduplicate -s fewer
Done in 0.99s.

> node /opt/conda/lib/python3.7/site-packages/jupyterlab/staging/yarn.js run build:prod:minimize
yarn run v1.15.2
$ cross-env NODE_OPTIONS=--max_old_space_size=4096 webpack --config webpack.prod.minimize.config.js
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

JupyterLab failed to build
Traceback (most recent call last):

  File "/opt/conda/lib/python3.7/site-packages/jupyterlab/debuglog.py", line 47, in debug_logging
    yield

  File "/opt/conda/lib/python3.7/site-packages/jupyterlab/labextensions.py", line 105, in start
    core_config=self.core_config)

  File "/opt/conda/lib/python3.7/site-packages/jupyterlab/commands.py", line 378, in build
    command=command, clean_staging=clean_staging)

  File "/opt/conda/lib/python3.7/site-packages/jupyterlab/commands.py", line 583, in build
    raise RuntimeError(msg)

RuntimeError: JupyterLab failed to build

Exiting application: jupyter

/opt/conda/lib/python3.7/site-packages/jupyterlab/staging/webpack.prod.minimize.config.js

const TerserPlugin = require('terser-webpack-plugin');
var merge = require('webpack-merge');
var config = require('./webpack.config');

config[0] = merge(config[0], {
  mode: 'production',
  devtool: 'source-map',
  optimization: {
    minimizer: [
      new TerserPlugin({
        parallel: true,
        sourceMap: true,
        terserOptions: {
          compress: false,
          ecma: 6,
          mangle: true,
          output: {
            beautify: false,
            comments: false
          },
          safari10: true
        },
        cache: process.platform !== 'win32'
      })
    ]
  }
});

module.exports = config;

fishy behaviour with Text items

Hey there

First off I'd like to congratulate you guys for this great tool, hopefully I won't need to digress with keynotes any more :-)

Now, I'm using this version

$ jupyter labextension list 2>&1 | grep drawio
        jupyterlab-drawio v0.7.0  enabled  OK

but am facing an odd behaviour with text items; creation is fine, but editions later on turn out to be problematic

I have tried to describe a scenario that would allow to reproduce my issue, but I could not find anything deterministically reproducible; so the best I can describe it is, it happens that I open a document to change the contents of a text element, but that does not trigger properly and does not survive the next save/reload cycle; also when the problem occurs I often see erroneous display.

this is not an isolated occurrence, I have run into that a few times already; at first I could be misusing the UI, and it's still possible that I do, but figured it was worth recording the matter in case others would experience the same thing

thanks again for making this tool available !

Unable to install on Mac OS

Hi, I'm not very Terminal or Jupyter savy...

I've tried:
jupyter labextension install jupyterlab-drawio

Then got this:
> '' pack jupyterlab-drawio expected str, bytes or os.PathLike object, not NoneType

Error during install

Error in installation. When I try to install using
$ jupyter labextension install jupyterlab-drawio

I get the following error.

/usr/local/bin/npm pack jupyterlab-drawio
jupyterlab-drawio-0.1.2.tgz

Errored, use --debug for full output:
IOError: CRC check failed 0x4231cfac != 0xc08de80bL

Would appreciate your help.
Thanks

Allow exporting into more formats

The online draw.io app supports more formats, whereas only SVG is available as an export option. At least include PDF and PNG, which can be easily embedded in Latex.

Install fails - Conflicts with current Jupyterlab dependencies

Installation fails: jupyter labextension install jupyterlab-drawio

ValueError: 
"[email protected]" is not compatible with the current JupyterLab
Conflicting Dependencies:
JupyterLab              Extension            Package
>=0.10.0-0 <0.11.0-0    >=0.15.0-0 <0.16.0-0 @jupyterlab/filebrowser
>=0.10.0-0 <0.11.0-0    >=0.15.0-0 <0.16.0-0 @jupyterlab/launcher
>=0.10.0-0 <0.11.0-0    >=0.15.0-0 <0.16.0-0 @jupyterlab/apputils
>=0.10.0-0 <0.11.0-0    >=0.15.0-0 <0.16.0-0 @jupyterlab/application

Full dump

jupyter labextension install jupyterlab-drawio
> npm pack jupyterlab-drawio
jupyterlab-drawio-0.1.2.tgz
Traceback (most recent call last):
  File "/Users/xxx/anaconda3/bin/jupyter-labextension", line 11, in <module>
    sys.exit(main())
  File "/Users/xxx/anaconda3/lib/python3.5/site-packages/jupyter_core/application.py", line 267, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/Users/xxx/anaconda3/lib/python3.5/site-packages/traitlets/config/application.py", line 658, in launch_instance
    app.start()
  File "/Users/xxx/anaconda3/lib/python3.5/site-packages/jupyterlab/labextensions.py", line 168, in start
    super(LabExtensionApp, self).start()
  File "/Users/xxx/anaconda3/lib/python3.5/site-packages/jupyter_core/application.py", line 256, in start
    self.subapp.start()
  File "/Users/xxx/anaconda3/lib/python3.5/site-packages/jupyterlab/labextensions.py", line 58, in start
    for arg in self.extra_args]
  File "/Users/xxx/anaconda3/lib/python3.5/site-packages/jupyterlab/labextensions.py", line 58, in <listcomp>
    for arg in self.extra_args]
  File "/Users/xxx/anaconda3/lib/python3.5/site-packages/jupyterlab/commands.py", line 100, in install_extension
    return IOLoop.instance().run_sync(func)
  File "/Users/xxx/anaconda3/lib/python3.5/site-packages/tornado/ioloop.py", line 458, in run_sync
    return future_cell[0].result()
  File "/Users/xxx/anaconda3/lib/python3.5/site-packages/tornado/concurrent.py", line 238, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 4, in raise_exc_info
  File "/Users/xxx/anaconda3/lib/python3.5/site-packages/tornado/gen.py", line 1069, in run
    yielded = self.gen.send(value)
  File "/Users/xxx/anaconda3/lib/python3.5/site-packages/jupyterlab/commands.py", line 158, in install_extension_async
    raise ValueError(msg)
ValueError: 
"[email protected]" is not compatible with the current JupyterLab
Conflicting Dependencies:
JupyterLab              Extension            Package
>=0.10.0-0 <0.11.0-0    >=0.15.0-0 <0.16.0-0 @jupyterlab/filebrowser
>=0.10.0-0 <0.11.0-0    >=0.15.0-0 <0.16.0-0 @jupyterlab/launcher
>=0.10.0-0 <0.11.0-0    >=0.15.0-0 <0.16.0-0 @jupyterlab/apputils
>=0.10.0-0 <0.11.0-0    >=0.15.0-0 <0.16.0-0 @jupyterlab/application

Installation Issue

Hello Community,

I am having issues to install the extension.

Hope someone can point be in the right direciton.

Open Anaconda Prompt as admin and run:

jupyter labextension install jupyterlab-drawio

Get the following Message:

Building jupyterlab assets (build:prod:minimize)
An error occured.
RuntimeError: JupyterLab failed to build
See the log file for details:  C:\Users\xxx\AppData\Local\Temp\jupyterlab-debug-mfyjled7.log

Log File Says:

Yarn configuration loaded.
Node v10.13.0

> C:\Users\xxx\AppData\Local\Continuum\anaconda3\npm.CMD pack jupyterlab-drawio
npm notice 
npm notice package: [email protected]
... tons of npm notices ...
npm notice total files:   1419                                    
npm notice 
jupyterlab-drawio-0.6.0.tgz

Yarn configuration loaded.
Node v10.13.0

Building jupyterlab assets (build:prod:minimize)
> node C:\Users\xxx\AppData\Local\Continuum\anaconda3\lib\site-packages\jupyterlab\staging\yarn.js install --non-interactive
yarn install v1.15.2
[1/5] Validating package.json...
[2/5] Resolving packages...
success Already up-to-date.
Done in 0.42s.

> node C:\Users\xxx\AppData\Local\Continuum\anaconda3\lib\site-packages\jupyterlab\staging\yarn.js yarn-deduplicate -s fewer
yarn run v1.15.2
$ C:\Users\xxx\AppData\Local\Continuum\anaconda3\share\jupyter\lab\staging\node_modules\.bin\yarn-deduplicate -s fewer
Done in 1.95s.

> node C:\Users\xxx\AppData\Local\Continuum\anaconda3\lib\site-packages\jupyterlab\staging\yarn.js run build:prod:minimize
yarn run v1.15.2
$ ensure-max-old-space webpack --config webpack.prod.minimize.config.js

<--- Last few GCs --->


<--- JS stacktrace --->


#
# Fatal process OOM in insufficient memory to create an Isolate
#

child_process.js:632
    throw err;
    ^

Error: Command failed: C:\Users\xxx\AppData\Local\Continuum\anaconda3\share\jupyter\lab\staging\node_modules\.bin\webpack.CMD --config webpack.prod.minimize.config.js
    at checkExecSyncError (child_process.js:611:11)
    at Object.execFileSync (child_process.js:629:13)
    at Object.<anonymous> (C:\Users\xxx\AppData\Local\Continuum\anaconda3\share\jupyter\lab\staging\node_modules\@jupyterlab\buildutils\lib\ensure-max-old-space.js:38:17)
    at Module._compile (internal/modules/cjs/loader.js:688:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Module.load (internal/modules/cjs/loader.js:598:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
    at Function.Module._load (internal/modules/cjs/loader.js:529:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:741:12)
    at startup (internal/bootstrap/node.js:285:19)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

JupyterLab failed to build
Traceback (most recent call last):

  File "C:\Users\xxx\AppData\Local\Continuum\anaconda3\lib\site-packages\jupyterlab\debuglog.py", line 47, in debug_logging
    yield

  File "C:\Users\xxx\AppData\Local\Continuum\anaconda3\lib\site-packages\jupyterlab\labextensions.py", line 105, in start
    command=command, app_options=app_options)

  File "C:\Users\xxx\AppData\Local\Continuum\anaconda3\lib\site-packages\jupyterlab\commands.py", line 459, in build
    command=command, clean_staging=clean_staging)

  File "C:\Users\xxx\AppData\Local\Continuum\anaconda3\lib\site-packages\jupyterlab\commands.py", line 669, in build
    raise RuntimeError(msg)

RuntimeError: JupyterLab failed to build

Exiting application: jupyter

failing to build with python 3.8.1

ModuleNotFoundError: Module not found: Error: Can't resolve 'worker-loader' in '/root/miniconda/envs/py3.8.1/share/jupyter/lab/staging/node_modules/pdfjs-dist'

HTTP Get errors for several files

As noted in jupyterlab/jupyterlab#6806, when I install jupyterlab-drawio in JupyterLab 1.1.1 in a clean conda environment, I get the following errors:

[W 10:39:19.252 LabApp] 404 GET /src/css/common.css (::1) 43.88ms referer=http://localhost:8888/lab
[W 10:39:19.255 LabApp] 404 GET /src/resources/graph.txt (::1) 2.11ms referer=http://localhost:8888/lab
[W 10:39:19.277 LabApp] 404 GET /src/resources/editor.txt (::1) 2.02ms referer=http://localhost:8888/lab

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.