mermaid 9.1.4 → 9.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/dist/mermaid.core.js +21 -10
- package/dist/mermaid.core.js.map +1 -1
- package/dist/mermaid.esm.min.mjs +1 -1
- package/dist/mermaid.esm.min.mjs.map +1 -1
- package/dist/mermaid.js +21 -10
- package/dist/mermaid.js.map +1 -1
- package/dist/mermaid.min.js +1 -1
- package/dist/mermaid.min.js.map +1 -1
- package/package.json +2 -2
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2014 -
|
|
3
|
+
Copyright (c) 2014 - 2022 Knut Sveidqvist
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/dist/mermaid.core.js
CHANGED
|
@@ -10237,6 +10237,8 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
10237
10237
|
|
|
10238
10238
|
var Diagram = /*#__PURE__*/function () {
|
|
10239
10239
|
function Diagram(txt) {
|
|
10240
|
+
var _this$db$clear, _this$db;
|
|
10241
|
+
|
|
10240
10242
|
_classCallCheck(this, Diagram);
|
|
10241
10243
|
|
|
10242
10244
|
_defineProperty(this, "type", 'graph');
|
|
@@ -10255,6 +10257,7 @@ var Diagram = /*#__PURE__*/function () {
|
|
|
10255
10257
|
// Setup diagram
|
|
10256
10258
|
|
|
10257
10259
|
this.db = diagrams[this.type].db;
|
|
10260
|
+
(_this$db$clear = (_this$db = this.db).clear) === null || _this$db$clear === void 0 ? void 0 : _this$db$clear.call(_this$db);
|
|
10258
10261
|
this.renderer = diagrams[this.type].renderer;
|
|
10259
10262
|
this.parser = diagrams[this.type].parser;
|
|
10260
10263
|
this.parser.parser.yy = this.db;
|
|
@@ -31943,7 +31946,7 @@ var init = function init() {
|
|
|
31943
31946
|
initThrowsErrors.apply(void 0, arguments);
|
|
31944
31947
|
} catch (e) {
|
|
31945
31948
|
_logger__WEBPACK_IMPORTED_MODULE_0__.log.warn('Syntax Error rendering');
|
|
31946
|
-
_logger__WEBPACK_IMPORTED_MODULE_0__.log.warn(e);
|
|
31949
|
+
_logger__WEBPACK_IMPORTED_MODULE_0__.log.warn(e.str);
|
|
31947
31950
|
|
|
31948
31951
|
if (this.parseError) {
|
|
31949
31952
|
this.parseError(e);
|
|
@@ -32026,15 +32029,23 @@ var initThrowsErrors = function initThrowsErrors() {
|
|
|
32026
32029
|
_logger__WEBPACK_IMPORTED_MODULE_0__.log.debug('Detected early reinit: ', init);
|
|
32027
32030
|
}
|
|
32028
32031
|
|
|
32029
|
-
|
|
32030
|
-
|
|
32032
|
+
try {
|
|
32033
|
+
_mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].render(id, txt, function (svgCode, bindFunctions) {
|
|
32034
|
+
element.innerHTML = svgCode;
|
|
32031
32035
|
|
|
32032
|
-
|
|
32033
|
-
|
|
32034
|
-
|
|
32036
|
+
if (typeof callback !== 'undefined') {
|
|
32037
|
+
callback(id);
|
|
32038
|
+
}
|
|
32035
32039
|
|
|
32036
|
-
|
|
32037
|
-
|
|
32040
|
+
if (bindFunctions) bindFunctions(element);
|
|
32041
|
+
}, element);
|
|
32042
|
+
} catch (error) {
|
|
32043
|
+
_logger__WEBPACK_IMPORTED_MODULE_0__.log.warn('Catching Error (bootstrap)');
|
|
32044
|
+
throw {
|
|
32045
|
+
error: error,
|
|
32046
|
+
message: error.str
|
|
32047
|
+
};
|
|
32048
|
+
}
|
|
32038
32049
|
};
|
|
32039
32050
|
|
|
32040
32051
|
for (var i = 0; i < nodes.length; i++) {
|
|
@@ -32399,7 +32410,7 @@ var render = function render(id, _txt, cb, container) {
|
|
|
32399
32410
|
.append('svg').attr('id', id).attr('width', '100%').attr('xmlns', 'http://www.w3.org/2000/svg').append('g');
|
|
32400
32411
|
}
|
|
32401
32412
|
|
|
32402
|
-
txt = encodeEntities(txt); //
|
|
32413
|
+
txt = encodeEntities(txt); // Important that we do not create the diagram until after the directives have been included
|
|
32403
32414
|
|
|
32404
32415
|
var diag = new _Diagram__WEBPACK_IMPORTED_MODULE_3__["default"](txt); // Get the tmp element containing the the svg
|
|
32405
32416
|
|
|
@@ -36418,7 +36429,7 @@ module.exports = require("stylis");
|
|
|
36418
36429
|
/***/ ((module) => {
|
|
36419
36430
|
|
|
36420
36431
|
"use strict";
|
|
36421
|
-
module.exports = JSON.parse('{"name":"mermaid","version":"9.1.
|
|
36432
|
+
module.exports = JSON.parse('{"name":"mermaid","version":"9.1.5","description":"Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.","main":"dist/mermaid.core.js","module":"dist/mermaid.esm.min.mjs","exports":{".":{"require":"./dist/mermaid.core.js","import":"./dist/mermaid.esm.min.mjs"},"./*":"./*"},"keywords":["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph"],"scripts":{"build:development":"webpack --mode development --progress --color","build:production":"webpack --mode production --progress --color","build":"concurrently \\"yarn build:development\\" \\"yarn build:production\\"","postbuild":"documentation build src/mermaidAPI.js src/config.js src/defaultConfig.js --shallow -f md --markdown-toc false > docs/Setup.md","build:watch":"yarn build:development --watch","release":"yarn build","lint":"eslint ./ --ext .js,.json,.html","lint:fix":"yarn lint --fix","e2e:depr":"yarn lint && jest e2e --config e2e/jest.config.js","cypress":"cypress run","e2e":"start-server-and-test dev http://localhost:9000/ cypress","e2e-upd":"yarn lint && jest e2e -u --config e2e/jest.config.js","dev":"webpack serve --config ./.webpack/webpack.config.e2e.babel.js","ci":"jest src/.*","test":"yarn lint && jest src/.*","test:watch":"jest --watch src","prepublishOnly":"yarn build && yarn test","prepare":"husky install && yarn build","pre-commit":"lint-staged"},"repository":{"type":"git","url":"https://github.com/knsv/mermaid"},"author":"Knut Sveidqvist","license":"MIT","standard":{"ignore":["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],"globals":["page"]},"dependencies":{"@braintree/sanitize-url":"^6.0.0","d3":"^7.0.0","dagre":"^0.8.5","dagre-d3":"^0.6.4","dompurify":"2.3.10","graphlib":"^2.1.8","khroma":"^2.0.0","moment-mini":"2.24.0","stylis":"^4.0.10"},"devDependencies":{"@applitools/eyes-cypress":"^3.25.7","@babel/core":"^7.14.6","@babel/eslint-parser":"^7.14.7","@babel/preset-env":"^7.14.7","@babel/register":"^7.14.5","@commitlint/cli":"^17.0.0","@commitlint/config-conventional":"^17.0.0","babel-jest":"^28.0.3","babel-loader":"^8.2.2","concurrently":"^7.0.0","coveralls":"^3.0.2","css-to-string-loader":"^0.1.3","cypress":"9.7.0","cypress-image-snapshot":"^4.0.1","documentation":"13.2.0","eslint":"^8.4.1","eslint-config-prettier":"^8.3.0","eslint-plugin-cypress":"^2.12.1","eslint-plugin-html":"^7.1.0","eslint-plugin-jest":"^26.0.0","eslint-plugin-jsdoc":"^39.1.0","eslint-plugin-json":"^3.1.0","eslint-plugin-markdown":"^3.0.0","eslint-plugin-prettier":"^4.0.0","husky":"^8.0.0","identity-obj-proxy":"^3.0.0","jest":"^28.0.3","jest-environment-jsdom":"^28.0.2","jison":"^0.4.18","js-base64":"3.7.2","lint-staged":"^13.0.0","moment":"^2.23.0","path-browserify":"^1.0.1","prettier":"^2.3.2","prettier-plugin-jsdoc":"^0.3.30","start-server-and-test":"^1.12.6","terser-webpack-plugin":"^5.2.4","webpack":"^5.53.0","webpack-cli":"^4.7.2","webpack-dev-server":"^4.3.0","webpack-merge":"^5.8.0","webpack-node-externals":"^3.0.0"},"resolutions":{"d3":"^7.0.0"},"files":["dist"],"sideEffects":["**/*.css","**/*.scss"]}');
|
|
36422
36433
|
|
|
36423
36434
|
/***/ })
|
|
36424
36435
|
|