pxx-vue-quill 1.0.82 → 1.0.84
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 +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-08T03:
|
|
10
|
+
* Date: 2025-09-08T03:59:56.688Z
|
|
11
11
|
*/
|
|
12
12
|
(function (global, factory) {
|
|
13
13
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) :
|
|
@@ -18781,11 +18781,11 @@
|
|
|
18781
18781
|
value: true
|
|
18782
18782
|
});
|
|
18783
18783
|
|
|
18784
|
-
var _createClass
|
|
18784
|
+
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; }; }();
|
|
18785
18785
|
|
|
18786
18786
|
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; }
|
|
18787
18787
|
|
|
18788
|
-
function _classCallCheck
|
|
18788
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
18789
18789
|
|
|
18790
18790
|
var LEFT_ALIGN = 'left';
|
|
18791
18791
|
var CENTER_ALIGN = 'center';
|
|
@@ -18796,7 +18796,7 @@
|
|
|
18796
18796
|
var _this = this,
|
|
18797
18797
|
_alignments;
|
|
18798
18798
|
|
|
18799
|
-
_classCallCheck
|
|
18799
|
+
_classCallCheck(this, DefaultAligner);
|
|
18800
18800
|
|
|
18801
18801
|
this.applyStyle = options.aligner.applyStyle;
|
|
18802
18802
|
this.alignAttribute = options.attribute;
|
|
@@ -18824,7 +18824,7 @@
|
|
|
18824
18824
|
}), _alignments);
|
|
18825
18825
|
}
|
|
18826
18826
|
|
|
18827
|
-
_createClass
|
|
18827
|
+
_createClass(DefaultAligner, [{
|
|
18828
18828
|
key: 'getAlignments',
|
|
18829
18829
|
value: function getAlignments() {
|
|
18830
18830
|
var _this2 = this;
|
|
@@ -19549,148 +19549,156 @@
|
|
|
19549
19549
|
|
|
19550
19550
|
var IframeVideoSpec = {};
|
|
19551
19551
|
|
|
19552
|
-
var UnclickableBlotSpec
|
|
19552
|
+
var UnclickableBlotSpec = {};
|
|
19553
19553
|
|
|
19554
|
-
|
|
19555
|
-
value: true
|
|
19556
|
-
});
|
|
19554
|
+
var hasRequiredUnclickableBlotSpec;
|
|
19557
19555
|
|
|
19558
|
-
|
|
19556
|
+
function requireUnclickableBlotSpec () {
|
|
19557
|
+
if (hasRequiredUnclickableBlotSpec) return UnclickableBlotSpec;
|
|
19558
|
+
hasRequiredUnclickableBlotSpec = 1;
|
|
19559
19559
|
|
|
19560
|
-
|
|
19560
|
+
Object.defineProperty(UnclickableBlotSpec, "__esModule", {
|
|
19561
|
+
value: true
|
|
19562
|
+
});
|
|
19561
19563
|
|
|
19562
|
-
|
|
19564
|
+
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; }; }();
|
|
19563
19565
|
|
|
19564
|
-
|
|
19566
|
+
var _BlotSpec2 = requireBlotSpec();
|
|
19565
19567
|
|
|
19566
|
-
|
|
19568
|
+
var _BlotSpec3 = _interopRequireDefault(_BlotSpec2);
|
|
19567
19569
|
|
|
19568
|
-
|
|
19570
|
+
var _BlotFormatter = requireBlotFormatter();
|
|
19569
19571
|
|
|
19570
|
-
|
|
19572
|
+
_interopRequireDefault(_BlotFormatter);
|
|
19571
19573
|
|
|
19572
|
-
|
|
19574
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19573
19575
|
|
|
19574
|
-
|
|
19576
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19575
19577
|
|
|
19576
|
-
|
|
19577
|
-
var PROXY_IMAGE_CLASS = 'blot-formatter__proxy-image';
|
|
19578
|
+
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; }
|
|
19578
19579
|
|
|
19579
|
-
|
|
19580
|
-
_inherits(UnclickableBlotSpec, _BlotSpec);
|
|
19580
|
+
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; }
|
|
19581
19581
|
|
|
19582
|
-
|
|
19583
|
-
|
|
19582
|
+
var MOUSE_ENTER_ATTRIBUTE = 'data-blot-formatter-unclickable-bound';
|
|
19583
|
+
var PROXY_IMAGE_CLASS = 'blot-formatter__proxy-image';
|
|
19584
19584
|
|
|
19585
|
-
|
|
19585
|
+
var UnclickableBlotSpec$1 = function (_BlotSpec) {
|
|
19586
|
+
_inherits(UnclickableBlotSpec, _BlotSpec);
|
|
19586
19587
|
|
|
19587
|
-
|
|
19588
|
-
|
|
19589
|
-
unclickable.setAttribute(MOUSE_ENTER_ATTRIBUTE, 'true');
|
|
19590
|
-
unclickable.addEventListener('mouseenter', _this.onMouseEnter);
|
|
19591
|
-
});
|
|
19592
|
-
};
|
|
19588
|
+
function UnclickableBlotSpec(formatter, selector) {
|
|
19589
|
+
_classCallCheck(this, UnclickableBlotSpec);
|
|
19593
19590
|
|
|
19594
|
-
|
|
19595
|
-
var unclickable = event.target;
|
|
19596
|
-
if (!(unclickable instanceof HTMLElement)) {
|
|
19597
|
-
return;
|
|
19598
|
-
}
|
|
19591
|
+
var _this = _possibleConstructorReturn(this, (UnclickableBlotSpec.__proto__ || Object.getPrototypeOf(UnclickableBlotSpec)).call(this, formatter));
|
|
19599
19592
|
|
|
19600
|
-
|
|
19601
|
-
|
|
19602
|
-
|
|
19593
|
+
_this.onTextChange = function () {
|
|
19594
|
+
Array.from(document.querySelectorAll(_this.selector + ':not([' + MOUSE_ENTER_ATTRIBUTE + '])')).forEach(function (unclickable) {
|
|
19595
|
+
unclickable.setAttribute(MOUSE_ENTER_ATTRIBUTE, 'true');
|
|
19596
|
+
unclickable.addEventListener('mouseenter', _this.onMouseEnter);
|
|
19597
|
+
});
|
|
19598
|
+
};
|
|
19603
19599
|
|
|
19604
|
-
|
|
19605
|
-
|
|
19606
|
-
|
|
19607
|
-
|
|
19608
|
-
|
|
19609
|
-
};
|
|
19600
|
+
_this.onMouseEnter = function (event) {
|
|
19601
|
+
var unclickable = event.target;
|
|
19602
|
+
if (!(unclickable instanceof HTMLElement)) {
|
|
19603
|
+
return;
|
|
19604
|
+
}
|
|
19610
19605
|
|
|
19611
|
-
|
|
19612
|
-
|
|
19613
|
-
|
|
19614
|
-
return _this;
|
|
19615
|
-
}
|
|
19606
|
+
_this.nextUnclickable = unclickable;
|
|
19607
|
+
_this.repositionProxyImage(_this.nextUnclickable);
|
|
19608
|
+
};
|
|
19616
19609
|
|
|
19617
|
-
|
|
19618
|
-
|
|
19619
|
-
|
|
19620
|
-
|
|
19621
|
-
|
|
19622
|
-
|
|
19623
|
-
this prevents the click event from overlapping with ImageSpec
|
|
19624
|
-
*/
|
|
19625
|
-
document.body.appendChild(this.createProxyImage());
|
|
19626
|
-
}
|
|
19610
|
+
_this.onProxyImageClick = function () {
|
|
19611
|
+
_this.unclickable = _this.nextUnclickable;
|
|
19612
|
+
_this.nextUnclickable = null;
|
|
19613
|
+
_this.formatter.show(_this);
|
|
19614
|
+
_this.hideProxyImage();
|
|
19615
|
+
};
|
|
19627
19616
|
|
|
19628
|
-
|
|
19629
|
-
|
|
19630
|
-
|
|
19631
|
-
|
|
19632
|
-
|
|
19633
|
-
key: 'getTargetElement',
|
|
19634
|
-
value: function getTargetElement() {
|
|
19635
|
-
return this.unclickable;
|
|
19636
|
-
}
|
|
19637
|
-
}, {
|
|
19638
|
-
key: 'getOverlayElement',
|
|
19639
|
-
value: function getOverlayElement() {
|
|
19640
|
-
return this.unclickable;
|
|
19641
|
-
}
|
|
19642
|
-
}, {
|
|
19643
|
-
key: 'onHide',
|
|
19644
|
-
value: function onHide() {
|
|
19645
|
-
this.hideProxyImage();
|
|
19646
|
-
this.nextUnclickable = null;
|
|
19647
|
-
this.unclickable = null;
|
|
19648
|
-
}
|
|
19649
|
-
}, {
|
|
19650
|
-
key: 'createProxyImage',
|
|
19651
|
-
value: function createProxyImage() {
|
|
19652
|
-
var canvas = document.createElement('canvas');
|
|
19653
|
-
var context = canvas.getContext('2d');
|
|
19654
|
-
context.globalAlpha = 0;
|
|
19655
|
-
context.fillRect(0, 0, 1, 1);
|
|
19656
|
-
|
|
19657
|
-
this.proxyImage = document.createElement('img');
|
|
19658
|
-
this.proxyImage.src = canvas.toDataURL('image/png');
|
|
19659
|
-
this.proxyImage.classList.add(PROXY_IMAGE_CLASS);
|
|
19660
|
-
|
|
19661
|
-
Object.assign(this.proxyImage.style, {
|
|
19662
|
-
position: 'absolute',
|
|
19663
|
-
margin: '0'
|
|
19664
|
-
});
|
|
19617
|
+
_this.selector = selector;
|
|
19618
|
+
_this.unclickable = null;
|
|
19619
|
+
_this.nextUnclickable = null;
|
|
19620
|
+
return _this;
|
|
19621
|
+
}
|
|
19665
19622
|
|
|
19666
|
-
|
|
19667
|
-
|
|
19668
|
-
|
|
19669
|
-
|
|
19670
|
-
|
|
19671
|
-
|
|
19672
|
-
|
|
19673
|
-
|
|
19674
|
-
|
|
19675
|
-
|
|
19676
|
-
|
|
19677
|
-
|
|
19678
|
-
|
|
19679
|
-
|
|
19680
|
-
|
|
19681
|
-
|
|
19682
|
-
|
|
19683
|
-
|
|
19684
|
-
|
|
19685
|
-
|
|
19686
|
-
|
|
19687
|
-
|
|
19688
|
-
|
|
19623
|
+
_createClass(UnclickableBlotSpec, [{
|
|
19624
|
+
key: 'init',
|
|
19625
|
+
value: function init() {
|
|
19626
|
+
if (document.body) {
|
|
19627
|
+
/*
|
|
19628
|
+
it's important that this is attached to the body instead of the root quill element.
|
|
19629
|
+
this prevents the click event from overlapping with ImageSpec
|
|
19630
|
+
*/
|
|
19631
|
+
document.body.appendChild(this.createProxyImage());
|
|
19632
|
+
}
|
|
19633
|
+
|
|
19634
|
+
this.hideProxyImage();
|
|
19635
|
+
this.proxyImage.addEventListener('click', this.onProxyImageClick);
|
|
19636
|
+
this.formatter.quill.on('text-change', this.onTextChange);
|
|
19637
|
+
}
|
|
19638
|
+
}, {
|
|
19639
|
+
key: 'getTargetElement',
|
|
19640
|
+
value: function getTargetElement() {
|
|
19641
|
+
return this.unclickable;
|
|
19642
|
+
}
|
|
19643
|
+
}, {
|
|
19644
|
+
key: 'getOverlayElement',
|
|
19645
|
+
value: function getOverlayElement() {
|
|
19646
|
+
return this.unclickable;
|
|
19647
|
+
}
|
|
19648
|
+
}, {
|
|
19649
|
+
key: 'onHide',
|
|
19650
|
+
value: function onHide() {
|
|
19651
|
+
this.hideProxyImage();
|
|
19652
|
+
this.nextUnclickable = null;
|
|
19653
|
+
this.unclickable = null;
|
|
19654
|
+
}
|
|
19655
|
+
}, {
|
|
19656
|
+
key: 'createProxyImage',
|
|
19657
|
+
value: function createProxyImage() {
|
|
19658
|
+
var canvas = document.createElement('canvas');
|
|
19659
|
+
var context = canvas.getContext('2d');
|
|
19660
|
+
context.globalAlpha = 0;
|
|
19661
|
+
context.fillRect(0, 0, 1, 1);
|
|
19662
|
+
|
|
19663
|
+
this.proxyImage = document.createElement('img');
|
|
19664
|
+
this.proxyImage.src = canvas.toDataURL('image/png');
|
|
19665
|
+
this.proxyImage.classList.add(PROXY_IMAGE_CLASS);
|
|
19666
|
+
|
|
19667
|
+
Object.assign(this.proxyImage.style, {
|
|
19668
|
+
position: 'absolute',
|
|
19669
|
+
margin: '0'
|
|
19670
|
+
});
|
|
19689
19671
|
|
|
19690
|
-
|
|
19691
|
-
|
|
19672
|
+
return this.proxyImage;
|
|
19673
|
+
}
|
|
19674
|
+
}, {
|
|
19675
|
+
key: 'hideProxyImage',
|
|
19676
|
+
value: function hideProxyImage() {
|
|
19677
|
+
Object.assign(this.proxyImage.style, {
|
|
19678
|
+
display: 'none'
|
|
19679
|
+
});
|
|
19680
|
+
}
|
|
19681
|
+
}, {
|
|
19682
|
+
key: 'repositionProxyImage',
|
|
19683
|
+
value: function repositionProxyImage(unclickable) {
|
|
19684
|
+
var rect = unclickable.getBoundingClientRect();
|
|
19685
|
+
|
|
19686
|
+
Object.assign(this.proxyImage.style, {
|
|
19687
|
+
display: 'block',
|
|
19688
|
+
left: rect.left + window.pageXOffset + 'px',
|
|
19689
|
+
top: rect.top + window.pageYOffset + 'px',
|
|
19690
|
+
width: rect.width + 'px',
|
|
19691
|
+
height: rect.height + 'px'
|
|
19692
|
+
});
|
|
19693
|
+
}
|
|
19694
|
+
}]);
|
|
19692
19695
|
|
|
19693
|
-
|
|
19696
|
+
return UnclickableBlotSpec;
|
|
19697
|
+
}(_BlotSpec3.default);
|
|
19698
|
+
|
|
19699
|
+
UnclickableBlotSpec.default = UnclickableBlotSpec$1;
|
|
19700
|
+
return UnclickableBlotSpec;
|
|
19701
|
+
}
|
|
19694
19702
|
|
|
19695
19703
|
var hasRequiredIframeVideoSpec;
|
|
19696
19704
|
|
|
@@ -19702,7 +19710,7 @@
|
|
|
19702
19710
|
value: true
|
|
19703
19711
|
});
|
|
19704
19712
|
|
|
19705
|
-
var _UnclickableBlotSpec2 =
|
|
19713
|
+
var _UnclickableBlotSpec2 = requireUnclickableBlotSpec();
|
|
19706
19714
|
|
|
19707
19715
|
var _UnclickableBlotSpec3 = _interopRequireDefault(_UnclickableBlotSpec2);
|
|
19708
19716
|
|
|
@@ -19929,7 +19937,7 @@
|
|
|
19929
19937
|
}
|
|
19930
19938
|
});
|
|
19931
19939
|
|
|
19932
|
-
var _UnclickableBlotSpec =
|
|
19940
|
+
var _UnclickableBlotSpec = requireUnclickableBlotSpec();
|
|
19933
19941
|
|
|
19934
19942
|
Object.defineProperty(exports, 'UnclickableBlotSpec', {
|
|
19935
19943
|
enumerable: true,
|