pxx-vue-quill 1.0.160 → 1.0.161
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 +145 -137
- 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-15T01:
|
|
10
|
+
* Date: 2025-09-15T01:45:46.446Z
|
|
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$1 = 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$1(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$1(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$1(DefaultAligner, [{
|
|
19041
19041
|
key: 'getAlignments',
|
|
19042
19042
|
value: function getAlignments() {
|
|
19043
19043
|
var _this2 = this;
|
|
@@ -19346,31 +19346,31 @@
|
|
|
19346
19346
|
value: true
|
|
19347
19347
|
});
|
|
19348
19348
|
|
|
19349
|
-
var _createClass
|
|
19349
|
+
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; }; }();
|
|
19350
19350
|
|
|
19351
19351
|
var _Action2 = requireAction();
|
|
19352
19352
|
|
|
19353
|
-
var _Action3 = _interopRequireDefault
|
|
19353
|
+
var _Action3 = _interopRequireDefault(_Action2);
|
|
19354
19354
|
|
|
19355
|
-
var _BlotFormatter
|
|
19355
|
+
var _BlotFormatter = requireBlotFormatter();
|
|
19356
19356
|
|
|
19357
|
-
_interopRequireDefault
|
|
19357
|
+
_interopRequireDefault(_BlotFormatter);
|
|
19358
19358
|
|
|
19359
|
-
function _interopRequireDefault
|
|
19359
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19360
19360
|
|
|
19361
|
-
function _classCallCheck
|
|
19361
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19362
19362
|
|
|
19363
|
-
function _possibleConstructorReturn
|
|
19363
|
+
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; }
|
|
19364
19364
|
|
|
19365
|
-
function _inherits
|
|
19365
|
+
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; }
|
|
19366
19366
|
|
|
19367
19367
|
var ResizeAction = function (_Action) {
|
|
19368
|
-
_inherits
|
|
19368
|
+
_inherits(ResizeAction, _Action);
|
|
19369
19369
|
|
|
19370
19370
|
function ResizeAction(formatter) {
|
|
19371
|
-
_classCallCheck
|
|
19371
|
+
_classCallCheck(this, ResizeAction);
|
|
19372
19372
|
|
|
19373
|
-
var _this = _possibleConstructorReturn
|
|
19373
|
+
var _this = _possibleConstructorReturn(this, (ResizeAction.__proto__ || Object.getPrototypeOf(ResizeAction)).call(this, formatter));
|
|
19374
19374
|
|
|
19375
19375
|
_this.onMouseDown = function (event) {
|
|
19376
19376
|
if (!(event.target instanceof HTMLElement)) {
|
|
@@ -19442,7 +19442,7 @@
|
|
|
19442
19442
|
return _this;
|
|
19443
19443
|
}
|
|
19444
19444
|
|
|
19445
|
-
_createClass
|
|
19445
|
+
_createClass(ResizeAction, [{
|
|
19446
19446
|
key: 'onCreate',
|
|
19447
19447
|
value: function onCreate() {
|
|
19448
19448
|
this.formatter.overlay.appendChild(this.topLeftHandle);
|
|
@@ -19754,148 +19754,156 @@
|
|
|
19754
19754
|
|
|
19755
19755
|
var IframeVideoSpec = {};
|
|
19756
19756
|
|
|
19757
|
-
var UnclickableBlotSpec
|
|
19757
|
+
var UnclickableBlotSpec = {};
|
|
19758
19758
|
|
|
19759
|
-
|
|
19760
|
-
value: true
|
|
19761
|
-
});
|
|
19759
|
+
var hasRequiredUnclickableBlotSpec;
|
|
19762
19760
|
|
|
19763
|
-
|
|
19761
|
+
function requireUnclickableBlotSpec () {
|
|
19762
|
+
if (hasRequiredUnclickableBlotSpec) return UnclickableBlotSpec;
|
|
19763
|
+
hasRequiredUnclickableBlotSpec = 1;
|
|
19764
19764
|
|
|
19765
|
-
|
|
19765
|
+
Object.defineProperty(UnclickableBlotSpec, "__esModule", {
|
|
19766
|
+
value: true
|
|
19767
|
+
});
|
|
19766
19768
|
|
|
19767
|
-
|
|
19769
|
+
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; }; }();
|
|
19768
19770
|
|
|
19769
|
-
|
|
19771
|
+
var _BlotSpec2 = requireBlotSpec();
|
|
19770
19772
|
|
|
19771
|
-
|
|
19773
|
+
var _BlotSpec3 = _interopRequireDefault(_BlotSpec2);
|
|
19772
19774
|
|
|
19773
|
-
|
|
19775
|
+
var _BlotFormatter = requireBlotFormatter();
|
|
19774
19776
|
|
|
19775
|
-
|
|
19777
|
+
_interopRequireDefault(_BlotFormatter);
|
|
19776
19778
|
|
|
19777
|
-
|
|
19779
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19778
19780
|
|
|
19779
|
-
|
|
19781
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19780
19782
|
|
|
19781
|
-
|
|
19782
|
-
var PROXY_IMAGE_CLASS = 'blot-formatter__proxy-image';
|
|
19783
|
+
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; }
|
|
19783
19784
|
|
|
19784
|
-
|
|
19785
|
-
_inherits(UnclickableBlotSpec, _BlotSpec);
|
|
19785
|
+
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; }
|
|
19786
19786
|
|
|
19787
|
-
|
|
19788
|
-
|
|
19787
|
+
var MOUSE_ENTER_ATTRIBUTE = 'data-blot-formatter-unclickable-bound';
|
|
19788
|
+
var PROXY_IMAGE_CLASS = 'blot-formatter__proxy-image';
|
|
19789
19789
|
|
|
19790
|
-
|
|
19790
|
+
var UnclickableBlotSpec$1 = function (_BlotSpec) {
|
|
19791
|
+
_inherits(UnclickableBlotSpec, _BlotSpec);
|
|
19791
19792
|
|
|
19792
|
-
|
|
19793
|
-
|
|
19794
|
-
unclickable.setAttribute(MOUSE_ENTER_ATTRIBUTE, 'true');
|
|
19795
|
-
unclickable.addEventListener('mouseenter', _this.onMouseEnter);
|
|
19796
|
-
});
|
|
19797
|
-
};
|
|
19793
|
+
function UnclickableBlotSpec(formatter, selector) {
|
|
19794
|
+
_classCallCheck(this, UnclickableBlotSpec);
|
|
19798
19795
|
|
|
19799
|
-
|
|
19800
|
-
var unclickable = event.target;
|
|
19801
|
-
if (!(unclickable instanceof HTMLElement)) {
|
|
19802
|
-
return;
|
|
19803
|
-
}
|
|
19796
|
+
var _this = _possibleConstructorReturn(this, (UnclickableBlotSpec.__proto__ || Object.getPrototypeOf(UnclickableBlotSpec)).call(this, formatter));
|
|
19804
19797
|
|
|
19805
|
-
|
|
19806
|
-
|
|
19807
|
-
|
|
19798
|
+
_this.onTextChange = function () {
|
|
19799
|
+
Array.from(document.querySelectorAll(_this.selector + ':not([' + MOUSE_ENTER_ATTRIBUTE + '])')).forEach(function (unclickable) {
|
|
19800
|
+
unclickable.setAttribute(MOUSE_ENTER_ATTRIBUTE, 'true');
|
|
19801
|
+
unclickable.addEventListener('mouseenter', _this.onMouseEnter);
|
|
19802
|
+
});
|
|
19803
|
+
};
|
|
19808
19804
|
|
|
19809
|
-
|
|
19810
|
-
|
|
19811
|
-
|
|
19812
|
-
|
|
19813
|
-
|
|
19814
|
-
};
|
|
19805
|
+
_this.onMouseEnter = function (event) {
|
|
19806
|
+
var unclickable = event.target;
|
|
19807
|
+
if (!(unclickable instanceof HTMLElement)) {
|
|
19808
|
+
return;
|
|
19809
|
+
}
|
|
19815
19810
|
|
|
19816
|
-
|
|
19817
|
-
|
|
19818
|
-
|
|
19819
|
-
return _this;
|
|
19820
|
-
}
|
|
19811
|
+
_this.nextUnclickable = unclickable;
|
|
19812
|
+
_this.repositionProxyImage(_this.nextUnclickable);
|
|
19813
|
+
};
|
|
19821
19814
|
|
|
19822
|
-
|
|
19823
|
-
|
|
19824
|
-
|
|
19825
|
-
|
|
19826
|
-
|
|
19827
|
-
|
|
19828
|
-
this prevents the click event from overlapping with ImageSpec
|
|
19829
|
-
*/
|
|
19830
|
-
document.body.appendChild(this.createProxyImage());
|
|
19831
|
-
}
|
|
19815
|
+
_this.onProxyImageClick = function () {
|
|
19816
|
+
_this.unclickable = _this.nextUnclickable;
|
|
19817
|
+
_this.nextUnclickable = null;
|
|
19818
|
+
_this.formatter.show(_this);
|
|
19819
|
+
_this.hideProxyImage();
|
|
19820
|
+
};
|
|
19832
19821
|
|
|
19833
|
-
|
|
19834
|
-
|
|
19835
|
-
|
|
19836
|
-
|
|
19837
|
-
|
|
19838
|
-
key: 'getTargetElement',
|
|
19839
|
-
value: function getTargetElement() {
|
|
19840
|
-
return this.unclickable;
|
|
19841
|
-
}
|
|
19842
|
-
}, {
|
|
19843
|
-
key: 'getOverlayElement',
|
|
19844
|
-
value: function getOverlayElement() {
|
|
19845
|
-
return this.unclickable;
|
|
19846
|
-
}
|
|
19847
|
-
}, {
|
|
19848
|
-
key: 'onHide',
|
|
19849
|
-
value: function onHide() {
|
|
19850
|
-
this.hideProxyImage();
|
|
19851
|
-
this.nextUnclickable = null;
|
|
19852
|
-
this.unclickable = null;
|
|
19853
|
-
}
|
|
19854
|
-
}, {
|
|
19855
|
-
key: 'createProxyImage',
|
|
19856
|
-
value: function createProxyImage() {
|
|
19857
|
-
var canvas = document.createElement('canvas');
|
|
19858
|
-
var context = canvas.getContext('2d');
|
|
19859
|
-
context.globalAlpha = 0;
|
|
19860
|
-
context.fillRect(0, 0, 1, 1);
|
|
19861
|
-
|
|
19862
|
-
this.proxyImage = document.createElement('img');
|
|
19863
|
-
this.proxyImage.src = canvas.toDataURL('image/png');
|
|
19864
|
-
this.proxyImage.classList.add(PROXY_IMAGE_CLASS);
|
|
19865
|
-
|
|
19866
|
-
Object.assign(this.proxyImage.style, {
|
|
19867
|
-
position: 'absolute',
|
|
19868
|
-
margin: '0'
|
|
19869
|
-
});
|
|
19822
|
+
_this.selector = selector;
|
|
19823
|
+
_this.unclickable = null;
|
|
19824
|
+
_this.nextUnclickable = null;
|
|
19825
|
+
return _this;
|
|
19826
|
+
}
|
|
19870
19827
|
|
|
19871
|
-
|
|
19872
|
-
|
|
19873
|
-
|
|
19874
|
-
|
|
19875
|
-
|
|
19876
|
-
|
|
19877
|
-
|
|
19878
|
-
|
|
19879
|
-
|
|
19880
|
-
|
|
19881
|
-
|
|
19882
|
-
|
|
19883
|
-
|
|
19884
|
-
|
|
19885
|
-
|
|
19886
|
-
|
|
19887
|
-
|
|
19888
|
-
|
|
19889
|
-
|
|
19890
|
-
|
|
19891
|
-
|
|
19892
|
-
|
|
19893
|
-
|
|
19828
|
+
_createClass(UnclickableBlotSpec, [{
|
|
19829
|
+
key: 'init',
|
|
19830
|
+
value: function init() {
|
|
19831
|
+
if (document.body) {
|
|
19832
|
+
/*
|
|
19833
|
+
it's important that this is attached to the body instead of the root quill element.
|
|
19834
|
+
this prevents the click event from overlapping with ImageSpec
|
|
19835
|
+
*/
|
|
19836
|
+
document.body.appendChild(this.createProxyImage());
|
|
19837
|
+
}
|
|
19838
|
+
|
|
19839
|
+
this.hideProxyImage();
|
|
19840
|
+
this.proxyImage.addEventListener('click', this.onProxyImageClick);
|
|
19841
|
+
this.formatter.quill.on('text-change', this.onTextChange);
|
|
19842
|
+
}
|
|
19843
|
+
}, {
|
|
19844
|
+
key: 'getTargetElement',
|
|
19845
|
+
value: function getTargetElement() {
|
|
19846
|
+
return this.unclickable;
|
|
19847
|
+
}
|
|
19848
|
+
}, {
|
|
19849
|
+
key: 'getOverlayElement',
|
|
19850
|
+
value: function getOverlayElement() {
|
|
19851
|
+
return this.unclickable;
|
|
19852
|
+
}
|
|
19853
|
+
}, {
|
|
19854
|
+
key: 'onHide',
|
|
19855
|
+
value: function onHide() {
|
|
19856
|
+
this.hideProxyImage();
|
|
19857
|
+
this.nextUnclickable = null;
|
|
19858
|
+
this.unclickable = null;
|
|
19859
|
+
}
|
|
19860
|
+
}, {
|
|
19861
|
+
key: 'createProxyImage',
|
|
19862
|
+
value: function createProxyImage() {
|
|
19863
|
+
var canvas = document.createElement('canvas');
|
|
19864
|
+
var context = canvas.getContext('2d');
|
|
19865
|
+
context.globalAlpha = 0;
|
|
19866
|
+
context.fillRect(0, 0, 1, 1);
|
|
19867
|
+
|
|
19868
|
+
this.proxyImage = document.createElement('img');
|
|
19869
|
+
this.proxyImage.src = canvas.toDataURL('image/png');
|
|
19870
|
+
this.proxyImage.classList.add(PROXY_IMAGE_CLASS);
|
|
19871
|
+
|
|
19872
|
+
Object.assign(this.proxyImage.style, {
|
|
19873
|
+
position: 'absolute',
|
|
19874
|
+
margin: '0'
|
|
19875
|
+
});
|
|
19894
19876
|
|
|
19895
|
-
|
|
19896
|
-
|
|
19877
|
+
return this.proxyImage;
|
|
19878
|
+
}
|
|
19879
|
+
}, {
|
|
19880
|
+
key: 'hideProxyImage',
|
|
19881
|
+
value: function hideProxyImage() {
|
|
19882
|
+
Object.assign(this.proxyImage.style, {
|
|
19883
|
+
display: 'none'
|
|
19884
|
+
});
|
|
19885
|
+
}
|
|
19886
|
+
}, {
|
|
19887
|
+
key: 'repositionProxyImage',
|
|
19888
|
+
value: function repositionProxyImage(unclickable) {
|
|
19889
|
+
var rect = unclickable.getBoundingClientRect();
|
|
19890
|
+
|
|
19891
|
+
Object.assign(this.proxyImage.style, {
|
|
19892
|
+
display: 'block',
|
|
19893
|
+
left: rect.left + window.pageXOffset + 'px',
|
|
19894
|
+
top: rect.top + window.pageYOffset + 'px',
|
|
19895
|
+
width: rect.width + 'px',
|
|
19896
|
+
height: rect.height + 'px'
|
|
19897
|
+
});
|
|
19898
|
+
}
|
|
19899
|
+
}]);
|
|
19897
19900
|
|
|
19898
|
-
|
|
19901
|
+
return UnclickableBlotSpec;
|
|
19902
|
+
}(_BlotSpec3.default);
|
|
19903
|
+
|
|
19904
|
+
UnclickableBlotSpec.default = UnclickableBlotSpec$1;
|
|
19905
|
+
return UnclickableBlotSpec;
|
|
19906
|
+
}
|
|
19899
19907
|
|
|
19900
19908
|
var hasRequiredIframeVideoSpec;
|
|
19901
19909
|
|
|
@@ -19907,7 +19915,7 @@
|
|
|
19907
19915
|
value: true
|
|
19908
19916
|
});
|
|
19909
19917
|
|
|
19910
|
-
var _UnclickableBlotSpec2 =
|
|
19918
|
+
var _UnclickableBlotSpec2 = requireUnclickableBlotSpec();
|
|
19911
19919
|
|
|
19912
19920
|
var _UnclickableBlotSpec3 = _interopRequireDefault(_UnclickableBlotSpec2);
|
|
19913
19921
|
|
|
@@ -20134,7 +20142,7 @@
|
|
|
20134
20142
|
}
|
|
20135
20143
|
});
|
|
20136
20144
|
|
|
20137
|
-
var _UnclickableBlotSpec =
|
|
20145
|
+
var _UnclickableBlotSpec = requireUnclickableBlotSpec();
|
|
20138
20146
|
|
|
20139
20147
|
Object.defineProperty(exports, 'UnclickableBlotSpec', {
|
|
20140
20148
|
enumerable: true,
|