Releases: sverweij/mscgen_js
1.2.6
- uses the npm package mscgenjs-inpage for the pages using the mscgen_js embedding feature (embed.html and tutorial.html)
- small beer/ housekeeping
Complete list of changes: 1.2.5...1.2.6
1.2.5
- makes the tutorial and embedding guide more usable by
- placing the table of contents on a fixed spot on the left
- tweaking the copy
Complete list of changes: 1.2.4...1.2.5
1.2.4
- little tweaks in the tutorial html
- a new color scheme: bluey
- a humongous refactoring - functionality should not be affected (tested thoroughly), but as always: bug reports welcome.
- Split off the core functionality (parsing and rendering) to a separate git repo: mscgenjs-core. Why? To enable other modules (like atom-mscgen-preview or the command line interface) to use it with a simple dependency in their package.json.
- Splits off the command line interface to mscgenjs-cli.
- Refactors the rest of the code to use mscgenjs-core.
List of changes: 1.2.3...1.2.4
1.2.3
- when you generate a piece of HTML with an embedded msc,
<
is now properly escaped to<
- the editor area scales up to size for screens up till 1150px (was 1000px)
- various small HTML related fixes and optimizations
List of changes: 1.2.2...1.2.3
1.2.2
Snazzified CLI & npm packaging preparations
- Makes preparations to get mscgen_js in a state where it is an (easily) usable npm package
- a (lazy loading) index.js
- move keys for ci services to ci
- Upgrades the command line interface:
- conversion to and from mscgen, xu and msgenny
- conversion to mscgen, xu, msgenny, dot, doxygen, svg, png and jpeg
- uses graphics rendering with phantomjs instead of jsdom. A bit slower, but accurate because phantomjs does support getBBox
- this also makes most of the scriptlets in src/script/scriptlets superfluous => ⚡ smaller npm package
- The about-box in the interpreter got a refreshment. Less copy, more in style with the newer sliding panels (a.o.t. a light-boxish thing)
Lis of changes: 1.2.1...1.2.2
1.2.1
Small changes.
List: 1.2.0...1.2.1
1.2.0
Embedding charts from separate files
- Enables embedding charts from separate files. Which fixes #211, which was a suggestion from @jbcpollak in issue #206
- See Loading from separate files in the embedding guide for more information.
- Also updates the bower package
List of all changes: 1.1.0...1.2.0
Sample
Live sample: https://sverweij.github.io/mscgen_js/samples/embedexternal.html
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
<script>
var mscgen_js_config = {
clickable: true,
loadFromSrcAttribute: true
}
</script>
<script src='http://localhost:8666/mscgen-inpage.js' defer></script>
</head>
<body>
<h2>Read from an external file</h2>
<div data-src="https://sverweij.github.io/mscgen_js/samples/test21_unicode_colored.mscin"></div>
<h2>Read from a non-existing external file</h2>
<p>Should display an error message</p>
<mscgen data-src="thisfiledoesnotexist.mscin"></mscgen>
<h2>Embedded in the page and a src attribute</h2>
<p>
The stuff in the src attribute wins. In
this case means we see a unicode exchange, and not labels a,b and c introducing each other
</p>
<pre class="mscgen_js" data-src="https://sverweij.github.io/mscgen_js/samples/test21a_unicode_serious.msgenny" data-language="msgenny">
a, b, c;
b => * : hello world;
a >> b : hello b,
c >> b : hello b;
</pre>
</body>
</html>
Rendered output
1.1.0
All of unicode as first class citizens
This Friday I realized three things
- MscGen, Xù and MsGenny only allow a microscopic subset of unicode in naked entity names (
[A-Za-z0-9]+
). Which sucks for the majority of humanity. - This is not necessary.
- While I don't control the MscGen specification, I do control that of MsGenny. Which means I can fix that.
So I fixed it. From this version on MsGenny treats all unicode characters as first class citizens. This means you no longer have to put non-alpha-numeric identifiers within quotes ("差出人"
) nor do you have to resort to using labels (sender: 差出人;
). Instead, you can write
差出人 -> 受信機: 信息;
to get
(Click the chart to open it in the interpreter)
List of all changes (mostly dependency updates): 1.0.7...1.1.0
1.0.7
Functionality
- Improves error messages concerning missing entities in (in mscgen and xù)
- Adds a command line interface (see src/script/cli). Works fine. Two caveats:
- still uses jsdom, so chart features relying on getBBox calculations look sub-optimal.
- command line options are not 100% posixy:
node mscgen.js -T svg -i input.msc -o output.svg works
, butnode mscgen.js -Tsvg -i input.svg -o output.svg
(note the missing space between-T
andsvg
) does not.
- Adds (scripts for creating) a Bower package. See https://github.com/sverweij/mscgen_js-inpage-package.
Tech stuff
- Automates external as well as internal dependency management (with npm-check-updates and js-makedepend respectively).
- Upgrades of various dependencies.
- mscgen_js' syntax highlighting for mscgen, xù and msgenny in codemirror was merged into the code mirror repo, so we're using that now.
- Clarifies failing tests (none at the moment, thank you :-) ) by using chai and chai-xml.
List of all changes: 1.0.0...1.0.7
Release 1.0.0
A bump to 1.0.0?
Yep. This means I'm confident the package (both library and interpreter) will behave as I intend it to.
Changes: polishing
Rendering:
- Arrows get the same color as the line they're part of.
- Label positions are optimized to decrease the chance of text/ line collisions.
- Self reference arcs now render as a curve instead of as three straight lines.
- Pixel tweaking in notes, emphasis and method arcs and in the self reference variant of lost arcs.
- Empty labels don't get rendered anymore (no visible difference, just a smaller svg).
In some circumstances the difference is very noticeable (click on the image to view it in the online interpreter):
[](https://sverweij.github.io/mscgen_js/index.html?lang=mscgen&utm_source=releasenotes&utm_campaign=1.0.0&msc=msc {%0A hscale%3D"1.15"%2C%0A wordwraparcs%3D"true"%3B%0A%0A Alice [linecolor%3D"%23008800"%2C textbgcolor%3D"%23CCFFCC"%2C arclinecolor%3D"%23008800"]%2C%0A Bob [linecolor%3D"%23FF0000"%2C textbgcolor%3D"%23FFCCCC"%2C arclinecolor%3D"%23FF0000"]%3B%0A%0A Alice %3D> Alice [label%3D"sign message with own private key"]%3B%0A Alice %3D> Bob [label%3D"message signed with Alice her private key"]%3B%0A Bob %3D> Alice [label%3D"get Alice her public key"]%3B%0A Alice >> Bob [label%3D"Alices' public key"]%3B%0A Bob %3D> Bob [label%3D"verify message with Alice her public key"]%3B%0A})
Web page optimizations:
- Pages load all vector assets from one, small font.
- That asset font (already in use) is smaller.
- In the interpreter rendering logic politely waits until typing is done. This makes typing larger charts more comfortable.
- Editor:
- improved syntax highlighting.
- The editor area resizing now accommodates more and larger screen sizes.
I also reorganized the code a bit and updated the build process so I can deploy more than one branch at the same time.
Details of all changes since release 0.9.95: 0.9.95...1.0.0