Skip to content

Commit

Permalink
drawio 14.8.0 (QuantStack#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
bollwyvl authored Jun 22, 2021
1 parent 6b3aef7 commit f772592
Show file tree
Hide file tree
Showing 11 changed files with 78 additions and 17 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@

#### @deathbeds/ipydrawio-notebook 1.1.1

#### @deathbeds/ipydrawio-webpack 14.7.600
#### @deathbeds/ipydrawio-webpack 14.8.000

- upgrade to drawio v14.7.6 for layer enhancements and various bugfixes [#51]
- upgrade to drawio v14.8.0 for layer enhancements and various bugfixes [#51]

#### @deathbeds/ipydrawio-jupyter-templates 1.1.1

Expand Down
Binary file modified docs/_static/favicon.ico
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/ipydrawio-webpack/drawio
Submodule drawio updated 95 files
+50 −0 ChangeLog
+1 −1 VERSION
+1 −1 src/main/webapp/export3.html
+ src/main/webapp/images/android-chrome-196x196.png
+1,332 −1,322 src/main/webapp/js/app.min.js
+28 −9 src/main/webapp/js/diagramly/App.js
+153 −201 src/main/webapp/js/diagramly/Dialogs.js
+4 −2 src/main/webapp/js/diagramly/EditorUi.js
+3 −3 src/main/webapp/js/diagramly/GitHubClient.js
+3 −3 src/main/webapp/js/diagramly/GitLabClient.js
+44 −13 src/main/webapp/js/diagramly/GraphViewer.js
+32 −22 src/main/webapp/js/diagramly/Menus.js
+269 −177 src/main/webapp/js/diagramly/Minimal.js
+8 −4 src/main/webapp/js/diagramly/Trees.js
+2 −2 src/main/webapp/js/diagramly/TrelloClient.js
+63 −57 src/main/webapp/js/diagramly/mxFreehand.js
+39 −7 src/main/webapp/js/diagramly/mxRuler.js
+7 −7 src/main/webapp/js/diagramly/sidebar/Sidebar-Advanced.js
+0 −1 src/main/webapp/js/extensions.min.js
+56 −3 src/main/webapp/js/grapheditor/Actions.js
+16 −14 src/main/webapp/js/grapheditor/Dialogs.js
+39 −6 src/main/webapp/js/grapheditor/EditorUi.js
+25 −0 src/main/webapp/js/grapheditor/Format.js
+81 −89 src/main/webapp/js/grapheditor/Graph.js
+6 −1 src/main/webapp/js/grapheditor/Menus.js
+58 −15 src/main/webapp/js/grapheditor/Sidebar.js
+0 −1 src/main/webapp/js/mermaid/mermaid.min.js
+862 −859 src/main/webapp/js/viewer-static.min.js
+862 −859 src/main/webapp/js/viewer.min.js
+23 −23 src/main/webapp/mxgraph/mxClient.js
+1 −1 src/main/webapp/newDiagramCats/index.xml
+57 −4 src/main/webapp/plugins/cConf-1-4-8.js
+8 −0 src/main/webapp/resources/dia.txt
+8 −0 src/main/webapp/resources/dia_am.txt
+8 −0 src/main/webapp/resources/dia_ar.txt
+8 −0 src/main/webapp/resources/dia_bg.txt
+8 −0 src/main/webapp/resources/dia_bn.txt
+8 −0 src/main/webapp/resources/dia_bs.txt
+8 −0 src/main/webapp/resources/dia_ca.txt
+8 −0 src/main/webapp/resources/dia_cs.txt
+8 −0 src/main/webapp/resources/dia_da.txt
+8 −0 src/main/webapp/resources/dia_de.txt
+8 −0 src/main/webapp/resources/dia_el.txt
+8 −0 src/main/webapp/resources/dia_eo.txt
+8 −0 src/main/webapp/resources/dia_es.txt
+8 −0 src/main/webapp/resources/dia_et.txt
+8 −0 src/main/webapp/resources/dia_eu.txt
+8 −0 src/main/webapp/resources/dia_fa.txt
+8 −0 src/main/webapp/resources/dia_fi.txt
+8 −0 src/main/webapp/resources/dia_fil.txt
+8 −0 src/main/webapp/resources/dia_fr.txt
+8 −0 src/main/webapp/resources/dia_gl.txt
+8 −0 src/main/webapp/resources/dia_gu.txt
+8 −0 src/main/webapp/resources/dia_he.txt
+8 −0 src/main/webapp/resources/dia_hi.txt
+8 −0 src/main/webapp/resources/dia_hr.txt
+8 −0 src/main/webapp/resources/dia_hu.txt
+8 −0 src/main/webapp/resources/dia_i18n.txt
+8 −0 src/main/webapp/resources/dia_id.txt
+8 −0 src/main/webapp/resources/dia_it.txt
+8 −0 src/main/webapp/resources/dia_ja.txt
+8 −0 src/main/webapp/resources/dia_kn.txt
+8 −0 src/main/webapp/resources/dia_ko.txt
+8 −0 src/main/webapp/resources/dia_lt.txt
+8 −0 src/main/webapp/resources/dia_lv.txt
+8 −0 src/main/webapp/resources/dia_ml.txt
+8 −0 src/main/webapp/resources/dia_mr.txt
+8 −0 src/main/webapp/resources/dia_ms.txt
+8 −0 src/main/webapp/resources/dia_my.txt
+8 −0 src/main/webapp/resources/dia_nl.txt
+8 −0 src/main/webapp/resources/dia_no.txt
+8 −0 src/main/webapp/resources/dia_pl.txt
+8 −0 src/main/webapp/resources/dia_pt-br.txt
+8 −0 src/main/webapp/resources/dia_pt.txt
+8 −0 src/main/webapp/resources/dia_ro.txt
+8 −0 src/main/webapp/resources/dia_ru.txt
+8 −0 src/main/webapp/resources/dia_si.txt
+8 −0 src/main/webapp/resources/dia_sk.txt
+8 −0 src/main/webapp/resources/dia_sl.txt
+8 −0 src/main/webapp/resources/dia_sr.txt
+8 −0 src/main/webapp/resources/dia_sv.txt
+8 −0 src/main/webapp/resources/dia_sw.txt
+8 −0 src/main/webapp/resources/dia_ta.txt
+8 −0 src/main/webapp/resources/dia_te.txt
+8 −0 src/main/webapp/resources/dia_th.txt
+8 −0 src/main/webapp/resources/dia_tr.txt
+8 −0 src/main/webapp/resources/dia_uk.txt
+8 −0 src/main/webapp/resources/dia_vi.txt
+8 −0 src/main/webapp/resources/dia_zh-tw.txt
+8 −0 src/main/webapp/resources/dia_zh.txt
+1 −1 src/main/webapp/service-worker.js
+1 −1 src/main/webapp/service-worker.js.map
+1 −1 src/main/webapp/shortcuts.svg
+7 −2 src/main/webapp/styles/grapheditor.css
+ src/main/webapp/templates/software/data_flow_1.png
1 change: 1 addition & 0 deletions packages/ipydrawio-webpack/lib/_static.js
Original file line number Diff line number Diff line change
Expand Up @@ -2733,6 +2733,7 @@ import '!!file-loader?name=[path][name].[ext]&context=.!../dio/templates/softwar
import '!!file-loader?name=[path][name].[ext]&context=.!../dio/templates/software/class_2.xml';
import '!!file-loader?name=[path][name].[ext]&context=.!../dio/templates/software/component.png';
import '!!file-loader?name=[path][name].[ext]&context=.!../dio/templates/software/component.xml';
import '!!file-loader?name=[path][name].[ext]&context=.!../dio/templates/software/data_flow_1.png';
import '!!file-loader?name=[path][name].[ext]&context=.!../dio/templates/software/data_flow_1.xml';
import '!!file-loader?name=[path][name].[ext]&context=.!../dio/templates/software/database_1.png';
import '!!file-loader?name=[path][name].[ext]&context=.!../dio/templates/software/database_1.xml';
Expand Down
2 changes: 1 addition & 1 deletion packages/ipydrawio-webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@
"build:pre": "python scripts/patch.py && python scripts/static.py"
},
"types": "lib/index.d.ts",
"version": "14.7.600"
"version": "14.8.000"
}
2 changes: 1 addition & 1 deletion packages/ipydrawio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"json-schema-to-typescript": "^10.1.4"
},
"peerDependencies": {
"@deathbeds/ipydrawio-webpack": "^14.7.600",
"@deathbeds/ipydrawio-webpack": "^14.8.000",
"@jupyter-widgets/base": "4",
"@jupyter-widgets/controls": "3",
"@jupyter-widgets/jupyterlab-manager": "3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ def _pdf(self, pdf_request):
self.start_server()
time.sleep(self.init_wait_sec)
try:
self.log.warning(f"[ipydrawio-export] exporting ({retries} retries)...")
res = self._session.post(self.url, timeout=None, data=data)
pdf_text = res.text
status_code = res.status_code
Expand Down
58 changes: 49 additions & 9 deletions py_packages/ipydrawio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
```bash
mamba install -c conda-forge ipydrawio # recommended, or...
conda install -c conda-forge ipydrawio # or...
pip install ipydrawio ipydrawio
pip install ipydrawio
```

## Features
Expand Down Expand Up @@ -55,27 +55,60 @@ pip install ipydrawio ipydrawio

## Usage

> Please see the [docs] for full information

- Try on [![binder-badge][]][binder]
- or follow the [Installation instructions](#installation) and **Start
JupyterLab**
- Import a `drawio` from [diagrams.net](https://diagrams.net) with the _[File
Manager][]_
- or create a new blank (or customized)
- Open a diagram, by doing one of:
- Creating a
<img src="https://raw.githubusercontent.com/deathbeds/ipydrawio/master/packages/ipydrawio/style/img/drawio.svg" width="24"/>
_Diagram_ from the [Launcher][]
Diagram\_ from the [Launcher][]
- Uploading a diagram created on [diagrams.net](https://diagrams.net) with the
_[File Manager][]_ and double clicking it
- Building diagrams by interactively computing in `IPython` with
`ipydrawio.Diagram`
- Use the `application/x-drawio` MIME renderer
- Use the _[Command Palette][]_ to _Export Diagram_ to various formats
- > **NOTE**: some of the built-in UI features of drawio don't work properly
> inside an IFrame in JupyterLab, and are difficult to robustly disable:
> please see _Diagram_ options available in the _Command Palette_ and
> various _Main Menu_ menus.
- Build interactive diagrams with `ipydrawio.Diagram` from `IPython`
- Use the `application/x-drawio` MIME renderer
## Configuring
- Change the _Diagram Theme_ from the _Settings_
### UI Themes
Your default theme can be changed in the JupyterLab Main Menu:
- open _Settings_
- open _Diagram Theme_
- select your theme
- all open documents will change to this theme (prompting if not saved)
- all future documents will use this theme
The different themes have some advantages and disadvantages:
| theme | default | full menu | layers | pages | light | dark | rough |
| --------- | :-----: | :-------: | :----: | :---: | :---: | :--: | :---: |
| `atlas` | | ✔️ | ✔️ | ✔️ | ✔️ | | |
| `dark` | | ✔️ | ✔️ | ✔️ | | ✔️ | |
| `kennedy` | | ✔️ | ✔️ | ✔️ | ✔️ | | |
| `min` | ✔️ | | ✔️ | ✔️ | ✔️ | ⚙️ | |
| `sketch` | | | ✔️ | | ✔️ | ⚙️ | ✔️ |
> Note that `rough` will change how many shapes look
### Drawio Configuration and URL parameters
> Use _Advanced Settings_ to modify drawio embedding parameters
Use _Advanced Settings_ to modify drawio embedding parameters
> See the [schema] for full details of the (known) supported options as well as
> the [upstream docs] for all parameters, though IPyDrawio might not support
> them... yet.
[schema]: https://ipydrawio.readthedocs.io/en/stable/api/schema.html
[upstream docs]: https://www.diagrams.net/doc/faq/supported-url-parameters
### PDF: Lab and Server extensions
Expand All @@ -99,6 +132,13 @@ headless browser, powered by [@jgraph/draw-image-export2], `puppeteer`, and
> conda install -yc conda-forge ipydrawio-export
> ```

Once installed, you can use the in-browser tools _Export Diagram as PDF_ as well
as the command line:

```bash
jupyter ipydrawio-export <name of document>
```

## Open Source

### License
Expand Down
21 changes: 20 additions & 1 deletion scripts/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,28 @@ def A_O(archive_id, url, cache_bust=CACHE_EPOCH):

JS_PKG_NOT_META = {k: v for k, v in JS_PKG_JSON.items() if k.startswith("_")}


def _norm_js_version(pkg):
"""undo some package weirdness"""
v = pkg["version"]
final = ""
# alphas, beta use dashes
for dashed in v.split("-"):
if final:
final += "-"
for dotted in dashed.split("."):
if final:
final += "."
if re.findall(r"^\d+$", dotted):
final += str(int(dotted))
else:
final += dotted
return final


JS_TARBALL = {
k: JS_PKG_JSON[k].parent
/ f"""{v["name"].replace('@', '').replace("/", "-")}-{v["version"]}.tgz"""
/ f"""{v["name"].replace('@', '').replace("/", "-")}-{_norm_js_version(v)}.tgz"""
for k, v in JS_PKG_DATA.items()
if k not in JS_PKG_NOT_META
}
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"@jupyterlab/application" "3"

"@deathbeds/ipydrawio-webpack@file:packages/ipydrawio-webpack":
version "14.7.600"
version "14.8.000"
dependencies:
"@jupyterlab/application" "3"

Expand Down

0 comments on commit f772592

Please sign in to comment.