Skip to content

Commit

Permalink
chore(release): 0.7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
humyfred committed Jun 7, 2022
1 parent 56d96cc commit 5a74b0c
Show file tree
Hide file tree
Showing 15 changed files with 75 additions and 43 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [0.7.4](https://github.com/Tencent/cherry-markdown/compare/v0.7.3...v0.7.4) (2022-06-07)


### Bug Fixes

* 删除线配置失效,顺便优化注释 ([b819667](https://github.com/Tencent/cherry-markdown/commit/b819667cd908ef89e1f5f7daf8cf974d0a4addf8))
* 只读模式下出现了两个问题(1、只读模式下宽度变成50%了;2、只读模式下可以编辑图片尺寸) ([ff46352](https://github.com/Tencent/cherry-markdown/commit/ff46352d2709af3bf5784f9ea8812bf8d0c9d614)), closes [#246](https://github.com/Tencent/cherry-markdown/issues/246)

### [0.7.3](https://github.com/Tencent/cherry-markdown/compare/v0.7.2...v0.7.3) (2022-05-26)

### [0.7.1](https://github.com/Tencent/cherry-markdown/compare/v0.7.0...v0.7.1) (2022-05-10)
Expand Down
2 changes: 1 addition & 1 deletion dist/cherry-markdown.core.common.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/cherry-markdown.core.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/cherry-markdown.engine.core.common.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/cherry-markdown.engine.core.esm.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/cherry-markdown.engine.core.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/cherry-markdown.esm.js

Large diffs are not rendered by default.

92 changes: 58 additions & 34 deletions dist/cherry-markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -22490,10 +22490,15 @@
}, {
key: "rule",
value: function rule() {
var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
config: undefined
},
config = _ref2.config;

/** @type {Partial<import('~types/syntax').BasicHookRegexpRule>} */
var ret = {};

if (this.needWhitespace) {
if (!!config.needWhitespace) {
ret = {
begin: '(^|[\\s])\\~T\\~T',
end: '\\~T\\~T(?=\\s|$)',
Expand Down Expand Up @@ -39950,7 +39955,7 @@
return MyersDiff;
}();

function mitt(n){return {all:n=n||new Map,on:function(t,e){var i=n.get(t);i&&i.push(e)||n.set(t,[e]);},off:function(t,e){var i=n.get(t);i&&i.splice(i.indexOf(e)>>>0,1);},emit:function(t,e){(n.get(t)||[]).slice().map(function(n){n(e);}),(n.get("*")||[]).slice().map(function(n){n(t,e);});}}}
function mitt(n){return {all:n=n||new Map,on:function(t,e){var i=n.get(t);i?i.push(e):n.set(t,[e]);},off:function(t,e){var i=n.get(t);i&&(e?i.splice(i.indexOf(e)>>>0,1):n.set(t,[]));},emit:function(t,e){var i=n.get(t);i&&i.slice().map(function(n){n(e);}),(i=n.get("*"))&&i.slice().map(function(n){n(t,e);});}}}

/**
* 事件管理
Expand Down Expand Up @@ -48967,20 +48972,16 @@
_createClass(Previewer, [{
key: "init",
value: function init(editor) {
var _context, _context2;

/**
* @property
* @private
* @type {boolean} 禁用滚动事件监听
*/
this.disableScrollListener = false;
this.bindScroll();
this.editor = editor; // 非必要操作无脑延时一下

setTimeout$2(bind$5(_context = this.bindDrag).call(_context, this), 100);

setTimeout$2(bind$5(_context2 = this.$initPreviewerBubble).call(_context2, this), 100);
this.editor = editor;
this.bindDrag();
this.$initPreviewerBubble();
}
}, {
key: "$initPreviewerBubble",
Expand Down Expand Up @@ -49058,9 +49059,9 @@
editorMaskDom = _this$options.editorMaskDom,
previewerMaskDom = _this$options.previewerMaskDom,
virtualLineDom = _this$options.virtualDragLineDom;
virtualLineDom.style.height = "".concat(editorHeight, "px");
virtualLineDom.style.top = "".concat(editorTop, "px");
virtualLineDom.style.left = "".concat(previewerLeft, "px");
virtualLineDom.style.bottom = '0px';
editorMaskDom.style.height = "".concat(editorHeight, "px");
editorMaskDom.style.top = "".concat(editorTop, "px");
editorMaskDom.style.left = '0px';
Expand Down Expand Up @@ -49117,7 +49118,7 @@
key: "bindDrag",
value: function bindDrag() {
var _this2 = this,
_context3;
_context;

var dragLineMouseMove = function dragLineMouseMove(mouseMoveEvent) {
// 阻止事件冒泡
Expand Down Expand Up @@ -49235,7 +49236,7 @@
};

addEvent(this.options.virtualDragLineDom, 'mousedown', dragLineMouseDown, false);
addEvent(window, 'resize', bind$5(_context3 = this.syncVirtualLayoutFromReal).call(_context3, this), false);
addEvent(window, 'resize', bind$5(_context = this.syncVirtualLayoutFromReal).call(_context, this), false);
this.setRealLayout();
}
}, {
Expand Down Expand Up @@ -49387,10 +49388,10 @@

if (/^(width|height)$/i.test(name)) {
if (isNaN(value)) {
var _context4;
var _context2;

ret.style = ret.style ? ret.style : [];
ret.style.push(concat$5(_context4 = "".concat(name, ":")).call(_context4, value));
ret.style.push(concat$5(_context2 = "".concat(name, ":")).call(_context2, value));
continue;
}
}
Expand Down Expand Up @@ -49503,10 +49504,10 @@
var resSign;

forEach$3(list).call(list, function (listItem, i) {
var _context5;
var _context3;

// hash精度校准
if (slice$3(_context5 = listItem.sign).call(_context5, 0, 12) === slice$3(sign).call(sign, 0, 12) && i > signIndex) {
if (slice$3(_context3 = listItem.sign).call(_context3, 0, 12) === slice$3(sign).call(sign, 0, 12) && i > signIndex) {
resSign = {
index: i > signIndex ? i : signIndex,
sign: sign
Expand Down Expand Up @@ -49566,21 +49567,21 @@
Logger.log(res);
this.$dealWithMyersDiffResult(res, oldHtmlList.list, newHtmlList.list, domContainer);
} else if (newHtmlList.list.length && !oldHtmlList.list.length) {
var _context6;
var _context4;

// 全新增
Logger.log('add all');

forEach$3(_context6 = newHtmlList.list).call(_context6, function (piece) {
forEach$3(_context4 = newHtmlList.list).call(_context4, function (piece) {
domContainer.appendChild(piece.dom);
});
} else if (!newHtmlList.list.length && oldHtmlList.list.length) {
var _context7;
var _context5;

// 全删除
Logger.log('delete all');

forEach$3(_context7 = oldHtmlList.list).call(_context7, function (piece) {
forEach$3(_context5 = oldHtmlList.list).call(_context5, function (piece) {
domContainer.removeChild(piece.dom);
});
}
Expand Down Expand Up @@ -49720,19 +49721,19 @@
}, {
key: "afterUpdate",
value: function afterUpdate() {
var _context8;
var _context6;

map$3(_context8 = this.options.afterUpdateCallBack).call(_context8, function (fn) {
map$3(_context6 = this.options.afterUpdateCallBack).call(_context6, function (fn) {
return fn();
});
}
}, {
key: "registerAfterUpdate",
value: function registerAfterUpdate(fn) {
if (isArray$3(fn)) {
var _context9;
var _context7;

this.options.afterUpdateCallBack = concat$5(_context9 = this.options.afterUpdateCallBack).call(_context9, fn);
this.options.afterUpdateCallBack = concat$5(_context7 = this.options.afterUpdateCallBack).call(_context7, fn);
} else if (!fn) {
throw new Error('[markdown error]: Previewer registerAfterUpdate params are undefined');
} else {
Expand Down Expand Up @@ -84843,12 +84844,32 @@

},
fontEmphasis: {
allowWhitespace: false // 是否允许首尾空格

/**
* 是否允许首尾空格
* 首尾、前后的定义: 语法前**语法首+内容+语法尾**语法后
* 例:
* true:
* __ hello __ ====> <strong> hello </strong>
* __hello__ ====> <strong>hello</strong>
* false:
* __ hello __ ====> <em>_ hello _</em>
* __hello__ ====> <strong>hello</strong>
*/
allowWhitespace: false
},
strikethrough: {
needWhitespace: false // 是否必须有首位空格

/**
* 是否必须有前后空格
* 首尾、前后的定义: 语法前**语法首+内容+语法尾**语法后
* 例:
* true:
* hello wor~~l~~d ====> hello wor~~l~~d
* hello wor ~~l~~ d ====> hello wor <del>l</del> d
* false:
* hello wor~~l~~d ====> hello wor<del>l</del>d
* hello wor ~~l~~ d ====> hello wor <del>l</del> d
*/
needWhitespace: false
},
mathBlock: {
engine: 'MathJax',
Expand Down Expand Up @@ -85145,7 +85166,7 @@
});
}

var VERSION = "0.7.3-b47e2944";
var VERSION = "0.7.4-56d96cc2";
var CherryStatic = /*#__PURE__*/function () {
function CherryStatic() {
_classCallCheck(this, CherryStatic);
Expand Down Expand Up @@ -85253,9 +85274,17 @@
_this.options.engine.global.urlProcessor = urlProcessorProxy(_this.options.engine.global.urlProcessor);
}

_this.status = {
toolbar: 'show',
previewer: 'show',
editor: 'show'
};

if (_this.options.isPreviewOnly) {
_this.options.toolbars.showToolbar = false;
_this.options.editor.defaultModel = 'previewOnly';
_this.status.editor = 'hide';
_this.status.toolbar = 'hide';
}
/**
* @property
Expand Down Expand Up @@ -85288,11 +85317,6 @@
var _context2,
_this2 = this;

this.status = {
toolbar: 'show',
previewer: 'show',
editor: 'show'
};
var mountEl = this.options.id ? document.getElementById(this.options.id) : this.options.el;

if (!mountEl) {
Expand Down
2 changes: 1 addition & 1 deletion dist/cherry-markdown.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/cherry-markdown.min.js

Large diffs are not rendered by default.

Binary file modified dist/fonts/ch-icon.eot
Binary file not shown.
Binary file modified dist/fonts/ch-icon.ttf
Binary file not shown.
Binary file modified dist/fonts/ch-icon.woff
Binary file not shown.
Binary file modified dist/fonts/ch-icon.woff2
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "cherry-markdown",
"license": "Apache-2.0",
"version": "0.7.3",
"version": "0.7.4",
"description": "a new markdown editor",
"repository": {
"type": "git",
Expand Down

0 comments on commit 5a74b0c

Please sign in to comment.