Merge branch 'mermaid-8.13' into staging

pull/1/head
ansuz 3 years ago
commit bff8b54304

@ -132,6 +132,24 @@
g.legend text, text.pieTitleText {
fill: @cp_markdown-block-fg;
}
g.legend rect {
stroke: @cryptpad_text_col !important;
stroke-width: 1px;
}
.pieCircle {
stroke: @cryptpad_text_col;
}
text.slice {
fill: @cryptpad_text_col;
}
}
&[mermaid-source^="erDiagram"] {
rect.er:not(.relationshipLabelBox) {
fill: #ECECFF;
}
g text.er {
fill: #333;
}
}
}
pre.markmap {

File diff suppressed because one or more lines are too long

@ -36,7 +36,7 @@ define([
init: function () {
require([
'mermaid',
'css!/code/mermaid-new.css'
//'css!/code/mermaid-new.css' // XXX
], function (_Mermaid) {
console.debug("loaded mermaid");
if (Mermaid.__stubbed) {
@ -202,7 +202,7 @@ define([
renderer.code = function (code, language) {
if (!code || typeof(code) !== 'string' || !code.trim()) { return defaultCode.apply(renderer, arguments); }
if (language === 'mermaid' && code.match(/^(graph|pie|gantt|sequenceDiagram|classDiagram|gitGraph)/)) {
if (language === 'mermaid' && code.match(/^(flowchart|graph|pie|gantt|sequenceDiagram|classDiagram|gitGraph|stateDiagram|erDiagram|journey|requirementDiagram)/)) {
return '<pre class="mermaid" data-plugin="mermaid">'+Util.fixHTML(code)+'</pre>';
} else if (language === 'markmap') {
return '<pre class="markmap" data-plugin="markmap">'+Util.fixHTML(code)+'</pre>';

@ -10,7 +10,7 @@ define([
json: '/bower_components/requirejs-plugins/src/json',
// jquery declares itself as literally "jquery" so it cannot be pulled by path :(
"jquery": "/bower_components/jquery/dist/jquery.min",
"mermaid": "/code/mermaid.min",
"mermaid": "/lib/mermaid/mermaid.min",
// json.sortify same
"json.sortify": "/bower_components/json.sortify/dist/JSON.sortify",
cm: '/bower_components/codemirror',

@ -8,6 +8,6 @@ This file is intended to be used as a log of what third-party source we have ven
* [jscolor v2.0.5](https://jscolor.com/) for providing a consistent color picker across all browsers
* [jquery.ui 1.12.1](https://jqueryui.com/) for its 'autocomplete' extension which is used for our tag picker
* [pdfjs](https://mozilla.github.io/pdf.js/) with some minor modifications to prevent CSP errors
* [mermaidjs 8.4.8](https://mermaid-js.github.io/mermaid/#/) extends our markdown integration to support a variety of diagram types
* [mermaid 8.13.4](https://github.com/mermaid-js/mermaid/releases/tag/8.13.4) extends our markdown integration to support a variety of diagram types
* [Fabricjs 4.6.0](https://github.com/fabricjs/fabric.js) and [Fabric-history](https://github.com/lyzerk/fabric-history) for the whiteboard app

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2014 - 2021 Knut Sveidqvist
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save