pxx-vue-quill 1.0.158 → 1.0.159

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.
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * Copyright (c) 2025 Pxx-Team
9
9
  * Released under the MIT license
10
- * Date: 2025-09-11T19:42:07.160Z
10
+ * Date: 2025-09-11T19:44:23.962Z
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$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; }; }();
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$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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$1(this, DefaultAligner);
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$1(DefaultAligner, [{
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$1 = {};
19765
+ var UnclickableBlotSpec = {};
19766
19766
 
19767
- Object.defineProperty(UnclickableBlotSpec$1, "__esModule", {
19768
- value: true
19769
- });
19767
+ var hasRequiredUnclickableBlotSpec;
19770
19768
 
19771
- 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; }; }();
19769
+ function requireUnclickableBlotSpec () {
19770
+ if (hasRequiredUnclickableBlotSpec) return UnclickableBlotSpec;
19771
+ hasRequiredUnclickableBlotSpec = 1;
19772
19772
 
19773
- var _BlotSpec2 = requireBlotSpec();
19773
+ Object.defineProperty(UnclickableBlotSpec, "__esModule", {
19774
+ value: true
19775
+ });
19774
19776
 
19775
- var _BlotSpec3 = _interopRequireDefault(_BlotSpec2);
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
- var _BlotFormatter = requireBlotFormatter();
19779
+ var _BlotSpec2 = requireBlotSpec();
19778
19780
 
19779
- _interopRequireDefault(_BlotFormatter);
19781
+ var _BlotSpec3 = _interopRequireDefault(_BlotSpec2);
19780
19782
 
19781
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19783
+ var _BlotFormatter = requireBlotFormatter();
19782
19784
 
19783
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19785
+ _interopRequireDefault(_BlotFormatter);
19784
19786
 
19785
- 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; }
19787
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19786
19788
 
19787
- 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; }
19789
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19788
19790
 
19789
- var MOUSE_ENTER_ATTRIBUTE = 'data-blot-formatter-unclickable-bound';
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
- var UnclickableBlotSpec = function (_BlotSpec) {
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
- function UnclickableBlotSpec(formatter, selector) {
19796
- _classCallCheck(this, UnclickableBlotSpec);
19795
+ var MOUSE_ENTER_ATTRIBUTE = 'data-blot-formatter-unclickable-bound';
19796
+ var PROXY_IMAGE_CLASS = 'blot-formatter__proxy-image';
19797
19797
 
19798
- var _this = _possibleConstructorReturn(this, (UnclickableBlotSpec.__proto__ || Object.getPrototypeOf(UnclickableBlotSpec)).call(this, formatter));
19798
+ var UnclickableBlotSpec$1 = function (_BlotSpec) {
19799
+ _inherits(UnclickableBlotSpec, _BlotSpec);
19799
19800
 
19800
- _this.onTextChange = function () {
19801
- Array.from(document.querySelectorAll(_this.selector + ':not([' + MOUSE_ENTER_ATTRIBUTE + '])')).forEach(function (unclickable) {
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
- _this.onMouseEnter = function (event) {
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
- _this.nextUnclickable = unclickable;
19814
- _this.repositionProxyImage(_this.nextUnclickable);
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
- _this.onProxyImageClick = function () {
19818
- _this.unclickable = _this.nextUnclickable;
19819
- _this.nextUnclickable = null;
19820
- _this.formatter.show(_this);
19821
- _this.hideProxyImage();
19822
- };
19813
+ _this.onMouseEnter = function (event) {
19814
+ var unclickable = event.target;
19815
+ if (!(unclickable instanceof HTMLElement)) {
19816
+ return;
19817
+ }
19823
19818
 
19824
- _this.selector = selector;
19825
- _this.unclickable = null;
19826
- _this.nextUnclickable = null;
19827
- return _this;
19828
- }
19819
+ _this.nextUnclickable = unclickable;
19820
+ _this.repositionProxyImage(_this.nextUnclickable);
19821
+ };
19829
19822
 
19830
- _createClass(UnclickableBlotSpec, [{
19831
- key: 'init',
19832
- value: function init() {
19833
- if (document.body) {
19834
- /*
19835
- it's important that this is attached to the body instead of the root quill element.
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
- this.hideProxyImage();
19842
- this.proxyImage.addEventListener('click', this.onProxyImageClick);
19843
- this.formatter.quill.on('text-change', this.onTextChange);
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
- return this.proxyImage;
19880
- }
19881
- }, {
19882
- key: 'hideProxyImage',
19883
- value: function hideProxyImage() {
19884
- Object.assign(this.proxyImage.style, {
19885
- display: 'none'
19886
- });
19887
- }
19888
- }, {
19889
- key: 'repositionProxyImage',
19890
- value: function repositionProxyImage(unclickable) {
19891
- var rect = unclickable.getBoundingClientRect();
19892
-
19893
- Object.assign(this.proxyImage.style, {
19894
- display: 'block',
19895
- left: rect.left + window.pageXOffset + 'px',
19896
- top: rect.top + window.pageYOffset + 'px',
19897
- width: rect.width + 'px',
19898
- height: rect.height + 'px'
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
- return UnclickableBlotSpec;
19904
- }(_BlotSpec3.default);
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
- UnclickableBlotSpec$1.default = UnclickableBlotSpec;
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 = UnclickableBlotSpec$1;
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 = UnclickableBlotSpec$1;
20153
+ var _UnclickableBlotSpec = requireUnclickableBlotSpec();
20146
20154
 
20147
20155
  Object.defineProperty(exports, 'UnclickableBlotSpec', {
20148
20156
  enumerable: true,