pxx-vue-quill 1.0.101 → 1.0.103
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/dist/vue-quill.umd.js +134 -127
- package/dist/vue-quill.umd.prod.js +2 -2
- package/package.json +1 -1
package/dist/vue-quill.umd.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* Copyright (c) 2025 Pxx-Team
|
|
9
9
|
* Released under the MIT license
|
|
10
|
-
* Date: 2025-09-10T02:
|
|
10
|
+
* Date: 2025-09-10T02:20:30.800Z
|
|
11
11
|
*/
|
|
12
12
|
(function (global, factory) {
|
|
13
13
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) :
|
|
@@ -18993,11 +18993,11 @@
|
|
|
18993
18993
|
value: true
|
|
18994
18994
|
});
|
|
18995
18995
|
|
|
18996
|
-
var _createClass
|
|
18996
|
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
18997
18997
|
|
|
18998
18998
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
18999
18999
|
|
|
19000
|
-
function _classCallCheck
|
|
19000
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19001
19001
|
|
|
19002
19002
|
var LEFT_ALIGN = 'left';
|
|
19003
19003
|
var CENTER_ALIGN = 'center';
|
|
@@ -19008,7 +19008,7 @@
|
|
|
19008
19008
|
var _this = this,
|
|
19009
19009
|
_alignments;
|
|
19010
19010
|
|
|
19011
|
-
_classCallCheck
|
|
19011
|
+
_classCallCheck(this, DefaultAligner);
|
|
19012
19012
|
|
|
19013
19013
|
this.applyStyle = options.aligner.applyStyle;
|
|
19014
19014
|
this.alignAttribute = options.attribute;
|
|
@@ -19036,7 +19036,7 @@
|
|
|
19036
19036
|
}), _alignments);
|
|
19037
19037
|
}
|
|
19038
19038
|
|
|
19039
|
-
_createClass
|
|
19039
|
+
_createClass(DefaultAligner, [{
|
|
19040
19040
|
key: 'getAlignments',
|
|
19041
19041
|
value: function getAlignments() {
|
|
19042
19042
|
var _this2 = this;
|
|
@@ -19761,148 +19761,156 @@
|
|
|
19761
19761
|
|
|
19762
19762
|
var IframeVideoSpec = {};
|
|
19763
19763
|
|
|
19764
|
-
var UnclickableBlotSpec
|
|
19764
|
+
var UnclickableBlotSpec = {};
|
|
19765
19765
|
|
|
19766
|
-
|
|
19767
|
-
value: true
|
|
19768
|
-
});
|
|
19766
|
+
var hasRequiredUnclickableBlotSpec;
|
|
19769
19767
|
|
|
19770
|
-
|
|
19768
|
+
function requireUnclickableBlotSpec () {
|
|
19769
|
+
if (hasRequiredUnclickableBlotSpec) return UnclickableBlotSpec;
|
|
19770
|
+
hasRequiredUnclickableBlotSpec = 1;
|
|
19771
19771
|
|
|
19772
|
-
|
|
19772
|
+
Object.defineProperty(UnclickableBlotSpec, "__esModule", {
|
|
19773
|
+
value: true
|
|
19774
|
+
});
|
|
19773
19775
|
|
|
19774
|
-
|
|
19776
|
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
19775
19777
|
|
|
19776
|
-
|
|
19778
|
+
var _BlotSpec2 = requireBlotSpec();
|
|
19777
19779
|
|
|
19778
|
-
|
|
19780
|
+
var _BlotSpec3 = _interopRequireDefault(_BlotSpec2);
|
|
19779
19781
|
|
|
19780
|
-
|
|
19782
|
+
var _BlotFormatter = requireBlotFormatter();
|
|
19781
19783
|
|
|
19782
|
-
|
|
19784
|
+
_interopRequireDefault(_BlotFormatter);
|
|
19783
19785
|
|
|
19784
|
-
|
|
19786
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19785
19787
|
|
|
19786
|
-
|
|
19788
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19787
19789
|
|
|
19788
|
-
|
|
19789
|
-
var PROXY_IMAGE_CLASS = 'blot-formatter__proxy-image';
|
|
19790
|
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
19790
19791
|
|
|
19791
|
-
|
|
19792
|
-
_inherits(UnclickableBlotSpec, _BlotSpec);
|
|
19792
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
19793
19793
|
|
|
19794
|
-
|
|
19795
|
-
|
|
19794
|
+
var MOUSE_ENTER_ATTRIBUTE = 'data-blot-formatter-unclickable-bound';
|
|
19795
|
+
var PROXY_IMAGE_CLASS = 'blot-formatter__proxy-image';
|
|
19796
19796
|
|
|
19797
|
-
|
|
19797
|
+
var UnclickableBlotSpec$1 = function (_BlotSpec) {
|
|
19798
|
+
_inherits(UnclickableBlotSpec, _BlotSpec);
|
|
19798
19799
|
|
|
19799
|
-
|
|
19800
|
-
|
|
19801
|
-
unclickable.setAttribute(MOUSE_ENTER_ATTRIBUTE, 'true');
|
|
19802
|
-
unclickable.addEventListener('mouseenter', _this.onMouseEnter);
|
|
19803
|
-
});
|
|
19804
|
-
};
|
|
19800
|
+
function UnclickableBlotSpec(formatter, selector) {
|
|
19801
|
+
_classCallCheck(this, UnclickableBlotSpec);
|
|
19805
19802
|
|
|
19806
|
-
|
|
19807
|
-
var unclickable = event.target;
|
|
19808
|
-
if (!(unclickable instanceof HTMLElement)) {
|
|
19809
|
-
return;
|
|
19810
|
-
}
|
|
19803
|
+
var _this = _possibleConstructorReturn(this, (UnclickableBlotSpec.__proto__ || Object.getPrototypeOf(UnclickableBlotSpec)).call(this, formatter));
|
|
19811
19804
|
|
|
19812
|
-
|
|
19813
|
-
|
|
19814
|
-
|
|
19805
|
+
_this.onTextChange = function () {
|
|
19806
|
+
Array.from(document.querySelectorAll(_this.selector + ':not([' + MOUSE_ENTER_ATTRIBUTE + '])')).forEach(function (unclickable) {
|
|
19807
|
+
unclickable.setAttribute(MOUSE_ENTER_ATTRIBUTE, 'true');
|
|
19808
|
+
unclickable.addEventListener('mouseenter', _this.onMouseEnter);
|
|
19809
|
+
});
|
|
19810
|
+
};
|
|
19815
19811
|
|
|
19816
|
-
|
|
19817
|
-
|
|
19818
|
-
|
|
19819
|
-
|
|
19820
|
-
|
|
19821
|
-
};
|
|
19812
|
+
_this.onMouseEnter = function (event) {
|
|
19813
|
+
var unclickable = event.target;
|
|
19814
|
+
if (!(unclickable instanceof HTMLElement)) {
|
|
19815
|
+
return;
|
|
19816
|
+
}
|
|
19822
19817
|
|
|
19823
|
-
|
|
19824
|
-
|
|
19825
|
-
|
|
19826
|
-
return _this;
|
|
19827
|
-
}
|
|
19818
|
+
_this.nextUnclickable = unclickable;
|
|
19819
|
+
_this.repositionProxyImage(_this.nextUnclickable);
|
|
19820
|
+
};
|
|
19828
19821
|
|
|
19829
|
-
|
|
19830
|
-
|
|
19831
|
-
|
|
19832
|
-
|
|
19833
|
-
|
|
19834
|
-
|
|
19835
|
-
this prevents the click event from overlapping with ImageSpec
|
|
19836
|
-
*/
|
|
19837
|
-
document.body.appendChild(this.createProxyImage());
|
|
19838
|
-
}
|
|
19822
|
+
_this.onProxyImageClick = function () {
|
|
19823
|
+
_this.unclickable = _this.nextUnclickable;
|
|
19824
|
+
_this.nextUnclickable = null;
|
|
19825
|
+
_this.formatter.show(_this);
|
|
19826
|
+
_this.hideProxyImage();
|
|
19827
|
+
};
|
|
19839
19828
|
|
|
19840
|
-
|
|
19841
|
-
|
|
19842
|
-
|
|
19843
|
-
|
|
19844
|
-
|
|
19845
|
-
key: 'getTargetElement',
|
|
19846
|
-
value: function getTargetElement() {
|
|
19847
|
-
return this.unclickable;
|
|
19848
|
-
}
|
|
19849
|
-
}, {
|
|
19850
|
-
key: 'getOverlayElement',
|
|
19851
|
-
value: function getOverlayElement() {
|
|
19852
|
-
return this.unclickable;
|
|
19853
|
-
}
|
|
19854
|
-
}, {
|
|
19855
|
-
key: 'onHide',
|
|
19856
|
-
value: function onHide() {
|
|
19857
|
-
this.hideProxyImage();
|
|
19858
|
-
this.nextUnclickable = null;
|
|
19859
|
-
this.unclickable = null;
|
|
19860
|
-
}
|
|
19861
|
-
}, {
|
|
19862
|
-
key: 'createProxyImage',
|
|
19863
|
-
value: function createProxyImage() {
|
|
19864
|
-
var canvas = document.createElement('canvas');
|
|
19865
|
-
var context = canvas.getContext('2d');
|
|
19866
|
-
context.globalAlpha = 0;
|
|
19867
|
-
context.fillRect(0, 0, 1, 1);
|
|
19868
|
-
|
|
19869
|
-
this.proxyImage = document.createElement('img');
|
|
19870
|
-
this.proxyImage.src = canvas.toDataURL('image/png');
|
|
19871
|
-
this.proxyImage.classList.add(PROXY_IMAGE_CLASS);
|
|
19872
|
-
|
|
19873
|
-
Object.assign(this.proxyImage.style, {
|
|
19874
|
-
position: 'absolute',
|
|
19875
|
-
margin: '0'
|
|
19876
|
-
});
|
|
19829
|
+
_this.selector = selector;
|
|
19830
|
+
_this.unclickable = null;
|
|
19831
|
+
_this.nextUnclickable = null;
|
|
19832
|
+
return _this;
|
|
19833
|
+
}
|
|
19877
19834
|
|
|
19878
|
-
|
|
19879
|
-
|
|
19880
|
-
|
|
19881
|
-
|
|
19882
|
-
|
|
19883
|
-
|
|
19884
|
-
|
|
19885
|
-
|
|
19886
|
-
|
|
19887
|
-
|
|
19888
|
-
|
|
19889
|
-
|
|
19890
|
-
|
|
19891
|
-
|
|
19892
|
-
|
|
19893
|
-
|
|
19894
|
-
|
|
19895
|
-
|
|
19896
|
-
|
|
19897
|
-
|
|
19898
|
-
|
|
19899
|
-
|
|
19900
|
-
|
|
19835
|
+
_createClass(UnclickableBlotSpec, [{
|
|
19836
|
+
key: 'init',
|
|
19837
|
+
value: function init() {
|
|
19838
|
+
if (document.body) {
|
|
19839
|
+
/*
|
|
19840
|
+
it's important that this is attached to the body instead of the root quill element.
|
|
19841
|
+
this prevents the click event from overlapping with ImageSpec
|
|
19842
|
+
*/
|
|
19843
|
+
document.body.appendChild(this.createProxyImage());
|
|
19844
|
+
}
|
|
19845
|
+
|
|
19846
|
+
this.hideProxyImage();
|
|
19847
|
+
this.proxyImage.addEventListener('click', this.onProxyImageClick);
|
|
19848
|
+
this.formatter.quill.on('text-change', this.onTextChange);
|
|
19849
|
+
}
|
|
19850
|
+
}, {
|
|
19851
|
+
key: 'getTargetElement',
|
|
19852
|
+
value: function getTargetElement() {
|
|
19853
|
+
return this.unclickable;
|
|
19854
|
+
}
|
|
19855
|
+
}, {
|
|
19856
|
+
key: 'getOverlayElement',
|
|
19857
|
+
value: function getOverlayElement() {
|
|
19858
|
+
return this.unclickable;
|
|
19859
|
+
}
|
|
19860
|
+
}, {
|
|
19861
|
+
key: 'onHide',
|
|
19862
|
+
value: function onHide() {
|
|
19863
|
+
this.hideProxyImage();
|
|
19864
|
+
this.nextUnclickable = null;
|
|
19865
|
+
this.unclickable = null;
|
|
19866
|
+
}
|
|
19867
|
+
}, {
|
|
19868
|
+
key: 'createProxyImage',
|
|
19869
|
+
value: function createProxyImage() {
|
|
19870
|
+
var canvas = document.createElement('canvas');
|
|
19871
|
+
var context = canvas.getContext('2d');
|
|
19872
|
+
context.globalAlpha = 0;
|
|
19873
|
+
context.fillRect(0, 0, 1, 1);
|
|
19874
|
+
|
|
19875
|
+
this.proxyImage = document.createElement('img');
|
|
19876
|
+
this.proxyImage.src = canvas.toDataURL('image/png');
|
|
19877
|
+
this.proxyImage.classList.add(PROXY_IMAGE_CLASS);
|
|
19878
|
+
|
|
19879
|
+
Object.assign(this.proxyImage.style, {
|
|
19880
|
+
position: 'absolute',
|
|
19881
|
+
margin: '0'
|
|
19882
|
+
});
|
|
19901
19883
|
|
|
19902
|
-
|
|
19903
|
-
|
|
19884
|
+
return this.proxyImage;
|
|
19885
|
+
}
|
|
19886
|
+
}, {
|
|
19887
|
+
key: 'hideProxyImage',
|
|
19888
|
+
value: function hideProxyImage() {
|
|
19889
|
+
Object.assign(this.proxyImage.style, {
|
|
19890
|
+
display: 'none'
|
|
19891
|
+
});
|
|
19892
|
+
}
|
|
19893
|
+
}, {
|
|
19894
|
+
key: 'repositionProxyImage',
|
|
19895
|
+
value: function repositionProxyImage(unclickable) {
|
|
19896
|
+
var rect = unclickable.getBoundingClientRect();
|
|
19897
|
+
|
|
19898
|
+
Object.assign(this.proxyImage.style, {
|
|
19899
|
+
display: 'block',
|
|
19900
|
+
left: rect.left + window.pageXOffset + 'px',
|
|
19901
|
+
top: rect.top + window.pageYOffset + 'px',
|
|
19902
|
+
width: rect.width + 'px',
|
|
19903
|
+
height: rect.height + 'px'
|
|
19904
|
+
});
|
|
19905
|
+
}
|
|
19906
|
+
}]);
|
|
19904
19907
|
|
|
19905
|
-
|
|
19908
|
+
return UnclickableBlotSpec;
|
|
19909
|
+
}(_BlotSpec3.default);
|
|
19910
|
+
|
|
19911
|
+
UnclickableBlotSpec.default = UnclickableBlotSpec$1;
|
|
19912
|
+
return UnclickableBlotSpec;
|
|
19913
|
+
}
|
|
19906
19914
|
|
|
19907
19915
|
var hasRequiredIframeVideoSpec;
|
|
19908
19916
|
|
|
@@ -19914,7 +19922,7 @@
|
|
|
19914
19922
|
value: true
|
|
19915
19923
|
});
|
|
19916
19924
|
|
|
19917
|
-
var _UnclickableBlotSpec2 =
|
|
19925
|
+
var _UnclickableBlotSpec2 = requireUnclickableBlotSpec();
|
|
19918
19926
|
|
|
19919
19927
|
var _UnclickableBlotSpec3 = _interopRequireDefault(_UnclickableBlotSpec2);
|
|
19920
19928
|
|
|
@@ -20141,7 +20149,7 @@
|
|
|
20141
20149
|
}
|
|
20142
20150
|
});
|
|
20143
20151
|
|
|
20144
|
-
var _UnclickableBlotSpec =
|
|
20152
|
+
var _UnclickableBlotSpec = requireUnclickableBlotSpec();
|
|
20145
20153
|
|
|
20146
20154
|
Object.defineProperty(exports, 'UnclickableBlotSpec', {
|
|
20147
20155
|
enumerable: true,
|
|
@@ -20912,11 +20920,10 @@
|
|
|
20912
20920
|
quill.on('selection-change', updateHistoryState);
|
|
20913
20921
|
addLinkClickListener();
|
|
20914
20922
|
const toolbarClickHandler = (event) => {
|
|
20915
|
-
var _a;
|
|
20916
20923
|
const target = event.target;
|
|
20917
20924
|
const clickedEditorContainer = target.closest('.quill-editor-container');
|
|
20918
20925
|
if (clickedEditorContainer) {
|
|
20919
|
-
const currentEditorContainer =
|
|
20926
|
+
const currentEditorContainer = editor.value && editor.value.closest('.quill-editor-container');
|
|
20920
20927
|
if (clickedEditorContainer === currentEditorContainer) {
|
|
20921
20928
|
controlToolbarVisible(true);
|
|
20922
20929
|
}
|