mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-14 06:43:25 +08:00
build: update dist files
This commit is contained in:
parent
469a726285
commit
8ed7d12a08
17
dist/mermaid.core.js
vendored
17
dist/mermaid.core.js
vendored
@ -17166,9 +17166,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "apply", function() { return apply; });
|
||||
/* harmony import */ var _mermaidAPI__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../mermaidAPI */ "./src/mermaidAPI.js");
|
||||
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../config */ "./src/config.js");
|
||||
/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/common */ "./src/diagrams/common/common.js");
|
||||
/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
|
||||
|
||||
/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
|
||||
|
||||
|
||||
|
||||
@ -17316,9 +17314,9 @@ var parseMessage = function parseMessage(str) {
|
||||
|
||||
var message = {
|
||||
text: _str.replace(/^[:]?(?:no)?wrap:/, '').trim(),
|
||||
wrap: _str.match(/^[:]?(?:no)?wrap:/) === null ? _common_common__WEBPACK_IMPORTED_MODULE_2__["default"].hasBreaks(_str) || undefined : _str.match(/^[:]?wrap:/) !== null ? true : _str.match(/^[:]?nowrap:/) !== null ? false : undefined
|
||||
wrap: _str.match(/^[:]?wrap:/) !== null ? true : _str.match(/^[:]?nowrap:/) !== null ? false : undefined
|
||||
};
|
||||
_logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug('parseMessage:', message);
|
||||
_logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('parseMessage:', message);
|
||||
return message;
|
||||
};
|
||||
var LINETYPE = {
|
||||
@ -17758,7 +17756,6 @@ var drawNote = function drawNote(elem, noteModel) {
|
||||
textObj.anchor = conf.noteAlign;
|
||||
textObj.textMargin = conf.noteMargin;
|
||||
textObj.valign = conf.noteAlign;
|
||||
textObj.wrap = true;
|
||||
var textElem = Object(_svgDraw__WEBPACK_IMPORTED_MODULE_1__["drawText"])(g, textObj);
|
||||
var textHeight = Math.round(textElem.map(function (te) {
|
||||
return (te._groups || te)[0][0].getBBox().height;
|
||||
@ -17811,8 +17808,7 @@ var drawMessage = function drawMessage(g, msgModel) {
|
||||
starty = msgModel.starty,
|
||||
message = msgModel.message,
|
||||
type = msgModel.type,
|
||||
sequenceIndex = msgModel.sequenceIndex,
|
||||
wrap = msgModel.wrap;
|
||||
sequenceIndex = msgModel.sequenceIndex;
|
||||
var lines = _common_common__WEBPACK_IMPORTED_MODULE_4__["default"].splitBreaks(message).length;
|
||||
var textDims = _utils__WEBPACK_IMPORTED_MODULE_7__["default"].calculateTextDimensions(message, messageFont(conf));
|
||||
var lineHeight = textDims.height / lines;
|
||||
@ -17832,7 +17828,6 @@ var drawMessage = function drawMessage(g, msgModel) {
|
||||
textObj.valign = conf.messageAlign;
|
||||
textObj.textMargin = conf.wrapPadding;
|
||||
textObj.tspan = false;
|
||||
textObj.wrap = wrap;
|
||||
Object(_svgDraw__WEBPACK_IMPORTED_MODULE_1__["drawText"])(g, textObj);
|
||||
var totalOffset = textDims.height - 10;
|
||||
var textWidth = textDims.width;
|
||||
@ -18348,12 +18343,12 @@ var buildMessageModel = function buildMessageModel(msg, actors) {
|
||||
var toIdx = fromBounds[0] < toBounds[0] ? 0 : 1;
|
||||
var allBounds = fromBounds.concat(toBounds);
|
||||
var boundedWidth = Math.abs(toBounds[toIdx] - fromBounds[fromIdx]);
|
||||
var msgDims = _utils__WEBPACK_IMPORTED_MODULE_7__["default"].calculateTextDimensions(msg.message, messageFont(conf));
|
||||
|
||||
if (msg.wrap && msg.message) {
|
||||
msg.message = _utils__WEBPACK_IMPORTED_MODULE_7__["default"].wrapLabel(msg.message, Math.max(boundedWidth + 2 * conf.wrapPadding, conf.width), messageFont(conf));
|
||||
}
|
||||
|
||||
var msgDims = _utils__WEBPACK_IMPORTED_MODULE_7__["default"].calculateTextDimensions(msg.message, messageFont(conf));
|
||||
return {
|
||||
width: Math.max(msg.wrap ? 0 : msgDims.width + 2 * conf.wrapPadding, boundedWidth + 2 * conf.wrapPadding, conf.width),
|
||||
height: 0,
|
||||
@ -18545,7 +18540,7 @@ var drawRect = function drawRect(elem, rectData) {
|
||||
var drawText = function drawText(elem, textData) {
|
||||
var prevTextHeight = 0,
|
||||
textHeight = 0;
|
||||
var lines = textData.wrap ? textData.text.split(_common_common__WEBPACK_IMPORTED_MODULE_0__["default"].lineBreakRegex) : [textData.text.replace(_common_common__WEBPACK_IMPORTED_MODULE_0__["default"].lineBreakRegex, ' ')];
|
||||
var lines = textData.text.split(_common_common__WEBPACK_IMPORTED_MODULE_0__["default"].lineBreakRegex);
|
||||
var textElems = [];
|
||||
var dy = 0;
|
||||
|
||||
|
2
dist/mermaid.core.js.map
vendored
2
dist/mermaid.core.js.map
vendored
File diff suppressed because one or more lines are too long
19
dist/mermaid.js
vendored
19
dist/mermaid.js
vendored
@ -30304,7 +30304,7 @@ function addHtmlLabel(root, node) {
|
||||
var client = div.node().getBoundingClientRect();
|
||||
fo
|
||||
.attr("width", client.width)
|
||||
.attr("height", client.height);
|
||||
.attr("height", client.height);
|
||||
|
||||
return fo;
|
||||
}
|
||||
@ -65528,9 +65528,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "apply", function() { return apply; });
|
||||
/* harmony import */ var _mermaidAPI__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../mermaidAPI */ "./src/mermaidAPI.js");
|
||||
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../config */ "./src/config.js");
|
||||
/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/common */ "./src/diagrams/common/common.js");
|
||||
/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
|
||||
|
||||
/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
|
||||
|
||||
|
||||
|
||||
@ -65678,9 +65676,9 @@ var parseMessage = function parseMessage(str) {
|
||||
|
||||
var message = {
|
||||
text: _str.replace(/^[:]?(?:no)?wrap:/, '').trim(),
|
||||
wrap: _str.match(/^[:]?(?:no)?wrap:/) === null ? _common_common__WEBPACK_IMPORTED_MODULE_2__["default"].hasBreaks(_str) || undefined : _str.match(/^[:]?wrap:/) !== null ? true : _str.match(/^[:]?nowrap:/) !== null ? false : undefined
|
||||
wrap: _str.match(/^[:]?wrap:/) !== null ? true : _str.match(/^[:]?nowrap:/) !== null ? false : undefined
|
||||
};
|
||||
_logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug('parseMessage:', message);
|
||||
_logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('parseMessage:', message);
|
||||
return message;
|
||||
};
|
||||
var LINETYPE = {
|
||||
@ -66119,7 +66117,6 @@ var drawNote = function drawNote(elem, noteModel) {
|
||||
textObj.anchor = conf.noteAlign;
|
||||
textObj.textMargin = conf.noteMargin;
|
||||
textObj.valign = conf.noteAlign;
|
||||
textObj.wrap = true;
|
||||
var textElem = Object(_svgDraw__WEBPACK_IMPORTED_MODULE_1__["drawText"])(g, textObj);
|
||||
var textHeight = Math.round(textElem.map(function (te) {
|
||||
return (te._groups || te)[0][0].getBBox().height;
|
||||
@ -66172,8 +66169,7 @@ var drawMessage = function drawMessage(g, msgModel) {
|
||||
starty = msgModel.starty,
|
||||
message = msgModel.message,
|
||||
type = msgModel.type,
|
||||
sequenceIndex = msgModel.sequenceIndex,
|
||||
wrap = msgModel.wrap;
|
||||
sequenceIndex = msgModel.sequenceIndex;
|
||||
var lines = _common_common__WEBPACK_IMPORTED_MODULE_4__["default"].splitBreaks(message).length;
|
||||
var textDims = _utils__WEBPACK_IMPORTED_MODULE_7__["default"].calculateTextDimensions(message, messageFont(conf));
|
||||
var lineHeight = textDims.height / lines;
|
||||
@ -66193,7 +66189,6 @@ var drawMessage = function drawMessage(g, msgModel) {
|
||||
textObj.valign = conf.messageAlign;
|
||||
textObj.textMargin = conf.wrapPadding;
|
||||
textObj.tspan = false;
|
||||
textObj.wrap = wrap;
|
||||
Object(_svgDraw__WEBPACK_IMPORTED_MODULE_1__["drawText"])(g, textObj);
|
||||
var totalOffset = textDims.height - 10;
|
||||
var textWidth = textDims.width;
|
||||
@ -66709,12 +66704,12 @@ var buildMessageModel = function buildMessageModel(msg, actors) {
|
||||
var toIdx = fromBounds[0] < toBounds[0] ? 0 : 1;
|
||||
var allBounds = fromBounds.concat(toBounds);
|
||||
var boundedWidth = Math.abs(toBounds[toIdx] - fromBounds[fromIdx]);
|
||||
var msgDims = _utils__WEBPACK_IMPORTED_MODULE_7__["default"].calculateTextDimensions(msg.message, messageFont(conf));
|
||||
|
||||
if (msg.wrap && msg.message) {
|
||||
msg.message = _utils__WEBPACK_IMPORTED_MODULE_7__["default"].wrapLabel(msg.message, Math.max(boundedWidth + 2 * conf.wrapPadding, conf.width), messageFont(conf));
|
||||
}
|
||||
|
||||
var msgDims = _utils__WEBPACK_IMPORTED_MODULE_7__["default"].calculateTextDimensions(msg.message, messageFont(conf));
|
||||
return {
|
||||
width: Math.max(msg.wrap ? 0 : msgDims.width + 2 * conf.wrapPadding, boundedWidth + 2 * conf.wrapPadding, conf.width),
|
||||
height: 0,
|
||||
@ -66906,7 +66901,7 @@ var drawRect = function drawRect(elem, rectData) {
|
||||
var drawText = function drawText(elem, textData) {
|
||||
var prevTextHeight = 0,
|
||||
textHeight = 0;
|
||||
var lines = textData.wrap ? textData.text.split(_common_common__WEBPACK_IMPORTED_MODULE_0__["default"].lineBreakRegex) : [textData.text.replace(_common_common__WEBPACK_IMPORTED_MODULE_0__["default"].lineBreakRegex, ' ')];
|
||||
var lines = textData.text.split(_common_common__WEBPACK_IMPORTED_MODULE_0__["default"].lineBreakRegex);
|
||||
var textElems = [];
|
||||
var dy = 0;
|
||||
|
||||
|
2
dist/mermaid.js.map
vendored
2
dist/mermaid.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/mermaid.min.js
vendored
2
dist/mermaid.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/mermaid.min.js.map
vendored
2
dist/mermaid.min.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user