pxx-vue-quill 1.0.171 → 1.0.173
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 +133 -125
- package/dist/vue-quill.umd.prod.js +2 -2
- package/package.json +2 -2
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-10-16T03:
|
|
10
|
+
* Date: 2025-10-16T03:26:08.109Z
|
|
11
11
|
*/
|
|
12
12
|
(function (global, factory) {
|
|
13
13
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) :
|
|
@@ -18994,11 +18994,11 @@
|
|
|
18994
18994
|
value: true
|
|
18995
18995
|
});
|
|
18996
18996
|
|
|
18997
|
-
var _createClass
|
|
18997
|
+
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; }; }();
|
|
18998
18998
|
|
|
18999
18999
|
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; }
|
|
19000
19000
|
|
|
19001
|
-
function _classCallCheck
|
|
19001
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19002
19002
|
|
|
19003
19003
|
var LEFT_ALIGN = 'left';
|
|
19004
19004
|
var CENTER_ALIGN = 'center';
|
|
@@ -19009,7 +19009,7 @@
|
|
|
19009
19009
|
var _this = this,
|
|
19010
19010
|
_alignments;
|
|
19011
19011
|
|
|
19012
|
-
_classCallCheck
|
|
19012
|
+
_classCallCheck(this, DefaultAligner);
|
|
19013
19013
|
|
|
19014
19014
|
this.applyStyle = options.aligner.applyStyle;
|
|
19015
19015
|
this.alignAttribute = options.attribute;
|
|
@@ -19037,7 +19037,7 @@
|
|
|
19037
19037
|
}), _alignments);
|
|
19038
19038
|
}
|
|
19039
19039
|
|
|
19040
|
-
_createClass
|
|
19040
|
+
_createClass(DefaultAligner, [{
|
|
19041
19041
|
key: 'getAlignments',
|
|
19042
19042
|
value: function getAlignments() {
|
|
19043
19043
|
var _this2 = this;
|
|
@@ -19762,148 +19762,156 @@
|
|
|
19762
19762
|
|
|
19763
19763
|
var IframeVideoSpec = {};
|
|
19764
19764
|
|
|
19765
|
-
var UnclickableBlotSpec
|
|
19765
|
+
var UnclickableBlotSpec = {};
|
|
19766
19766
|
|
|
19767
|
-
|
|
19768
|
-
value: true
|
|
19769
|
-
});
|
|
19767
|
+
var hasRequiredUnclickableBlotSpec;
|
|
19770
19768
|
|
|
19771
|
-
|
|
19769
|
+
function requireUnclickableBlotSpec () {
|
|
19770
|
+
if (hasRequiredUnclickableBlotSpec) return UnclickableBlotSpec;
|
|
19771
|
+
hasRequiredUnclickableBlotSpec = 1;
|
|
19772
19772
|
|
|
19773
|
-
|
|
19773
|
+
Object.defineProperty(UnclickableBlotSpec, "__esModule", {
|
|
19774
|
+
value: true
|
|
19775
|
+
});
|
|
19774
19776
|
|
|
19775
|
-
|
|
19777
|
+
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; }; }();
|
|
19776
19778
|
|
|
19777
|
-
|
|
19779
|
+
var _BlotSpec2 = requireBlotSpec();
|
|
19778
19780
|
|
|
19779
|
-
|
|
19781
|
+
var _BlotSpec3 = _interopRequireDefault(_BlotSpec2);
|
|
19780
19782
|
|
|
19781
|
-
|
|
19783
|
+
var _BlotFormatter = requireBlotFormatter();
|
|
19782
19784
|
|
|
19783
|
-
|
|
19785
|
+
_interopRequireDefault(_BlotFormatter);
|
|
19784
19786
|
|
|
19785
|
-
|
|
19787
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19786
19788
|
|
|
19787
|
-
|
|
19789
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19788
19790
|
|
|
19789
|
-
|
|
19790
|
-
var PROXY_IMAGE_CLASS = 'blot-formatter__proxy-image';
|
|
19791
|
+
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; }
|
|
19791
19792
|
|
|
19792
|
-
|
|
19793
|
-
_inherits(UnclickableBlotSpec, _BlotSpec);
|
|
19793
|
+
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; }
|
|
19794
19794
|
|
|
19795
|
-
|
|
19796
|
-
|
|
19795
|
+
var MOUSE_ENTER_ATTRIBUTE = 'data-blot-formatter-unclickable-bound';
|
|
19796
|
+
var PROXY_IMAGE_CLASS = 'blot-formatter__proxy-image';
|
|
19797
19797
|
|
|
19798
|
-
|
|
19798
|
+
var UnclickableBlotSpec$1 = function (_BlotSpec) {
|
|
19799
|
+
_inherits(UnclickableBlotSpec, _BlotSpec);
|
|
19799
19800
|
|
|
19800
|
-
|
|
19801
|
-
|
|
19802
|
-
unclickable.setAttribute(MOUSE_ENTER_ATTRIBUTE, 'true');
|
|
19803
|
-
unclickable.addEventListener('mouseenter', _this.onMouseEnter);
|
|
19804
|
-
});
|
|
19805
|
-
};
|
|
19801
|
+
function UnclickableBlotSpec(formatter, selector) {
|
|
19802
|
+
_classCallCheck(this, UnclickableBlotSpec);
|
|
19806
19803
|
|
|
19807
|
-
|
|
19808
|
-
var unclickable = event.target;
|
|
19809
|
-
if (!(unclickable instanceof HTMLElement)) {
|
|
19810
|
-
return;
|
|
19811
|
-
}
|
|
19804
|
+
var _this = _possibleConstructorReturn(this, (UnclickableBlotSpec.__proto__ || Object.getPrototypeOf(UnclickableBlotSpec)).call(this, formatter));
|
|
19812
19805
|
|
|
19813
|
-
|
|
19814
|
-
|
|
19815
|
-
|
|
19806
|
+
_this.onTextChange = function () {
|
|
19807
|
+
Array.from(document.querySelectorAll(_this.selector + ':not([' + MOUSE_ENTER_ATTRIBUTE + '])')).forEach(function (unclickable) {
|
|
19808
|
+
unclickable.setAttribute(MOUSE_ENTER_ATTRIBUTE, 'true');
|
|
19809
|
+
unclickable.addEventListener('mouseenter', _this.onMouseEnter);
|
|
19810
|
+
});
|
|
19811
|
+
};
|
|
19816
19812
|
|
|
19817
|
-
|
|
19818
|
-
|
|
19819
|
-
|
|
19820
|
-
|
|
19821
|
-
|
|
19822
|
-
};
|
|
19813
|
+
_this.onMouseEnter = function (event) {
|
|
19814
|
+
var unclickable = event.target;
|
|
19815
|
+
if (!(unclickable instanceof HTMLElement)) {
|
|
19816
|
+
return;
|
|
19817
|
+
}
|
|
19823
19818
|
|
|
19824
|
-
|
|
19825
|
-
|
|
19826
|
-
|
|
19827
|
-
return _this;
|
|
19828
|
-
}
|
|
19819
|
+
_this.nextUnclickable = unclickable;
|
|
19820
|
+
_this.repositionProxyImage(_this.nextUnclickable);
|
|
19821
|
+
};
|
|
19829
19822
|
|
|
19830
|
-
|
|
19831
|
-
|
|
19832
|
-
|
|
19833
|
-
|
|
19834
|
-
|
|
19835
|
-
|
|
19836
|
-
this prevents the click event from overlapping with ImageSpec
|
|
19837
|
-
*/
|
|
19838
|
-
document.body.appendChild(this.createProxyImage());
|
|
19839
|
-
}
|
|
19823
|
+
_this.onProxyImageClick = function () {
|
|
19824
|
+
_this.unclickable = _this.nextUnclickable;
|
|
19825
|
+
_this.nextUnclickable = null;
|
|
19826
|
+
_this.formatter.show(_this);
|
|
19827
|
+
_this.hideProxyImage();
|
|
19828
|
+
};
|
|
19840
19829
|
|
|
19841
|
-
|
|
19842
|
-
|
|
19843
|
-
|
|
19844
|
-
|
|
19845
|
-
|
|
19846
|
-
key: 'getTargetElement',
|
|
19847
|
-
value: function getTargetElement() {
|
|
19848
|
-
return this.unclickable;
|
|
19849
|
-
}
|
|
19850
|
-
}, {
|
|
19851
|
-
key: 'getOverlayElement',
|
|
19852
|
-
value: function getOverlayElement() {
|
|
19853
|
-
return this.unclickable;
|
|
19854
|
-
}
|
|
19855
|
-
}, {
|
|
19856
|
-
key: 'onHide',
|
|
19857
|
-
value: function onHide() {
|
|
19858
|
-
this.hideProxyImage();
|
|
19859
|
-
this.nextUnclickable = null;
|
|
19860
|
-
this.unclickable = null;
|
|
19861
|
-
}
|
|
19862
|
-
}, {
|
|
19863
|
-
key: 'createProxyImage',
|
|
19864
|
-
value: function createProxyImage() {
|
|
19865
|
-
var canvas = document.createElement('canvas');
|
|
19866
|
-
var context = canvas.getContext('2d');
|
|
19867
|
-
context.globalAlpha = 0;
|
|
19868
|
-
context.fillRect(0, 0, 1, 1);
|
|
19869
|
-
|
|
19870
|
-
this.proxyImage = document.createElement('img');
|
|
19871
|
-
this.proxyImage.src = canvas.toDataURL('image/png');
|
|
19872
|
-
this.proxyImage.classList.add(PROXY_IMAGE_CLASS);
|
|
19873
|
-
|
|
19874
|
-
Object.assign(this.proxyImage.style, {
|
|
19875
|
-
position: 'absolute',
|
|
19876
|
-
margin: '0'
|
|
19877
|
-
});
|
|
19830
|
+
_this.selector = selector;
|
|
19831
|
+
_this.unclickable = null;
|
|
19832
|
+
_this.nextUnclickable = null;
|
|
19833
|
+
return _this;
|
|
19834
|
+
}
|
|
19878
19835
|
|
|
19879
|
-
|
|
19880
|
-
|
|
19881
|
-
|
|
19882
|
-
|
|
19883
|
-
|
|
19884
|
-
|
|
19885
|
-
|
|
19886
|
-
|
|
19887
|
-
|
|
19888
|
-
|
|
19889
|
-
|
|
19890
|
-
|
|
19891
|
-
|
|
19892
|
-
|
|
19893
|
-
|
|
19894
|
-
|
|
19895
|
-
|
|
19896
|
-
|
|
19897
|
-
|
|
19898
|
-
|
|
19899
|
-
|
|
19900
|
-
|
|
19901
|
-
|
|
19836
|
+
_createClass(UnclickableBlotSpec, [{
|
|
19837
|
+
key: 'init',
|
|
19838
|
+
value: function init() {
|
|
19839
|
+
if (document.body) {
|
|
19840
|
+
/*
|
|
19841
|
+
it's important that this is attached to the body instead of the root quill element.
|
|
19842
|
+
this prevents the click event from overlapping with ImageSpec
|
|
19843
|
+
*/
|
|
19844
|
+
document.body.appendChild(this.createProxyImage());
|
|
19845
|
+
}
|
|
19846
|
+
|
|
19847
|
+
this.hideProxyImage();
|
|
19848
|
+
this.proxyImage.addEventListener('click', this.onProxyImageClick);
|
|
19849
|
+
this.formatter.quill.on('text-change', this.onTextChange);
|
|
19850
|
+
}
|
|
19851
|
+
}, {
|
|
19852
|
+
key: 'getTargetElement',
|
|
19853
|
+
value: function getTargetElement() {
|
|
19854
|
+
return this.unclickable;
|
|
19855
|
+
}
|
|
19856
|
+
}, {
|
|
19857
|
+
key: 'getOverlayElement',
|
|
19858
|
+
value: function getOverlayElement() {
|
|
19859
|
+
return this.unclickable;
|
|
19860
|
+
}
|
|
19861
|
+
}, {
|
|
19862
|
+
key: 'onHide',
|
|
19863
|
+
value: function onHide() {
|
|
19864
|
+
this.hideProxyImage();
|
|
19865
|
+
this.nextUnclickable = null;
|
|
19866
|
+
this.unclickable = null;
|
|
19867
|
+
}
|
|
19868
|
+
}, {
|
|
19869
|
+
key: 'createProxyImage',
|
|
19870
|
+
value: function createProxyImage() {
|
|
19871
|
+
var canvas = document.createElement('canvas');
|
|
19872
|
+
var context = canvas.getContext('2d');
|
|
19873
|
+
context.globalAlpha = 0;
|
|
19874
|
+
context.fillRect(0, 0, 1, 1);
|
|
19875
|
+
|
|
19876
|
+
this.proxyImage = document.createElement('img');
|
|
19877
|
+
this.proxyImage.src = canvas.toDataURL('image/png');
|
|
19878
|
+
this.proxyImage.classList.add(PROXY_IMAGE_CLASS);
|
|
19879
|
+
|
|
19880
|
+
Object.assign(this.proxyImage.style, {
|
|
19881
|
+
position: 'absolute',
|
|
19882
|
+
margin: '0'
|
|
19883
|
+
});
|
|
19902
19884
|
|
|
19903
|
-
|
|
19904
|
-
|
|
19885
|
+
return this.proxyImage;
|
|
19886
|
+
}
|
|
19887
|
+
}, {
|
|
19888
|
+
key: 'hideProxyImage',
|
|
19889
|
+
value: function hideProxyImage() {
|
|
19890
|
+
Object.assign(this.proxyImage.style, {
|
|
19891
|
+
display: 'none'
|
|
19892
|
+
});
|
|
19893
|
+
}
|
|
19894
|
+
}, {
|
|
19895
|
+
key: 'repositionProxyImage',
|
|
19896
|
+
value: function repositionProxyImage(unclickable) {
|
|
19897
|
+
var rect = unclickable.getBoundingClientRect();
|
|
19898
|
+
|
|
19899
|
+
Object.assign(this.proxyImage.style, {
|
|
19900
|
+
display: 'block',
|
|
19901
|
+
left: rect.left + window.pageXOffset + 'px',
|
|
19902
|
+
top: rect.top + window.pageYOffset + 'px',
|
|
19903
|
+
width: rect.width + 'px',
|
|
19904
|
+
height: rect.height + 'px'
|
|
19905
|
+
});
|
|
19906
|
+
}
|
|
19907
|
+
}]);
|
|
19905
19908
|
|
|
19906
|
-
|
|
19909
|
+
return UnclickableBlotSpec;
|
|
19910
|
+
}(_BlotSpec3.default);
|
|
19911
|
+
|
|
19912
|
+
UnclickableBlotSpec.default = UnclickableBlotSpec$1;
|
|
19913
|
+
return UnclickableBlotSpec;
|
|
19914
|
+
}
|
|
19907
19915
|
|
|
19908
19916
|
var hasRequiredIframeVideoSpec;
|
|
19909
19917
|
|
|
@@ -19915,7 +19923,7 @@
|
|
|
19915
19923
|
value: true
|
|
19916
19924
|
});
|
|
19917
19925
|
|
|
19918
|
-
var _UnclickableBlotSpec2 =
|
|
19926
|
+
var _UnclickableBlotSpec2 = requireUnclickableBlotSpec();
|
|
19919
19927
|
|
|
19920
19928
|
var _UnclickableBlotSpec3 = _interopRequireDefault(_UnclickableBlotSpec2);
|
|
19921
19929
|
|
|
@@ -20142,7 +20150,7 @@
|
|
|
20142
20150
|
}
|
|
20143
20151
|
});
|
|
20144
20152
|
|
|
20145
|
-
var _UnclickableBlotSpec =
|
|
20153
|
+
var _UnclickableBlotSpec = requireUnclickableBlotSpec();
|
|
20146
20154
|
|
|
20147
20155
|
Object.defineProperty(exports, 'UnclickableBlotSpec', {
|
|
20148
20156
|
enumerable: true,
|